Files
dotfiles/deprecated/hypr/hyprland.conf
2023-12-04 09:44:54 +08:00

448 lines
16 KiB
Plaintext

# monitor = DP-2, 1920x1080, 0x0, 1
# workspace = DP-2,2
# monitor = eDP-1, 1920x1080, 1920x0, 1
# workspace = eDP-1,9
monitor = , preferred, auto, 1
source = ~/.config/hypr/mocha.conf
input {
kb_layout = us
kb_variant = altgr-intl
kb_options = compose:menu,level3:ralt_switch
kb_options = ctrl:nocaps
follow_mouse = 1
numlock_by_default = true
touchpad {
natural_scroll = true
tap-to-click = true
drag_lock = true
disable_while_typing = true
}
# sensitivity = 1.0 # -1.0 - 1.0, 0 means no modification.
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
mouse_move_enables_dpms = true
no_direct_scanout = true #for fullscreen games
enable_swallow = true
swallow_regex = ^(kitty)$
focus_on_activate = true
# animate_manual_resizes = false
# animate_mouse_windowdragging = false
}
binds {
workspace_back_and_forth = true
}
general {
gaps_in = 5
gaps_out = 5
border_size = 3
col.active_border = $mauve $blue 45deg
col.inactive_border = $overlay0
layout = master
}
decoration {
rounding = 4
# multisample_edges = true
blur = true
blur_size = 3
blur_passes = 3
blur_new_optimizations = on
active_opacity = 1.0
# inactive_opacity = 0.9
fullscreen_opacity = 1.0
# set drop_shadow = true to enable
drop_shadow = true
shadow_ignore_window = true
shadow_offset = 7 7
shadow_range = 16
shadow_render_power = 3
col.shadow = rgba(00000077)
dim_inactive = false
dim_strength = 0.1
dim_special = 0.5
dim_around = 0.5
}
# blurls = waybar
blurls = gtk-layer-shell
blurls = lockscreen
animations {
enabled = true
# Beziers
bezier = simple, 0.16, 1, 0.3, 1
bezier = tehtarik, 0.68, -0.55, 0.265, 1.55
bezier = overshot, 0.05, 0.9, 0.1, 1.05
bezier = smoothOut, 0.36, 0, 0.66, -0.56
bezier = smoothIn, 0.25, 1, 0.5, 1
animation = windows, 1, 5, simple, slide
animation = windowsOut, 1, 4, simple, slide
animation = fade, 1, 10, simple
animation = workspaces, 1, 6, simple, slide
animation = specialWorkspace, 1, 6, simple, slidevert
}
dwindle {
pseudotile = true
preserve_split = true
special_scale_factor = 0.8
}
master {
new_is_master = false
mfact = 0.6
special_scale_factor = 0.8
}
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
}
device:epic mouse V1 {
sensitivity = -0.5
}
windowrule = float, yad|nm-connection-editor|pavucontrol|Rofi
windowrule = float, feh|Gimp|qt5ct
windowrule = fullscreen, neovide
windowrule = float, title:^(Firefox — Sharing Indicator)$
windowrule = workspace special:discord silent, Electron
windowrule = move 1511 919, showmethekey-gtk
windowrule = float, showmethekey-gtk
windowrule = noborder, showmethekey-gtk
windowrule = opacity 1.0 override 1.0 override, ^(showmethekey-gtk)$
windowrule = noblur, showmethekey-gtk
windowrule = nofocus, showmethekey-gtk
windowrule = noanim, showmethekey-gtk
windowrule = noshadow, showmethekey-gtk
windowrule = float, ^(com.github.hluk.copyq)$
# windowrule = float, wlogout
# windowrule = move 0 0, wlogout
# windowrule = size 100% 100%, wlogout
# windowrule = animation slide, wlogout
windowrulev2 = workspace 4, class:^(Apache Directory Studio)$
windowrulev2 = bordercolor $green $red, floating:1
windowrulev2 = bordercolor $lavender $mauve, fullscreen:1
windowrulev2 = opacity 0.8 0.8, pinned:1
windowrulev2 = workspace 8 silent, class:^(Steam)$, title:^(Steam)$
windowrulev2 = workspace 8 silent, class:^(lutris)$, title:^(Lutris)$
windowrulev2 = idleinhibit focus, class:^(teams-for-linux)$
windowrulev2 = workspace 5, class:^(gnome-connections)$
windowrulev2 = float, class:^(firefox)$, title:^(Picture-in-Picture)$
windowrulev2 = fullscreen, class:^(Torchlight2.bin.x86_64)$, title:^(Torchlight II v.1.25.5.4)$
# windowrulev2 = dimaround, class:^(wofi)$
windowrulev2 = workspace 6, class:^(python3)$, title:^(Microsoft Office Online)$
# for waybar yay update click, cava
windowrulev2 = animation slide, class:^(update)$, title:^(update)$
windowrulev2 = float, class:^(update)$, title:^(update)$
windowrulev2 = size 60% 50%, class:^(update)$, title:^(update)$
windowrulev2 = move 380 8, class:^(update)$, title:^(update)$
# windowrulev2 = dimaround, class:^(update)$, title:^(update)$
# for ttyclock
windowrulev2 = float, class:^(clock)$, title:^(clock)$
windowrulev2 = size 33% 27%, class:^(clock)$, title:^(clock)$
windowrulev2 = center, class:^(clock)$, title:^(clock)$
# $mainMod = SUPER
$mainMod = ALT
$localBin = $HOME/.local/bin
$scriptsDir = $HOME/.config/hypr/scripts
$term = kitty
$menu = $HOME/.cargo/bin/anyrun
$powermenu = $scriptsDir/powermenu
$volume = $scriptsDir/volume
$backlight = $scriptsDir/brightness
$screenshot = $scriptsDir/screenshot
$lock = $scriptsDir/lockscreen
$logout = archlinux-logout
$colorpicker = $scriptsDir/colorpicker
$wofi_beats = $scriptsDir/wofi-beats
$files = nautilus
$browser = firefox
$music = youtube-music
bind = $mainMod, Return, exec, $term -1
bind = $mainMod, W, exec, [workspace 2] MOZ_USE_XINPUT2=1 $browser
bind = $mainMod SHIFT, W, exec, [workspace 9 silent] whatsapp-nativefier -enable-features=UseOzonePlatform -ozone-platform=wayland
bind = $mainMod, Q, killactive,
bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, A, exec, [workspace 10 silent] microsoft-edge-stable -enable-features=UseOzonePlatform -ozone-platform=wayland --profile-directory="Default"
bind = $mainMod SHIFT, A, exec, [workspace 10 silent] microsoft-edge-stable -enable-features=UseOzonePlatform -ozone-platform=wayland --profile-directory="Profile 1"
bind = $mainMod CTRL, A, exec, [workspace 2] brave -enable-features=UseOzonePlatform -ozone-platform=wayland
bind = $mainMod CTRL SHIFT, A, exec, [workspace 10 silent] teams-for-linux -enable-features=UseOzonePlatform -ozone-platform=wayland
bind = $mainMod, F, fullscreen
bind = $mainMod CTRL, F, fakefullscreen
bind = $mainMod, E, exec, PATH=$HOME/.local/bin:$PATH EDITOR=lvim kitty -1 --class lf lf
bind = $mainMod SHIFT, E, exec, $files
bind = $mainMod, V, togglefloating,
bind = $mainMod SHIFT, V, exec, hyprctl dispatch workspaceopt allfloat
bind = $mainMod, R, exec, $menu
# bind = $mainMod, C, exec, $scriptsDir/menu
bind = $mainMod, SPACE, exec, $scriptsDir/menu
bindr = $mainMod SHIFT, C, exec, pkill bemenu || $scriptsDir/bemenu_input -l
bind = $mainMod, J, layoutmsg, cyclenext
bind = $mainMod, K, layoutmsg, cycleprev
bind = $mainMod SHIFT, Return, layoutmsg, swapwithmaster
bind = $mainMod, I, layoutmsg, addmaster
bind = $mainMod, D, layoutmsg, removemaster
bind = $mainMod SHIFT, period, layoutmsg, orientationnext
bind = $mainMod SHIFT, comma, layoutmsg, orientationprev
bind = $mainMod CTRL, comma, layoutmsg, focusmaster
bind = $mainMod, L, exec, $scriptsDir/changeLayout
bind = $mainMod SHIFT, L, exec, $lock
bind = $mainMod, S, exec, hyprctl dispatch splitratio 0.3
bind = $mainMod SHIFT, S, exec, hyprctl dispatch splitratio -0.3
bind = $mainMod, Escape, exec, $logout
// Test rofi logout... no keybinds though which sux
bind = $mainMod SHIFT, Escape, exec, $HOME/.config/rofi/scripts/powermenu_t3
# bind = $mainMod, Y, exec, $term -1 --class update -T update -e cava
# bind = $mainMod SHIFT, Y, exec, [float] $term -1 --class clock -T clock -e tty-clock -c -B -C 7 -r -s -f "%A, %B, %d"
bind = $mainMod SHIFT, O, exec, $colorpicker
bind = $mainMod, Y, exec, [workspace special:trash] $music -enable-features=UseOzonePlatform -ozone-platform=wayland
bindr = $mainMod SHIFT, Y, exec, pkill wofi || $wofi_beats
bind = $mainMod SHIFT, D, exec, [workspace special:discord silent] discord -enable-features=UseOzonePlatform -ozone-platform=wayland
# Master layout specific
bind = $mainMod, M, submap, masterlayout
submap = masterlayout
bind = , I, layoutmsg, addmaster
bind = , I, submap, reset
bind = , D, layoutmsg, removemaster
bind = , D, submap, reset
bind = , escape, submap, reset
submap = reset
# Night mode (blue filter)
bind = $mainMod, T, exec, hyprctl keyword decoration:screen_shader $scriptsDir/flux.glsl
bind = $mainMod SHIFT, T, exec, hyprctl keyword decoration:screen_shader "[[EMPTY]]"
bind = $mainMod, G, togglegroup
bind = $mainMod, tab, changegroupactive
bind = $mainMod CTRL, G, moveoutofgroup
bind = $mainMod ALT, G, lockgroups, toggle
bind = $mainMod SHIFT, G, submap, group
submap = group
bind = , J, moveintogroup, d
bind = , J, submap, reset
bind = , K, moveintogroup, u
bind = , K, submap, reset
bind = , L, moveintogroup, r
bind = , L, submap, reset
bind = , H, moveintogroup, l
bind = , H, submap, reset
bind = , escape, submap, reset
submap = reset
# Screenshots
bind = , Print, exec, $scriptsDir/grimblast -n copysave output
bind = $mainMod, Print, exec, $scriptsDir/grimblast -n copysave screen
bind = SHIFT, Print, exec, $scriptsDir/grimblast -n copy output
bind = CTRL, Print, exec, $scriptsDir/grimblast -n copysave active
bind = $mainMod CTRL, Print, exec, $scriptsDir/grimblast -n copysave area
# Special Keys
bindl = , xf86audioraisevolume, exec, $volume --inc
bindl = , xf86audiolowervolume, exec, $volume --dec
bindl = , xf86audiomute, exec, $volume --toggle
bindl = , xf86monbrightnessup, exec, $brightness --inc
bindl = , xf86monbrightnessdown, exec, $brightness --dec
bindl = , xf86audioplay, exec, playerctl play-pause
bindl = , xf86audionext, exec, playerctl next
bindl = , xf86audioprev, exec, playerctl previous
# Backlight control
bind = $mainMod SHIFT, equal, submap, backlight
submap = backlight
bind = , equal, exec, $backlight --inc
bind = , minus, exec, $backlight --dec
bind = , K, exec, $backlight --inc
bind = , J, exec, $backlight --dec
bind = , up, exec, $backlight --inc
bind = , down, exec, $backlight --dec
bind = , escape, submap, reset
submap = reset
# Volume control
bind = $mainMod, equal, submap, volume
submap = volume
bind = , equal, exec, $volume --inc
bind = , minus, exec, $volume --dec
bind = , K, exec, $volume --inc
bind = , J, exec, $volume --dec
bind = , up, exec, $volume --inc
bind = , down, exec, $volume --dec
bind = , 0, exec, $volume --toggle
bind = , 9, exec, $volume --toggle-mic
bind = , escape, submap, reset
submap = reset
# Resize
bind = $mainMod SHIFT, R, submap, resize
submap = resize
binde = , H, resizeactive,-50 0
binde = , L, resizeactive,50 0
binde = , K, resizeactive,0 -50
binde = , J, resizeactive,0 50
binde = , left, resizeactive,-50 0
binde = , right, resizeactive,50 0
binde = , up, resizeactive,0 -50
binde = , down, resizeactive,0 50
bind = , escape, submap, reset
submap = reset
# Move
bind = $mainMod SHIFT, M, submap, move
submap = move
bind = , H, movewindow, l
bind = , L, movewindow, r
bind = , K, movewindow, u
bind = , J, movewindow, d
bind = , left, movewindow, l
bind = , right, movewindow, r
bind = , up, movewindow, u
bind = , down, movewindow, d
bind = , period, exec, hyprctl dispatch movewindow mon:0
bind = , comma, exec, hyprctl dispatch movewindow mon:1
bind = , escape, submap, reset
submap = reset
# Focus
bind = $mainMod SHIFT, F, submap, focus
submap = focus
bind = , left, movefocus, l
bind = , right, movefocus, r
bind = , up, movefocus, u
bind = , down, movefocus, d
bind = , H, movefocus, l
bind = , L, movefocus, r
bind = , K, movefocus, u
bind = , J, movefocus, d
bind = , escape, submap, reset
submap = reset
bind = ALT, tab, exec, hyprctl dispatch focuscurrentorlast
# Special workspace
bind = $mainMod SHIFT, U, movetoworkspace, special
bind = $mainMod, U, togglespecialworkspace,
bind = $mainMod SHIFT, Backspace, movetoworkspace, special:work
bind = $mainMod, Backspace, togglespecialworkspace, work
bind = $mainMod SHIFT, Delete, movetoworkspace, special:trash
bind = $mainMod, Delete, togglespecialworkspace, trash
bind = $mainMod SHIFT, Backslash, movetoworkspace, special:discord
bind = $mainMod, Backslash, togglespecialworkspace, discord
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, Grave, workspace, empty # The key before '1' (backtick/tilde)
# Move active window and follow to workspace
bind = $mainMod CTRL, 1, movetoworkspace, 1
bind = $mainMod CTRL, 2, movetoworkspace, 2
bind = $mainMod CTRL, 3, movetoworkspace, 3
bind = $mainMod CTRL, 4, movetoworkspace, 4
bind = $mainMod CTRL, 5, movetoworkspace, 5
bind = $mainMod CTRL, 6, movetoworkspace, 6
bind = $mainMod CTRL, 7, movetoworkspace, 7
bind = $mainMod CTRL, 8, movetoworkspace, 8
bind = $mainMod CTRL, 9, movetoworkspace, 9
bind = $mainMod CTRL, 0, movetoworkspace, 10
bind = $mainMod CTRL, Grave, movetoworkspace, empty
bind = $mainMod CTRL, bracketleft, movetoworkspace, -1
bind = $mainMod CTRL, bracketright, movetoworkspace, +1
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
bind = $mainMod SHIFT, Grave, movetoworkspacesilent, empty
bind = $mainMod SHIFT, bracketleft, movetoworkspacesilent, -1
bind = $mainMod SHIFT, bracketright, movetoworkspacesilent, +1
# 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
# mouse:272 = left
# mouse:273 = right
# mouse:274 = middle
# mouse:275 = side
# mouse:276 = extra
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = $mainMod, mouse:274, togglefloating
# The second bind is redundant but I'm used to it in DWM
bind = $mainMod SHIFT CTRL, comma, exec, hyprctl dispatch swapactiveworkspaces 1 0
bind = $mainMod SHIFT CTRL, period, exec, hyprctl dispatch swapactiveworkspaces 0 1
bind = $mainMod SHIFT CTRL, left, exec, hyprctl dispatch swapactiveworkspaces 1 0
bind = $mainMod SHIFT CTRL, right, exec, hyprctl dispatch swapactiveworkspaces 0 1
# focus monitor.
bind = $mainMod, comma, focusmonitor, l
bind = $mainMod, bracketleft, workspace, e-1
bind = $mainMod, period, focusmonitor, r
bind = $mainMod, bracketright, workspace, e+1
# move
bind = SHIFTALT, comma, movecurrentworkspacetomonitor, l
bind = SHIFTALT, period, movecurrentworkspacetomonitor, r
# laptop lid switch
# bindl=,switch:on:Lid Switch, exec, "hyprctl keyword monitor "eDP-1, 1920x1080, 1920x0, 1"
# bindl=,switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, disable"
exec-once = swaybg -m fill -i $HOME/.config/hypr/bg/mohamed-chahin-10.jpg
exec-once = $scriptsDir/startup
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# start kitty scratchpad. Call using $mainMod+U (toggle special workspace)
exec-once = [workspace special] $term -1
exec-once = $scriptsDir/portal
exec-once = copyq
#exec-once = [workspace 2] $browser
exec-once = [workspace special:trash silent] rclone-browser
# exec-once = [workspace 9 silent] whatsapp-nativefier
# exec-once = swayidle -w timeout 900 '$lock' timeout 1800 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '$lock'
exec-once = swayidle -w timeout 900 '$lock' resume 'hyprctl dispatch dpms on before-sleep '$lock'
exec-once = fcitx5