committing random WM stuff

This commit is contained in:
2026-03-24 00:03:59 +01:00
parent a7c0018684
commit cb15e83811
70 changed files with 5428 additions and 1 deletions

18
alacritty Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch alacritty with alt config
CONFIG="$HOME/.config/hypr/alacritty/alacritty.toml"
if [ "$1" == "-f" ]; then
alacritty --class 'alacritty-float,alacritty-float' --config-file "$CONFIG"
elif [ "$1" == "-F" ]; then
alacritty --class 'alacritty-fullscreen,alacritty-fullscreen' --config-file "$CONFIG" \
-o window.startup_mode="'Fullscreen'" \
window.padding.x=30 window.padding.y=30 \
window.opacity=0.95 font.size=14
else
alacritty --config-file "$CONFIG" ${@}
fi

20
asroot Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Directory containing the script
DIR="$HOME/.config/hypr"
# Rofi sudo askpass helper
export SUDO_ASKPASS="$DIR/scripts/rofi_askpass"
# Check if a command is provided
if [ -z "$1" ]; then
echo "Usage: $0 <command>"
exit 1
fi
# Execute the application with sudo
if ! sudo -E -A "$@"; then
echo "Failed to execute command with sudo."
exit 1
fi

56
brightness Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Script To Manage Brightness For Archcraft (in Wayland).
iDIR="$HOME/.config/hypr/mako/icons"
# Get brightness
get_backlight() {
LIGHT=$(printf "%.0f\n" `light -G`)
echo "${LIGHT}%"
}
# Get icons
get_icon() {
backlight="$(get_backlight)"
current="${backlight%%%}"
if [[ ("$current" -ge "0") && ("$current" -le "20") ]]; then
icon="$iDIR"/brightness-20.png
elif [[ ("$current" -ge "20") && ("$current" -le "40") ]]; then
icon="$iDIR"/brightness-40.png
elif [[ ("$current" -ge "40") && ("$current" -le "60") ]]; then
icon="$iDIR"/brightness-60.png
elif [[ ("$current" -ge "60") && ("$current" -le "80") ]]; then
icon="$iDIR"/brightness-80.png
elif [[ ("$current" -ge "80") && ("$current" -le "100") ]]; then
icon="$iDIR"/brightness-100.png
fi
}
# Notify
notify_user() {
notify-send -h string:x-canonical-private-synchronous:sys-notify-backlight -u low -i "$icon" "Brightness : $(get_backlight)"
}
# Increase brightness
inc_backlight() {
light -A 5 && get_icon && notify_user
}
# Decrease brightness
dec_backlight() {
light -U 5 && get_icon && notify_user
}
# Execute accordingly
if [[ "$1" == "--get" ]]; then
get_backlight
elif [[ "$1" == "--inc" ]]; then
inc_backlight
elif [[ "$1" == "--dec" ]]; then
dec_backlight
else
get_backlight
fi

23
colorpicker Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Simple Script To Pick Color Quickly.
#color=$(grim -g "`slurp -b 00000000 -p`" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- | tail -n1 | cut -d' ' -f4)
color=`$(which hyprpicker)`
image=/tmp/${color}.png
main() {
if [[ "$color" ]]; then
# copy color code to clipboard
echo $color | tr -d "\n" | wl-copy
# generate preview
convert -size 48x48 xc:"$color" ${image}
# notify about it
notify-send -h string:x-canonical-private-synchronous:sys-notify-picker -u low -i ${image} "$color, copied to clipboard."
fi
}
# Run the script
main

View File

@@ -5,7 +5,9 @@ SRC="/home/belar/.config"
DST_DIR=/mnt/nas_belar/rsync/config-backup/
# Sync the source directory to the destination directory
/usr/bin/rsync -CERrltm --delete "${SRC}" "${DST_DIR}"
#/usr/bin/rsync -CERrltm --delete "${SRC}" "${DST_DIR}"
/usr/bin/rsync -CERrltm --delete "${SRC}" truenas-belar:/mnt/DATA/USER_DATA/belar/rsync
# Change to the Git repository directory
cd $DST_DIR

23
foot Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch terminal with alt config
# Get Colors
DIR="$HOME/.config/hypr"
background="`cat $DIR/rofi/shared/colors.rasi | grep 'background:' | cut -d':' -f2 | tr -d ' '\;`"
accent="`cat $DIR/rofi/shared/colors.rasi | grep 'selected:' | cut -d':' -f2 | tr -d ' '\;`"
CONFIG="$HOME/.config/hypr/foot/foot.ini"
if [ "$1" == "-f" ]; then
foot --app-id='foot-float' --config="$CONFIG"
elif [ "$1" == "-F" ]; then
foot --fullscreen --app-id='foot-full' --font="Iosevka Nerd Font:size=14" --override=pad=35x35 --config="$CONFIG"
elif [ "$1" == "-s" ]; then
foot --app-id='foot-float' --config="$CONFIG" \
--window-size-pixels=$(slurp -b ${background:1}CC -c ${accent:1}ff -s ${accent:1}0D -w 2 -f "%wx%h")
else
foot --config="$CONFIG" ${@}
fi

21
gtkthemes Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Set GTK Themes, Icons, Cursor and Fonts
THEME='Manhattan'
ICONS='Luv-Folders-Dark'
FONT='Noto Sans 9'
CURSOR='Qogirr-Dark'
SCHEMA='gsettings set org.gnome.desktop.interface'
apply_themes () {
${SCHEMA} gtk-theme "$THEME"
${SCHEMA} icon-theme "$ICONS"
${SCHEMA} cursor-theme "$CURSOR"
${SCHEMA} font-name "$FONT"
}
apply_themes

21
kitty Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch kitty with hypr config
# hypr directory
DIR="$HOME/.config/hypr"
CONFIG="$DIR/kitty/kitty.conf"
if [ "$1" == "-f" ]; then
kitty --class 'kitty-float' --config "$CONFIG"
elif [ "$1" == "-F" ]; then
kitty --class 'kitty-fullscreen' --config "$CONFIG" \
--start-as fullscreen \
--override 'window_padding_width=30' \
--override 'font_size=14' \
--override 'background_opacity=0.95'
else
kitty --config "$CONFIG" ${@}
fi

72
lockscreen Executable file
View File

@@ -0,0 +1,72 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Source Theme file
DIR="$HOME/.config/hypr"
source "$DIR"/theme/current.bash
# Colors
bg=${background:1} fg=${foreground:1}
red=${color1:1} green=${color2:1} yellow=${color3:1}
blue=${color4:1} magenta=${color5:1} cyan=${color6:1}
alpha='00000000'
# CMD
swaylock -f \
\
`# General` \
--ignore-empty-password \
--show-failed-attempts \
--hide-keyboard-layout \
--indicator-caps-lock \
\
`# Appearance` \
--color ${bg}E6 \
--font 'JetBrainsMono Nerd Font' --font-size 18 \
\
`# Backspace Key` \
--key-hl-color ${green} \
--caps-lock-key-hl-color ${blue} \
--bs-hl-color ${red} \
--caps-lock-bs-hl-color ${red} \
\
`# Indicator` \
--indicator-radius 120 \
--indicator-thickness 10 \
\
`# Inside Circle Colors` \
--inside-color ${alpha} \
--inside-clear-color ${alpha} \
--inside-caps-lock-color ${alpha} \
--inside-ver-color ${blue} \
--inside-wrong-color ${red} \
\
`# Layout Colors` \
--layout-bg-color ${cyan} \
--layout-border-color ${cyan} \
--layout-text-color ${bg} \
\
`# Line Colors` \
--line-color ${bg} \
--line-clear-color ${red} \
--line-caps-lock-color ${bg} \
--line-ver-color ${bg} \
--line-wrong-color ${bg} \
\
`# Ring Colors` \
--ring-color ${cyan} \
--ring-clear-color ${bg} \
--ring-caps-lock-color ${magenta} \
--ring-ver-color ${blue} \
--ring-wrong-color ${red} \
\
`# Separator Color` \
--separator-color ${bg} \
\
`# Text Colors` \
--text-color ${fg} \
--text-clear-color ${fg} \
--text-caps-lock-color ${fg} \
--text-ver-color ${bg} \
--text-wrong-color ${bg}

