Skip to content

Commit

Permalink
hyprland: Split the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
yutkat committed Dec 12, 2023
1 parent a64a641 commit 30491e7
Show file tree
Hide file tree
Showing 8 changed files with 248 additions and 246 deletions.
80 changes: 80 additions & 0 deletions .config/hypr/config.d/bind.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# KeyBinds
bind=SUPER,RETURN,exec,~/.local/bin/x-terminal-emulator
bind=SUPER,c,exec,~/.local/bin/x-www-browser
bind=SUPER,o,exec,xdg-open "$(find ~/Downloads -type f -not -name ".*" -printf "%T@ %p\n" | sort -n | cut -d' ' -f 2- | tail -n 1)"
# bind=SUPER+SHIFT,e,exit,
bind=SUPER+SHIFT,e,exec,ulauncher-toggle -q "sys "
bind=SUPER+SHIFT,space,togglefloating,

## Group
bind=SUPER,g,togglegroup,
bind=SUPER,p,changegroupactive,f
bind=SUPER,n,changegroupactive,b
bind=SUPER+ALT,h,movewindoworgroup,l
bind=SUPER+ALT,l,movewindoworgroup,r
bind=SUPER+ALT,k,movewindoworgroup,u
bind=SUPER+ALT,j,movewindoworgroup,d

## Mouse
bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow

## Window
bind=SUPER+SHIFT,q,killactive
bind=ALT,F4,killactive
bind=SUPER,f,fullscreen,1
bind=SUPER+SHIFT,f,fullscreen,0
bind=SUPER+SHIFT,space,togglefloating
bind=SUPER+CTRL,space,togglefloating

bind=SUPER+SHIFT,backslash,layoutmsg,preselect r
bind=SUPER,minus,layoutmsg,preselect d
bind=SUPER,s,togglesplit

bind=SUPER,left,movefocus,l
bind=SUPER,right,movefocus,r
bind=SUPER,up,movefocus,u
bind=SUPER,down,movefocus,d
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
bind=SUPER+CTRL,h,movewindow,mon:l
bind=SUPER+CTRL,l,movewindow,mon:r
bind=SUPER+CTRL,k,movewindow,mon:u
bind=SUPER+CTRL,j,movewindow,mon:d

## Workspace
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

bind=SUPER+SHIFT,1,movetoworkspacesilent,1
bind=SUPER+SHIFT,2,movetoworkspacesilent,2
bind=SUPER+SHIFT,3,movetoworkspacesilent,3
bind=SUPER+SHIFT,4,movetoworkspacesilent,4
bind=SUPER+SHIFT,5,movetoworkspacesilent,5
bind=SUPER+SHIFT,6,movetoworkspacesilent,6
bind=SUPER+SHIFT,7,movetoworkspacesilent,7
bind=SUPER+SHIFT,8,movetoworkspacesilent,8
bind=SUPER+SHIFT,9,movetoworkspacesilent,9
bind=SUPER+SHIFT,0,movetoworkspacesilent,10

# bind=SUPER+CTRL+SHIFT,l,exec,pypr shift_monitors -1
# bind=SUPER+CTRL+SHIFT,h,exec,pypr shift_monitors +1
bind=SUPER+CTRL+SHIFT,h,movecurrentworkspacetomonitor,l
bind=SUPER+CTRL+SHIFT,l,movecurrentworkspacetomonitor,r

bind=SUPER,mouse_down,workspace,e+1
bind=SUPER,mouse_up,workspace,e-1
24 changes: 24 additions & 0 deletions .config/hypr/config.d/env.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Env
env = GTK_THEME,Arc-Dark
env = QT_STYLE_OVERRIDE,kvantum-dark
env = LC_CTYPE,$LANG
env = LC_NUMERIC,$LANG
env = LC_TIME,$LANG
env = LC_COLLATE,$LANG
env = LC_MONETARY,$LANG
env = LC_MESSAGES,$LANG
env = LC_PAPER,$LANG
env = LC_NAME,$LANG
env = LC_ADDRESS,$LANG
env = LC_TELEPHONE,$LANG
env = LC_MEASUREMENT,$LANG
env = LC_IDENTIFICATION,$LANG
env = LC_ALL,

