add steamdeck keyboard inputs
This commit is contained in:
parent
2522f7f8e6
commit
9c79269bd6
105
home.nix
105
home.nix
@ -1,17 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Define variables for your workspaces and displays
|
|
||||||
display1 = "card1-eDP-1"; # Replace with your actual display identifier
|
|
||||||
touchDisplay = "10248:4117:FTS3528:00_2808:1015";
|
|
||||||
workspace1 = "1:Web";
|
|
||||||
workspace2 = "2:App";
|
|
||||||
workspace3 = "3:Chat";
|
|
||||||
workspace4 = "4:Read";
|
|
||||||
workspace5 = "5:Code";
|
|
||||||
workspace6 = "6:Password";
|
|
||||||
workspace7 = "7:Shell";
|
|
||||||
workspace8 = "8:Media";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
@ -56,7 +45,7 @@ in
|
|||||||
|
|
||||||
# steam deck touch compability in non-steam games
|
# steam deck touch compability in non-steam games
|
||||||
caribou
|
caribou
|
||||||
#nixgl.auto.nixGLDefault
|
evtest # for input key testing
|
||||||
|
|
||||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
# # overrides. You can do that directly here, just don't forget the
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
@ -146,27 +135,79 @@ in
|
|||||||
terminal = "alacritty";
|
terminal = "alacritty";
|
||||||
menu = "bemenu-run";
|
menu = "bemenu-run";
|
||||||
|
|
||||||
|
# Define variables for your workspaces and displays
|
||||||
|
display1 = "card1-eDP-1";
|
||||||
|
workspace1 = "1:Web";
|
||||||
|
workspace2 = "2:App";
|
||||||
|
workspace3 = "3:Chat";
|
||||||
|
workspace4 = "4:Read";
|
||||||
|
workspace5 = "5:Code";
|
||||||
|
workspace6 = "6:Password";
|
||||||
|
workspace7 = "7:Shell";
|
||||||
|
workspace8 = "8:Media";
|
||||||
|
|
||||||
# Autostart applications
|
# Autostart applications
|
||||||
startup = [
|
startup = [
|
||||||
{command = "nvim";}
|
{ command = "swaymsg workspace ${workspace7}; exec nvim"; }
|
||||||
{command = "allacritty";}
|
{ command = "swaymsg workspace ${workspace7}; exec alacritty"; }
|
||||||
{command = "keepassxc";}
|
{ command = "keepassxc"; }
|
||||||
{command = "logseq";}
|
{ command = "logseq"; }
|
||||||
{command = "thunderbird";}
|
{ command = "thunderbird"; }
|
||||||
{command = "firefox";}
|
{ command = "firefox"; }
|
||||||
#{command = "steam";}
|
#{ command = "steam"; }
|
||||||
# Update environment variables
|
# Update environment variables
|
||||||
{command = "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE PATH";}
|
{ command = "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE PATH";}
|
||||||
# Start sway-session.target
|
# Start sway-session.target
|
||||||
{command = "systemctl --user start sway-session.target";}
|
{ command = "systemctl --user start sway-session.target";}
|
||||||
|
# Switch to the desired workspaces on each output
|
||||||
|
{ command = "swaymsg focus output ${display1}; swaymsg workspace ${workspace1}"; }
|
||||||
|
{ command = "swaymsg focus output ${display2}; swaymsg workspace ${workspace3}"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Keyboard layout
|
# Keyboard layout
|
||||||
input = {
|
input = {
|
||||||
# input touchDisplay
|
# Enable touch screen
|
||||||
|
"10248:4117:FTS3528:00_2808:1015" = {
|
||||||
|
send_events = "enabled";
|
||||||
|
tap_enabled = true;
|
||||||
|
map_to_output = "${display1}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Map touch devices to display
|
||||||
"type:touch" = {
|
"type:touch" = {
|
||||||
map_to_output = "${display1}";
|
map_to_output = "${display1}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Configure Steam Controller pointer
|
||||||
|
"10462:4613:Valve_Software_Steam_Controller" = {
|
||||||
|
# For the pointer device
|
||||||
|
accel_speed = 0.0;
|
||||||
|
natural_scroll = false;
|
||||||
|
left_handed = false;
|
||||||
|
scroll_method = "two_finger";
|
||||||
|
middle_emulation = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure Steam Controller keyboard
|
||||||
|
"10462:4613:Valve_Software_Steam_Controller" = {
|
||||||
|
xkb_layout = "de";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set German layout for all keyboards
|
||||||
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "de";
|
||||||
|
repeat_delay = 600;
|
||||||
|
repeat_rate = 25;
|
||||||
|
};
|
||||||
|
|
||||||
|
# For all pointers
|
||||||
|
"type:pointer" = {
|
||||||
|
accel_speed = 0.0;
|
||||||
|
natural_scroll = false;
|
||||||
|
left_handed = false;
|
||||||
|
middle_emulation = true;
|
||||||
|
};
|
||||||
|
|
||||||
"*" = {
|
"*" = {
|
||||||
xkb_layout = "de"; # German keyboard layout
|
xkb_layout = "de"; # German keyboard layout
|
||||||
};
|
};
|
||||||
@ -174,14 +215,14 @@ in
|
|||||||
|
|
||||||
# Display configuration
|
# Display configuration
|
||||||
output = {
|
output = {
|
||||||
"*" = {
|
|
||||||
scale = "1";
|
|
||||||
};
|
|
||||||
"${display1}" = {
|
"${display1}" = {
|
||||||
res = "1280x800"; # Steam Deck resolution
|
res = "1280x800"; # Steam Deck resolution
|
||||||
pos = "0 0";
|
pos = "0 0";
|
||||||
scale = "1";
|
scale = "1";
|
||||||
};
|
};
|
||||||
|
"*" = {
|
||||||
|
scale = "1";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
@ -223,7 +264,9 @@ in
|
|||||||
"XF86MonBrightnessUp" = "exec brightnessctl set 5%+";
|
"XF86MonBrightnessUp" = "exec brightnessctl set 5%+";
|
||||||
"Print" = "exec grimshot save area";
|
"Print" = "exec grimshot save area";
|
||||||
"Mod4+Shift+q" = "exec swaynagmode --exit";
|
"Mod4+Shift+q" = "exec swaynagmode --exit";
|
||||||
"Mod4+Shift+Return" = "exec swaynagmode --confirm";
|
"Mod4+Shift+Return" = "exec swaynagmode --confirm";
|
||||||
|
# steamdeck specific keys
|
||||||
|
# "bindcode 304" = "exec firefox";...
|
||||||
};
|
};
|
||||||
|
|
||||||
# Assign workspaces to outputs (adjust as needed)
|
# Assign workspaces to outputs (adjust as needed)
|
||||||
@ -251,9 +294,9 @@ in
|
|||||||
"${workspace6}" = [ { app_id = "org.keepassxc.KeePassXC"; } ];
|
"${workspace6}" = [ { app_id = "org.keepassxc.KeePassXC"; } ];
|
||||||
"${workspace7}" = [ { app_id = "Alacritty"; } ];
|
"${workspace7}" = [ { app_id = "Alacritty"; } ];
|
||||||
"${workspace8}" = [
|
"${workspace8}" = [
|
||||||
{ class = "vlc"; }
|
{ class = "vlc"; }
|
||||||
{ class = "steam"; }
|
{ class = "steam"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user