feat:migrate hyprland config with nwg tools

This commit is contained in:
grassblock 2025-06-04 15:08:49 +08:00
parent 54ea69dd8e
commit fc39a811c9
251 changed files with 23198 additions and 118 deletions

View file

@ -1,83 +1,61 @@
# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# nwg-shell Hyprland config file
#
# The nwg-shell-config utility generates a part of settings for you:
# General, Input devices, Touchpad, Dwindle layout, Master layout.
# Decoration, animations, gestures and per-device config are left to be configured by yourself.
# Refer to the Hyprland wiki at https://wiki.hyprland.org for more information.
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# Monitors & workspaces: nwg-displays generates 2 files, which we include here:
#
source = ~/.config/hypr/monitors.conf
source = ~/.config/hypr/workspaces.conf
#autogenerated = 0 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute apps & services at launch
#exec-once = sleep 1 & dbus-update-activation-environment --systemd --all # now uses uwsm instead
exec-once = waybar & hypridle & hyprpaper
#
# Autostart. Feel free to add your own entries.
# Shell components will be started in the includes.conf file, which we include below.
#
exec = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = ~/.config/hypr/scripts/.azotebg-hyprland # Wallpaper
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# from original hyprland config
exec-once = wlsunset -l 39.2 -L 118.6
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = mako
exec-once = fcitx5 -d --replace
exec-once = wl-paste --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store
exec-once = udiskie --appindicator --no-automount # show appindicator but don't mount devices
exec-once = echo 'Xft.dpi:144' | xrdb -merge # fix xwayland scaling
exec-once = /home/grassblock/.config/hypr/scripts/video-wallpaper
exec = hypridle
#
# Include settings generated by nwg-shell-config
#
source = ~/.config/hypr/includes.conf
# Source a file (multi-file configs)
source = ~/.config/hypr/conf/env.conf # This imports the environment varibles
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = rofi -show drun
# Some default env vars.
env = HYPRCURSOR_THEME,Bibata-Modern-Ice
env = HYPRCURSOR_SIZE,24
env = XCURSOR_SIZE,24
env = XCURSOR_THEME,Bibata-Modern-Ice
#
# All the settings below are up to you. We don't touch them in the shell config utility.
#
source = ~/.config/hypr/conf/window-rules.conf
# env vars
env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt5ct if you only have that
#env = QT_STYLE_OVERRIDE,kvantum #ignore for kde applications crashing
#env = GTK_THEME,Nordic-bluish-dark #ignore for libadwaita applications
#env = ICON_THEME,Papirus-Dark
#env = QT_SCALE_FACTOR_ROUNDING_POLICY,Passthrough
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = XDG_MENU_PREFIX,plasma- #this fix dolphin open with
# locales
env = LANG,en_GB.UTF-8
env = XDG_SESSION_DESKTOP,Hyprland
#env = XDG_MENU_PREFIX, plasma-
env = XDG_MENU_PREFIX,arch- #this fix dolphin open with
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
}
env = LC_CTYPE,en_GB.UTF-8"
env = LC_NUMERIC,en_GB.UTF-8
env = LC_TIME,en_SE.UTF-8
env = LC_COLLATE,en_GB.UTF-8
env = LC_MONETARY,zh_CN.UTF-8
env = LC_MESSAGES,en_GB.UTF-8
env = LC_PAPER,en_GB.UTF-8
env = LC_NAME,zh_CN.UTF-8
env = LC_ADDRESS,en_GB.UTF-8
env = LC_TELEPHONE,zh_CN.UTF-8
env = LC_MEASUREMENT,zh_CN.UTF-8
env = LC_IDENTIFICATION,en_GB.UTF-8
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
gaps_out = 5
border_size = 2
col.active_border = rgba(81a1c1ee) 45deg
col.inactive_border = rgba(595959aa)
@ -87,16 +65,15 @@ general {
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 6
blur {
enabled = true
size = 5
passes = 1
new_optimizations = true
}
#dim_inactive = true
@ -110,10 +87,9 @@ decoration {
}
animations {
enabled = yes
enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
@ -124,20 +100,9 @@ animations {
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = master
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
workspace_swipe = true
}
xwayland {
@ -151,15 +116,14 @@ misc {
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# device:epic-mouse-v1 {
# sensitivity = -0.5
# }
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
#windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
windowrule = pseudo,fcitx
windowrule = float,title:^(galculator|org.gnome.Calculator|azote)$
windowrule = idleinhibit fullscreen,class:^.*$$
#windowrule = pseudo,fcitx
# waylyrics windowrule for desktop lyrics
windowrulev2 = float,class:(io.github.waylyrics.Waylyrics)
windowrulev2 = pin,class:(io.github.waylyrics.Waylyrics)
@ -176,46 +140,83 @@ windowrulev2 = noshadow,class:(Waydroid)
windowrulev2 = nomaxsize,class:(Waydroid)
# shimeji
windowrule = float, com-group_finity-mascot-Main
windowrule = noblur, com-group_finity-mascot-Main
windowrule = nofocus, com-group_finity-mascot-Main
windowrule = noshadow, com-group_finity-mascot-Main
windowrule = noborder, com-group_finity-mascot-Main
#windowrule = float, com-group_finity-mascot-Main
#windowrule = noblur, com-group_finity-mascot-Main
#windowrule = nofocus, com-group_finity-mascot-Main
#windowrule = noshadow, com-group_finity-mascot-Main
#windowrule = noborder, com-group_finity-mascot-Main
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, K, exec, $terminal
bind = $mainMod, C, killactive,
bind = ALT, F4, killactive,
#bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F, togglefloating,
# KEY BINDINGS, see https://wiki.hyprland.org/Configuring/Binds/ for more
# If you happen to change some key bindings, you may also edit ~/.local/share/nwg-shell-config/help-hyprland.pango
# We've defined $term, $editor and so on in includes.conf.
$menu = rofi -show drun
bind = $mainMod, X, exec, $exit
bind = $mainMod, E, exec, $filemanager
bind = ALT, F1, exec, $launcher
bind = $mainMod, V, exec, nwg-clipman
bind = $mainMod, T, exec, $term
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = SUPER, V, exec, rofi -modi clipboard:~/.config/rofi/scripts/clip -show clipboard -show-icons
bind = , PRINT, exec, ~/.config/hypr/scripts/grimblast/screenshot.sh
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp -d)" - | wl-copy #quick screenshot
bind = $mainMod, L, exec, hyprlock
bind = ALT, TAB, exec, rofi -show window
bind = CTRL + ALT, DELETE, exec, ~/.config/rofi/scripts/powermenu/powermenu.sh
bind = $mainMod, L, exec, gtklock
bind = CTRL + ALT, DELETE, exec, nwg-bar
bind = $mainMod + SHIFT, C, exec, hyprpicker -a
bind = ALT, SPACE, exec, rofi -show combi -modes combi -combi-modes "drun,run,recursivebrowser"
# Show/hide the dock, if started
bind = ALT, D, exec, pkill -10 nwg-dock
bind = $mainMod, L, exec, nwg-lock # screen locker, according to shell settings
bind = $mainMod, F1, exec, nwg-shell-help # help window
bind = $mainMod SHIFT, F, fullscreen
bind = $mainMod, I, pin
bind = $mainMod, C, killactive,
bind = $mainMod, C, killactive,
bind = ALT, F4, killactive,
bind = $mainMod SHIFT, M, exit,
#bind = $mainMod, Space, togglefloating,
bind = $mainMod, F, togglefloating,
bind = $mainMod SHIFT, C, exec, hyprctl reload # reload Hyprland
bind = $mainMod SHIFT, Z, movetoworkspace, special # move to the special workspace
bind = $mainMod, Z, togglespecialworkspace # show/hide special workspace
# Key binds for volume & brightness
bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
# Move focus with mainMod + arrow keys
bind = ALT, Tab, exec,rofi -show window # (dwindle)
bind = $mainMod, P, pseudo, # (dwindle)
bind = $mainMod, A, layoutmsg, cycleprev # (master)
bind = $mainMod, S, layoutmsg, swapwithmaster # (master)
bind = $mainMod, D, layoutmsg, cyclenext # (master)
# SCREENSHOT (/usr/local/bin/screenshot)
bind = , Print, exec, screenshot fullscreen # full screen
bind = CONTROL, Print, exec, screenshot display # focused display
bind = $mainMod SHIFT+CONTROL, Print, exec, screenshot focused # focused window
bind = SHIFT+CONTROL, Print, exec, screenshot swappy # selected region -> swappy
bind = $mainMod SHIFT, S, exec, screenshot swappy
# bind = SHIFT+CONTROL, Print, exec, screenshot region # or selected region w/o swappy
# MOVE FOCUS with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
# MOVE WINDOW with mainMod SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# SWITCH WORKSPACES with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
@ -227,7 +228,7 @@ bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
# MOVE ACTIVE WINDOW TO A WORKSPACE with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
@ -239,14 +240,37 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
# Scroll through existing workspaces with mainMod + scroll
# SCROLL THROUGH EXISTING WORKSPACES with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
# MOVE/RESIZE WINDOWS with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# KEY BINDINGS SUBMAP TO RESIZE WINDOWS WITH ARROW KEYS
# switch to a submap called resize
bind = $mainMod, R, submap, resize
# start a submap called "resize"
submap = resize
# set repeatable binds for resizing the active window
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
# use reset to go back to the global submap
bind = , escape, submap, reset
# will reset the submap, which will return to the global submap
submap = reset
# keybinds further down will be global again...
#
# HUD MESSAGES (must be defined after primary bindings).
# In case you find them annoying, delete the line below.
# You can also delete the ~/.config/hypr/hud.conf file afterwards.
#
source = ~/.config/hypr/hud.conf