first commit
This commit is contained in:
commit
78b79e224f
239 changed files with 14912 additions and 0 deletions
41
rofi/scripts/powermenu.sh
Executable file
41
rofi/scripts/powermenu.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme themes/powermenu.rasi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
# Options
|
||||
shutdown="襤"
|
||||
reboot="ﰇ"
|
||||
lock=""
|
||||
suspend="鈴"
|
||||
logout=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "UP - $uptime" -dmenu -selected-row 2)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
$reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
$lock)
|
||||
i3lock
|
||||
;;
|
||||
$suspend)
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
;;
|
||||
$logout)
|
||||
openbox --exit
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue