mirror of
https://github.com/Dejvino/pinephone-sway-poc.git
synced 2024-11-22 14:02:35 +00:00
Improved menuselect. Add shutdown and restart option.
This commit is contained in:
parent
1fda73be71
commit
10fccd77a1
@ -3,12 +3,18 @@
|
|||||||
MENUOPTIONS=~/.menuoptions
|
MENUOPTIONS=~/.menuoptions
|
||||||
MENUSELECT=~/.menuselect
|
MENUSELECT=~/.menuselect
|
||||||
|
|
||||||
|
HEIGHT=0
|
||||||
|
WIDTH=0
|
||||||
|
LINES=0
|
||||||
|
|
||||||
if [ ! -f $MENUOPTIONS ]
|
if [ ! -f $MENUOPTIONS ]
|
||||||
then
|
then
|
||||||
echo 'termite Terminal' > $MENUOPTIONS
|
echo 'termite Terminal' > $MENUOPTIONS
|
||||||
echo 'audacious Music_Player' >> $MENUOPTIONS
|
echo 'audacious "Music Player"' >> $MENUOPTIONS
|
||||||
echo 'firefox Web_Browser' >> $MENUOPTIONS
|
echo 'firefox "Web Browser"' >> $MENUOPTIONS
|
||||||
|
echo '"sudo reboot" Restart' >> $MENUOPTIONS
|
||||||
|
echo '"sudo poweroff" Shutdown' >> $MENUOPTIONS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dialog --menu EXECUTE 15 40 6 `cat $MENUOPTIONS` 2>$MENUSELECT && swaymsg exec `cat $MENUSELECT`
|
cat $MENUOPTIONS | xargs dialog --menu EXECUTE $HEIGHT $WIDTH $LINES 2>$MENUSELECT && swaymsg exec "`cat $MENUSELECT`"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user