54
mako/config Normal file
View File

@@ -0,0 +1,54 @@
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Mako configuration file
# GLOBAL CONFIGURATION OPTIONS
max-history=100
sort=-time
# BINDING OPTIONS
on-button-left=dismiss
on-button-middle=none
on-button-right=dismiss-all
on-touch=dismiss
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
# STYLE OPTIONS
font=JetBrains Mono 10
width=300
height=100
margin=10
padding=15
border-size=2
border-radius=0
icons=1
max-icon-size=48
icon-location=left
markup=1
actions=1
history=1
text-alignment=left
default-timeout=5000
ignore-timeout=0
max-visible=5
layer=overlay
anchor=top-right
# Mako_Colors
background-color=#3d3942
text-color=#e0dde2
border-color=#49454f
progress-color=over #C3B2CD
[urgency=low]
border-color=#49454f
default-timeout=2000
[urgency=normal]
border-color=#49454f
default-timeout=5000
[urgency=high]
border-color=#9A9EAA
text-color=#9A9EAA
default-timeout=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
mako/icons/dropper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
mako/icons/microphone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
mako/icons/music.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
mako/icons/palette.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
mako/icons/picture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
mako/icons/timer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
mako/icons/volume-high.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
mako/icons/volume-low.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
mako/icons/volume-mid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
mako/icons/volume-mute.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

11
notifications Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch mako with alt config
CONFIG="$HOME/.config/hypr/mako/config"
if [[ ! `pidof mako` ]]; then
mako --config ${CONFIG}
fi

76
rofi/askpass.rasi Normal file
View File

@@ -0,0 +1,76 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
location: center;
anchor: center;
fullscreen: false;
width: 350px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 30px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
background-color: @background;
cursor: "default";
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt", "entry" ];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
/* background-image: linear-gradient(to right, #E06B74, #C778DD); */
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px 12px;
border-radius: 0px;
/* background-image: linear-gradient(to right, #E06B74, #C778DD); */
background-color: var(active);
text-color: @background;
}
entry {
enabled: true;
padding: 10px 12px;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: inherit;
cursor: text;
placeholder: "Password";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: false;
}

148
rofi/asroot.rasi Normal file
View File

@@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 440px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 15px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

202
rofi/bluetooth.rasi Normal file
View File

