eyezoom
This commit is contained in:
parent
ba01b9417a
commit
3a6561da03
|
@ -71,6 +71,7 @@
|
|||
renoise = self.packages.${system}.renoise;
|
||||
wall = self.packages.${system}.wall;
|
||||
protonmail-desktop = self.packages.${system}.protonmail-desktop;
|
||||
eyezoom = self.packages.${system}.eyezoom;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -121,6 +122,7 @@
|
|||
renoise = import ./pkgs/renoise.nix { inherit pkgs; };
|
||||
wall = import ./pkgs/wall.nix { inherit pkgs; };
|
||||
protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; };
|
||||
eyezoom = import ./pkgs/eyezoom.nix { inherit pkgs; };
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,12 +13,30 @@
|
|||
appearance.wallpaper = "${extra.wall}";
|
||||
};
|
||||
|
||||
hotkeys.commands."launch-alacritty" = {
|
||||
name = "Launch alacritty";
|
||||
hotkeys.commands."launch-terminal" = {
|
||||
name = "Launch terminal";
|
||||
key = "Meta+Return";
|
||||
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" = {
|
||||
name = "Launch cpypsk";
|
||||
key = "Meta+p";
|
||||
|
|
23
pkgs/eyezoom.nix
Normal file
23
pkgs/eyezoom.nix
Normal 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
|
||||
''
|
Loading…
Reference in New Issue
Block a user