update hyprland config on laptop
workspace switch hotkeys resizing keys moonlander default layout on laptop add monitor rotation remove scaling on laptop display
This commit is contained in:
parent
033ce8dc23
commit
fddf319df9
6 changed files with 87 additions and 37 deletions
|
|
@ -15,13 +15,20 @@
|
||||||
{
|
{
|
||||||
name = "HDMI-A-1";
|
name = "HDMI-A-1";
|
||||||
resolution = {x=1920;y=1080;freq=60;};
|
resolution = {x=1920;y=1080;freq=60;};
|
||||||
|
position = {
|
||||||
|
x = 1920;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
wallpaper = "/home/tristan/Pictures/backgrounds/nier.jpg";
|
wallpaper = "/home/tristan/Pictures/backgrounds/nier.jpg";
|
||||||
|
rotation = 1;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "eDP-1";
|
name = "eDP-1";
|
||||||
description = "BOE 0x07D8";
|
description = "BOE 0x07D8";
|
||||||
scaling = 1.2;
|
position = {
|
||||||
position.y = 1080;
|
x = 0;
|
||||||
|
y = 1080;
|
||||||
|
};
|
||||||
wallpaper = "/home/tristan/Pictures/backgrounds/nix-wallpaper-watersplash.png";
|
wallpaper = "/home/tristan/Pictures/backgrounds/nix-wallpaper-watersplash.png";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,15 @@ let
|
||||||
|
|
||||||
renderDisplaysForHyprland = displays:
|
renderDisplaysForHyprland = displays:
|
||||||
"# === DISPLAY MODULE ===\n"
|
"# === DISPLAY MODULE ===\n"
|
||||||
+ concatStringsSep "\n" (map displayHyprlandSetting displays);
|
+ concatStringsSep "\n" (map displayHyprlandSetting displays)
|
||||||
|
+ "\n";
|
||||||
|
|
||||||
displayHyprlandSetting = display:
|
displayHyprlandSetting = display:
|
||||||
"monitor = " + specificDisplay display +
|
"monitor = " + specificDisplay display +
|
||||||
", " + resToString display.resolution +
|
", " + resToString display.resolution +
|
||||||
", " + positionToHyprlandString display.position +
|
", " + positionToHyprlandString display.position +
|
||||||
", " + toString display.scaling;
|
", " + toString display.scaling +
|
||||||
|
", " + "transform," + toString display.rotation;
|
||||||
|
|
||||||
swaybgJob = displays:
|
swaybgJob = displays:
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +30,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
swaybgCmd = display:
|
swaybgCmd = display:
|
||||||
if (display.wallpaper != "") then "-o ${display.name} -i ${display.wallpaper}" else "";
|
if (display.wallpaper != "") then "-o ${display.name} -i ${display.wallpaper} -m fill" else "";
|
||||||
|
|
||||||
specificDisplay = display:
|
specificDisplay = display:
|
||||||
if display.description == ""
|
if display.description == ""
|
||||||
|
|
@ -86,6 +88,10 @@ let
|
||||||
type = types.float;
|
type = types.float;
|
||||||
default = 1.0;
|
default = 1.0;
|
||||||
};
|
};
|
||||||
|
rotation = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 0;
|
||||||
|
};
|
||||||
resolution = mkOption {
|
resolution = mkOption {
|
||||||
description = "res";
|
description = "res";
|
||||||
type = resolutionType;
|
type = resolutionType;
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,13 @@ in
|
||||||
vscode-extensions.asvetliakov.vscode-neovim
|
vscode-extensions.asvetliakov.vscode-neovim
|
||||||
];
|
];
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim";
|
"vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim";
|
||||||
"keyboard.dispatch" = "keyCode";
|
"keyboard.dispatch" = "keyCode";
|
||||||
"terminal.integrated.sendKeybindingsToShell" = true;
|
"terminal.integrated.sendKeybindingsToShell" = true;
|
||||||
"aws.telemetry" = false;
|
"aws.telemetry" = false;
|
||||||
"gitlens.telemetry.enabled" = false;
|
"gitlens.telemetry.enabled" = false;
|
||||||
"redhat.telemetry.enabled" = false;
|
"redhat.telemetry.enabled" = false;
|
||||||
|
"cSpell.language" = "en,en-GB";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,26 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.keyboard.dvorak.enable {
|
config = {
|
||||||
home-manager.users.${user}.imports = [
|
home-manager.users.${user}.imports = [
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
# === KEYBOARD MODULE ===
|
# === KEYBOARD MODULE ===
|
||||||
input {
|
input {
|
||||||
kb_variant = dvorak
|
kb_variant = ,dvorak
|
||||||
|
kb_layout = gb,gb
|
||||||
|
kb_options = caps:escape
|
||||||
|
numlock_by_default = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# moonlander is programmed in dvorak!
|
||||||
|
device:zsa-technology-labs-moonlander-mark-i {
|
||||||
|
kb_variant =
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
services.xserver.xkbVariant = "dvorak";
|
services.xserver.xkbVariant = if config.keyboard.dvorak.enable then "dvorak" else "";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,11 @@ in
|
||||||
|
|
||||||
# so hard to reach X on a laptop
|
# so hard to reach X on a laptop
|
||||||
bind = SUPER_SHIFT, Q, killactive,
|
bind = SUPER_SHIFT, Q, killactive,
|
||||||
|
|
||||||
|
# toggle built in keyboard layout
|
||||||
|
device:at-translated-set-2-keyboard {
|
||||||
|
kb_options = grp:alt_shift_toggle
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ in
|
||||||
systemdIntegration = true;
|
systemdIntegration = true;
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/
|
# https://wiki.hyprland.org/Configuring/Variables/
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
## global hyprland configuration
|
# === GLOBAL CONFIG ===
|
||||||
env = GDK_BACKEND,wayland,x11
|
env = GDK_BACKEND,wayland,x11
|
||||||
env = QT_QPA_PLATFORM,wayland;xcb
|
env = QT_QPA_PLATFORM,wayland;xcb
|
||||||
env = SDL_VIDEODRIVER,wayland
|
env = SDL_VIDEODRIVER,wayland
|
||||||
|
|
@ -44,10 +44,6 @@ in
|
||||||
env = NIXOS_OZONE_WL,1
|
env = NIXOS_OZONE_WL,1
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = gb
|
|
||||||
kb_options = caps:escape
|
|
||||||
numlock_by_default = true
|
|
||||||
|
|
||||||
touchpad {
|
touchpad {
|
||||||
natural_scroll = yes
|
natural_scroll = yes
|
||||||
scroll_factor = 0.5
|
scroll_factor = 0.5
|
||||||
|
|
@ -70,36 +66,63 @@ in
|
||||||
bind = SUPER, j, layoutmsg,cyclenext
|
bind = SUPER, j, layoutmsg,cyclenext
|
||||||
bind = SUPER, k, layoutmsg,cycleprev
|
bind = SUPER, k, layoutmsg,cycleprev
|
||||||
bind = SUPER, space, layoutmsg,swapwithmaster master
|
bind = SUPER, space, layoutmsg,swapwithmaster master
|
||||||
bind = SUPER_SHIFT, k, layoutmsg, orientationtop
|
|
||||||
bind = SUPER_SHIFT, h, layoutmsg, orientationleft
|
|
||||||
bind = SUPER, F, fullscreen,
|
bind = SUPER, F, fullscreen,
|
||||||
bind = SUPER, V, togglefloating,
|
bind = SUPER, V, togglefloating,
|
||||||
bind = SUPER_SHIFT, V, togglegroup,
|
bind = SUPER_SHIFT, V, togglegroup,
|
||||||
bind = SUPER_SHIFT, space, changegroupactive,n
|
bind = SUPER_SHIFT, h, changegroupactive,b
|
||||||
|
bind = SUPER_SHIFT, h, moveintogroup,l
|
||||||
|
bind = SUPER_SHIFT, l, moveintogroup,r
|
||||||
|
bind = SUPER_SHIFT, l, changegroupactive,f
|
||||||
bind = SUPER, Y, togglespecialworkspace
|
bind = SUPER, Y, togglespecialworkspace
|
||||||
bind = SUPER_SHIFT, Y, movetoworkspace, special
|
bind = SUPER_SHIFT, Y, movetoworkspace, special
|
||||||
|
|
||||||
bind = SUPER,1,workspace,1
|
bind = SUPER, R, submap, resize
|
||||||
bind = SUPER,2,workspace,2
|
submap = resize
|
||||||
bind = SUPER,3,workspace,3
|
|
||||||
bind = SUPER,4,workspace,4
|
|
||||||
bind = SUPER,5,workspace,5
|
|
||||||
bind = SUPER,6,workspace,6
|
|
||||||
bind = SUPER,7,workspace,7
|
|
||||||
bind = SUPER,8,workspace,8
|
|
||||||
bind = SUPER,9,workspace,9
|
|
||||||
bind = SUPER,0,workspace,10
|
|
||||||
|
|
||||||
bind = SUPER_SHIFT,1,movetoworkspace,1
|
binde=,right,resizeactive,10 0
|
||||||
bind = SUPER_SHIFT,2,movetoworkspace,2
|
binde=,left,resizeactive,-10 0
|
||||||
bind = SUPER_SHIFT,3,movetoworkspace,3
|
binde=,up,resizeactive,0 -10
|
||||||
bind = SUPER_SHIFT,4,movetoworkspace,4
|
binde=,down,resizeactive,0 10
|
||||||
bind = SUPER_SHIFT,5,movetoworkspace,5
|
|
||||||
bind = SUPER_SHIFT,6,movetoworkspace,6
|
binde=,k,resizeactive,0 -10
|
||||||
bind = SUPER_SHIFT,7,movetoworkspace,7
|
binde=,j,resizeactive,0 10
|
||||||
bind = SUPER_SHIFT,8,movetoworkspace,8
|
|
||||||
bind = SUPER_SHIFT,9,movetoworkspace,9
|
binde=,l,splitratio,0.05
|
||||||
bind = SUPER_SHIFT,0,movetoworkspace,10
|
binde=,h,splitratio,-0.05
|
||||||
|
binde=SHIFT,l,splitratio,0.3
|
||||||
|
binde=SHIFT,h,splitratio,-0.3
|
||||||
|
|
||||||
|
bind = , escape, submap,reset
|
||||||
|
bind = , enter, submap,reset
|
||||||
|
bind = SUPER, R, submap,reset
|
||||||
|
bind = CONTROL, C, submap,reset
|
||||||
|
submap = reset
|
||||||
|
|
||||||
|
workspace = 11, default:true
|
||||||
|
bind = SUPER,1,workspace,11
|
||||||
|
bind = SUPER,2,workspace,12
|
||||||
|
bind = SUPER,3,workspace,13
|
||||||
|
bind = SUPER,4,workspace,14
|
||||||
|
bind = SUPER,5,workspace,15
|
||||||
|
bind = SUPER,6,workspace,16
|
||||||
|
bind = SUPER,7,workspace,17
|
||||||
|
bind = SUPER,8,workspace,18
|
||||||
|
bind = SUPER,9,workspace,19
|
||||||
|
bind = SUPER,0,workspace,20
|
||||||
|
|
||||||
|
bind = SUPER,left,workspace,r-1
|
||||||
|
bind = SUPER,right,workspace,r+1
|
||||||
|
|
||||||
|
bind = SUPER_SHIFT,1,movetoworkspace,11
|
||||||
|
bind = SUPER_SHIFT,2,movetoworkspace,12
|
||||||
|
bind = SUPER_SHIFT,3,movetoworkspace,13
|
||||||
|
bind = SUPER_SHIFT,4,movetoworkspace,14
|
||||||
|
bind = SUPER_SHIFT,5,movetoworkspace,15
|
||||||
|
bind = SUPER_SHIFT,6,movetoworkspace,16
|
||||||
|
bind = SUPER_SHIFT,7,movetoworkspace,17
|
||||||
|
bind = SUPER_SHIFT,8,movetoworkspace,18
|
||||||
|
bind = SUPER_SHIFT,9,movetoworkspace,19
|
||||||
|
bind = SUPER_SHIFT,0,movetoworkspace,20
|
||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
workspace_swipe = yes
|
workspace_swipe = yes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue