Hyprland: Add basic custom config

This commit is contained in:
GHOSCHT 2024-12-13 17:53:50 +01:00
parent be70cb6736
commit b1ee77f2c3
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
2 changed files with 159 additions and 133 deletions

View file

@ -8,15 +8,14 @@
"busctl --user -- set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000" "busctl --user -- set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000"
"hyprshade on bluelight" "hyprshade on bluelight"
"fcitx5" "fcitx5"
"webcord"
]; ];
input = { input = {
kb_layout = "de"; kb_layout = "de";
numlock_by_default = true; numlock_by_default = true;
follow_mouse = 1; follow_mouse = 1;
float_switch_override_focus = 0; sensitivity = 0; # 0 means no modification
mouse_refocus = 0;
sensitivity = 0;
touchpad = { touchpad = {
natural_scroll = true; natural_scroll = true;
}; };
@ -24,6 +23,8 @@
general = { general = {
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
"$terminal" = "alacritty";
"$menu" = "wofi --show drun --allow-images --no-actions";
layout = "dwindle"; layout = "dwindle";
gaps_in = 5; gaps_in = 5;
gaps_out = 10; gaps_out = 10;
@ -32,8 +33,13 @@
no_border_on_floating = false; no_border_on_floating = false;
}; };
plugin = {
hyprsplit = {
num_workspaces = 10;
};
};
misc = { misc = {
disable_autoreload = true;
disable_hyprland_logo = true; disable_hyprland_logo = true;
always_follow_on_dnd = true; always_follow_on_dnd = true;
layers_hog_keyboard_focus = true; layers_hog_keyboard_focus = true;
@ -45,172 +51,163 @@
}; };
dwindle = { dwindle = {
# no_gaps_when_only = false; pseudotile = true;
force_split = 0; preserve_split = true;
special_scale_factor = 1.0;
split_width_multiplier = 1.0;
use_active_for_splits = true;
pseudotile = "yes";
preserve_split = "yes";
}; };
master = { master = {
new_status = "master"; new_status = "master";
special_scale_factor = 1;
# no_gaps_when_only = false;
}; };
decoration = { decoration = {
# active_opacity = 0.90; rounding = 10;
# inactive_opacity = 0.90;
# fullscreen_opacity = 1.0;
blur = { blur = {
enabled = true; enabled = true;
size = 3; size = 3;
passes = 2; passes = 1;
brightness = 1; vibrancy = 0.1696;
contrast = 1.4;
ignore_opacity = true;
noise = 0;
new_optimizations = true;
xray = true;
}; };
shadow = { shadow = {
enabled = true; enabled = true;
range = 4;
ignore_window = true;
offset = "0 2";
range = 20;
render_power = 3; render_power = 3;
}; };
}; };
animations = {
enabled = true;
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
bind = [ bind = [
# show keybinds list "$mainMod, Return, exec, $terminal"
"$mainMod, F1, exec, show-keybinds" "$mainMod SHIFT, C, killactive"
"$mainMod SHIFT, Q, exit"
"$mainMod, V, togglefloating"
"$mainMod, Space, exec, $menu"
"$mainMod, P, pseudo" # dwindle
"$mainMod, J, togglesplit" # dwindle
# keybindings # Move focus with mainMod + arrow keys
"$mainMod, Return, exec, alacritty"
"$mainMod, B, exec, hyprctl dispatch exec '[workspace 1 silent] zen'"
"$mainMod, Q, killactive,"
"$mainMod, F, fullscreen, 0"
"$mainMod SHIFT, F, fullscreen, 1"
"$mainMod, Space, exec, toggle_float"
"$mainMod, D, exec, rofi -show drun || pkill rofi"
"$mainMod SHIFT, D, exec, webcord --enable-features=UseOzonePlatform --ozone-platform=wayland"
"$mainMod SHIFT, S, exec, hyprctl dispatch exec '[workspace 5 silent] SoundWireServer'"
"$mainMod, Escape, exec, swaylock"
"ALT, Escape, exec, hyprlock"
"$mainMod SHIFT, Escape, exec, power-menu"
"$mainMod, P, pseudo,"
"$mainMod, X, togglesplit,"
"$mainMod, T, exec, toggle_oppacity"
"$mainMod CTRL, E, exec, nemo"
"$mainMod, E, exec, hyprctl dispatch exec '[float; center; size 1111 700] nemo'"
"$mainMod SHIFT, B, exec, toggle_waybar"
"$mainMod, C ,exec, hyprpicker -a"
"$mainMod, W,exec, wallpaper-picker"
"$mainMod SHIFT, W,exec, hyprctl dispatch exec '[float; center; size 925 615] waypaper'"
"$mainMod, N, exec, swaync-client -t -sw"
# "$mainMod SHIFT, W, exec, vm-start"
# screenshot
",Print, exec, screenshot --copy"
"$mainMod, Print, exec, screenshot --save"
"$mainMod SHIFT, Print, exec, screenshot --swappy"
# switch focus
"$mainMod, left, movefocus, l" "$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r" "$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u" "$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d" "$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, j, movefocus, d"
"$mainMod, k, movefocus, u"
"$mainMod, l, movefocus, r"
# switch workspace # Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1" "$mainMod, 1, split:workspace, 1"
"$mainMod, 2, workspace, 2" "$mainMod, 2, split:workspace, 2"
"$mainMod, 3, workspace, 3" "$mainMod, 3, split:workspace, 3"
"$mainMod, 4, workspace, 4" "$mainMod, 4, split:workspace, 4"
"$mainMod, 5, workspace, 5" "$mainMod, 5, split:workspace, 5"
"$mainMod, 6, workspace, 6" "$mainMod, 6, split:workspace, 6"
"$mainMod, 7, workspace, 7" "$mainMod, 7, split:workspace, 7"
"$mainMod, 8, workspace, 8" "$mainMod, 8, split:workspace, 8"
"$mainMod, 9, workspace, 9" "$mainMod, 9, split:workspace, 9"
"$mainMod, 0, workspace, 10" "$mainMod, 0, split:workspace, 10"
# same as above, but switch to the workspace # Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspacesilent, 1" # movetoworkspacesilent "$mainMod SHIFT, 1, split:movetoworkspacesilent, 1"
"$mainMod SHIFT, 2, movetoworkspacesilent, 2" "$mainMod SHIFT, 2, split:movetoworkspacesilent, 2"
"$mainMod SHIFT, 3, movetoworkspacesilent, 3" "$mainMod SHIFT, 3, split:movetoworkspacesilent, 3"
"$mainMod SHIFT, 4, movetoworkspacesilent, 4" "$mainMod SHIFT, 4, split:movetoworkspacesilent, 4"
"$mainMod SHIFT, 5, movetoworkspacesilent, 5" "$mainMod SHIFT, 5, split:movetoworkspacesilent, 5"
"$mainMod SHIFT, 6, movetoworkspacesilent, 6" "$mainMod SHIFT, 6, split:movetoworkspacesilent, 6"
"$mainMod SHIFT, 7, movetoworkspacesilent, 7" "$mainMod SHIFT, 7, split:movetoworkspacesilent, 7"
"$mainMod SHIFT, 8, movetoworkspacesilent, 8" "$mainMod SHIFT, 8, split:movetoworkspacesilent, 8"
"$mainMod SHIFT, 9, movetoworkspacesilent, 9" "$mainMod SHIFT, 9, split:movetoworkspacesilent, 9"
"$mainMod SHIFT, 0, movetoworkspacesilent, 10" "$mainMod SHIFT, 0, split:movetoworkspacesilent, 10"
"$mainMod CTRL, c, movetoworkspace, empty"
# window control # Example special workspace (scratchpad)
"$mainMod SHIFT, left, movewindow, l" "$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, right, movewindow, r" "$mainMod SHIFT, S, movetoworkspace, special:magic"
"$mainMod SHIFT, up, movewindow, u"
"$mainMod SHIFT, down, movewindow, d"
"$mainMod SHIFT, h, movewindow, l"
"$mainMod SHIFT, j, movewindow, d"
"$mainMod SHIFT, k, movewindow, u"
"$mainMod SHIFT, l, movewindow, r"
"$mainMod CTRL, left, resizeactive, -80 0" # Scroll through existing workspaces with mainMod + scroll
"$mainMod CTRL, right, resizeactive, 80 0" "$mainMod, mouse_down, workspace, e+1"
"$mainMod CTRL, up, resizeactive, 0 -80" "$mainMod, mouse_up, workspace, e-1"
"$mainMod CTRL, down, resizeactive, 0 80"
"$mainMod CTRL, h, resizeactive, -80 0"
"$mainMod CTRL, j, resizeactive, 0 80"
"$mainMod CTRL, k, resizeactive, 0 -80"
"$mainMod CTRL, l, resizeactive, 80 0"
"$mainMod ALT, left, moveactive, -80 0"
"$mainMod ALT, right, moveactive, 80 0"
"$mainMod ALT, up, moveactive, 0 -80"
"$mainMod ALT, down, moveactive, 0 80"
"$mainMod ALT, h, moveactive, -80 0"
"$mainMod ALT, j, moveactive, 0 80"
"$mainMod ALT, k, moveactive, 0 -80"
"$mainMod ALT, l, moveactive, 80 0"
# media and volume controls # media and volume controls
# ",XF86AudioMute,exec, pamixer -t"
",XF86AudioPlay,exec, playerctl play-pause" ",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next" ",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous" ",XF86AudioPrev,exec, playerctl previous"
",XF86AudioStop,exec, playerctl stop" ",XF86AudioStop,exec, playerctl stop"
"$mainMod, mouse_down, workspace, e-1"
"$mainMod, mouse_up, workspace, e+1"
# clipboard manager
"$mainMod, V, exec, cliphist list | rofi -dmenu -theme-str 'window {width: 50%;} listview {columns: 1;}' | cliphist decode | wl-copy"
]; ];
# mouse binding # Move/resize windows with mainMod + LMB/RMB and dragging
bindm = [ bindm = [
"$mainMod, mouse:272, movewindow" "$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow" "$mainMod, mouse:273, resizewindow"
]; ];
windowrulev2 = [
"suppressevent maximize, class:.*" # Ignore maximize requests from apps. You'll probably like this.
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # Fix some dragging issues with XWayland
"float, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"float,class:^(pavucontrol)$"
"float,class:^(SoundWireServer)$"
"float,class:^(.sameboy-wrapped)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
"float,class:^(dialog)$"
"float,class:^(download)$"
"float,class:^(notification)$"
"float,class:^(error)$"
"float,class:^(confirmreset)$"
"float,title:^(Open File)$"
"float,title:^(File Upload)$"
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
# workspace setup
"workspace 10, class:^(feishin)$"
# nextcloud
"float,class:^(com.nextcloud.desktopclient.nextcloud)$"
"stayfocused,class:^(com.nextcloud.desktopclient.nextcloud)$" # otherwise window immediately closes
# Remove context menu transparency in chromium based apps
"opaque,class:^()$,title:^()$"
"noshadow,class:^()$,title:^()$"
"noblur,class:^()$,title:^()$"
];
monitor = [
",preferred,auto,auto"
];
}; };
extraConfig = "
monitor=,preferred,auto,auto
xwayland {
force_zero_scaling = true
}
";
}; };
} }

View file

@ -9,6 +9,7 @@ in
hyprpicker hyprpicker
# hyprsunset # hyprsunset
# wl-gammarelay-rs # wl-gammarelay-rs
wofi
hyprshade hyprshade
hyprpolkitagent hyprpolkitagent
grim grim
@ -25,10 +26,38 @@ in
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
systemd.enable = true; systemd.enable = true;
plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
}; };
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "hyprland/window" ];
modules-right = [ "tray" "memory" "cpu" "clock" ];
tray.spacing = 10;
clock.tooltip-format = "{:%d.%m.%Y}";
cpu.format = "{}% ";
memory.format = " {}% ";
"hyprland/workspaces" = {
format = "{icon}";
persistent-workspaces = {
"*" = 10;
};
format-icons = {
"9" = "";
"10" = "󰝚";
};
};
};
};
}; };
xdg.configFile."hypr/shaders/bluelight.glsl".text = '' xdg.configFile."hypr/shaders/bluelight.glsl".text = ''