feat: more laptop config

This commit is contained in:
Patrick Großmann 2023-09-24 20:43:44 +02:00
parent b1943da1cc
commit da8591f749
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
5 changed files with 106 additions and 142 deletions

View file

@ -11,7 +11,7 @@
mouse.accelProfile = "flat";
touchpad = {
accelProfile = "flat";
accelSpeed = "0.5";
accelSpeed = "1";
naturalScrolling = true;
disableWhileTyping = true;
};

View file

@ -1,15 +1,10 @@
{
config,
lib,
...
}: {
{config, ...}: {
# import shared sway config
imports = [../sway3.nix];
stylix.targets.i3.enable = true;
xsession.windowManager.i3 = {
enable = true;
config =
lib.attrsets.recursiveUpdate
(import ../sway3.nix)
{
config = {
menu = "rofi -show drun";
keybindings = let
cfg = config.xsession.windowManager.i3.config;

View file

@ -1,3 +1,9 @@
{
config,
nixosConfig,
lib,
...
}:
# shared sway/i3 config
let
modifier = "Mod4";
@ -6,7 +12,7 @@ let
right = "s";
up = "l";
terminal = "kitty";
in {
cfg = {
inherit modifier terminal;
focus = {
followMouse = false;
@ -16,59 +22,35 @@ in {
window.titlebar = false;
floating.titlebar = false;
workspaceLayout = "stacking";
workspaceOutputAssign = [
{
workspace = "1";
output = "DP-4";
}
{
workspace = "2";
output = "DP-4";
}
{
workspace = "3";
output = "DP-4";
}
{
workspace = "4";
output = "DP-4";
}
bars = [config.lib.stylix.i3.bar];
workspaceOutputAssign = let
output = out: workspaces:
map (x: {
workspace = x;
output = out;
})
workspaces;
in
{
workspace = "F1";
output = "HDMI-0";
}
{
workspace = "F2";
output = "HDMI-0";
}
{
workspace = "F3";
output = "HDMI-0";
}
{
workspace = "F4";
output = "HDMI-0";
"desktopnix" =
output "HDMI-0" ["1" "2" "3" "4"]
++ output "DP-4" ["j" "d" "u" "a"]
++ output "DVI-D-0" ["F1" "F2" "F3" "F4"];
"patricknix" =
output "eDP-1" ["1" "2" "3" "4"]
++ output "DP-1" ["j" "d" "u" "a"];
}
.${nixosConfig.node.name}
or {};
{
workspace = "Q";
output = "DVI-D-0";
}
{
workspace = "W";
output = "DVI-D-0";
}
{
workspace = "E";
output = "DVI-D-0";
}
{
workspace = "R";
output = "DVI-D-0";
}
];
keybindings = {
keybindings =
(lib.attrsets.mergeAttrsList (map (x: {
"${modifier}+${x.workspace}" = "workspace ${x.workspace}";
"${modifier}+Shift+${x.workspace}" = "move container to workspace ${x.workspace}";
})
cfg.workspaceOutputAssign))
// {
"${modifier}+t" = "exec ${terminal}";
"${modifier}+b" = "exec firefox";
"${modifier}+m" = "exec thunderbird";
@ -107,35 +89,9 @@ in {
"${modifier}+comma" = "workspace prev_on_output";
"${modifier}+period" = "workspace next_on_output";
"${modifier}+1" = "workspace number 1";
"${modifier}+2" = "workspace number 2";
"${modifier}+3" = "workspace number 3";
"${modifier}+4" = "workspace number 4";
"${modifier}+F1" = "workspace F1";
"${modifier}+F2" = "workspace F2";
"${modifier}+F3" = "workspace F3";
"${modifier}+F4" = "workspace F4";
"${modifier}+j" = "workspace Q";
"${modifier}+d" = "workspace W";
"${modifier}+u" = "workspace E";
"${modifier}+a" = "workspace R";
"${modifier}+Shift+1" = "move container to workspace number 1";
"${modifier}+Shift+2" = "move container to workspace number 2";
"${modifier}+Shift+3" = "move container to workspace number 3";
"${modifier}+Shift+4" = "move container to workspace number 4";
"${modifier}+Shift+F1" = "move container to workspace F1";
"${modifier}+Shift+F2" = "move container to workspace F2";
"${modifier}+Shift+F3" = "move container to workspace F3";
"${modifier}+Shift+F4" = "move container to workspace F4";
"${modifier}+Shift+J" = "move container to workspace Q";
"${modifier}+Shift+D" = "move container to workspace W";
"${modifier}+Shift+u" = "move container to workspace E";
"${modifier}+Shift+a" = "move container to workspace R";
};
};
in {
wayland.windowManager.sway.config = cfg;
xsession.windowManager.i3.config = cfg;
}

View file

@ -2,9 +2,10 @@
config,
pkgs,
nixosConfig,
lib,
...
}: {
# import shared i3 config
imports = [../sway3.nix];
home.packages = [
pkgs.wdisplays
];
@ -12,8 +13,6 @@
wayland.windowManager.sway = {
enable = true;
config =
lib.attrsets.recursiveUpdate
(import ../sway3.nix)
{
menu = "fuzzel";
input = {
@ -25,9 +24,10 @@
repeat_delay = "235";
repeat_rate = "60";
accel_profile = "flat";
pointer_accel = "0.5";
pointer_accel = "0.3";
};
"type:touchpad" = {
pointer_accel = "0.5";
natural_scroll = "enabled";
};
};
@ -55,6 +55,19 @@
};
};
};
patricknix = {
output = {
"Acer Technologies XB271HU #ASP7ytE/6A7d" = {
mode = "2560x1440@59.951Hz";
pos = "0,0";
};
"AU Optronics 0x30EB Unknown" = {
mode = "3840x2160@60.002Hz";
pos = "2560,0";
scale = "2";
};
};
};
}
.${nixosConfig.node.name}
or {};

View file

@ -42,7 +42,7 @@
../common
../common/impermanence.nix
../common/graphical/Xorg
#../common/graphical/wayland
../common/graphical/wayland
../common/programs/direnv.nix
../common/programs/htop.nix