# fcitx
env = XIM,fcitx
env = XIM_PROGRAM,fcitx
env = INPUT_METHOD,fcitx
#env = GTK_IM_MODULE,fcitx
env = QT_IM_MODULE,fcitx
env = XMODIFIERS,@im=fcitx
1 change: 1 addition & 0 deletions .config/hypr/config.d/monitor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
monitor=,preferred,auto,1
65 changes: 65 additions & 0 deletions .config/hypr/config.d/option.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
general {
sensitivity = 1.0 # for mouse cursor
cursor_inactive_timeout = 5

gaps_in = 2
gaps_out = 2
border_size = 2
col.active_border = 0x66ee1111
col.inactive_border = 0x66333333

apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)

#damage_tracking = full # leave it on full unless you hate your GPU and want to make it suffer
}

input {
kb_layout =
kb_variant =
kb_model =
kb_options =
kb_rules =

follow_mouse = 1
sensitivity = 1
repeat_rate = 50
repeat_delay = 500

touchpad {
natural_scroll = no
}
}

decoration {
rounding = 10
blur {
size = 3 # minimum 1
passes = 1 # minimum 1, more passes = more resource intensive.
}
# 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 {
enabled = 1
animation = windows,1,7,default
animation = border,1,10,default
animation = fade,1,10,default
animation = workspaces,1,6,default
}

dwindle {
pseudotile = true
force_split = 2
preserve_split = true
}

gestures {
workspace_swipe = no
}

misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
60 changes: 60 additions & 0 deletions .config/hypr/config.d/startup.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Startup
exec-once=hyprpaper
exec-once=hyprctl setcursor ComixCursors-Black 24
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# https://github.com/espanso/espanso/issues/1750
#exec-once=systemctl --user start espanso
#exec-once=nm-applet --indicator
exec-once=blueman-applet
exec-once=fcitx5
exec-once=waybar
exec-once=~/.config/hypr/scripts/hyprland_portal.sh

# Apps
## Sound
exec-once=pasystray
exec-once=systemctl --user start pipewire pipewire-pulse wireplumber

## Waybar
bind=SUPER,r,exec,killall -SIGUSR2 waybar

## pypr
exec-once=pypr
bind=SUPER,semicolon,exec,pypr toggle term
# windowrulev2=float,class:(wezterm.scratchpad)
# windowrulev2=workspace special:scratch_term silent,class:(wezterm.scratchpad)
# windowrulev2=size 90% 90%,class:(wezterm.scratchpad)
# windowrulev2=center,class:(wezterm.scratchpad)

## Lock
exec-once=swayidle -w timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
exec-once=swayidle -w timeout 610 'swaylock -c 000000' resume 'hyprctl dispatch dpms on'
exec-once=swayidle -w timeout 10 'if pgrep swaylock; then hyprctl dispatch dpms off"; fi' resume 'if pgrep swaylock; then hyprctl dispatch dpms on; fi'
bind=SUPER,comma,exec,swaylock -c 000000

## Notification
exec-once=dunst
bind=SUPER,BackSpace,exec,dunstctl close
bind=SUPER+SHIFT,BackSpace,exec,dunstctl close_all
bind=SUPER,grave,exec,dunstctl history-pop
bind=SUPER+SHIFT,grave,exec,dunstctl context
bind=SUPER+CTRL,grave,exec,dunstctl action

## Ulauncher
exec-once=systemctl --user import-environment PATH; systemctl --user start ulauncher
bind=SUPER,d,exec,ulauncher-toggle
bind=ALT,F2,exec,ulauncher-toggle
bind=SUPER,space,exec,ulauncher-toggle

## CopyQ
exec-once=copyq
bind=SUPER+CTRL,v,exec,copyq show
windowrulev2=float,class:(com.github.hluk.copyq)
windowrulev2=size 50% 50%,class:(com.github.hluk.copyq)
windowrulev2=center,class:(com.github.hluk.copyq)

## Screenshots
bind=,Print,exec,grim "$(echo ~/Pictures/screenshots/$(date +'%Y%m%d_%H%M%S').png)"
bind=SHIFT,Print,exec,grim -g "$(slurp)" - | swappy -f -
bind=CTRL,Print,exec,swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp | grim -g - - | swappy -f -
4 changes: 4 additions & 0 deletions .config/hypr/config.d/window-rule.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Window rule
windowrulev2=size 50% 70%,class:^(GTK Application)$
windowrulev2=center,class:^(GTK Application)$
windowrulev2 = bordercolor rgb(FF0000) rgb(880808),fullscreen:1
Loading

0 comments on commit 30491e7

Please sign in to comment.