@@ -0,0 +1,202 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser";
show-icons: false;
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 500px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt" ];
}
prompt {
enabled: true;
padding: 8px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 8px 10px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
entry {
enabled: true;
padding: 8px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 7;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 8px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 8px 12px;
border-radius: 12px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-image: linear-gradient(to right, #E06B74, #C778DD);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 8px 12px;
border-radius: 12px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

148
rofi/confirm.rasi Normal file
View File

@@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 300px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 2px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

202
rofi/launcher.rasi Normal file
View File

@@ -0,0 +1,202 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser";
show-icons: true;
display-drun: "";
display-run: "";
display-filebrowser: "";
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 800px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview", "mode-switcher" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 7;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 6px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px 250px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(urgent);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

148
rofi/music.rasi Normal file
View File

@@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 510px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 15px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

206
rofi/networkmenu.rasi Normal file
View File

@@ -0,0 +1,206 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser";
show-icons: false;
display-drun: "";
display-run: "";
display-filebrowser: "";
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 500px;
height: 495px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt", "entry" ];
}
prompt {
enabled: true;
padding: 8px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 8px 10px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
entry {
enabled: true;
padding: 8px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 8px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 8px 12px;
border-radius: 12px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-image: linear-gradient(to right, #E06B74, #C778DD);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 8px 12px;
border-radius: 12px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

View File

@@ -0,0 +1,30 @@
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
[dmenu]
dmenu_command = rofi -dmenu -theme ~/.config/hypr/rofi/networkmenu.rasi
# # Note that dmenu_command can contain arguments as well like `rofi -width 30`
# # Rofi and dmenu are set to case insensitive by default `-i`
# l = number of lines to display, defaults to number of total network options
# fn = font string
# nb = normal background (name, #RGB, or #RRGGBB)
# nf = normal foreground
# sb = selected background
# sf = selected foreground
# b = (just set to empty value and menu will appear at the bottom
# m = number of monitor to display on
# p = Custom Prompt for the networks menu
# pinentry = Pinentry command
# rofi_highlight = <True or False> # (Default: False) use rofi highlighting instead of '**'
# # override normal foreground and background colors (dmenu) or use the
# # -password option (rofi) to obscure passphrase entry
# [dmenu_passphrase]
# nf = #222222
# nb = #222222
# rofi_obscure = True
[editor]
terminal = alacritty
gui_if_available = True
# terminal = <name of terminal program>
# gui_if_available = <True or False>

148
rofi/powermenu.rasi Normal file
View File

@@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 510px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 15px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

202
rofi/runner.rasi Normal file
View File

@@ -0,0 +1,202 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "run";
show-icons: true;
display-drun: "";
display-run: "";
display-filebrowser: "";
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Run...";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 6;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 6px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px 250px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(urgent);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

148
rofi/screenshot.rasi Normal file
View File

@@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 440px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 0px;
border-color: @background-alt;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 12px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 15px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

8
rofi/shared/colors.rasi Normal file
View File

@@ -0,0 +1,8 @@
* {
background: #3d3942;
background-alt: #49454f;
foreground: #e0dde2;
selected: #C3B2CD;
active: #A896B3;
urgent: #9A9EAA;
}

7
rofi/shared/fonts.rasi Normal file
View File

@@ -0,0 +1,7 @@
/* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com> */
/* Text Font */
* {
font: "Iosevka 10";
}

302
rofi/windows.rasi Normal file
View File

@@ -0,0 +1,302 @@
/**
* Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "window";
show-icons: true;
display-drun: " Apps";
display-run: " Run";
display-filebrowser: " Files";
display-window: " Windows";
drun-display-format: "{name}";
window-format: "{c} · {t}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
* {
border-colour: var(selected);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 1px solid;
border-radius: 0px;
border-color: @border-colour;
cursor: "default";
/* Backgroud Colors */
background-color: @background-colour;
/* Backgroud Image */
//background-image: url("/path/to/image.png", none);
/* Simple Linear Gradient */
//background-image: linear-gradient(red, orange, pink, purple);
/* Directional Linear Gradient */
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
/* Angle Linear Gradient */
//background-image: linear-gradient(45, cyan, purple, indigo);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 20px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px 0px 8px 0px;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Filter...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @handle-colour;
border-radius: 0px;
background-color: @alternate-background;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 6px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: var(normal-background);
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: var(alternate-normal-background);
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 8px 12px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 8px 12px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
}
textbox {
border: 0px solid;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 20px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

12
rofi_askpass Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/askpass.rasi"
# Rofi text dialog to get password
rofi -dmenu \
-password \
-i \
-p "Root" \
-theme ${RASI}

77
rofi_asroot Executable file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/asroot.rasi"
ASROOT="$DIR/scripts/asroot"
USER=`whoami`
# Theme Elements
prompt='Root'
mesg="Run Applications As Root"
term="alacritty --class alacritty-float,alacritty-float --config-file /home/$USER/.config/hypr/alacritty/alacritty.toml"
# Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$layout" == 'NO' ]]; then
option_1=" Alacritty"
option_2=" Thunar"
option_3=" Geany"
option_4=" Ranger"
option_5=" Vim"
else
option_1=""
option_2=""
option_3=""
option_4=""
option_5=""
fi
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$prompt" \
-mesg "$mesg" \
-markup-rows \
-theme ${RASI}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5" | rofi_cmd
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
${ASROOT} "$term"
elif [[ "$1" == '--opt2' ]]; then
${ASROOT} 'dbus-run-session thunar'
elif [[ "$1" == '--opt3' ]]; then
${ASROOT} geany
elif [[ "$1" == '--opt4' ]]; then
${ASROOT} "$term -e ranger"
elif [[ "$1" == '--opt5' ]]; then
${ASROOT} "$term -e vim"
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
esac

321
rofi_bluetooth Executable file
View File

@@ -0,0 +1,321 @@
#!/usr/bin/env bash
# __ _ _ _ _ _ _
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
#
# Author: Nick Clyde (clydedroid)
#
# A script that generates a rofi menu that uses bluetoothctl to
# connect to bluetooth devices and display status info.
#
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
#
# Depends on:
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/bluetooth.rasi"
# Constants
divider="---------"
goback="Back"
# Checks if bluetooth controller is powered on
power_on() {
if bluetoothctl show | grep -q "Powered: yes"; then
return 0
else
return 1
fi
}
# Toggles power state
toggle_power() {
if power_on; then
bluetoothctl power off
show_menu
else
if rfkill list bluetooth | grep -q 'blocked: yes'; then
rfkill unblock bluetooth && sleep 3
fi
bluetoothctl power on
show_menu
fi
}
# Checks if controller is scanning for new devices
scan_on() {
if bluetoothctl show | grep -q "Discovering: yes"; then
echo "Scan: on"
return 0
else
echo "Scan: off"
return 1
fi
}
# Toggles scanning state
toggle_scan() {
if scan_on; then
kill $(pgrep -f "bluetoothctl scan on")
bluetoothctl scan off
show_menu
else
bluetoothctl scan on &
echo "Scanning..."
sleep 5
show_menu
fi
}
# Checks if controller is able to pair to devices
pairable_on() {
if bluetoothctl show | grep -q "Pairable: yes"; then
echo "Pairable: on"
return 0
else
echo "Pairable: off"
return 1
fi
}
# Toggles pairable state
toggle_pairable() {
if pairable_on; then
bluetoothctl pairable off
show_menu
else
bluetoothctl pairable on
show_menu
fi
}
# Checks if controller is discoverable by other devices
discoverable_on() {
if bluetoothctl show | grep -q "Discoverable: yes"; then
echo "Discoverable: on"
return 0
else
echo "Discoverable: off"
return 1
fi
}
# Toggles discoverable state
toggle_discoverable() {
if discoverable_on; then
bluetoothctl discoverable off
show_menu
else
bluetoothctl discoverable on
show_menu
fi
}
# Checks if a device is connected
device_connected() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Connected: yes"; then
return 0
else
return 1
fi
}
# Toggles device connection
toggle_connection() {
if device_connected "$1"; then
bluetoothctl disconnect "$1"
device_menu "$device"
else
bluetoothctl connect "$1"
device_menu "$device"
fi
}
# Checks if a device is paired
device_paired() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Paired: yes"; then
echo "Paired: yes"
return 0
else
echo "Paired: no"
return 1
fi
}
# Toggles device paired state
toggle_paired() {
if device_paired "$1"; then
bluetoothctl remove "$1"
device_menu "$device"
else
bluetoothctl pair "$1"
device_menu "$device"
fi
}
# Checks if a device is trusted
device_trusted() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Trusted: yes"; then
echo "Trusted: yes"
return 0
else
echo "Trusted: no"
return 1
fi
}
# Toggles device connection
toggle_trust() {
if device_trusted "$1"; then
bluetoothctl untrust "$1"
device_menu "$device"
else
bluetoothctl trust "$1"
device_menu "$device"
fi
}
# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
if power_on; then
printf '󰂯'
paired_devices_cmd="devices Paired"
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
paired_devices_cmd="paired-devices"
fi
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
counter=0
for device in "${paired_devices[@]}"; do
if device_connected "$device"; then
device_alias=$(bluetoothctl info "$device" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
((counter++))
fi
done
printf "\n"
else
echo "󰂲"
fi
}
# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
device=$1
# Get device name and mac address
device_name=$(echo "$device" | cut -d ' ' -f 3-)
mac=$(echo "$device" | cut -d ' ' -f 2)
# Build options
if device_connected "$mac"; then
connected="Connected: yes"
else
connected="Connected: no"
fi
paired=$(device_paired "$mac")
trusted=$(device_trusted "$mac")
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$connected")
toggle_connection "$mac"
;;
"$paired")
toggle_paired "$mac"
;;
"$trusted")
toggle_trust "$mac"
;;
"$goback")
show_menu
;;
esac
}
# Opens a rofi menu with current bluetooth status and options to connect
show_menu() {
# Get menu options
if power_on; then
power="Power: on"
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
# Get controller flags
scan=$(scan_on)
pairable=$(pairable_on)
discoverable=$(discoverable_on)
# Options passed to rofi
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
else
power="Power: off"
options="$power\nExit"
fi
# Open rofi menu, read chosen option
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
# Match chosen option to command
case "$chosen" in
"" | "$divider")
echo "No option chosen."
;;
"$power")
toggle_power
;;
"$scan")
toggle_scan
;;
"$discoverable")
toggle_discoverable
;;
"$pairable")
toggle_pairable
;;
*)
device=$(bluetoothctl devices | grep "$chosen")
# Open a submenu if a device is selected
if [[ $device ]]; then device_menu "$device"; fi
;;
esac
}
# Rofi command to pipe into, can add any options here
rofi_command="rofi -theme ${RASI} -dmenu $* -p"
case "$1" in
--status)
print_status
;;
*)
show_menu
;;
esac

12
rofi_launcher Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/launcher.rasi"
# Run
rofi \
-show drun \
-theme ${RASI}

120
rofi_music Executable file
View File

