reworked desktopctl
This commit is contained in:
parent
c20420e159
commit
5501aaaec9
6 changed files with 199 additions and 2 deletions
30
scripts/desktop/desktopctl.nix
Normal file
30
scripts/desktop/desktopctl.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.writeShellScriptBin "desktopctl" ''
|
||||
case $@ in
|
||||
"Lock Screen")
|
||||
nohup sh -c "i3lock-fancy" > /dev/null &
|
||||
exit 0
|
||||
;;
|
||||
"Log Out")
|
||||
pkill i3
|
||||
exit 0
|
||||
;;
|
||||
"Shut Down")
|
||||
shutdown now
|
||||
exit 0
|
||||
;;
|
||||
"Reboot")
|
||||
systemctl reboot
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n"
|
||||
echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:30px;}\n"
|
||||
echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n"
|
||||
echo -en "\0theme\x1finputbar{margin:0;}\n"
|
||||
echo -en "Lock Screen\0icon\x1f${../../other/assets/desktopctl/lock-screen.svg}\n"
|
||||
echo -en "Log Out\0icon\x1f${../../other/assets/desktopctl/logout.svg}\n"
|
||||
echo -en "Shut Down\0icon\x1f${../../other/assets/desktopctl/shutdown.svg}\n"
|
||||
echo -en "Reboot\0icon\x1f${../../other/assets/desktopctl/reboot.svg}\n"
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue