aboutsummaryrefslogtreecommitdiff
path: root/.config/polybar/scripts
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2023-02-08 13:40:23 -0600
committerAaditya Dhruv <[email protected]>2023-02-08 13:40:23 -0600
commit7d47c78928a70d2a6c9ff1aa6170c09eb7215a27 (patch)
tree3354731b36649d241680388f18d023e33c41bdda /.config/polybar/scripts
parentdfc681ee304f37de3121176e5cdc03d9e9bf502d (diff)
Polybar path changes, dpi, sxhkd changes
Diffstat (limited to '.config/polybar/scripts')
-rwxr-xr-x.config/polybar/scripts/launcher.sh4
-rwxr-xr-x.config/polybar/scripts/powermenu.sh32
-rw-r--r--.config/polybar/scripts/rofi/launcher.rasi4
3 files changed, 24 insertions, 16 deletions
diff --git a/.config/polybar/scripts/launcher.sh b/.config/polybar/scripts/launcher.sh
index 92a7c99..212a197 100755
--- a/.config/polybar/scripts/launcher.sh
+++ b/.config/polybar/scripts/launcher.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-FILE="$HOME/.config/polybar/forest/scripts/rofi/colors.rasi"
+FILE="$HOME/.config/polybar/scripts/rofi/colors.rasi"
## random accent color
#COLORS=('#EC7875' '#EC6798' '#BE78D1' '#75A4CD' '#00C7DF' '#00B19F' '#61C766' \
@@ -10,4 +10,4 @@ FILE="$HOME/.config/polybar/forest/scripts/rofi/colors.rasi"
#sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE
#sed -i -e "s/se: .*/se: ${SE}FF;/g" $FILE
-rofi -dpi 144 -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/forest/scripts/rofi/launcher.rasi
+rofi -dpi 144 -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/scripts/rofi/launcher.rasi
diff --git a/.config/polybar/scripts/powermenu.sh b/.config/polybar/scripts/powermenu.sh
index 271006d..7b229ae 100755
--- a/.config/polybar/scripts/powermenu.sh
+++ b/.config/polybar/scripts/powermenu.sh
@@ -5,10 +5,10 @@
## Github : @adi1090x
## Twitter : @adi1090x
-dir="~/.config/polybar/forest/scripts/rofi"
+dir="~/.config/polybar/scripts/rofi"
uptime=$(uptime -p | sed -e 's/up //g')
-rofi_command="rofi -theme $dir/powermenu.rasi"
+rofi_command="rofi -no-config -theme $dir/powermenu.rasi"
# Options
shutdown=" Shutdown"
@@ -17,9 +17,19 @@ lock=" Lock"
suspend=" Sleep"
logout=" Logout"
+# Confirmation
+confirm_exit() {
+ rofi -dmenu\
+ -no-config\
+ -i\
+ -no-fixed-num-lines\
+ -p "Are You Sure? : "\
+ -theme $dir/confirm.rasi
+}
+
# Message
msg() {
- rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
+ rofi -no-config -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
}
# Variable passed to rofi
@@ -30,7 +40,7 @@ case $chosen in
$shutdown)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- loginctl poweroff
+ systemctl poweroff
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
@@ -40,7 +50,7 @@ case $chosen in
$reboot)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- loginctl reboot
+ systemctl reboot
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
@@ -48,16 +58,14 @@ case $chosen in
fi
;;
$lock)
- if [[ -f /usr/bin/i3lock ]]; then
- i3lock
- elif [[ -f /usr/bin/betterlockscreen ]]; then
- betterlockscreen -l
- fi
- ;;
+ ~/.config/i3lock/lock.sh
+ ;;
$suspend)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- ZZZ
+ mpc -q pause
+ amixer set Master mute
+ systemctl suspend
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
diff --git a/.config/polybar/scripts/rofi/launcher.rasi b/.config/polybar/scripts/rofi/launcher.rasi
index 5a80370..9bea4a3 100644
--- a/.config/polybar/scripts/rofi/launcher.rasi
+++ b/.config/polybar/scripts/rofi/launcher.rasi
@@ -28,7 +28,7 @@ window {
border: 1px 1px 1px 1px;
border-color: @fg;
border-radius: 0px;
- width: 700px;
+ width: 700px;
height: 600px;
location: center;
x-offset: 0;
@@ -92,7 +92,7 @@ element {
text-color: @fg;
orientation: horizontal;
border-radius: 0px;
- padding: 12px;
+ padding: 12px;
}
element-icon {