forked from Keyitdev/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: added powermenu, minor bug fixes
- Loading branch information
Showing
7 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
|
||
# rofi theme | ||
theme="$HOME/.config/rofi/main_without_icons.rasi" | ||
|
||
get_options() { | ||
echo " Poweroff" | ||
echo " Reboot" | ||
echo " Hibernate" | ||
echo " Lock" | ||
echo " Suspend" | ||
echo " Log out" | ||
} | ||
|
||
main() { | ||
|
||
# get choice from rofi | ||
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme") | ||
|
||
# run the selected command | ||
case $choice in | ||
' Poweroff') | ||
systemctl poweroff | ||
;; | ||
' Reboot') | ||
systemctl reboot | ||
;; | ||
' Hibernate') | ||
systemctl hibernate | ||
;; | ||
' Lock') | ||
lock | ||
;; | ||
' Suspend') | ||
systemctl suspend | ||
;; | ||
' Log out') | ||
i3-msg exit | ||
;; | ||
esac | ||
|
||
# done | ||
set -e | ||
} | ||
|
||
main & | ||
|
||
exit 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.