210 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *

This commit is contained in:
Max Känner 2024-03-13 20:45:40 +01:00
parent 68c53b010d
commit 684a48804d

View File

@ -32,18 +32,55 @@
fi fi
''; '';
}; };
rotate_lisgd = pkgs.writeTextFile {
name = "rotate_lisgd";
destination = "/bin/rotate_lisgd";
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
# PREV_ORIENTATION and ORIENTATION are given by rot8
LISGD_INPUT='-d /dev/input/by-path/platform-AMDI0010:02-event'
# open nwggrid (Meta+D) by swiping up from the bottom edge
LISGD_ACTIONS='-g "1,DU,B,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 32:1 32:0 125:0"'
# close window (Meta+Shift+Q) by swiping down with 3 fingers
LISGD_ACTIONS+=' -g "3,UD,*,L,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 16:1 16:0 42:0 125:0"'
# move window left (Meta+Shift+H) by swiping left with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 35:1 35:0 42:0 125:0"'
# move window down (Meta+Shift+J) by swiping down with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 36:1 36:0 42:0 125:0"'
# move window up (Meta+Shift+K) by swiping up with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 37:1 37:0 42:0 125:0"'
# move window right (Meta+Shift+L) by swiping right with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 38:1 38:0 42:0 125:0"'
${pkgs.killall}/bin/killall lisgd
LISGD_ORIENTATION=0
if [[ $ORIENTATION == *"normal"* ]]; then
LISGD_ORIENTATION=0
elif [[ $ORIENTATION == *"90"* ]]; then
LISGD_ORIENTATION=3
elif [[ $ORIENTATION == *"180"* ]]; then
LISGD_ORIENTATION=2
elif [[ $ORIENTATION == *"270"* ]]; then
LISGD_ORIENTATION=1
fi
LISGD_ARGS="$LISGD_INPUT -o $LISGD_ORIENTATION $LISGD_ACTIONS"
${pkgs.lisgd}/bin/lisgd $LISGD_ARGS
'';
};
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
squeekboard_format
squeekboard_toggle
waybar # status bar waybar # status bar
swaylock # screen locking swaylock # screen locking
swayidle # automatic screen locking after system idle time swayidle # automatic screen locking after system idle time
kanshi # hotswap displays kanshi # hotswap displays
foot # terminal foot # terminal
keepassxc # used for secrets instead of gnome-keyring keepassxc # used for secrets instead of gnome-keyring
ydotool
lisgd
]; ];
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -159,7 +196,8 @@ in {
{command = "dbus-sway-environment";} {command = "dbus-sway-environment";}
{command = "configure-gtk";} {command = "configure-gtk";}
{command = "${pkgs.squeekboard}/bin/squeekboard";} {command = "${pkgs.squeekboard}/bin/squeekboard";}
{command = "${pkgs.rot8}/bin/rot8 -n 10";} {command = "${pkgs.rot8}/bin/rot8 -n 10 -h ${rotate_lisgd}/bin/rotate_lisgd";}
{command = "${rotate_lisgd}/bin/rotate_lisgd";}
{command = "${pkgs.nwg-launchers}/bin/nwggrid-server -fp";} {command = "${pkgs.nwg-launchers}/bin/nwggrid-server -fp";}
{command = "${pkgs.keepassxc}/bin/keepassxc";} {command = "${pkgs.keepassxc}/bin/keepassxc";}
{command = "${pkgs.waybar}/bin/waybar";} {command = "${pkgs.waybar}/bin/waybar";}