@@ -0,0 +1,120 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/music.rasi"
# Theme Elements
status="`mpc status`"
if [[ -z "$status" ]]; then
prompt='Offline'
mesg="MPD is Offline"
else
prompt="`mpc -f "%artist%" current`"
mesg="`mpc -f "%title%" current` 𝅘𝅥𝅮 `mpc status | grep "#" | awk '{print $3}'`"
fi
# Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$layout" == 'NO' ]]; then
if [[ ${status} == *"[playing]"* ]]; then
option_1=" Pause"
else
option_1=" Play"
fi
option_2=" Stop"
option_3=" Previous"
option_4=" Next"
option_5=" Repeat"
option_6=" Random"
else
if [[ ${status} == *"[playing]"* ]]; then
option_1=""
else
option_1=""
fi
option_2=""
option_3=""
option_4=""
option_5=""
option_6=""
fi
# Toggle Actions
active=''
urgent=''
# Repeat
if [[ ${status} == *"repeat: on"* ]]; then
active="-a 4"
elif [[ ${status} == *"repeat: off"* ]]; then
urgent="-u 4"
else
option_5=" Parsing Error"
fi
# Random
if [[ ${status} == *"random: on"* ]]; then
[ -n "$active" ] && active+=",5" || active="-a 5"
elif [[ ${status} == *"random: off"* ]]; then
[ -n "$urgent" ] && urgent+=",5" || urgent="-u 5"
else
option_6=" Parsing Error"
fi
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$prompt" \
-mesg "$mesg" \
${active} ${urgent} \
-markup-rows \
-theme ${RASI}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Execute Command
iDIR="$HOME/.config/hypr/mako/icons"
notify_song="notify-send -h string:x-canonical-private-synchronous:sys-notify-song -u low -i ${iDIR}/music.png"
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
mpc -q toggle && ${notify_song} "`mpc -f "%artist%" current`"
elif [[ "$1" == '--opt2' ]]; then
mpc -q stop
elif [[ "$1" == '--opt3' ]]; then
mpc -q prev && ${notify_song} "`mpc -f "%artist%" current`"
elif [[ "$1" == '--opt4' ]]; then
mpc -q next && ${notify_song} "`mpc -f "%artist%" current`"
elif [[ "$1" == '--opt5' ]]; then
mpc -q repeat
elif [[ "$1" == '--opt6' ]]; then
mpc -q random
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
$option_6)
run_cmd --opt6
;;
esac

1038
rofi_network Executable file

File diff suppressed because it is too large Load Diff

117
rofi_powermenu Executable file
View File

