dotfiles/dot_config/hypr/hyprland.conf
2024-06-02 12:44:51 +02:00

516 lines
16 KiB
Text

################
### MONITORS ###
################
monitor = DP-1, 1920x1080@144, 0x0, 1
monitor = HDMI-A-1, 1920x1080, 1920x0, 1
# Default
workspace = 1, monitor:DP-1, default:true
workspace = 2, monitor:DP-1
workspace = 3, monitor:DP-1
workspace = 4, monitor:DP-1
workspace = 5, monitor:HDMI-A-1
workspace = 6, monitor:HDMI-A-1
workspace = 7, monitor:HDMI-A-1
workspace = 8, monitor:HDMI-A-1
# With split plugins
# workspace = 1, default:true
# workspace = 2
# workspace = 3
# workspace = 4
# workspace = 5
# workspace = 6
# workspace = 7
# workspace = 8
input {
kb_file =
kb_layout =
kb_variant =
kb_model =
kb_options = compose:ralt #,caps:escape
kb_rules =
repeat_delay = 200
repeat_rate = 50
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
force_no_accel = true
}
#####################
### LOOK AND FEEL ###
#####################
general {
gaps_in = 4
gaps_out = 8
border_size = 2
col.active_border = 0xfff4dbd6
col.inactive_border = 0x001e1e2e
apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
resize_on_border = true
# no_border_on_floating = true
layout = master
allow_tearing = true
}
group {
col.border_inactive = 0x33f4dbd6
col.border_active = 0xeef4dbd6
groupbar {
gradients = false
text_color = 0xf4dbd6ff
render_titles = false
col.inactive = 0x33f4dbd6
col.active = 0xeef4dbd6
}
}
# Tearing
env = WLR_DRM_NO_ATOMIC,1
windowrulev2 = immediate, class:^(cs2|osu\!|love)$
decoration {
rounding = 10
blur {
enabled = true
xray = false
size = 12
passes = 4
new_optimizations = on
noise = 0.05
contrast = 1.3
brightness = 0.95
special = true
}
active_opacity = 1.00
inactive_opacity = 1.00
drop_shadow = 1
# shadow_range = 20
# shadow_render_power = 2
# shadow_ignore_window = 1
# shadow_offset = 8 8
# dim_inactive = true
dim_strength = 0.1
dim_special = 0
# blurls = waybar
# blurls = launcher
# blurls = lockscreen
# blurls = swayosd
# blurls = gtk-layer-shell
shadow_range = 10
shadow_render_power = 2
shadow_ignore_window = 1
col.shadow = 0x66000000
col.shadow_inactive = 0x00000000
}
animations {
enabled = true
bezier = overshot, 0.13, 0.99, 0.29, 1.1
bezier = strongOvershot, 0.13, 0.99, 0.29, 1.3
bezier = easeOutExpo, 0.16, 1, 0.3, 1
bezier = easeInOutBack, 0.68, -0.6, 0.32, 1.6
animation = windows, 1, 4, easeOutExpo, popin
animation = border, 1, 4, easeOutExpo
animation = borderangle, 1, 8, default
animation = layers, 1, 3, overshot, fade
animation = fadeIn, 1, 1, easeOutExpo
animation = fadeOut, 1, 1, easeOutExpo
animation = fadeSwitch, 1, 6, easeOutExpo
animation = fadeShadow, 1, 6, easeOutExpo
animation = fadeDim, 1, 6, easeOutExpo
animation = fadeLayers, 1, 2, easeOutExpo
animation = workspaces, 1, 6, easeOutExpo, slide
animation = specialWorkspace, 1, 1, easeOutExpo, fade
}
dwindle {
pseudotile = true # enable pseudotiling on dwindle
no_gaps_when_only = 1
}
master {
always_center_master = false
mfact = 0.55
no_gaps_when_only = 1
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
# force_hypr_chan = true
vrr = 2
# vfr = true
# animate_mouse_windowdragging = true
focus_on_activate = false
mouse_move_enables_dpms = true
key_press_enables_dpms = true
enable_swallow = false
swallow_regex = ^(foot|kitty)$
}
# plugin {
# hyprbars {
# # example config
# bar_height = 20
# bar_color = rgb(24273a)
# bar_text_size = 8
# bar_text_font = "UbuntuMono Nerd Font"
#
# # example buttons (R -> L)
# # hyprbars-button = color, size, on-click
# # hyprbars-button = rgb(ff4040), 10, 󰖭, hyprctl dispatch killactive
# # hyprbars-button = rgb(eeee11), 10, , hyprctl dispatch fullscreen 1
# }
# }
#
##############
### Layers ###
##############
layerrule = blur, waybar
layerrule = blur, launcher
layerrule = blur, lockscreen
# layerrule = blur, swayosd
# layerrule = blur, gtk-layer-shell
##############################
### WINDOWS AND WORKSPACES ###
##############################
# window rules
# for windows named/classed as abc and xyz
windowrulev2 = float, class:^(floating-foot)$
windowrulev2 = float, class:^(.*nextcloud.*)$
windowrulev2 = float, class:^(org.kde.ark)$
windowrulev2 = stayfocused, class:^(.*nextcloud.*)$
windowrulev2 = center, class:^(floating-foot)$
windowrulev2 = pin, class:^(floating-foot)$
windowrulev2 = float, title:^(Move files)$
windowrulev2 = center, title:^(Move files)$
# windowrulev2 = stayfocused, title:^()$,class:^(steam)$
# windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
# transparency
windowrulev2 = opacity 1.0 override 0.9 override, class:^(kitty|foot|footclient|floating-foot|VSCodium|Code|neovide)$
# 1 terminal
windowrulev2 = workspace 1, class:^(kitty|foot|footclient)$
# 2 browser
windowrulev2 = workspace 2, class:^(mullvadbrowser|floorp|firefox*|Pulse Browser|librewolf*|LibreWolf*|org.qutebrowser.qutebrowser|chromium|thorium*|brave*|vivaldi*)
# 3 files
windowrulev2 = workspace 3, class:^(thunar|org.qbittorrent.qBittorrent|org.kde.dolphin|pcmanfm-qt|deluge)$|^(org.gnome.Nautilus)$|^(org.gnome.NautilusDevel)$|^(nemo*)|fm-term
windowrulev2 = workspace 3, title:^Syncplay*
# 4 games, gaming
windowrulev2 = workspace 4, class:^(steam_app_*|osu\!|org.prismlauncher.PrismLauncher|steam_app_671860|com.usebottles.bottles|moe.launcher.an-anime-game-launcher|moe.launcher.the-honkers-railway-launcher|genshinimpact.exe|starrail.exe|trackma-*|cs2|csgo_linux64)$
# 5 code
windowrulev2 = workspace 5, class:^(VSCodium|org.remmina.Remmina|Code|Pixelorama)$
# 6 media
windowrulev2 = workspace 6, class:^(mpv|Spotify)$
# 7 communication
windowrulev2 = workspace 7, class:^(WebCord|discord|org.telegram.desktop|Signal|teams-for-linux)$
# 8 settings
windowrulev2 = workspace 8, class:^(sc-controller|pavucontrol)$
####################
### KEYBINDINGSS ###
####################
#
# binds
$mod = SUPER
# mouse
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
# hyprctl / misc dispatchers
bind = $mod SHIFT, R, exec, hyprctl reload
bind = $mod SHIFT, Q, exit,
bind = $mod, Q, exec, rofi -show power-menu -modi power-menu:rofi-power-menu
bind = $mod, C, killactive,
# screenshot
bind = $mod SHIFT, S, exec, hyprshot -m region
bind = $mod CONTROL SHIFT, S, exec, grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'"
bind = $mod, Print, exec, hyprshot -m window
# apps
bind = $mod, Return, exec, footclient
bind = $mod SHIFT, Return, exec, footclient -F
bind = $mod SHIFT, E, exec, xdg-open .
# bind = $mod, E, exec, footclient -a "fm-term" tmux new-session -A -s filemanager 'nnn -da -P p'
bind = $mod, E, exec, kitty --class="fm-term" nnn -a -P p
bind = $mod, Space, togglefloating,
bind = $mod, T, exec, swaync-client --toggle-panel
# bind = $mod SHIFT, D, exec, tofi-drun --drun-launch=true
bind = $mod, D, exec, rofi -show drun -theme catppuccin-macchiato
# bind = $mod, D, exec, anyrun
bind = $mod, W, exec, rofi -show window -theme catppuccin-macchiato
# bind = ALT_L, Tab, exec, rofi -show window -theme catppuccin-macchiato
# bind = ALT_L, Tab, exec, eww open overview
# bind = ALT_L, Tab, exec, killall -SIGUSR1 sfwbar
bind = $mod, P, pseudo, # dwindle only
# bind = $mod SHIFT, P, exec, hyprctl dispatch dpms off
# bind = $mod SHIFT, L, exec, ~/.config/hypr/bsplock
bind = $mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = $mod, N, exec, networkmanager_dmenu
bind = CAPS, , exec, swayosd-client --caps-lock-led
# Scratch pad
bind = $mod CONTROL, Return, exec, footclient -a "floating-foot"
# audio
# bind = , 123, exec, pactl set-sink-volume @DEFAULT_SINK@ +2%
# bind = , 122, exec, pactl set-sink-volume @DEFAULT_SINK@ -2%
# bind = , 121, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , 123, exec, swayosd-client --output-volume raise || pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , 122, exec, swayosd-client --output-volume lower || pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , 121, exec, swayosd-client --output-volume mute-toggle || pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , 171, exec, playerctl next
bind = , 172, exec, playerctl play-pause
bind = , 173, exec, playerctl previous
# pass
# bind = , mouse:275, pass, ^(discord|WebCord)$
# window
bind = $mod, U, focusurgentorlast,
bind = $mod CONTROL, Tab, movewindow, mon:+1
bind = $mod, Escape, cyclenext
bind = $mod, S, togglesplit
bind = $mod, F, fullscreen
bind = $mod SHIFT, F, fullscreen, 1
# bind = $mod, M, fakefullscreen
bind = $mod, left, movefocus, l
bind = $mod, right, movefocus, r
bind = $mod, up, movefocus, u
bind = $mod, down, movefocus, d
bind = $mod, h, movefocus, l
bind = $mod, l, movefocus, r
# bind = $mod, k, movefocus, u
# bind = $mod, j, movefocus, d
bind = $mod, k, layoutmsg, cycleprev
bind = $mod, j, layoutmsg, cyclenext
bind = $mod SHIFT, left, movewindow, l
bind = $mod SHIFT, right, movewindow, r
bind = $mod SHIFT, up, movewindow, u
bind = $mod SHIFT, down, movewindow, d
bind = $mod SHIFT, h, movewindow, l
bind = $mod SHIFT, l, movewindow, r
bind = $mod SHIFT, k, movewindow, u
bind = $mod SHIFT, j, movewindow, d
# master layout
bind = $mod, x, layoutmsg, swapwithmaster
bind = $mod CONTROL, left , layoutmsg, orientationleft
bind = $mod CONTROL, right, layoutmsg, orientationright
bind = $mod CONTROL, up , layoutmsg, orientationtop
bind = $mod CONTROL, down , layoutmsg, orientationbottom
bind = $mod CONTROL, c , layoutmsg, orientationcenter
bind = $mod SHIFT CONTROL, h , layoutmsg, addmaster
bind = $mod SHIFT CONTROL, l , layoutmsg, removemaster
# workspace
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
# bind = $mod, 1, split-workspace, 1
# bind = $mod, 2, split-workspace, 2
# bind = $mod, 3, split-workspace, 3
# bind = $mod, 4, split-workspace, 4
# bind = $mod, 5, split-workspace, 5
# bind = $mod, 6, split-workspace, 6
# bind = $mod, 7, split-workspace, 7
# bind = $mod, 8, split-workspace, 8
bind = $mod, A, togglespecialworkspace
bind = $mod SHIFT, A, movetoworkspace, special
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
# bind = $mod SHIFT, 1, split-movetoworkspace, 1
# bind = $mod SHIFT, 2, split-movetoworkspace, 2
# bind = $mod SHIFT, 3, split-movetoworkspace, 3
# bind = $mod SHIFT, 4, split-movetoworkspace, 4
# bind = $mod SHIFT, 5, split-movetoworkspace, 5
# bind = $mod SHIFT, 6, split-movetoworkspace, 6
# bind = $mod SHIFT, 7, split-movetoworkspace, 7
# bind = $mod SHIFT, 8, split-movetoworkspace, 8
bind = $mod, B, exec, killall -SIGUSR1 waybar
bind = $mod, mouse_down, workspace, e-1
bind = $mod, mouse_up, workspace, e+1
bind = $mod SHIFT CONTROL, left, swapactiveworkspaces, current -1
bind = $mod SHIFT CONTROL, right, swapactiveworkspaces, current +1
# Groups
bind = $mod, g, togglegroup
bind = $mod SHIFT, g, moveoutofgroup
bind = $mod CONTROL, Space, changegroupactive
# Monitors
bind = $mod, comma, focusmonitor, -1
bind = $mod, period, focusmonitor, +1
bind = $mod SHIFT, comma, movewindow, mon:-1
bind = $mod SHIFT, period, movewindow, mon:+1
# pyprland
# bind = $mod, M, exec, /home/eric/.local/bin/pypr toggle_minimized
# bind = $mod SHIFT, M, togglespecialworkspace, minimized
# bind = $mod, Tab, exec, /home/eric/.local/bin/pypr expose
# bind = $mod SHIFT, W, togglespecialworkspace, exposed
# hycov
# bind = $mod, Tab, hycov:toggleoverview
# bind = $mod, W, hycov:toggleoverview
# bind = $mod SHIFT, Tab,hycov:toggleoverview,forceall #grave key is the '~' key
# bind = $mod CONTROL, Tab, hycov:toggleoverview,forceallinone
# bind = ALT_L, Escape, hycov:toggleoverview
#
# bind = $mod, left, hycov:movefocus,l
# bind = $mod, down, hycov:movefocus,d
# bind = $mod, up, hycov:movefocus,u
# bind = $mod, right, hycov:movefocus,r
# bind = $mod, h, hycov:movefocus,l
# bind = $mod, j, hycov:movefocus,d
# bind = $mod, k, hycov:movefocus,u
# bind = $mod, l, hycov:movefocus,r
# hyprexpo
# bind = $mod SHIFT, W, hyprexpo:expo, toggle # can be: toggle, off/disable or on/enable
plugin {
hycov {
overview_gappo = 60 # gaps width from screen edge
overview_gappi = 24 # gaps width from clients
enable_hotarea = 0 # enable mouse cursor hotarea
hotarea_monitor = all # monitor name which hotarea is in, default is all
hotarea_pos = 3 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right)
hotarea_size = 3 # hotarea size, 10x10
swipe_fingers = 4 # finger number of gesture,move any directory
move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move
enable_gesture = 0 # enable gesture
disable_workspace_change = 0 # disable workspace change when in overview mode
disable_spawn = 0 # disable bind exec when in overview mode
auto_exit = 1 # enable auto exit when no client in overview
auto_fullscreen = 0 # auto make active window maximize after exit overview
only_active_workspace = 0 # only overview the active workspace
only_active_monitor = 0 # only overview the active monitor
enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail
alt_replace_key = Alt_L # alt swith mode arg,see readme for detail
alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode
click_in_cursor = 1 # when click to jump,the target windwo is find by cursor, not the current foucus window.
hight_of_titlebar = 0 # height deviation of title bar hight
}
hyprexpo {
columns = 2
gap_size = 5
bg_col = rgb(111111)
workspace_method = first 1 # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true # laptop touchpad
gesture_fingers = 3 # 3 or 4
gesture_distance = 300 # how far is the "max"
gesture_positive = true # positive = swipe down. Negative = swipe up.
}
}
debug:disable_logs = false
#############################
### ENVIRONMENT VARIABLES ###
#############################
env = QT_QPA_PLATFORMTHEME,qt6ct
env = HYPRCURSOR_SIZE,24
env = XCURSOR_SIZE,24
#env = HYPRCURSOR_THEME,qogir_hl
env = XCURSOR_THEME,Qogir-dark
#env = WLR_NO_HARDWARE_CURSORS,1
#################
### AUTOSTART ###
#################
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = hyprpaper &
exec-once = waybar &
exec-once = swaync &
# exec-once = transmission-daemon
# exec-once = fcitx5
exec-once = /usr/lib/kdeconnectd &
exec-once = kdeconnect-indicator &
# exec-once = /home/eric/.local/bin/pypr &
exec-once = swayosd-server &
# exec-once = eww daemon
exec-once = nm-applet
exec-once = swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock'
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
exec-once = systemctl start --user foot-server
exec-once = systemctl start --user sunshine
exec-once = flatpak run me.kozec.syncthingtk -m &
# exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec-once = /usr/lib/polkit-kde-authentication-agent-1 &
# exec-once = hyprpm reload -n