nixpkgs/home/xsession.nix
2024-06-12 10:37:35 +02:00

51 lines
1.3 KiB
Nix

{
config
,pkgs
,hostName
,...
}:
let
initExtraHikari = ''
xrandr --auto --output eDP-1 --brightness 1 --scale 1.25x1.25
# Use natural scrolling for trackpad
xinput --set-prop bcm5974 'libinput Natural Scrolling Enabled' 1
'';
initExtraHikari2 = ''
xrandr --auto --output eDP-1 --brightness 1
# Enable tapping instead of phsyical click
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Tapping Enabled' 1
# Use natural scrolling for trackpad
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
'';
initExtraHikari3 = ''
xrandr --auto --output eDP-1 --brightness 1
# Use natural scrolling for trackpad
xinput --set-prop 'PIXA3854:00 093A:0274 Touchpad' 'libinput Natural Scrolling Enabled' 1
'';
in {
xsession = {
enable = true;
numlock.enable = true;
initExtra = (if hostName == "hikari" then initExtraHikari else (if hostName == "hikari3" then initExtraHikari3 else initExtraHikari2)) + ''
# Set backlight of output
xbacklight -set 25
# Set background color
xsetroot -solid "#2E3436"
# Disable screen saver
xset s off
# Increase mouse speed
xinput --set-prop 13 'libinput Accel Speed' 1
'';
};
}