diff --git a/data/herbstluftwm/keybinds.nix b/data/herbstluftwm/keybinds.nix index 6be4b20..89bb2d8 100644 --- a/data/herbstluftwm/keybinds.nix +++ b/data/herbstluftwm/keybinds.nix @@ -1,4 +1,4 @@ -MOD: TAGS: +MOD: TAGS: pkgs: { # ${MOD} will be set to the main modifier key @@ -74,10 +74,11 @@ MOD: TAGS: "${MOD}-Shift-space" = " cycle_layout -1"; "${MOD}-t " = "spawn kitty"; - "${MOD}-b " = "spawn firefox"; - "${MOD}-m " = "spawn thunderbird"; + "${MOD}-b " = "spawn ${pkgs.firefox}/bin/firefox"; + "${MOD}-m " = "spawn ${pkgs.thunderbird}/bin/thunderbird"; "${MOD}-Shift-l " = "spawn systemctl suspend"; "Menu" = "spawn rofi -show run"; + "${MOD}-F12" = "spawn ${(import ../../modules/touchscreen.nix) pkgs}"; } // builtins.listToAttrs (map (x: { name = "${MOD}-${x}"; diff --git a/data/herbstluftwm/xinitrc b/data/herbstluftwm/xinitrc index ff931d7..817cc8a 100755 --- a/data/herbstluftwm/xinitrc +++ b/data/herbstluftwm/xinitrc @@ -12,4 +12,6 @@ xsetroot -solid '#000000' # #touchegg & #dunst & +autorandr -c +xset r rate 235 60 exec dbus-launch --sh-syntax --exit-with-session -- herbstluftwm --locked diff --git a/modules/touchscreen.nix b/modules/touchscreen.nix new file mode 100644 index 0000000..e8e8203 --- /dev/null +++ b/modules/touchscreen.nix @@ -0,0 +1,10 @@ +pkgs: +# This is small script to map touchinputs to outputs +# in an ideal world this would happen automatically but +# with udev and X11 we truly do not live in an ideal world +"${pkgs.writeShellScriptBin "fix-shit" '' + xinput --map-to-output "ELAN2514:00 04F3:2817" eDP-1 + xinput --map-to-output "ELAN2514:00 04F3:2817 Stylus Pen (0)" eDP-1 + xset r rate 235 60 + autorandr -c +''}/bin/fix-shit" diff --git a/users/common/graphical/herbstluftwm.nix b/users/common/graphical/herbstluftwm.nix index 6dc0d67..3a5e01b 100644 --- a/users/common/graphical/herbstluftwm.nix +++ b/users/common/graphical/herbstluftwm.nix @@ -46,7 +46,7 @@ in { "${MOD}-Button3" = "resize"; }; - keybinds = import (data_dir + /keybinds.nix) MOD TAGS; + keybinds = import (data_dir + /keybinds.nix) MOD TAGS pkgs; settings = { "default_frame_layout" = 3; diff --git a/users/common/programs/polybar.nix b/users/common/programs/polybar.nix index 062e0e8..3e7bd73 100644 --- a/users/common/programs/polybar.nix +++ b/users/common/programs/polybar.nix @@ -74,8 +74,12 @@ in { monitor-fallback = "eDP-1"; bottom = true; - dpi = 96; - height = 22; + # for UHD Polybar + dpi = 144; + height = 33; + # for HD Polybar + #dpi = 96; + #height = 22; offset.x = "0%"; offset.y = "0%"; diff --git a/users/common/touchscreen.nix b/users/common/touchscreen.nix deleted file mode 100644 index 03f0c5f..0000000 --- a/users/common/touchscreen.nix +++ /dev/null @@ -1,13 +0,0 @@ -{pkgs, ...}: let - # This is small script to map touchinputs to outputs - # in an ideal world this would happen automatically but - # with udev and X11 we truly do not live in an ideal world - fix = pkgs.writeShellScriptBin "fix-shit" '' - xinput --map-to-output "ELAN2514:00 04F3:2817" eDP-1 - xinput --map-to-output "ELAN2514:00 04F3:2817 Stylus Pen (0)" eDP-1 - xset r rate 235 60 - autorandr -c - ''; -in { - home.packages = [fix]; -} diff --git a/users/patrick.nix b/users/patrick.nix index 3f423e6..8415096 100644 --- a/users/patrick.nix +++ b/users/patrick.nix @@ -9,7 +9,6 @@ common/graphical/autorandr.nix common/programs/polybar.nix common/programs/rofi.nix - common/touchscreen.nix #common/touchegg.nix ];