update config
This commit is contained in:
parent
9c79269bd6
commit
ff1e9251a0
141
home.nix
141
home.nix
@ -1,6 +1,17 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
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
|
||||
{
|
||||
# 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
|
||||
caribou
|
||||
evtest # for input key testing
|
||||
wtype
|
||||
playerctl
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
@ -134,18 +147,7 @@ in
|
||||
modifier = "Mod4"; # Windows key
|
||||
terminal = "alacritty";
|
||||
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
|
||||
startup = [
|
||||
{ command = "swaymsg workspace ${workspace7}; exec nvim"; }
|
||||
@ -161,15 +163,15 @@ in
|
||||
{ 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}"; }
|
||||
#{ command = "swaymsg focus output ${display2}; swaymsg workspace ${workspace3}"; }
|
||||
];
|
||||
|
||||
# Keyboard layout
|
||||
input = {
|
||||
# Enable touch screen
|
||||
"10248:4117:FTS3528:00_2808:1015" = {
|
||||
send_events = "enabled";
|
||||
tap_enabled = true;
|
||||
#send_events = "enabled";
|
||||
#tap_enabled = "true";
|
||||
map_to_output = "${display1}";
|
||||
};
|
||||
|
||||
@ -181,31 +183,26 @@ in
|
||||
# Configure Steam Controller pointer
|
||||
"10462:4613:Valve_Software_Steam_Controller" = {
|
||||
# For the pointer device
|
||||
accel_speed = 0.0;
|
||||
natural_scroll = false;
|
||||
left_handed = false;
|
||||
#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";
|
||||
middle_emulation = "true";
|
||||
};
|
||||
|
||||
# Set German layout for all keyboards
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "de";
|
||||
repeat_delay = 600;
|
||||
repeat_rate = 25;
|
||||
repeat_delay = "600";
|
||||
repeat_rate = "25";
|
||||
};
|
||||
|
||||
# For all pointers
|
||||
"type:pointer" = {
|
||||
accel_speed = 0.0;
|
||||
natural_scroll = false;
|
||||
left_handed = false;
|
||||
middle_emulation = true;
|
||||
#accel_speed = "0.0";
|
||||
natural_scroll = "false";
|
||||
left_handed = "false";
|
||||
middle_emulation = "true";
|
||||
};
|
||||
|
||||
"*" = {
|
||||
@ -270,13 +267,13 @@ in
|
||||
};
|
||||
|
||||
# Assign workspaces to outputs (adjust as needed)
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
workspace = workspace1;
|
||||
output = display1;
|
||||
}
|
||||
# Add other workspace-output assignments if you have multiple monitors
|
||||
];
|
||||
#workspaceOutputAssign = [
|
||||
# {
|
||||
# workspace = workspace1;
|
||||
# output = display1;
|
||||
# }
|
||||
# # Add other workspace-output assignments if you have multiple monitors
|
||||
#];
|
||||
|
||||
# Assign applications to workspaces
|
||||
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