mass update.
[my-dotfiles.git] / bin / blackpearl-powermenu.sh
CommitLineData
fdd76fc5 1#!/bin/bash
2
7abef725 3# rofi_command="rofi -theme blackpearl/powermenu.rasi"
4rofi_command="rofi -theme darknix/powermenu.rasi"
fdd76fc5 5
6### Options ###
7power_off=""
8reboot=""
7abef725 9lock=""
10suspend="⏾"
11log_out="﫼"
fdd76fc5 12# Variable passed to rofi
13options="$power_off\n$reboot\n$lock\n$suspend\n$log_out"
14
7abef725 15chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 0)"
fdd76fc5 16case $chosen in
17 $power_off)
18 notify-send 'shutting down' 'the system is going to shutdown now'
19 sleep 1
20 sudo /sbin/shutdown -h now
21 ;;
22 $reboot)
23 notify-send 'rebooting the system' 'the system is going to reboot now'
24 sleep 1
25 sudo /sbin/shutdown -r now
26 ;;
27 $lock)
28 sleep 1
7abef725 29 i3lock-fancy
fdd76fc5 30 ;;
31 $suspend)
32 sleep 1
33 i3suspend
34 ;;
35 $log_out)
36 i3-exit
37 ;;
38esac
39