feat: clone-term on sway
This commit is contained in:
parent
d23e72a4d1
commit
23c355b2d9
|
@ -3,13 +3,18 @@
|
|||
ps,
|
||||
procps,
|
||||
xdotool,
|
||||
jq,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "clone-term";
|
||||
runtimeInputs = [ps procps xdotool];
|
||||
runtimeInputs = [ps procps xdotool jq];
|
||||
text = ''
|
||||
|
||||
if [[ $XDG_CURRENT_DESKTOP == sway ]]; then
|
||||
PAREN=$(swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true).pid')
|
||||
else
|
||||
PAREN=$(xdotool getwindowfocus getwindowpid)
|
||||
fi
|
||||
|
||||
MAXDEPTH=0
|
||||
SELECTED=0
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
maim = "${pkgs.maim}/bin/maim -qs -b 1 --hidecursor";
|
||||
in {
|
||||
"Menu" = "exec ${cfg.menu}";
|
||||
"${cfg.modifier}+c" = "exec ${lib.getExe pkgs.scripts.clone-term}";
|
||||
"Ctrl+F9" = "exec ${config.xsession.wallpapers.script}";
|
||||
"${cfg.modifier}+F12" =
|
||||
"exec "
|
||||
|
|
|
@ -94,6 +94,7 @@ let
|
|||
"${modifier}+b" = "exec firefox";
|
||||
"${modifier}+m" = "exec thunderbird";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+c" = "exec ${lib.getExe pkgs.scripts.clone-term}";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
|
|
Loading…
Reference in a new issue