mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
212 lines
6.3 KiB
Plaintext
212 lines
6.3 KiB
Plaintext
## Hyprland configuration file for Archcraft
|
|
|
|
#-- Output ----------------------------------------------------
|
|
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
|
|
|
# format:
|
|
# monitor=name,resolution,position,scale
|
|
monitor=DP-2,3840x2160@144,0x0,1.6
|
|
workspace=DP-2,1
|
|
|
|
#-- Input ----------------------------------------------------
|
|
# Configure mouse and touchpad here.
|
|
input {
|
|
kb_layout=us
|
|
kb_variant=
|
|
kb_model=
|
|
kb_options=
|
|
kb_rules=
|
|
follow_mouse=1
|
|
natural_scroll=0
|
|
force_no_accel=0
|
|
# repeat_rate=
|
|
# repeat_delay=
|
|
numlock_by_default=1
|
|
}
|
|
|
|
#-- General ----------------------------------------------------
|
|
# General settings like MOD key, Gaps, Colors, etc.
|
|
general {
|
|
sensitivity=2.0
|
|
apply_sens_to_raw=0
|
|
|
|
gaps_in=5
|
|
gaps_out=10
|
|
|
|
border_size=4
|
|
col.active_border=0xFFB4A1DB
|
|
col.inactive_border=0xFF343A40
|
|
}
|
|
|
|
#-- Decoration ----------------------------------------------------
|
|
# Decoration settings like Rounded Corners, Opacity, Blur, etc.
|
|
decoration {
|
|
rounding=8 # Original: rounding=-1
|
|
multisample_edges=0
|
|
|
|
active_opacity=1.0
|
|
inactive_opacity=0.9
|
|
fullscreen_opacity=1.0
|
|
|
|
blur=0
|
|
blur_size=3 # minimum 1
|
|
blur_passes=1 # minimum 1, more passes = more resource intensive.
|
|
blur_ignore_opacity=0
|
|
|
|
# Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts.
|
|
# if you want heavy blur, you need to up the blur_passes.
|
|
# the more passes, the more you can up the blur_size without noticing artifacts.
|
|
}
|
|
|
|
#-- Animations ----------------------------------------------------
|
|
animations {
|
|
enabled=1
|
|
animation=windows,1,8,default,popin 80%
|
|
animation=fadeOut,1,8,default
|
|
animation=fadeIn,1,8,default
|
|
animation=workspaces,1,8,default
|
|
#animation=workspaces,1,6,overshot
|
|
}
|
|
|
|
#-- Dwindle ----------------------------------------------------
|
|
dwindle {
|
|
pseudotile=0 # enable pseudotiling on dwindle
|
|
}
|
|
|
|
#-- Window Rules ----------------------------------------------------
|
|
windowrule=float,foot-float
|
|
windowrule=float,yad|nm-connection-editor|pavucontrolk
|
|
windowrule=float,xfce-polkit|kvantummanager|qt5ct
|
|
windowrule=float,feh|imv|Gpicview|Gimp|nomacs
|
|
windowrule=float,VirtualBox Manager|qemu|Qemu-system-x86_64
|
|
windowrule=float,xfce4-appfinder
|
|
|
|
windowrule=float,foot-full
|
|
windowrule=move 0 0,foot-full
|
|
windowrule=size 100% 100%,foot-full
|
|
|
|
windowrule=float,wlogout
|
|
windowrule=move 0 0,wlogout
|
|
windowrule=size 100% 100%,wlogout
|
|
windowrule=animation slide,wlogout
|
|
|
|
#-- Keybindings ----------------------------------------------------
|
|
$term = alacritty
|
|
$app_launcher = ~/.config/hypr/scripts/menu
|
|
$volume = ~/.config/hypr/scripts/volume
|
|
$backlight = ~/.config/hypr/scripts/brightness
|
|
$screenshot = ~/.config/hypr/scripts/screenshot
|
|
$lockscreen = ~/.config/hypr/scripts/lockscreen
|
|
$wlogout = ~/.config/hypr/scripts/wlogout
|
|
$colorpicker = ~/.config/hypr/scripts/colorpicker
|
|
$files = thunar
|
|
$editor = code # vscode
|
|
$browser = firefox
|
|
|
|
# -- Terminal --
|
|
bind=SUPER,Return,exec,$term
|
|
|
|
# -- Wofi --
|
|
bind=SUPER,D,exec,$app_launcher
|
|
|
|
# -- Hyprland --
|
|
bind=SUPER,Q,killactive,
|
|
bind=CTRLALT,Delete,exit,
|
|
bind=SUPER,F,fullscreen,
|
|
bind=SUPER,Space,togglefloating,
|
|
bind=SUPER,S,pseudo,
|
|
|
|
# -- Misc --
|
|
bind=SUPER,N,exec,nm-connection-editor # need install network-manager-applet
|
|
bind=SUPER,P,exec,$colorpicker
|
|
bind=CTRLALT,L,exec,$lockscreen
|
|
bind=SUPERSHIFT,X,exec,$wlogout
|
|
|
|
# -- Some nice mouse binds --
|
|
bindm=SUPER,mouse:272,movewindow
|
|
bindm=SUPER,mouse:273,resizewindow
|
|
|
|
# -- Function keys --
|
|
bind=,XF86MonBrightnessUp,exec,$backlight --inc
|
|
bind=,XF86MonBrightnessDown,exec,$backlight --dec
|
|
bind=,XF86AudioRaiseVolume,exec,$volume --inc
|
|
bind=,XF86AudioLowerVolume,exec,$volume --dec
|
|
bind=,XF86AudioMute,exec,$volume --toggle
|
|
bind=,XF86AudioMicMute,exec,$volume --toggle-mic
|
|
bind=,XF86AudioNext,exec,mpc next
|
|
bind=,XF86AudioPrev,exec,mpc prev
|
|
bind=,XF86AudioPlay,exec,mpc toggle
|
|
bind=,XF86AudioStop,exec,mpc stop
|
|
|
|
# -- Screenshots --
|
|
bind=,Print,exec,$screenshot --now
|
|
bind=SUPER,Print,exec,$screenshot --win
|
|
bind=CTRL,Print,exec,$screenshot --area
|
|
|
|
# Focus
|
|
bind=SUPER,left,movefocus,l
|
|
bind=SUPER,right,movefocus,r
|
|
bind=SUPER,up,movefocus,u
|
|
bind=SUPER,down,movefocus,d
|
|
|
|
# Move
|
|
bind=SUPERSHIFT,left,movewindow,l
|
|
bind=SUPERSHIFT,right,movewindow,r
|
|
bind=SUPERSHIFT,up,movewindow,u
|
|
bind=SUPERSHIFT,down,movewindow,d
|
|
|
|
# Resize
|
|
bind=SUPERCTRL,left,resizeactive,-20 0
|
|
bind=SUPERCTRL,right,resizeactive,20 0
|
|
bind=SUPERCTRL,up,resizeactive,0 -20
|
|
bind=SUPERCTRL,down,resizeactive,0 20
|
|
|
|
# Workspaces
|
|
bind=SUPER,1,workspace,1
|
|
bind=SUPER,2,workspace,2
|
|
bind=SUPER,3,workspace,3
|
|
bind=SUPER,4,workspace,4
|
|
bind=SUPER,5,workspace,5
|
|
bind=SUPER,6,workspace,6
|
|
bind=SUPER,7,workspace,7
|
|
bind=SUPER,8,workspace,8
|
|
bind=SUPER,9,workspace,9
|
|
bind=SUPER,0,workspace,10
|
|
|
|
# Send to Workspaces
|
|
bind=SUPERSHIFT,1,movetoworkspace,1
|
|
bind=SUPERSHIFT,2,movetoworkspace,2
|
|
bind=SUPERSHIFT,3,movetoworkspace,3
|
|
bind=SUPERSHIFT,4,movetoworkspace,4
|
|
bind=SUPERSHIFT,5,movetoworkspace,5
|
|
bind=SUPERSHIFT,6,movetoworkspace,6
|
|
bind=SUPERSHIFT,7,movetoworkspace,7
|
|
bind=SUPERSHIFT,8,movetoworkspace,8
|
|
bind=SUPERSHIFT,9,movetoworkspace,9
|
|
bind=SUPERSHIFT,0,movetoworkspace,10
|
|
|
|
bind=SUPER,mouse_down,workspace,e+1
|
|
bind=SUPER,mouse_up,workspace,e-1
|
|
|
|
#-- Startup ----------------------------------------------------
|
|
exec-once=~/.config/hypr/scripts/startup
|
|
|
|
|
|
#-- Fcitx5 input method ----------------------------------------------------
|
|
windowrule=pseudo,fcitx # enable this will make fcitx5 works, but fcitx5-configtool will not work!
|
|
exec-once=cp ~/.config/fcitx5/profile-bak ~/.config/fcitx5/profile # restore fcitx5 profile manged by nixos
|
|
exec-once=fcitx5 -d --replace # start fcitx5 daemon
|
|
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
|
|
|
|
|
|
# -- Fix input method in vscode
|
|
exec-once = hyprctl setcursor "Bibata-Modern-Ice" 24
|
|
# 效果是 wayland 原生窗口缩放完全正常
|
|
# xwayland 窗口先渲染到 200% 再降到 hyprland config 里 monitor 设置的值,看上去和原生没啥区别
|
|
# 相比较一开始的方案输入法字体大小也正确了.唯一有点问题的可能是 xwayland 窗口下的鼠标指针大小不对
|
|
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
|
exec-once = xrdb -merge ~/.Xresources
|
|
# env = GDK_SCALE,2
|
|
env = XCURSOR_SIZE,48
|
|
env = XCURSOR_THEME,"Bibata-Modern-Ice"
|