mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-22 21:24:41 +01:00
reworked desktopctl
This commit is contained in:
parent
c20420e159
commit
5501aaaec9
|
@ -3,7 +3,8 @@
|
||||||
let
|
let
|
||||||
cfg = config.jade.desktop;
|
cfg = config.jade.desktop;
|
||||||
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../scripts/desktop/window-screenshot.sh);
|
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../scripts/desktop/window-screenshot.sh);
|
||||||
desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
||||||
|
desktop-ctl = import ../scripts/desktop/desktopctl.nix { pkgs = pkgs; };
|
||||||
em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../scripts/desktop/macros/record.sh);
|
em-record = pkgs.writeShellScriptBin "em-record.sh" (builtins.readFile ../scripts/desktop/macros/record.sh);
|
||||||
em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../scripts/desktop/macros/play.sh);
|
em-play = pkgs.writeShellScriptBin "em-play.sh" (builtins.readFile ../scripts/desktop/macros/play.sh);
|
||||||
em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../scripts/desktop/macros/play-loop.sh);
|
em-play-loop = pkgs.writeShellScriptBin "em-play-loop.sh" (builtins.readFile ../scripts/desktop/macros/play-loop.sh);
|
||||||
|
@ -111,7 +112,7 @@ in with lib; {
|
||||||
"${mod}+d" = "exec --no-startup-id rofi -show drun -theme ${../other/rofi-themes/applauncher.rasi}";
|
"${mod}+d" = "exec --no-startup-id rofi -show drun -theme ${../other/rofi-themes/applauncher.rasi}";
|
||||||
"${mod}+space" = "exec --no-startup-id -show window";
|
"${mod}+space" = "exec --no-startup-id -show window";
|
||||||
"${mod}+i" = "exec --no-startup-id rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy";
|
"${mod}+i" = "exec --no-startup-id rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy";
|
||||||
"${mod}+Shift+e" = "exec --no-startup-id desktop-ctl.sh";
|
"${mod}+Shift+e" = "exec --no-startup-id rofi -show \"desktopctl\" -modes \"desktopctl:${desktop-ctl.outPath}/bin/desktopctl\" -theme ${../other/rofi-themes/applauncher.rasi}";
|
||||||
"${mod}+m" = "exec --no-startup-id menu-qalc";
|
"${mod}+m" = "exec --no-startup-id menu-qalc";
|
||||||
|
|
||||||
# audio
|
# audio
|
||||||
|
|
57
other/assets/desktopctl/lock-screen.svg
Normal file
57
other/assets/desktopctl/lock-screen.svg
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="48"
|
||||||
|
height="48"
|
||||||
|
viewBox="0 0 12.7 12.7"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
sodipodi:docname="lock-screen.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="true"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="17.689955"
|
||||||
|
inkscape:cx="18.541596"
|
||||||
|
inkscape:cy="31.712913"
|
||||||
|
inkscape:window-width="1888"
|
||||||
|
inkscape:window-height="1144"
|
||||||
|
inkscape:window-x="14"
|
||||||
|
inkscape:window-y="38"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid686"
|
||||||
|
spacingx="0.21166667"
|
||||||
|
spacingy="0.21166667" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
id="rect3948"
|
||||||
|
style="stroke-width:1.102;fill:#ebdbb2;fill-opacity:1"
|
||||||
|
d="M 3.175 6.35 C 2.8232103 6.35 2.5398966 6.6333136 2.5398966 6.9851034 L 2.5398966 11.006563 C 2.5398966 11.358353 2.8232103 11.641667 3.175 11.641667 L 9.525 11.641667 C 9.8767897 11.641667 10.160103 11.358353 10.160103 11.006563 L 10.160103 6.9851034 C 10.160103 6.6333136 9.8767897 6.35 9.525 6.35 L 3.175 6.35 z M 6.35 7.5220215 C 6.8174385 7.5221356 7.196346 7.9010422 7.19646 8.3684814 C 7.1965 8.6709638 7.0351657 8.9504919 6.77323 9.10177 L 6.77323 9.8500448 C 6.77323 9.8500448 6.7733326 10.273275 6.35 10.273275 L 6.3453491 10.273275 C 6.2988402 10.271725 5.92677 10.246921 5.92677 9.8500448 L 5.92677 9.6913981 L 5.92677 9.10177 C 5.6648333 8.9504919 5.503499 8.6709638 5.50354 8.3684814 C 5.503654 7.9010422 5.8825605 7.5221356 6.35 7.5220215 z " />
|
||||||
|
<path
|
||||||
|
style="fill:#ebdbb2;stroke:none;stroke-width:1.102;stroke-dasharray:none;fill-opacity:1"
|
||||||
|
d="M 3.5983333,6.3499999 V 4.2333333 c 0,0 0,2.7516666 0,0 0,-2.7516666 2.7516666,-2.7516666 2.7516666,-2.7516666 0,0 -2.7516666,0 0,0 2.7516669,0 2.7516669,2.7516666 2.7516669,2.7516666 V 6.3499999 H 8.0433332 v 0 -2.1166666 c 0,0 0,1.6933333 0,0 C 8.0433332,2.54 6.3499999,2.54 6.3499999,2.54 c 0,0 1.6933333,0 0,0 -1.6933333,0 -1.6933333,1.6933333 -1.6933333,1.6933333 v 2.1166666 z"
|
||||||
|
id="path4894" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
59
other/assets/desktopctl/logout.svg
Normal file
59
other/assets/desktopctl/logout.svg
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="48.0px"
|
||||||
|
height="48.0px"
|
||||||
|
viewBox="0 0 48.0 48.0"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
sodipodi:docname="logout.svg"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview691"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="23"
|
||||||
|
inkscape:cx="28.130435"
|
||||||
|
inkscape:cy="24.869565"
|
||||||
|
inkscape:window-width="1888"
|
||||||
|
inkscape:window-height="1126"
|
||||||
|
inkscape:window-x="14"
|
||||||
|
inkscape:window-y="58"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid1177"
|
||||||
|
spacingx="0.8"
|
||||||
|
spacingy="0.8" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs686" />
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ebdbb2;stroke-width:3.267;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
d="m 16.8,24 h 7.774528 13.250944 L 30.4,15.2 37.825472,24 30.4,32.8"
|
||||||
|
id="path12044"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ebdbb2;stroke-width:3.267;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||||
|
d="M 32,8 H 10.4 l 0,32.8 h 20.8 v 0 H 32"
|
||||||
|
id="path17348"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
21
other/assets/desktopctl/reboot.svg
Normal file
21
other/assets/desktopctl/reboot.svg
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="48.0px"
|
||||||
|
height="48.0px"
|
||||||
|
viewBox="0 0 48.0 48.0"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs686" />
|
||||||
|
<g
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#ebdbb2;stroke-width:4.91339;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
|
d="M 40,24 C 40,40 24,40 24,40 v 0 C 8,40 8,24 8,24 v 0 C 8,8 24,8 24,8 L 20,14.4 24,8 17.6,4"
|
||||||
|
id="path4536" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 625 B |
29
other/assets/desktopctl/shutdown.svg
Normal file
29
other/assets/desktopctl/shutdown.svg
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="48.0px"
|
||||||
|
height="48.0px"
|
||||||
|
viewBox="0 0 48.0 48.0"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs1284" />
|
||||||
|
<g
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
id="path2614"
|
||||||
|
style="fill:#ebdbb2;fill-opacity:1;stroke:#ebdbb2;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
|
d="M 24 6.4003906 A 17.599998 17.599998 0 0 0 6.4003906 24 A 17.599998 17.599998 0 0 0 20 41.121094 L 20 36.988281 A 13.6 13.599999 0 0 1 10.400391 24 A 13.6 13.599999 0 0 1 24 10.400391 A 13.6 13.599999 0 0 1 37.599609 24 A 13.6 13.599999 0 0 1 28 36.988281 L 28 41.121094 A 17.599998 17.599998 0 0 0 41.599609 24 A 17.599998 17.599998 0 0 0 24 6.4003906 z " />
|
||||||
|
<rect
|
||||||
|
style="fill:#ebdbb2;fill-opacity:1;stroke:#ebdbb2;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
|
id="rect9058"
|
||||||
|
width="4"
|
||||||
|
height="20"
|
||||||
|
x="22"
|
||||||
|
y="24"
|
||||||
|
ry="2" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
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…
Reference in a new issue