@@ -0,0 +1,117 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/powermenu.rasi"
CNFR="$DIR/rofi/confirm.rasi"
# Theme Elements
prompt="`hostname` (`echo $DESKTOP_SESSION`)"
mesg="Uptime : `uptime -p | sed -e 's/up //g'`"
# Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$layout" == 'NO' ]]; then
option_1=" Lock"
option_2=" Logout"
option_3=" Suspend"
option_4=" Hibernate"
option_5=" Reboot"
option_6=" Shutdown"
else
option_1=""
option_2=""
option_3=""
option_4=""
option_5=""
option_6=""
fi
cnflayout=`cat ${CNFR} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$cnflayout" == 'NO' ]]; then
yes=' Yes'
no=' No'
else
yes=''
no=''
fi
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$prompt" \
-mesg "$mesg" \
-markup-rows \
-theme ${RASI}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-selected-row 1 \
-no-click-to-exit \
-theme ${CNFR}
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd
}
# Confirm and execute
confirm_run () {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
${1} && ${2} && ${3} && ${4}
else
exit
fi
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
hyprlock
elif [[ "$1" == '--opt2' ]]; then
confirm_run 'hyprctl dispatch exit 0'
elif [[ "$1" == '--opt3' ]]; then
confirm_run 'mpc -q pause' 'pulsemixer --mute' 'systemctl suspend'
elif [[ "$1" == '--opt4' ]]; then
confirm_run 'systemctl hibernate'
elif [[ "$1" == '--opt5' ]]; then
confirm_run 'systemctl reboot'
elif [[ "$1" == '--opt6' ]]; then
confirm_run 'systemctl poweroff'
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
$option_6)
run_cmd --opt6
;;
esac

12
rofi_runner Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/runner.rasi"
# Run
rofi \
-show run \
-theme ${RASI}

143
rofi_screenshot Executable file
View File

@@ -0,0 +1,143 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
# Get Colors
DIR="$HOME/.scripts"
background="`cat $DIR/rofi/shared/colors.rasi | grep 'background:' | cut -d':' -f2 | tr -d ' '\;`"
accent="`cat $DIR/rofi/shared/colors.rasi | grep 'selected:' | cut -d':' -f2 | tr -d ' '\;`"
# Import Current Theme
DIR="$HOME/.scripts"
RASI="$DIR/rofi/screenshot.rasi"
# Theme Elements
prompt='Screenshot'
mesg="Directory :: `xdg-user-dir PICTURES`/Screenshots"
# Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$layout" == 'NO' ]]; then
option_1=" Capture Desktop"
option_2=" Capture Area"
option_3=" Capture Window"
option_4=" Capture in 5s"
option_5=" Capture in 10s"
else
option_1=""
option_2=""
option_3=""
option_4=""
option_5=""
fi
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$prompt" \
-mesg "$mesg" \
-markup-rows \
-theme ${RASI}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5" | rofi_cmd
}
# Screenshot
time=`date +%Y-%m-%d-%H-%M-%S`
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${geometry}.png"
# Directory
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# notify and view screenshot
iDIR="$HOME/.config/hypr/mako/icons"
notify_view() {
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ${iDIR}/picture.png"
${notify_cmd_shot} "Copied to clipboard."
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null &
viewnior ${dir}/"$file"
if [[ -e "$dir/$file" ]]; then
${notify_cmd_shot} "Screenshot Saved."
else
${notify_cmd_shot} "Screenshot Deleted."
fi
}
# countdown
countdown () {
for sec in `seq $1 -1 1`; do
notify-send -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
sleep 1
done
}
# take shots
shotnow () {
cd ${dir} && sleep 0.5 && grim - | tee "$file" | wl-copy
notify_view
}
shot5 () {
countdown '5'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
notify_view
}
shot10 () {
countdown '10'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
notify_view
}
shotwin () {
w_pos=`hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1`
w_size=`hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g`
cd ${dir} && sleep 0.3 && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
notify_view
}
shotarea () {
cd ${dir} && grim -g "$(slurp -b ${background:1}CC -c ${accent:1}ff -s ${accent:1}0D -w 2 && sleep 0.3)" - | tee "$file" | wl-copy
notify_view
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
shotnow
elif [[ "$1" == '--opt2' ]]; then
shotarea
elif [[ "$1" == '--opt3' ]]; then
shotwin
elif [[ "$1" == '--opt4' ]]; then
shot5
elif [[ "$1" == '--opt5' ]]; then
shot10
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
esac

13
rofi_windows Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
# Import Current Theme
DIR="$HOME/.scripts"
STYLE="onedark"
RASI="$DIR/rofi/windows.rasi"
# Run
rofi \
-show window \
-theme ${RASI}

52
scan_hosts.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Check if the subnet argument is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <subnet/CIDR>"
exit 1
fi
# Extract the base IP and CIDR from the argument
subnet="$1"
IFS='.' read -r -a octets <<< "$(echo "$subnet" | cut -d'/' -f1)"
cidr=$(echo "$subnet" | cut -d'/' -f2)
# Function to ping a single IP
ping_host() {
ip="$1"
if ping -c 1 -W 1 "$ip" &> /dev/null; then
echo "$ip is up"
fi
}
# Export the function so it can be used by GNU Parallel
export -f ping_host
# Generate IPs based on CIDR
if [ "$cidr" -eq 24 ]; then
# For /24, only the last octet changes
for i in {1..254}; do
ip="${octets[0]}.${octets[1]}.${octets[2]}.$i"
echo "$ip"
done
elif [ "$cidr" -eq 16 ]; then
# For /16, the last two octets change
for i in {0..255}; do
for j in {0..255}; do
if [ "$i" -eq 0 ] && [ "$j" -eq 0 ]; then
continue # Skip network address
fi
if [ "$i" -eq 255 ] && [ "$j" -eq 255 ]; then
continue # Skip broadcast address
fi
ip="${octets[0]}.${octets[1]}.$i.$j"
echo "$ip"
done
done
else
echo "Unsupported CIDR notation. Only /24 and /16 are supported in this script."
exit 1
fi | parallel -j 512 --progress ping_host
echo "Scan completed."

87
screenshot Executable file
View File

@@ -0,0 +1,87 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Script to take screenshots with grim, slurp (in Wayland)
# Get Colors
DIR="$HOME/.config/hypr"
background="`cat $DIR/rofi/shared/colors.rasi | grep 'background:' | cut -d':' -f2 | tr -d ' '\;`"
accent="`cat $DIR/rofi/shared/colors.rasi | grep 'selected:' | cut -d':' -f2 | tr -d ' '\;`"
iDIR="$HOME/.config/hypr/mako/icons"
time=`date +%Y-%m-%d-%H-%M-%S`
dir="`xdg-user-dir PICTURES`/Screenshots"
file="Screenshot_${time}_${RANDOM}.png"
# notify and view screenshot
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ${iDIR}/picture.png"
notify_view () {
${notify_cmd_shot} "Copied to clipboard."
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null &
viewnior ${dir}/"$file"
if [[ -e "$dir/$file" ]]; then
${notify_cmd_shot} "Screenshot Saved."
else
${notify_cmd_shot} "Screenshot Deleted."
fi
}
# countdown
countdown () {
for sec in `seq $1 -1 1`; do
notify-send -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
sleep 1
done
}
# take shots
shotnow () {
cd ${dir} && sleep 0.5 && grim - | tee "$file" | wl-copy
notify_view
}
shot5 () {
countdown '5'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
notify_view
}
shot10 () {
countdown '10'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
notify_view
}
shotwin () {
w_pos=`hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1`
w_size=`hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g`
cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
notify_view
}
shotarea () {
cd ${dir} && grim -g "$(slurp -b ${background:1}CC -c ${accent:1}ff -s ${accent:1}0D -w 2 && sleep 0.3)" - | tee "$file" | wl-copy
notify_view
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
if [[ "$1" == "--now" ]]; then
shotnow
elif [[ "$1" == "--in5" ]]; then
shot5
elif [[ "$1" == "--in10" ]]; then
shot10
elif [[ "$1" == "--win" ]]; then
shotwin
elif [[ "$1" == "--area" ]]; then
shotarea
else
echo -e "Available Options : --now --in5 --in10 --win --area"
fi
exit 0

12
statusbar Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch waybar with alt config
CONFIG="$HOME/.config/hypr/waybar/config"
STYLE="$HOME/.config/hypr/waybar/style.css"
if [[ ! `pidof waybar` ]]; then
waybar --bar main-bar --log-level error --config ${CONFIG} --style ${STYLE}
fi

18
toggle_bar.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
## Copyright (C) 2024
##
## Script to toggle waybar visibility in Hyprland
# Check if waybar is running
if pgrep -x "waybar" > /dev/null; then
# If waybar is running, kill it
killall -q waybar
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low "Waybar Disabled"
else
# If waybar is not running, start it with the config files
CONFIG="$HOME/.config/hypr/waybar/config"
STYLE="$HOME/.config/hypr/waybar/style.css"
waybar --bar main-bar --log-level error --config ${CONFIG} --style ${STYLE} &
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low "Waybar Enabled"
fi

33
toggle_gaps.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
## Copyright (C) 2024
##
## Script to toggle gaps in Hyprland
# Path to store the gap state
STATE_FILE="$HOME/.cache/hypr_gaps_state"
# Default gaps values (matching your hyprtheme.conf)
DEFAULT_GAPS_IN=5
DEFAULT_GAPS_OUT=10
DEFAULT_GAPS_WS=-10
# Check if state file exists, create if not
if [ ! -f "$STATE_FILE" ]; then
echo "enabled" > "$STATE_FILE"
fi
# Read current state
CURRENT_STATE=$(cat "$STATE_FILE")
if [ "$CURRENT_STATE" = "enabled" ]; then
# Disable gaps
hyprctl --batch "keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:gaps_workspaces 0"
echo "disabled" > "$STATE_FILE"
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low "Gaps Disabled"
else
# Enable gaps
hyprctl --batch "keyword general:gaps_in $DEFAULT_GAPS_IN; keyword general:gaps_out $DEFAULT_GAPS_OUT; keyword general:gaps_workspaces $DEFAULT_GAPS_WS"
echo "enabled" > "$STATE_FILE"
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low "Gaps Enabled"
fi

30
toggle_wg.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
## Script to toggle WireGuard tunnel using wg command for state determination
# Define the WireGuard interface name
WG_INTERFACE="wg0"
# Function to check if WireGuard interface is active
is_wg_active() {
sudo /usr/bin/wg show | grep -q "interface"
}
if is_wg_active; then
# If the interface is active, disable it
sudo /usr/bin/wg-quick down "$WG_INTERFACE"
if ! is_wg_active; then
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i network-vpn "WireGuard Tunnel" "Tunnel Deactivated"
else
notify-send --urgency=critical -i network-vpn "WireGuard Tunnel" "Error: Failed to deactivate tunnel"
fi
else
# If the interface is not active, enable it
sudo /usr/bin/wg-quick up "$WG_INTERFACE"
if is_wg_active; then
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i network-vpn "WireGuard Tunnel" "Tunnel Activated"
else
notify-send --urgency=critical -i network-vpn "WireGuard Tunnel" "Error: Failed to activate tunnel"
fi
fi

82
volume Executable file
View File

@@ -0,0 +1,82 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Script To Manage Speaker Volume For Archcraft (in Wayland).
iDIR="$HOME/.config/hypr/mako/icons"
notify_cmd='notify-send -h string:x-canonical-private-synchronous:sys-notify-volume -u low'
# Get Volume
get_volume() {
echo "`pulsemixer --get-volume | cut -d' ' -f1`"
}
# Get icons
get_icon() {
current="$(get_volume)"
if [[ "$current" -eq "0" ]]; then
icon="$iDIR/volume-mute.png"
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
icon="$iDIR/volume-low.png"
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
icon="$iDIR/volume-mid.png"
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
icon="$iDIR/volume-high.png"
fi
}
# Notify
notify_user() {
${notify_cmd} -i "$icon" "Volume : $(get_volume)%"
}
# Increase Volume
inc_volume() {
[[ `pulsemixer --get-mute` == 1 ]] && pulsemixer --unmute
pulsemixer --max-volume 100 --change-volume +5 && get_icon && notify_user
}
# Decrease Volume
dec_volume() {
[[ `pulsemixer --get-mute` == 1 ]] && pulsemixer --unmute
pulsemixer --max-volume 100 --change-volume -5 && get_icon && notify_user
}
# Toggle Mute
toggle_mute() {
if [[ `pulsemixer --get-mute` == 0 ]]; then
pulsemixer --toggle-mute && ${notify_cmd} -i "$iDIR/volume-mute.png" "Mute"
else
pulsemixer --toggle-mute && get_icon && ${notify_cmd} -i "$icon" "Unmute"
fi
}
# Toggle Mic
toggle_mic() {
ID="`pulsemixer --list-sources | grep 'Default' | cut -d',' -f1 | cut -d' ' -f3`"
if [[ `pulsemixer --id $ID --get-mute` == 0 ]]; then
pulsemixer --id ${ID} --toggle-mute && ${notify_cmd} -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
else
pulsemixer --id ${ID} --toggle-mute && ${notify_cmd} -i "$iDIR/microphone.png" "Microphone Switched ON"
fi
}
# Execute accordingly
if [[ -x `which pulsemixer` ]]; then
if [[ "$1" == "--get" ]]; then
get_volume
elif [[ "$1" == "--inc" ]]; then
inc_volume
elif [[ "$1" == "--dec" ]]; then
dec_volume
elif [[ "$1" == "--toggle" ]]; then
toggle_mute
elif [[ "$1" == "--toggle-mic" ]]; then
toggle_mic
else
echo $(get_volume)%
fi
else
${notify_cmd} "'pulsemixer' is not installed."
fi

16
wallpaper Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Set Wallpaper in Hyprland
#WALLPAPER='/home/belar/Pictures/wallpapers/677966.png'
#swaybg --output '*' --mode fill --image "$WALLPAPER"
# live wallpaper
#/usr/bin/mpvpaper -s -o "no-audio loop" ALL /home/belar/.background/live/live/Parking-Scene-Unreal.mp4 &
#/usr/bin/mpvpaper -s -o "no-audio loop" ALL /home/belar/.background/live/proxima_centauri2.mp4
#/usr/bin/mpvpaper -s -o "no-audio loop" DP-3 /home/belar/.background/live/live/Computer.mp4 &
/usr/bin/mpvpaper -s -o "no-audio loop --hwdec=vaapi" DP-3 /home/belar/.background/live/live/Evening-Falling-Star.mp4 &
#/usr/bin/mpvpaper -s -o "no-audio loop --hwdec=vaapi" HDMI-A-4 /home/belar/.background/live/frieren_up.mp4 &

14
waybar/colors.css Normal file
View File

@@ -0,0 +1,14 @@
/** ********** Colors ********** **/
@define-color background #3d3942;
@define-color background-alt1 #49454f;
@define-color background-alt2 #56515d;
@define-color foreground #e0dde2;
@define-color selected #C3B2CD;
@define-color black #3d3942;
@define-color red #9A9EAA;
@define-color green #A896B3;
@define-color yellow #CAAEB0;
@define-color blue #C3B2CD;
@define-color magenta #94CCC5;
@define-color cyan #A7D5CF;
@define-color white #e0dde2;

28
waybar/config Normal file
View File

@@ -0,0 +1,28 @@
// Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
//
// Waybar config file
{
"include": "~/.config/hypr/waybar/modules",
"name": "main-bar", // Waybar name
"id": "main-bar", // Waybar id
"layer": "top", // Waybar at top layer
//"mode": "dock", // Display mode (dock|hide|invisible|overlay)
"exclusive": true, // Request an exclusive zone from the compositor
"passthrough": false, // Pass any pointer events to the window under the bar
"position": "top", // Waybar position (top|bottom|left|right)
"height": 34, // Waybar height (to be removed for auto height)
"width": "", // Waybar width (empty for auto width)
"spacing": 0, // Gaps between modules
"margin": 0, // Space around the bar
"margin-top": 0, // Space above the bar
"margin-bottom": 0, // Space below the bar
"margin-left": 0, // Space to the left of the bar
"margin-right": 0, // Space to the right of the bar
"fixed-center": true, // Center modules position
"ipc": true, // Control waybar with `swaymsg bar` commands
// Choose the order of the modules
"modules-left": ["custom/menu", "hyprland/workspaces", "mpd#2", "mpd#3", "mpd#4", "mpd" ],
//"modules-left": ["custom/menu", "hyprland/workspaces", "idle_inhibitor", "tray", "custom/spotify" ],
"modules-center": [ "cpu", "cpu#2", "memory", "memory#2", "disk", "disk#2" ],
"modules-right": ["custom/themes", "pulseaudio", "pulseaudio#2", "backlight", "backlight#2", "battery", "battery#2", "bluetooth", "bluetooth#2", "network", "network#2", "clock", "clock#2", "idle_inhibitor", "tray", "custom/power"],
}

326
waybar/modules Normal file
View File

@@ -0,0 +1,326 @@
// Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
//
// Waybar modules configuration
{
// waybar-backlight
"backlight": {
"interval": 2,
//"device": "amdgpu_bl0",
"format": "{icon}",
"format-icons": ["", "", "", "", "", "", ""],
// Commands to execute on events
"on-scroll-up": "light -A 5%",
"on-scroll-down": "light -U 5%",
"smooth-scrolling-threshold": 1,
},
"backlight#2": {
"interval": 2,
//"device": "amdgpu_bl0",
"format": "{percent}%",
// Commands to execute on events
"on-scroll-up": "light -A 5%",
"on-scroll-down": "light -U 5%",
"smooth-scrolling-threshold": 1,
},
// waybar-battery
"battery": {
"interval": 60,
//"bat": "BAT1",
//"adapter": "ACAD",
"full-at": 100,
"design-capacity": false,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}",
"format-charging": "",
"format-plugged": "ﮣ",
"format-full": "",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"format-time": "{H}h {M}min",
"tooltip": true,
},
"battery#2": {
"interval": 60,
//"bat": "BAT1",
//"adapter": "ACAD",
"full-at": 100,
"design-capacity": false,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}%",
"format-charging": "{capacity}%",
"format-plugged": "{capacity}%",
"format-full": "Full",
"format-alt": "{time}",
"format-time": "{H}h {M}min",
"tooltip": true,
},
// waybar-bluetooth
"bluetooth": {
//"controller": "controller1",
//"format-device-preference": "",
"format": "",
"format-on": "",
"format-off": "",
"format-disabled": "",
"format-connected": "",
"format-connected-battery": "",
"tooltip": true,
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"on-click": "~/.config/hypr/scripts/rofi_bluetooth",
"on-click-right": "blueman-manager",
},
"bluetooth#2": {
//"controller": "controller1",
//"format-device-preference": "",
"format": "{status}",
"format-on": "{status}",
"format-off": "{status}",
"format-disabled": "{status}",
"format-connected": "{device_alias}",
"format-connected-battery": "{device_alias}, {device_battery_percentage}%",
"tooltip": true,
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"on-click": "~/.config/hypr/scripts/rofi_bluetooth",
"on-click-right": "blueman-manager",
},
// waybar-clock
"clock": {
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
"format": "",
},
"clock#2": {
"interval": 60,
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%I:%M %p}",
"format-alt": "{:%a %b %d, %G}"
},
// waybar-cpu
"cpu": {
"interval": 5,
"format": "",
},
"cpu#2": {
"interval": 5,
"format": "{usage}%",
},
// waybar-custom
"custom/themes": {
"format": "",
"tooltip": false,
"on-click": "$HOME/.config/hypr/theme/theme.sh --pywal",
"on-click-right": "$HOME/.config/hypr/theme/theme.sh --default",
},
"custom/menu": {
"format": "",
"tooltip": false,
//"on-click": "$HOME/.config/hypr/scripts/wofi_menu",
"on-click": "$HOME/.config/hypr/scripts/rofi_launcher",
"on-click-right": "$HOME/.config/hypr/scripts/rofi_runner",
},
"custom/power": {
"format": "襤",
"tooltip": false,
//"on-click": "$HOME/.config/hypr/scripts/wlogout",
"on-click": "$HOME/.config/hypr/scripts/rofi_powermenu",
},
// waybar-disk
"disk": {
"interval": 30,
"format": "",
},
"disk#2": {
"interval": 30,
"format": "{free}",
},
// waybar-memory
"memory": {
"interval": 10,
"format": "",
},
"memory#2": {
"interval": 10,
"format": "{used:0.1f}G",
},
// waybar-spotify
"custom/spotify": {
"exec": "$HOME/.config/hypr/waybar/spotify",
"interval": 1,
"format": "{}",
"tooltip": true,
"max-length": 40,
"on-click": "playerctl play-pause",
"on-click-middle": "playerctl previous",
"on-click-right": "playerctl next",
"on-scroll-up": "playerctl position 05+",
"on-scroll-down": "playerctl position 05-",
"smooth-scrolling-threshold": 1,
},
// waybar-mpd
"mpd": {
"interval": 2,
"unknown-tag": "N/A",
"format": "{artist} - {title} | 祥 {elapsedTime:%M:%S}",
"format-disconnected": "Disconnected",
"format-paused": "{artist} - {title}",
"format-stopped": "Stopped",
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)",
// Commands to execute on events
"on-click": "mpc toggle",
"on-scroll-up": "mpc seek +00:00:01",
"on-scroll-down": "mpc seek -00:00:01",
"smooth-scrolling-threshold": 1,
},
"mpd#2": {
"format": "玲",
"format-disconnected": "玲",
"format-paused": "玲",
"format-stopped": "玲",
// Commands to execute on events
"on-click": "mpc prev",
},
"mpd#3": {
"interval": 1,
"format": "{stateIcon}",
"format-disconnected": "",
"format-paused": "{stateIcon}",
"format-stopped": "",
"state-icons": {
"paused": "",
"playing": ""
},
// Commands to execute on events
"on-click": "mpc toggle",
},
"mpd#4": {
"format": "怜",
"format-disconnected": "怜",
"format-paused": "怜",
"format-stopped": "怜",
// Commands to execute on events
"on-click": "mpc next",
},
// waybar-network
"network": {
"interval": 5,
//"interface": "wlan*", // (Optional) To force the use of this interface, set it for netspeed to work
"format-wifi": "直",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "睊",
"format-disabled": "睊",
"tooltip-format": " {ifname} via {gwaddr}",
//"on-click": "[[ ! `pidof nm-connection-editor` ]] && nm-connection-editor || pkill nm-connection-e",
"on-click": "~/.config/hypr/scripts/rofi_network",
},
"network#2": {
"interval": 5,
//"interface": "wlan*", // (Optional) To force the use of this interface, set it for netspeed to work
"format-wifi": "{essid}",
"format-ethernet": "{ipaddr}/{cidr}",
"format-linked": "{ifname} (No IP)",
"format-disconnected": "Disconnected",
"format-disabled": "Disabled",
"format-alt": " {bandwidthUpBits} |  {bandwidthDownBits}",
"tooltip-format": " {ifname} via {gwaddr}",
},
// waybar-pulseaudio
"pulseaudio": {
//"format": "{volume}% {icon} {format_source}",
"format": "{icon}",
"format-muted": "",
"format-bluetooth": "",
"format-bluetooth-muted": "",
"format-source": "",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "ﳌ",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"scroll-step": 5.0,
// Commands to execute on events
"on-click": "pulsemixer --toggle-mute",
"on-click-right": "pulsemixer --toggle-mute",
"smooth-scrolling-threshold": 1,
},
"pulseaudio#2": {
//"format": "{volume}% {icon} {format_source}",
"format": "{volume}%",
"format-muted": "Mute",
"format-bluetooth": "{volume}%",
"format-bluetooth-muted": "Mute",
"format-source": "{volume}%",
"scroll-step": 5.0,
// Commands to execute on events
"on-click": "pulsemixer --toggle-mute",
"on-click-right": "pulsemixer --toggle-mute",
"smooth-scrolling-threshold": 1,
},
// waybar-idle-inhibitor
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "💻",
"deactivated": "☕"
},
},
// waybar-wlr-workspaces
"hyprland/workspaces": {
"format": "{icon}",
"sort-by-number": true,
"active-only": false,
"format-icons": {
"1": "I",
"2": "II",
"3": "III",
"4": "IV",
"5": "V",
"6": "VI",
"7": "VII",
"8": "VIII",
"9": "IX",
"10": "X",
"urgent": "",
"focused": "",
"default": ""
},
"on-click": "activate",
},
// waybar-tray
"tray": {
"icon-size": 16,
"spacing": 10
}
}

15
waybar/spotify Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Script for spotify for waybar
player_status=$(playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo -e " $(playerctl metadata artist) - $(playerctl metadata title)\nPlaying: $(playerctl metadata artist) - $(playerctl metadata title)\nplaying"
elif [ "$player_status" = "Paused" ]; then
echo -e " $(playerctl metadata artist) - $(playerctl metadata title)\nPaused: $(playerctl metadata artist) - $(playerctl metadata title)\npaused"
else
echo -e " Spotify Offline!\nSpotify Offline.\noffline"
fi

314
waybar/style.css Normal file
View File

@@ -0,0 +1,314 @@
/*
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
*/
/** ********** Import Colors ********** **/
@import "./colors.css";
/** ********** Fonts ********** **/
* {
font-family: "JetBrains Mono", "Symbols Nerd Font", Iosevka, archcraft, sans-serif;
font-size: 14px;
}
/** ********** Waybar Window ********** **/
window#waybar {
background-color: @background;
color: @foreground;
border-bottom: 2px solid @background-alt1;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.5;
}
/** ********** Custom ********** **/
#custom-menu {
background-color: @background-alt1;
color: @magenta;
font-size: 18px;
border-radius: 0px 14px 0px 0px;
margin: 0px 0px 0px 0px;
padding: 2px 8px 2px 8px;
}
#custom-themes {
background-color: @selected;
}
#custom-power {
background-color: @red;
font-size: 16px;
}
#custom-power, #custom-themes {
color: @background;
border-radius: 10px;
margin: 6px 6px 6px 0px;
padding: 2px 8px 2px 8px;
}
/** ********** Idle Inhibitor ********** **/
#idle_inhibitor {
background-color: @green;
color: @background;
border-radius: 10px;
margin: 6px 0px 6px 6px ;
padding: 4px 6px;
}
#idle_inhibitor.deactivated {
background-color: @red;
}
/** ********** Tray ********** **/
#tray {
background-color: @background-alt1;
border-radius: 10px;
margin: 6px 0px 6px 6px ;
padding: 4px 6px;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#tray > .active {
}
/** ********** MPD ********** **/
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
#mpd {
color: @foreground;
font-size: 12px;
font-weight: bold;
}
#mpd.disconnected {
color: @red;
}
#mpd.stopped {
color: @red;
}
#mpd.playing {
color: @cyan;
}
#mpd.paused {
}
#mpd.2 {
border-radius: 10px 0px 0px 10px;
margin: 6px 0px 6px 6px ;
padding: 4px 6px 4px 10px;
}
#mpd.3 {
margin: 6px 0px 6px 0px ;
padding: 4px;
}
#mpd.4 {
border-radius: 0px 10px 10px 0px;
margin: 6px 6px 6px 0px ;
padding: 4px 10px 4px 6px;
}
#mpd.2,#mpd.3,#mpd.4 {
background-color: @background-alt1;
font-size: 14px;
}
/** ********** Spotify ********** **/
#custom-spotify {
background-color: @background-alt1;
color: @foreground;
border-radius: 10px;
margin: 6px 0px 6px 6px ;
padding: 4px 8px;
font-size: 12px;
font-weight: bold;
}
#custom-spotify.paused {
color: @foreground;
}
#custom-spotify.playing {
background: linear-gradient(90deg, @magenta 25%, @red 50%, @yellow 75%, @cyan 100%);
background-size: 300% 300%;
animation: gradient 10s ease infinite;
color: @background;
}
#custom-spotify.offline {
color: @red;
}
/** ********** CPU ********** **/
#cpu {
color: @red;
}
/** ********** Memory ********** **/
#memory {
color: @green;
}
/** ********** Disk ********** **/
#disk {
color: @yellow;
}
/** ********** Pulseaudio ********** **/
#pulseaudio {
color: @blue;
}
#pulseaudio.bluetooth {
color: @cyan;
}
#pulseaudio.muted {
color: @red;
}
#pulseaudio.2 {
}
#pulseaudio.2.bluetooth {
}
#pulseaudio.2.muted {
}
/** ********** Backlight ********** **/
#backlight {
color: @magenta;
}
/** ********** Battery ********** **/
#battery {
color: @cyan;
}
#battery.charging {
}
#battery.plugged {
}
@keyframes blink {
to {
color: @foreground;
}
}
#battery.critical:not(.charging) {
background-color: @background-alt2;
}
#battery.2.critical:not(.charging) {
background-color: @background-alt1;
color: @red;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
/** ********** Network ********** **/
#network {
color: @yellow;
}
#network.disconnected,#network.disabled {
color: @red;
}
#network.linked {
}
#network.ethernet {
}
#network.wifi {
}
/** ********** Bluetooth ********** **/
#bluetooth {
color: @green;
}
#bluetooth.disabled{
color: @red;
}
#bluetooth.off{
color: @red;
}
#bluetooth.on{
}
#bluetooth.connected{
}
#bluetooth.discoverable{
}
#bluetooth.discovering{
}
#bluetooth.pairable{
}
/** ********** Clock ********** **/
#clock {
color: @blue;
}
/** ********** WLR Desktop ********** **/
#workspaces {
background-color: @background;
border-radius: 10px;
margin-left: 6px ;
margin-bottom: 2px ;
padding: 0px;
}
#workspaces button{
color: @foreground;
}
#workspaces button.active{
color: @red;
}
#workspaces button.urgent{
color: @green;
}
#workspaces button.hidden{
color: @yellow;
}
/** ********** Common style ********** **/
#backlight,
#battery,
#clock,
#cpu,
#disk,
#memory,
#pulseaudio,
#network,
#bluetooth {
background-color: @background-alt2;
border-radius: 10px 0px 0px 10px;
margin: 6px 0px 6px 0px ;
padding: 4px 6px;
}
#backlight.2,
#battery.2,
#clock.2,
#cpu.2,
#disk.2,
#memory.2,
#pulseaudio.2,
#network.2,
#bluetooth.2 {
background-color: @background-alt1;
color: @foreground;
font-size: 12px;
font-weight: bold;
border-radius: 0px 10px 10px 0px;
margin: 6px 6px 6px 0px ;
padding: 5px 6px 4px 6px;
}

21
wlogout Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## wlogout with alt layout and style file
LAYOUT="$HOME/.config/hypr/wlogout/layout"
STYLE="$HOME/.config/hypr/wlogout/style.css"
if [[ ! `pidof wlogout` ]]; then
wlogout --layout ${LAYOUT} --css ${STYLE} \
--buttons-per-row 5 \
--column-spacing 50 \
--row-spacing 50 \
--margin-top 390 \
--margin-bottom 390 \
--margin-left 150 \
--margin-right 150
else
pkill wlogout
fi

41
wofi/config Normal file
View File

@@ -0,0 +1,41 @@
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Wofi Config
## General
show=drun
prompt=Apps
normal_window=true
layer=top
term=foot
## Geometry
width=400px
height=320px
location=0
orientation=vertical
halign=fill
line_wrap=off
dynamic_lines=false
## Images
allow_markup=true
allow_images=true
image_size=24
## Search
exec_search=false
hide_search=false
parse_search=false
insensitive=true
## Other
hide_scroll=true
no_actions=true
sort_order=default
gtk_dark=true
filter_rate=100
## Keys
key_expand=Tab
key_exit=Escape

79
wofi/style.css Normal file
View File

@@ -0,0 +1,79 @@
/*
* Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
*/
/** ********** Colors ********** **/
@define-color background #3d3942;
@define-color background-alt1 #49454f;
@define-color background-alt2 #56515d;
@define-color foreground #e0dde2;
@define-color selected #C3B2CD;
@define-color black #3d3942;
@define-color red #9A9EAA;
@define-color green #A896B3;
@define-color yellow #CAAEB0;
@define-color blue #C3B2CD;
@define-color magenta #94CCC5;
@define-color cyan #A7D5CF;
@define-color white #e0dde2;
/** ********** Fonts ********** **/
* {
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
font-size: 12px;
}
#window {
background-color: @background;
color: @foreground;
border: 0px solid @background-alt1;
border-radius: 0px;
}
#outer-box {
padding: 10px;
}
#input {
background-color: @background-alt1;
border: 0px solid @background-alt2;
padding: 4px 12px;
}
#scroll {
margin-top: 10px;
}
#inner-box {
}
#img {
padding-right: 8px;
}
#text {
color: @foreground;
}
#text:selected {
color: @background;
}
#entry {
padding: 6px;
}
#entry:selected {
background-color: @selected;
color: @background;
}
#unselected {
}
#selected {
}
#input, #entry:selected {
border-radius: 0px;
}

14
wofi_menu Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## launch wofi with alt config
CONFIG="$HOME/.config/hypr/wofi/config"
STYLE="$HOME/.config/hypr/wofi/style.css"
if [[ ! `pidof wofi` ]]; then
wofi --show drun --prompt 'Search...' --conf ${CONFIG} --style ${STYLE}
else
pkill wofi
fi

84
wofi_powermenu Executable file
View File

@@ -0,0 +1,84 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2024 Aditya Shakya <adi1090x@gmail.com>
##
## Wofi Powermenu
## Files
CONFIG="$HOME/.config/hypr/wofi/config"
STYLE="$HOME/.config/hypr/wofi/style.css"
## Wofi Command
wofi_command="wofi --show dmenu \
--conf ${CONFIG} --style ${STYLE} \
--width=300 --height=215 \
--cache-file=/dev/null \
--hide-scroll --no-actions \
--define=matching=fuzzy"
uptime=$(uptime -p | sed -e 's/up //g')
## Entries
shutdown=" Shutdown"
reboot=" Restart"
lock=" Lock"
suspend=" Sleep"
logout=" Logout"
# Ask for confirmation
cdialog () {
yad --title='Confirm?' --borders=15 --center --fixed --undecorated --button=Yes:0 --button=No:1 --text="Are you sure?" --text-align=center
}
# Variable passed to rofi
open_menu () {
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
chosen="$(echo -e "$options" | $wofi_command --prompt "UP - $uptime")"
case $chosen in
$shutdown)
cdialog
if [[ "$?" == 0 ]]; then
systemctl poweroff
else
exit
fi
;;
$reboot)
cdialog
if [[ "$?" == 0 ]]; then
systemctl reboot
else
exit
fi
;;
$lock)
hyprlock
;;
$suspend)
cdialog
if [[ "$?" == 0 ]]; then
mpc -q pause
pulsemixer --mute
systemctl suspend
else
exit
fi
;;
$logout)
cdialog
if [[ "$?" == 0 ]]; then
hyprctl dispatch exit 0
else
exit
fi
;;
esac
}
if [[ ! `pidof wofi` ]]; then
open_menu
else
pkill wofi
fi