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