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