-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrofi-session
More file actions
executable file
·54 lines (45 loc) · 1.45 KB
/
rofi-session
File metadata and controls
executable file
·54 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# .-----.-----.--.--.--.-----.----.--------.-----.-----.--.--.
# | _ | _ | | | | -__| _| | -__| | | |
# | __|_____|________|_____|__| |__|__|__|_____|__|__|_____|
# |__|
# Author: Dilip Chauhan
# Github: https://github/TechnicalDC
USE_ICON="no"
ROFI_THEME="$HOME/.config/rofi/themes/style-3/powermenu.rasi"
option1="Lock"
option2="Logout"
option3="Reboot"
option4="Shutdown"
if [ "$USE_ICON" = "yes" ]; then
option1=" "
option2=" "
option3=" "
option4=" "
fi
options="$option1\n"
options="$options$option2\n"
options="$options$option3\n$option4"
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -theme $ROFI_THEME -l 4)
case $choice in
$option1)
hyprlock -c $HOME/.config/hypr/hyprlock.conf ;;
$option2)
# choice=$(echo "$yes|$no" | rofi -dmenu -sep "|" -theme ~/.config/rofi/themes/pywal/dialog.rasi -mesg "Are you sure?")
# if [[ $choice == $yes ]]; then
hyprctl dispatch exit || niri msg action quit
# fi ;;
;;
$option3)
# choice=$(echo "$yes|$no" | rofi -dmenu -sep "|" -theme ~/.config/rofi/themes/pywal/dialog.rasi -mesg "Are you sure?")
# if [[ $choice == $yes ]]; then
systemctl reboot
# fi ;;
;;
$option4)
# choice=$(echo "$yes|$no" | rofi -dmenu -sep "|" -theme ~/.config/rofi/themes/pywal/dialog.rasi -mesg "Are you sure?")
# if [[ $choice == $yes ]]; then
systemctl poweroff
# fi ;;
;;
esac