updated all my files for rofi
[danixland-rofi.git] / scripts / darknix-powermenu.sh
... / ...
CommitLineData
1#!/bin/bash
2
3# rofi_command="rofi -theme blackpearl/powermenu.rasi"
4rofi_command="rofi -theme darknix/powermenu.rasi"
5
6### Options ###
7power_off=""
8reboot=""
9lock=""
10suspend="⏾"
11log_out="﫼"
12# Variable passed to rofi
13options="$power_off\n$reboot\n$lock\n$suspend\n$log_out"
14
15chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 0)"
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
29 i3lock-fancy
30 ;;
31 $suspend)
32 sleep 1
33 i3suspend
34 ;;
35 $log_out)
36 i3-exit
37 ;;
38esac
39