2023-09-07 09:26:16 +01:00
|
|
|
{ config, pkgs, anyrun, theme, ... }:
|
2023-08-28 10:38:22 +01:00
|
|
|
let
|
|
|
|
anyrunPackage = anyrun.packages.${pkgs.system}.anyrun;
|
|
|
|
emacsPackage = pkgs.emacs29-pgtk;
|
|
|
|
firefoxPackage = pkgs.firefox-wayland;
|
|
|
|
rofiPackage = pkgs.rofi-wayland;
|
|
|
|
swaylockPackage = pkgs.swaylock-effects;
|
2023-08-22 09:44:40 +01:00
|
|
|
in ''
|
2023-09-07 09:26:16 +01:00
|
|
|
source = ${theme}
|
2023-09-04 08:53:41 +01:00
|
|
|
source = ./extra.conf
|
2023-08-22 09:44:40 +01:00
|
|
|
monitor=,preferred,auto,auto
|
|
|
|
|
|
|
|
env = XDG_CURRENT_DESKTOP=Hyprland
|
|
|
|
env = XDG_SESSION_TYPE=wayland
|
|
|
|
env = XDG_SESSION_DESKTOP=Hyprland
|
|
|
|
env = GDK_BACKEND=wayland,x11
|
2023-09-07 09:22:22 +01:00
|
|
|
env = GTK_THEME,${config.gtk.theme.name}
|
|
|
|
env = XCURSOR_THEME,${config.gtk.cursorTheme.name}
|
2023-08-22 09:44:40 +01:00
|
|
|
env = XCURSOR_SIZE,24
|
|
|
|
env = QT_AUTO_SCREEN_SCALE_FACTOR=1
|
|
|
|
env = QT_QPA_PLATFORM=wayland;xcb
|
|
|
|
env = QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
|
|
env = MOZ_ENABLE_WAYLAND=1
|
|
|
|
|
2023-09-07 14:37:00 +01:00
|
|
|
exec-once=configure-gtk
|
|
|
|
|
2023-08-22 09:44:40 +01:00
|
|
|
input {
|
|
|
|
kb_layout = gb
|
|
|
|
follow_mouse = 1
|
|
|
|
touchpad {
|
|
|
|
natural_scroll = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
general {
|
|
|
|
gaps_in = 5
|
|
|
|
gaps_out = 10
|
|
|
|
border_size = 3
|
|
|
|
col.active_border = $mauve
|
|
|
|
col.group_border_active = $mauve
|
|
|
|
col.inactive_border = $surface2
|
|
|
|
col.group_border = $surface2
|
|
|
|
cursor_inactive_timeout = 5
|
|
|
|
layout = dwindle
|
|
|
|
}
|
|
|
|
|
|
|
|
dwindle {
|
|
|
|
force_split = 2
|
|
|
|
preserve_split = true
|
|
|
|
}
|
|
|
|
|
|
|
|
decoration {
|
|
|
|
rounding = 10
|
|
|
|
drop_shadow = yes
|
|
|
|
shadow_range = 4
|
|
|
|
shadow_render_power = 3
|
|
|
|
blur {
|
|
|
|
enabled = true
|
|
|
|
size = 5
|
|
|
|
passes = 3
|
|
|
|
ignore_opacity = false
|
|
|
|
new_optimizations = on
|
|
|
|
xray = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
animations {
|
|
|
|
enabled = yes
|
|
|
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
|
|
|
animation = windows, 1, 7, myBezier
|
|
|
|
animation = windowsOut, 1, 7, default, popin 80%
|
|
|
|
animation = border, 1, 10, default
|
|
|
|
animation = borderangle, 1, 8, default
|
|
|
|
animation = fade, 1, 7, default
|
|
|
|
animation = workspaces, 1, 6, default
|
|
|
|
}
|
|
|
|
|
|
|
|
XWayland {
|
|
|
|
force_zero_scaling = true
|
|
|
|
}
|
|
|
|
|
|
|
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
2023-08-28 10:38:22 +01:00
|
|
|
bind = SUPER, F1, exec, ${swaylockPackage}/bin/swaylock
|
2023-08-22 09:44:40 +01:00
|
|
|
bind = SUPER, M, fullscreen, 0
|
2023-09-05 15:33:39 +01:00
|
|
|
bind = SUPER, P, exec, pkill rofi || ${pkgs.rofi-pass}/bin/rofi-pass
|
2023-09-07 14:34:24 +01:00
|
|
|
bind = SUPER, X, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t
|
2023-08-22 12:31:09 +01:00
|
|
|
bind = SUPER SHIFT, M, fullscreen, 1
|
2023-08-22 09:44:40 +01:00
|
|
|
bind = SUPER SHIFT, Q, killactive,
|
|
|
|
bind = SUPER SHIFT, Space, togglefloating
|
2023-08-28 10:38:22 +01:00
|
|
|
bind = SUPER SHIFT, P, exec, pkill rofi || ${rofiPackage}/bin/rofi -show power-menu
|
2023-08-22 09:44:40 +01:00
|
|
|
|
|
|
|
# Common program shortcuts
|
2023-09-05 20:04:00 +01:00
|
|
|
bind = SUPER, Space, exec, pkill rofi || ${rofiPackage}/bin/rofi -show combi
|
2023-08-23 09:31:52 +01:00
|
|
|
bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty
|
2023-09-05 20:04:00 +01:00
|
|
|
bind = SUPER SHIFT, Return, exec, pkill rofi || ${rofiPackage}/bin/rofi -show run
|
2023-08-23 09:31:52 +01:00
|
|
|
|
2023-08-28 09:29:46 +01:00
|
|
|
bind = SUPER ALT, Space, submap, launch
|
2023-08-28 10:38:22 +01:00
|
|
|
bind = SUPER ALT, E, exec, ${emacsPackage}/bin/emacsclient -c -a 'emacs'
|
2023-09-05 12:49:33 +01:00
|
|
|
bind = SUPER ALT, W, exec, [workspace 2] ${firefoxPackage}/bin/firefox
|
|
|
|
bind = SUPER ALT, D, exec, [workspace 3] ${emacsPackage}/bin/emacsclient -c -a 'emacs'
|
|
|
|
bind = SUPER ALT, F, exec, [workspace 4] ${pkgs.xfce.thunar}/bin/thunar
|
|
|
|
bind = SUPER ALT, Z, exec, [workspace 4] ${pkgs.zotero}/bin/zotero
|
|
|
|
bind = SUPER ALT, S, exec, [workspace 5] ${pkgs.alacritty}/bin/alacritty -e ncspot
|
2023-08-23 09:31:52 +01:00
|
|
|
|
|
|
|
submap = launch
|
2023-09-05 12:49:33 +01:00
|
|
|
bind = , W, exec, [workspace 2 silent] ${firefoxPackage}/bin/firefox
|
|
|
|
bind = , D, exec, [workspace 3 silent] ${emacsPackage}/bin/emacsclient -c -a 'emacs'
|
|
|
|
bind = , F, exec, [workspace 4 silent] ${pkgs.xfce.thunar}/bin/thunar
|
|
|
|
bind = , Z, exec, [workspace 4 silent] ${pkgs.zotero}/bin/zotero
|
|
|
|
bind = , S, exec, [workspace 5 silent] ${pkgs.alacritty}/bin/alacritty -e ncspot
|
2023-08-23 09:33:00 +01:00
|
|
|
bind = , Space, submap, reset
|
2023-08-23 09:31:52 +01:00
|
|
|
bind = SUPER, Space, submap, reset
|
2023-08-28 09:29:46 +01:00
|
|
|
bind = SUPER ALT, Space, submap, reset
|
2023-08-23 09:31:52 +01:00
|
|
|
submap = reset
|
2023-08-22 09:44:40 +01:00
|
|
|
|
|
|
|
# Misc useful binds
|
|
|
|
bind=,Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"
|
|
|
|
bind=,XF86Calculator,exec,${anyrunPackage}/bin/anyrun
|
|
|
|
# Sound
|
|
|
|
bindl=,XF86AudioMute,exec,${pkgs.pamixer}/bin/pamixer -t
|
|
|
|
bindl=,XF86AudioMicMute,exec,${pkgs.pamixer}/bin/pamixer --default-source -t
|
|
|
|
binde=,XF86AudioRaiseVolume,exec,${pkgs.pamixer}/bin/pamixer -i 5
|
|
|
|
binde=,XF86AudioLowerVolume,exec,${pkgs.pamixer}/bin/pamixer -d 5
|
|
|
|
# Brightness
|
|
|
|
binde=,XF86MonBrightnessUp,exec,${pkgs.brightnessctl}/bin/brightnessctl s +5%
|
|
|
|
binde=,XF86MonBrightnessDown,exec,${pkgs.brightnessctl}/bin/brightnessctl s 5%-
|
|
|
|
# Playback
|
|
|
|
binde=,XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause
|
|
|
|
binde=,XF86AudioStop,exec,${pkgs.playerctl}/bin/playerctl play-pause
|
|
|
|
binde=,XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous
|
|
|
|
binde=,XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next
|
|
|
|
|
|
|
|
bind = SUPER, H, movefocus, l
|
|
|
|
bind = SUPER, L, movefocus, r
|
|
|
|
bind = SUPER, K, movefocus, u
|
|
|
|
bind = SUPER, J, movefocus, d
|
|
|
|
bind = SUPER SHIFT, H, movewindow, l
|
|
|
|
bind = SUPER SHIFT, L, movewindow, r
|
|
|
|
bind = SUPER SHIFT, K, movewindow, u
|
|
|
|
bind = SUPER SHIFT, J, movewindow, d
|
|
|
|
|
2023-09-05 12:49:33 +01:00
|
|
|
# Window rules
|
|
|
|
windowrule = float,(pavucontrol)
|
|
|
|
windowrule = size 800 600,(pavucontrol)
|
|
|
|
windowrule = move 100%-820 10%,(pavucontrol)
|
|
|
|
windowrule = float,(.blueman-manager-wrapped)
|
|
|
|
windowrule = size 800 600,(.blueman-manager-wrapped)
|
|
|
|
windowrule = move 100%-820 10%,(.blueman-manager-wrapped)
|
|
|
|
windowrule = float,(nm-connection-editor)
|
|
|
|
windowrule = size 800 600,(nm-connection-editor)
|
|
|
|
windowrule = move 100%-820 10%,(nm-connection-editor)
|
2023-09-05 17:22:21 +01:00
|
|
|
windowrule = float,(Pinentry)
|
|
|
|
windowrule = center,(Pinentry)
|
2023-09-05 12:49:33 +01:00
|
|
|
windowrule = nofullscreenrequest,(org.remmina.Remmina)
|
|
|
|
windowrule = nomaximizerequest,(org.remmina.Remmina)
|
2023-08-22 09:44:40 +01:00
|
|
|
windowrulev2 = float,title:(File|Picture-in-Picture),class:(firefox)
|
|
|
|
windowrulev2 = pin,title:(File|Picture-in-Picture),class:(firefox)
|
|
|
|
windowrulev2 = float,title:(Open),class:(soffice)
|
2023-08-23 09:31:52 +01:00
|
|
|
windowrulev2 = float,class:(org.remmina.Remmina),title:^(Remmina Remote Desktop Client)$
|
2023-09-05 12:49:33 +01:00
|
|
|
windowrulev2 = float,class:(steam),title:(Friends List)
|
2023-08-22 09:44:40 +01:00
|
|
|
|
2023-09-05 12:49:33 +01:00
|
|
|
# Workspace definitions
|
|
|
|
# 1: [a]ny
|
|
|
|
bind = SUPER, A, moveworkspacetomonitor, 1 current
|
|
|
|
bind = SUPER, A, workspace, 1
|
|
|
|
bind = SUPER SHIFT, A, movetoworkspace, 1
|
|
|
|
|
|
|
|
# 2: [b]rowser
|
|
|
|
bind = SUPER, W, moveworkspacetomonitor, 2 current
|
|
|
|
bind = SUPER, W, workspace, 2
|
|
|
|
bind = SUPER SHIFT, W, movetoworkspace, 2
|
|
|
|
windowrule = workspace 2,(firefox)
|
|
|
|
|
|
|
|
# 3: [d]ev
|
|
|
|
bind = SUPER, D, moveworkspacetomonitor, 3 current
|
|
|
|
bind = SUPER, D, workspace, 3
|
|
|
|
bind = SUPER SHIFT, D, movetoworkspace, 3
|
|
|
|
|
|
|
|
# 4: [f]iles
|
|
|
|
bind = SUPER, F, moveworkspacetomonitor, 4 current
|
|
|
|
bind = SUPER, F, workspace, 4
|
|
|
|
bind = SUPER SHIFT, F, movetoworkspace, 4
|
|
|
|
windowrule = workspace 4,^(libreoffice).*
|
|
|
|
windowrule = workspace 4,(thunar)
|
|
|
|
windowrulev2 = workspace 4,title:(Open),class:(soffice)
|
|
|
|
|
|
|
|
# 5: [s]potify (or mu[s]ic)
|
|
|
|
bind = SUPER, S, moveworkspacetomonitor, 5 current
|
|
|
|
bind = SUPER, S, workspace, 5
|
|
|
|
bind = SUPER SHIFT, S, movetoworkspace, 5
|
|
|
|
windowrulev2 = workspace 5,class:(Alacritty),title:(ncspot)
|
|
|
|
|
|
|
|
# 6: [c]hat
|
|
|
|
bind = SUPER, C, moveworkspacetomonitor, 6 current
|
|
|
|
bind = SUPER, C, workspace, 6
|
|
|
|
bind = SUPER SHIFT, C, movetoworkspace, 6
|
|
|
|
windowrule = workspace 6,(Signal)
|
|
|
|
windowrule = workspace 6,(fractal)
|
|
|
|
windowrule = workspace 6,(discord)
|
|
|
|
|
|
|
|
# 7: [v]ideo
|
|
|
|
bind = SUPER, V, moveworkspacetomonitor, 7 current
|
|
|
|
bind = SUPER, V, workspace, 7
|
|
|
|
bind = SUPER SHIFT, V, movetoworkspace, 7
|
|
|
|
|
|
|
|
# 8: [r]emote
|
|
|
|
bind = SUPER, R, moveworkspacetomonitor, 8 current
|
|
|
|
bind = SUPER, R, workspace, 8
|
|
|
|
bind = SUPER SHIFT, R, movetoworkspace, 8
|
|
|
|
windowrule = workspace 8,(org.remmina.Remmina)
|
|
|
|
|
|
|
|
# 9: [g]aming
|
|
|
|
bind = SUPER, G, moveworkspacetomonitor, 9 current
|
|
|
|
bind = SUPER, G, workspace, 9
|
|
|
|
bind = SUPER SHIFT, G, movetoworkspace, 9
|
|
|
|
windowrule = workspace 9,(steam)
|
2023-08-22 09:44:40 +01:00
|
|
|
|
|
|
|
# Special workspaces
|
2023-09-05 12:49:33 +01:00
|
|
|
bind = SUPER, comma, workspace, -1
|
|
|
|
bind = SUPER SHIFT, comma, movetoworkspace, -1
|
|
|
|
bind = SUPER, period, workspace, +1
|
|
|
|
bind = SUPER SHIFT, period, movetoworkspace, +1
|
2023-08-22 09:44:40 +01:00
|
|
|
bind = SUPER, N, workspace, empty
|
|
|
|
bind = SUPER SHIFT, N, movetoworkspace, empty
|
|
|
|
bind = SUPER, minus, togglespecialworkspace
|
|
|
|
bind = SUPER SHIFT, minus, movetoworkspace, special
|
|
|
|
bind = SUPER, tab, workspace, previous
|
|
|
|
bind = SUPER SHIFT, tab, movetoworkspace, previous
|
|
|
|
bind = SUPER, bracketright, focusmonitor, +1
|
|
|
|
bind = SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1
|
|
|
|
bind = SUPER, bracketleft, focusmonitor, -1
|
|
|
|
bind = SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1
|
|
|
|
bind = SUPER, U, focusurgentorlast
|
|
|
|
|
|
|
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
|
|
|
bindm = SUPER, mouse:272, movewindow
|
|
|
|
bindm = SUPER, mouse:273, resizewindow
|
|
|
|
|
|
|
|
exec-once = ${pkgs.libsForQt5.polkit-kde-agent}/bin/polkit-kde-authentication-agent-1
|
|
|
|
exec-once = ${pkgs.waybar}/bin/waybar
|
2023-09-06 16:58:19 +01:00
|
|
|
exec-once = ${pkgs.swaynotificationcenter}/bin/swaync
|
2023-08-22 09:44:40 +01:00
|
|
|
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
|
2023-09-01 15:19:55 +01:00
|
|
|
exec-once = ${pkgs.protonmail-bridge}/bin/protonmail-bridge -n
|
|
|
|
exec-once = ${pkgs.davmail}/bin/davmail -notray
|
2023-08-22 09:44:40 +01:00
|
|
|
''
|