update config
This commit is contained in:
parent
9c79269bd6
commit
ff1e9251a0
139
home.nix
139
home.nix
@ -1,6 +1,17 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# Define variables for your workspaces and displays
|
||||||
|
display1 = "card1-eDP-1";
|
||||||
|
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
|
||||||
@ -46,6 +57,8 @@ in
|
|||||||
# steam deck touch compability in non-steam games
|
# steam deck touch compability in non-steam games
|
||||||
caribou
|
caribou
|
||||||
evtest # for input key testing
|
evtest # for input key testing
|
||||||
|
wtype
|
||||||
|
playerctl
|
||||||
|
|
||||||
# # 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
|
||||||
@ -135,17 +148,6 @@ 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 = "swaymsg workspace ${workspace7}; exec nvim"; }
|
{ command = "swaymsg workspace ${workspace7}; exec nvim"; }
|
||||||
@ -161,15 +163,15 @@ in
|
|||||||
{ command = "systemctl --user start sway-session.target";}
|
{ command = "systemctl --user start sway-session.target";}
|
||||||
# Switch to the desired workspaces on each output
|
# Switch to the desired workspaces on each output
|
||||||
{ command = "swaymsg focus output ${display1}; swaymsg workspace ${workspace1}"; }
|
{ command = "swaymsg focus output ${display1}; swaymsg workspace ${workspace1}"; }
|
||||||
{ command = "swaymsg focus output ${display2}; swaymsg workspace ${workspace3}"; }
|
#{ command = "swaymsg focus output ${display2}; swaymsg workspace ${workspace3}"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Keyboard layout
|
# Keyboard layout
|
||||||
input = {
|
input = {
|
||||||
# Enable touch screen
|
# Enable touch screen
|
||||||
"10248:4117:FTS3528:00_2808:1015" = {
|
"10248:4117:FTS3528:00_2808:1015" = {
|
||||||
send_events = "enabled";
|
#send_events = "enabled";
|
||||||
tap_enabled = true;
|
#tap_enabled = "true";
|
||||||
map_to_output = "${display1}";
|
map_to_output = "${display1}";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -181,31 +183,26 @@ in
|
|||||||
# Configure Steam Controller pointer
|
# Configure Steam Controller pointer
|
||||||
"10462:4613:Valve_Software_Steam_Controller" = {
|
"10462:4613:Valve_Software_Steam_Controller" = {
|
||||||
# For the pointer device
|
# For the pointer device
|
||||||
accel_speed = 0.0;
|
#accel_speed = "0.0";
|
||||||
natural_scroll = false;
|
natural_scroll = "false";
|
||||||
left_handed = false;
|
left_handed = "false";
|
||||||
scroll_method = "two_finger";
|
scroll_method = "two_finger";
|
||||||
middle_emulation = true;
|
middle_emulation = "true";
|
||||||
};
|
|
||||||
|
|
||||||
# Configure Steam Controller keyboard
|
|
||||||
"10462:4613:Valve_Software_Steam_Controller" = {
|
|
||||||
xkb_layout = "de";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set German layout for all keyboards
|
# Set German layout for all keyboards
|
||||||
"type:keyboard" = {
|
"type:keyboard" = {
|
||||||
xkb_layout = "de";
|
xkb_layout = "de";
|
||||||
repeat_delay = 600;
|
repeat_delay = "600";
|
||||||
repeat_rate = 25;
|
repeat_rate = "25";
|
||||||
};
|
};
|
||||||
|
|
||||||
# For all pointers
|
# For all pointers
|
||||||
"type:pointer" = {
|
"type:pointer" = {
|
||||||
accel_speed = 0.0;
|
#accel_speed = "0.0";
|
||||||
natural_scroll = false;
|
natural_scroll = "false";
|
||||||
left_handed = false;
|
left_handed = "false";
|
||||||
middle_emulation = true;
|
middle_emulation = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
"*" = {
|
"*" = {
|
||||||
@ -270,13 +267,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Assign workspaces to outputs (adjust as needed)
|
# Assign workspaces to outputs (adjust as needed)
|
||||||
workspaceOutputAssign = [
|
#workspaceOutputAssign = [
|
||||||
{
|
# {
|
||||||
workspace = workspace1;
|
# workspace = workspace1;
|
||||||
output = display1;
|
# output = display1;
|
||||||
}
|
# }
|
||||||
# Add other workspace-output assignments if you have multiple monitors
|
# # Add other workspace-output assignments if you have multiple monitors
|
||||||
];
|
#];
|
||||||
|
|
||||||
# Assign applications to workspaces
|
# Assign applications to workspaces
|
||||||
assigns = {
|
assigns = {
|
||||||
@ -299,6 +296,76 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# Extra configuration for bindcode mappings
|
||||||
|
extraConfig = ''
|
||||||
|
# Map Steam Deck buttons to actions
|
||||||
|
|
||||||
|
# A Button (304) - Enter key
|
||||||
|
bindcode --release 304 exec wtype -k Return
|
||||||
|
|
||||||
|
# B Button (305) - Escape key
|
||||||
|
bindcode --release 305 exec wtype -k Escape
|
||||||
|
|
||||||
|
# X Button (308) - Ctrl+C (Copy)
|
||||||
|
bindcode --release 308 exec wtype -M ctrl -k c -m ctrl
|
||||||
|
|
||||||
|
# Y Button (307) - Ctrl+V (Paste)
|
||||||
|
bindcode --release 307 exec wtype -M ctrl -k v -m ctrl
|
||||||
|
|
||||||
|
# Left Shoulder (310) - Volume Down
|
||||||
|
bindcode --release 310 exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
|
||||||
|
# Right Shoulder (311) - Volume Up
|
||||||
|
bindcode --release 311 exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
|
|
||||||
|
# Left Trigger (312) - Previous Track
|
||||||
|
bindcode --release 312 exec playerctl previous
|
||||||
|
|
||||||
|
# Right Trigger (313) - Next Track
|
||||||
|
bindcode --release 313 exec playerctl next
|
||||||
|
|
||||||
|
# Select Button (314) - Open Application Launcher
|
||||||
|
bindcode --release 314 exec bemenu-run
|
||||||
|
|
||||||
|
# Start Button (315) - Play/Pause Media
|
||||||
|
bindcode --release 315 exec playerctl play-pause
|
||||||
|
|
||||||
|
# Steam Button (316) - Lock Screen
|
||||||
|
bindcode --release 316 exec swaylock
|
||||||
|
|
||||||
|
# Left Stick Press (317) - Toggle Mute
|
||||||
|
bindcode --release 317 exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
|
||||||
|
# Right Stick Press (318) - Open Terminal
|
||||||
|
bindcode --release 318 exec alacritty
|
||||||
|
|
||||||
|
# D-Pad Up (544) - Arrow Up
|
||||||
|
bindcode --release 544 exec wtype -k Up
|
||||||
|
|
||||||
|
# D-Pad Down (545) - Arrow Down
|
||||||
|
bindcode --release 545 exec wtype -k Down
|
||||||
|
|
||||||
|
# D-Pad Left (546) - Arrow Left
|
||||||
|
bindcode --release 546 exec wtype -k Left
|
||||||
|
|
||||||
|
# D-Pad Right (547) - Arrow Right
|
||||||
|
bindcode --release 547 exec wtype -k Right
|
||||||
|
|
||||||
|
# Back Paddle 1 (704) - Switch to Previous Workspace
|
||||||
|
bindcode --release 704 workspace prev
|
||||||
|
|
||||||
|
# Back Paddle 2 (705) - Switch to Next Workspace
|
||||||
|
bindcode --release 705 workspace next
|
||||||
|
|
||||||
|
# Back Paddle 3 (706) - Decrease Brightness
|
||||||
|
bindcode --release 706 exec brightnessctl set 5%-
|
||||||
|
|
||||||
|
# Back Paddle 4 (707) - Increase Brightness
|
||||||
|
bindcode --release 707 exec brightnessctl set 5%+
|
||||||
|
|
||||||
|
# Power Button (116) - Suspend
|
||||||
|
bindcode --release 116 exec systemctl suspend
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user