2023-06-26 18:02:44 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
2023-06-17 02:01:27 +02:00
|
|
|
|
2023-06-26 18:02:44 +02:00
|
|
|
let
|
|
|
|
opacity = lib.strings.floatToString config.stylix.opacity.terminal;
|
2023-07-01 20:06:34 +02:00
|
|
|
modifier = "SUPER";
|
2023-06-26 18:02:44 +02:00
|
|
|
in
|
2023-06-22 16:42:23 +02:00
|
|
|
{
|
2023-07-01 20:21:12 +02:00
|
|
|
xdg.configFile."hypr/gaps.sh" = {
|
|
|
|
executable = true;
|
|
|
|
text = /* bash */ ''
|
|
|
|
#/usr/bin/env bash
|
2023-07-03 20:52:59 +02:00
|
|
|
hyprctl keyword general:gaps_out $((10 - $(hyprctl getoption general:gaps_out -j | jq -r ".int")))
|
|
|
|
hyprctl keyword general:gaps_in $((5 - $(hyprctl getoption general:gaps_in -j | jq -r ".int")))
|
2023-07-04 01:07:41 +02:00
|
|
|
hyprctl keyword general:border_size $((2 - $(hyprctl getoption general:border_size -j | jq -r ".int")))
|
2023-07-03 20:52:59 +02:00
|
|
|
hyprctl keyword decoration:rounding $((8 - $(hyprctl getoption decoration:rounding -j | jq -r ".int")))
|
2023-07-01 20:21:12 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-06-25 18:45:55 +02:00
|
|
|
xdg.configFile."hypr/hyprland.conf".text = with config.lib.stylix.colors; /* bash */ ''
|
2023-06-17 02:01:27 +02:00
|
|
|
env=XCURSOR_SIZE,24
|
2023-06-22 17:00:39 +02:00
|
|
|
env=BROWSER,librewolf
|
2023-06-17 02:01:27 +02:00
|
|
|
env=GTK_IM_MODULE,fcitx
|
|
|
|
env=QT_IM_MODULE,fcitx
|
|
|
|
env=XMODIFIERS,@im=fcitx
|
|
|
|
env=SDL_IM_MODULE,fcitx
|
|
|
|
env=GLFW_IM_MODULE,ibus
|
|
|
|
monitor=,preferred,auto,1
|
|
|
|
|
|
|
|
exec-once = swww init
|
|
|
|
exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%
|
2023-07-02 15:34:05 +02:00
|
|
|
exec-once = sleep 0.5 && ironbar
|
2023-06-29 17:59:34 +02:00
|
|
|
exec-once = fcitx5
|
2023-06-17 02:01:27 +02:00
|
|
|
exec-once = mullvad-vpn
|
2023-07-04 16:09:18 +02:00
|
|
|
exec-once = hyprctl dispatch workspace 5000000
|
2023-06-17 02:01:27 +02:00
|
|
|
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
|
|
|
|
|
|
|
|
input {
|
|
|
|
kb_layout = us
|
|
|
|
accel_profile = flat
|
|
|
|
follow_mouse = 1
|
|
|
|
mouse_refocus = 0
|
|
|
|
sensitivity = 0
|
|
|
|
touchpad {
|
|
|
|
natural_scroll = yes
|
|
|
|
disable_while_typing = no
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
general {
|
2023-07-03 21:00:02 +02:00
|
|
|
gaps_in = 0
|
2023-06-17 02:01:27 +02:00
|
|
|
gaps_out = -1
|
2023-07-03 21:00:02 +02:00
|
|
|
border_size = 0
|
2023-07-04 14:19:13 +02:00
|
|
|
col.active_border = rgba(${base03}ee) rgba(${base04}ee) 45deg
|
2023-07-04 01:00:43 +02:00
|
|
|
col.inactive_border = rgba(${base02}99)
|
2023-06-17 02:01:27 +02:00
|
|
|
layout = master
|
|
|
|
}
|
|
|
|
|
|
|
|
decoration {
|
|
|
|
rounding = 0
|
|
|
|
blur = yes
|
|
|
|
blur_size = 4
|
|
|
|
blur_passes = 2
|
|
|
|
blur_new_optimizations = yes
|
|
|
|
drop_shadow = yes
|
|
|
|
shadow_range = 4
|
|
|
|
shadow_render_power = 3
|
|
|
|
col.shadow = rgba(1a1a1aee)
|
2023-06-25 16:06:20 +02:00
|
|
|
fullscreen_opacity = 0.9999999
|
2023-06-26 18:48:29 +02:00
|
|
|
dim_strength = 0.25
|
2023-06-17 02:01:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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, slidevert
|
|
|
|
animation = specialWorkspace, 1, 6, default, fade
|
|
|
|
}
|
|
|
|
|
|
|
|
dwindle {
|
|
|
|
preserve_split = yes
|
|
|
|
special_scale_factor = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
master {
|
|
|
|
new_is_master = no
|
|
|
|
new_on_top = no
|
|
|
|
mfact = 0.65
|
|
|
|
special_scale_factor = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
gestures {
|
|
|
|
workspace_swipe = yes
|
|
|
|
}
|
|
|
|
|
|
|
|
device:synps/2-synaptics-touchpad {
|
|
|
|
sensitivity = 0.75
|
|
|
|
accel_profile = flat
|
|
|
|
natural_scroll = yes
|
|
|
|
disable_while_typing = no
|
|
|
|
}
|
|
|
|
|
|
|
|
device:tpps/2-elan-trackpoint {
|
|
|
|
sensitivity = 0.5
|
|
|
|
accel_profile = flat
|
|
|
|
}
|
|
|
|
|
|
|
|
binds {
|
|
|
|
allow_workspace_cycles = yes
|
|
|
|
}
|
|
|
|
|
2023-07-01 20:06:34 +02:00
|
|
|
$SUPER = ${modifier}
|
|
|
|
$SUPER_SHIFT = ${modifier}_SHIFT
|
|
|
|
$SUPER_ALT = ${modifier}_ALT
|
2023-06-27 10:04:41 +02:00
|
|
|
|
|
|
|
bind = $SUPER_SHIFT, Return, exec, kitty
|
2023-07-02 20:33:35 +02:00
|
|
|
bind = $SUPER, Q, killactive
|
2023-06-30 14:07:24 +02:00
|
|
|
bind = $SUPER, P, exec, dunstify --icon=$(grimblast save screen) Screenshot Captured.
|
2023-06-17 02:01:27 +02:00
|
|
|
bind = , Print, exec, grimblast copy area
|
2023-06-27 10:04:41 +02:00
|
|
|
bind = $SUPER_ALT, delete, exit
|
2023-07-02 20:33:35 +02:00
|
|
|
bind = $SUPER, V, togglefloating
|
|
|
|
bind = $SUPER, B, centerwindow
|
2023-06-27 10:04:41 +02:00
|
|
|
bind = $SUPER, I, exec, hyprctl keyword decoration:dim_inactive $((1 - $(hyprctl getoption decoration:dim_inactive -j | jq -r ".int")))
|
2023-07-01 20:21:12 +02:00
|
|
|
bind = $SUPER, U, exec, ~/.config/hypr/gaps.sh
|
2023-07-02 15:34:05 +02:00
|
|
|
bind = $SUPER, O, exec, killall .ironbar-wrapper || ironbar
|
2023-06-27 10:04:41 +02:00
|
|
|
bind = $SUPER, X, pin
|
|
|
|
bind = $SUPER, F, fullscreen
|
|
|
|
bind = $SUPER, S, togglespecialworkspace
|
|
|
|
bind = $SUPER_SHIFT, S, movetoworkspace, special
|
|
|
|
bind = $SUPER_SHIFT, S, focuscurrentorlast
|
|
|
|
bind = $SUPER, F1, exec, killall rofi || rofi -show drun
|
|
|
|
bind = $SUPER, F2, togglespecialworkspace
|
|
|
|
|
|
|
|
bind = $SUPER, Return, layoutmsg, swapwithmaster master
|
|
|
|
bind = $SUPER, J, layoutmsg, cyclenext
|
|
|
|
bind = $SUPER, K, layoutmsg, cycleprev
|
|
|
|
bind = $SUPER_SHIFT, J, layoutmsg, swapnext
|
|
|
|
bind = $SUPER_SHIFT, K, layoutmsg, swapprev
|
|
|
|
bind = $SUPER, C, splitratio, exact 0.80
|
|
|
|
bind = $SUPER, C, layoutmsg, orientationtop
|
|
|
|
bind = $SUPER_SHIFT, C, splitratio, exact 0.65
|
|
|
|
bind = $SUPER_SHIFT, C, layoutmsg, orientationleft
|
|
|
|
bind = $SUPER, H, layoutmsg, addmaster
|
|
|
|
bind = $SUPER, L, layoutmsg, removemaster
|
|
|
|
bind = $SUPER_SHIFT, H, splitratio, -0.05
|
|
|
|
bind = $SUPER_SHIFT, L, splitratio, +0.05
|
|
|
|
|
2023-07-04 15:32:16 +02:00
|
|
|
bind = $SUPER, 1, exec, hyprland-relative-workspace b
|
|
|
|
bind = $SUPER, 2, exec, hyprland-relative-workspace f
|
|
|
|
bind = $SUPER_SHIFT, 1, exec, hyprland-relative-workspace b --with-window
|
|
|
|
bind = $SUPER_SHIFT, 2, exec, hyprland-relative-workspace f --with-window
|
2023-06-17 02:01:27 +02:00
|
|
|
|
2023-07-02 15:34:05 +02:00
|
|
|
layerrule = blur,ironbar
|
2023-06-17 02:01:27 +02:00
|
|
|
layerrule = blur,rofi
|
2023-06-26 18:04:29 +02:00
|
|
|
layerrule = blur,notifications
|
2023-06-17 02:01:27 +02:00
|
|
|
|
|
|
|
windowrulev2 = nomaxsize,class:^(winecfg\.exe)$
|
2023-06-22 13:58:22 +02:00
|
|
|
windowrulev2 = nomaxsize,class:^(osu\.exe)$
|
2023-06-17 02:01:27 +02:00
|
|
|
windowrulev2 = opaque,class:^(kitty)$
|
|
|
|
windowrulev2 = noblur,class:^(kitty)$
|
2023-06-30 13:47:54 +02:00
|
|
|
windowrulev2 = tile,class:^(.qemu-system-x86_64-wrapped)$
|
2023-06-26 18:02:44 +02:00
|
|
|
windowrulev2 = opacity ${opacity} ${opacity},class:^(thunar)$
|
2023-06-17 02:01:27 +02:00
|
|
|
|
|
|
|
# Scroll through existing workspaces with super + scroll
|
2023-06-27 10:04:41 +02:00
|
|
|
bind = $SUPER, mouse_down, workspace, e+1
|
|
|
|
bind = $SUPER, mouse_up, workspace, e-1
|
2023-06-17 02:01:27 +02:00
|
|
|
|
|
|
|
# Move/resize windows with super + LMB/RMB and dragging
|
2023-06-27 10:04:41 +02:00
|
|
|
bindm = $SUPER, mouse:272, movewindow
|
|
|
|
bindm = $SUPER, mouse:273, resizewindow
|
2023-06-17 02:01:27 +02:00
|
|
|
|
|
|
|
# Change volume with keys
|
|
|
|
# TODO: Change notification once at 0/100%
|
|
|
|
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
|
|
|
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
|
|
|
|
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
|
|
|
|
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
|
|
|
|
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
|
|
|
|
|
|
|
|
misc {
|
|
|
|
disable_hyprland_logo = yes
|
|
|
|
animate_manual_resizes = yes
|
|
|
|
animate_mouse_windowdragging = yes
|
2023-06-22 13:15:46 +02:00
|
|
|
disable_autoreload = yes
|
2023-06-17 02:01:27 +02:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
}
|