This commit is contained in:
Rachel Lambda Samuelsson 2024-09-15 19:45:05 +02:00
parent ba01b9417a
commit 3a6561da03
3 changed files with 45 additions and 2 deletions

View File

@ -71,6 +71,7 @@
renoise = self.packages.${system}.renoise; renoise = self.packages.${system}.renoise;
wall = self.packages.${system}.wall; wall = self.packages.${system}.wall;
protonmail-desktop = self.packages.${system}.protonmail-desktop; protonmail-desktop = self.packages.${system}.protonmail-desktop;
eyezoom = self.packages.${system}.eyezoom;
}; };
}; };
}; };
@ -121,6 +122,7 @@
renoise = import ./pkgs/renoise.nix { inherit pkgs; }; renoise = import ./pkgs/renoise.nix { inherit pkgs; };
wall = import ./pkgs/wall.nix { inherit pkgs; }; wall = import ./pkgs/wall.nix { inherit pkgs; };
protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; }; protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; };
eyezoom = import ./pkgs/eyezoom.nix { inherit pkgs; };
}; };
}); });
} }

View File

@ -13,12 +13,30 @@
appearance.wallpaper = "${extra.wall}"; appearance.wallpaper = "${extra.wall}";
}; };
hotkeys.commands."launch-alacritty" = { hotkeys.commands."launch-terminal" = {
name = "Launch alacritty"; name = "Launch terminal";
key = "Meta+Return"; key = "Meta+Return";
command = "wezterm"; command = "wezterm";
}; };
hotkeys.commands."eye" = {
name = "eye zoom";
key = "Alt+PageUp";
command = "${extra.eyezoom} eye";
};
hotkeys.commands."default" = {
name = "default zoom";
key = "Alt+PageDown";
command = "${extra.eyezoom} default";
};
hotkeys.commands."thin" = {
name = "thin zoom";
key = "Alt+Home";
command = "${extra.eyezoom} eye";
};
hotkeys.commands."cpypsk" = { hotkeys.commands."cpypsk" = {
name = "Launch cpypsk"; name = "Launch cpypsk";
key = "Meta+p"; key = "Meta+p";

23
pkgs/eyezoom.nix Normal file
View File

@ -0,0 +1,23 @@
{ pkgs, ... }:
pkgs.writeScript "eyezoom" ''
W=1920
H=1080
offx=1600
offy=0
HFACTOR=10
WFACTOR=4
case "$1" in
eye)
${pkgs.wmctrl}/bin/wmctrl -R 'Minecraft*' -e 0,$offx,$(( offy - (H * HFACTOR / 2) + (H / 2) )),$W,$((H*HFACTOR))
;;
tiktok)
${pkgs.wmctrl}/bin/wmctrl -R 'Minecraft*' -e 0,$(( offx - ((W/WFACTOR)/2) + (W/2))),$offy,$((W/WFACTOR)),$H
;;
*)
${pkgs.wmctrl}/bin/wmctrl -R 'Minecraft*' -e 0,$offx,$offy,$W,$H
;;
esac
''