neodotfiles/user/.config/hypr/hyprland.conf
2023-09-08 14:43:08 -04:00

440 lines
17 KiB
Text

############################################################
### ____ __ ###
### / __ \_________ _/ /_____ ###
### / / / / ___/ __ `/ //_/ _ \ ###
### / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) ###
### /_____/_/ \__,_/_/|_|\___/ The Hyprland config ###
### ###
############################################################
################################
### beg_________ ___ ____ ###
### / ___/ __ \/ _ \/ __/ ###
### / /__/ /_/ / , _/ _/ ###
### \___/\____/_/|_/___/ ###
### ###
############# {{{{ #############
# AUTOSTART
## Wayland backend
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
## Polkit agent
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
## Desktop portals
exec-once = /usr/lib/xdg-desktop-portal
exec-once = /usr/lib/xdg-desktop-portal-hyprland
## Notification daemon
exec-once = dunst --config ~/.config/dunst/dunstrc
## Top bar
exec-once = waybar
## Set wallpaper
exec-once = swww init
## Clipboard history
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
# MONITORS
monitor=,preferred,auto,1
# INPUT
input {
kb_layout = us,es
kb_options = grp:shift_caps_toggle
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = -0.2 # -1.0 - 1.0, 0 means no modification.
}
# GENERAL
general {
gaps_in = 2
gaps_out = 4
border_size = 3
col.active_border = rgb(cc241d) #rgb(d79921) 45deg
col.inactive_border = rgb(504945)
layout = master
}
# DECORATIONS
decoration {
rounding = 0 # Rounded corners
drop_shadow = yes
shadow_range = 5
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
# ANIMATIONS
animations {
enabled = yes
bezier = linear,0,0,1,1
# window creation
animation = windowsIn,1, 3,default,popin
animation = fadeIn,1, 3,default
# window destruction
animation = windowsOut,1, 3,default,popin
animation = fadeOut,1, 3,default
# window movement
animation = windowsMove,1, 3,default,popin
animation = border, 1, 2, linear
animation = borderangle, 1, 25, linear, loop
animation = fade, 1, 7, default
animation = workspaces, 1, 4, default, slide
}
# DWINDLE LAYOUT CONFIG
dwindle {
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 LAYOUT CONFIG
master {
no_gaps_when_only = false
new_is_master = false
mfact = 0.50
}
# TOUCHPAD GESTURES
gestures {
workspace_swipe = on
}
# MISC
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
mouse_move_enables_dpms = true
enable_swallow = true
swallow_regex = ^(wezterm)$
}
# MOUSE SENSITIVITY
device:epic mouse V1 {
sensitivity = -0.5
}
################################
### end_________ ___ ____ ###
### / ___/ __ \/ _ \/ __/ ###
### / /__/ /_/ / , _/ _/ ###
### \___/\____/_/|_/___/ ###
### ###
############# }}}} #############
###################################
### beg___ __ ____ ________ ###
### / _ \/ / / / / / __/ __/ ###
### / , _/ /_/ / /__/ _/_\ \ ###
### /_/|_|\____/____/___/___/ ###
### ###
############## {{{{ ###############
# WINDOW RULES
windowrule = float, ^(qalculate-gtk)$
## Workspace 1 - Editors
windowrule = workspace 1, ^(neovim)$
windowrule = workspace 1, ^(goneovim)$
windowrule = workspace 1, ^(Code)$
windowrule = workspace 1, ^(emacs)$
windowrule = workspace 1, ^(neovide)$
## Workspace 2 - Debug/Test Tools
windowrule = workspace 2, ^(gnome-boxes)$
windowrule = workspace 2, ^(virt-manager)$
## Workspace 2 - File management
windowrule = workspace 3, ^(file_manager)$
windowrule = workspace 3, ^(pcmanfm)$
## Workspace 4 - Web
windowrule = workspace 4, ^(org.qutebrowser.qutebrowser)$
windowrule = workspace 4, ^(firefox)$
windowrule = workspace 4, ^(LibreWolf)$
windowrule = workspace 4, ^(Chromium)$
windowrule = workspace 4, ^(Brave-browser)$
## Workspace 5 - Chat
windowrule = workspace 5, ^(gomuks)$
windowrule = workspace 5, ^(Signal)$
windowrule = workspace 5, ^(revolt-desktop)$
windowrule = workspace 5, ^(Element)$
## Workspace 6 - Mail
windowrule = workspace 6, ^(tutanota-desktop)$
windowrule = workspace 6, ^(thunderbird)$
## Workspace 7 - News
windowrule = workspace 7, ^(newsboat)$
windowrule = workspace 7, ^(org.kde.akregator)$
windowrule = workspace 7, ^(io.gitlab.news_flash.NewsFlash)$
windowrule = workspace 7, ^(liferea)$
windowrule = workspace 7, ^(io.github.martinrotter.rssguard)$
## Workspace 8 - Mastodon
windowrule = workspace 8, ^(tut)$
windowrule = workspace 8, ^(org.kde.tokodon)$
## Workspace 9 - Audio
windowrule = workspace 9, ^(music_player)$
windowrule = workspace 9, ^(ytfzf_music)$
windowrule = workspace 9, ^(audacity)$
windowrule = workspace 9, ^(Ardour)$
windowrule = workspace 9, ^(carla)$
windowrule = workspace 9, ^(carla-control)$
windowrule = workspace 9, ^(hydrogen)$
windowrule = workspace 9, ^(guitarix)$
windowrule = workspace 9, ^(lsp-plugins)$
windowrule = workspace 9, ^(QjackCtl)$
windowrule = workspace 9, ^(org.rncbc.qpwgraph)$
windowrule = workspace 9, ^(soundconverter)$
windowrule = workspace 9, ^(kid3-qt)$
## Workspace 10 - Video
windowrule = workspace 10, ^(pitivi)$
windowrule = workspace 10, ^(org.kde.kdenlive)$
windowrule = workspace 10, ^(mpv)$
windowrule = workspace 10, ^(ytfzf)$
windowrule = workspace 10, ^(flix_cli)$
windowrule = workspace 10, ^(ani_cli)$
windowrule = workspace 10, ^(blender)$
windowrule = workspace 10, ^(com.obsproject.Studio)$
windowrule = workspace 10, ^(fr.handbrake.ghb)$
## Workspace 11 - Graphics
windowrule = workspace 11, ^(org.inkscape.Inkscape)$
windowrule = workspace 11, ^(Gimp-2.10)$
windowrule = workspace 11, ^(xournalpp)$
windowrule = workspace 11, ^(krita)$
windowrule = workspace 11, ^(darktable)$
windowrule = workspace 11, ^(org.kde.digikam)$
## Workspace 12 - Office
windowrule = workspace 12, ^(libreoffice-writer)$
windowrule = workspace 12, ^(libreoffice-calc)$
windowrule = workspace 12, ^(libreoffice-impress)$
windowrule = workspace 12, ^(libreoffice-base)$
windowrule = workspace 12, ^(libreoffice-draw)$
windowrule = workspace 12, ^(libreoffice-math)$
windowrule = workspace 12, ^(soffice)$
windowrule = workspace 12, ^(GeoGebra)$
windowrule = workspace 12, ^(Notesnook)$
## Workspace 13 - PDF Readers
windowrule = workspace 13, ^(org.pwmt.zathura)$
## Workspace 14 - Games
windowrule = workspace 14, ^(org.libretro.RetroArch)$
windowrule = workspace 14, ^(com.github.tkashkin.gamehub)$
windowrule = workspace 14, ^(DarkPlaces)$
windowrule = workspace 14, ^(pyrogenesis)$
windowrule = workspace 14, ^(wesnoth)$
windowrule = workspace 14, ^(Steam)$
windowrule = workspace 14, ^(Minetest)$
# Workspace 15 - Password Manager
windowrule = workspace 15, ^(org.keepassxc.KeePassXC)$
# Workspace 16 - Audio Tools
windowrule = workspace 16, ^(pulsemixer)$
windowrule = workspace 16, ^(alsamixer)$
windowrule = workspace 16, ^(com.github.wwmm.easyeffects)$
## Workspace 19 - System Monitor
windowrule = workspace 19, ^(btop)$
windowrule = workspace 19, ^(htop)$
## Workspace 20 - Tools
windowrule = workspace 20, ^(wdisplays)$
windowrule = workspace 20, ^(font-manager)$
windowrule = workspace 20, ^(org.qbittorrent.qBittorrent)$
###################################
### end___ __ ____ ________ ###
### / _ \/ / / / / / __/ __/ ###
### / , _/ /_/ / /__/ _/_\ \ ###
### /_/|_|\____/____/___/___/ ###
### ###
############## }}}} ###############
##################################
### beg___ _____ _____ ____ ###
### / _ )/ _/ |/ / _ \/ __/ ###
### / _ |/ // / // /\ \ ###
### /____/___/_/|_/____/___/ ###
### ###
############## {{{{ ##############
# MODIFIER KEYS VARIABLES
$supMod = SUPER
$altMod = ALT
$conMod = CONTROL
# MAIN KEYBINDS
bind = $supMod, RETURN, exec, wezterm # Terminal
bind = $supMod, q, killactive, # Close window
bind = $supMod_$conMod_SHIFT, q, exit, # Exit the compositor
bind = $supMod, b, exec, pkill waybar || waybar # Hide/Show the top bar
bind = $supMod, v, togglefloating, # Toggle floating mode
#bind = $supMod, P, pseudo, # dwindle
#bind = $supMod, J, togglesplit, # dwindle
# FOCUS
## Cycle focus with supmod + k,j
bind = $supMod, k, layoutmsg, cyclenext
bind = $supMod, j, layoutmsg, cycleprev
## Focus master window
bind = $supMod_SHIFT, RETURN, layoutmsg, focusmaster
# LAYOUT MANIPULATION
## Swap windows
bind = $supMod_SHIFT, j, layoutmsg, swapnext
bind = $supMod_SHIFT, k, layoutmsg, swapprev
## Swap window with master
bind = $supMod_$conMod, RETURN, layoutmsg, swapwithmaster
## Add/remove window to master stack
bind = $supMod, i, layoutmsg, addmaster
bind = $supMod, d, layoutmsg, removemaster
## Change the master orientation
bind = $supMod_SHIFT, l, layoutmsg, orientationnext
bind = $supMod_SHIFT, h, layoutmsg, orientationprev
## Window resizing
bind = $supMod_$conMod, l, resizeactive, 30 0
bind = $supMod_$conMod, h, resizeactive, -30 0
bind = $supMod_$conMod, j, resizeactive, 0 30
bind = $supMod_$conMod, k, resizeactive, 0 -30
# Move/resize windows with supmod + lmb/rmb and dragging
bindm = $supMod, mouse:272, movewindow
bindm = $supMod, mouse:273, resizewindow
# WORKSPACES MANIPULATION
## Switch workspaces with supmod + [0-9]
bind = $supMod, 1, workspace, 1
bind = $supMod, 2, workspace, 2
bind = $supMod, 3, workspace, 3
bind = $supMod, 4, workspace, 4
bind = $supMod, 5, workspace, 5
bind = $supMod, 6, workspace, 6
bind = $supMod, 7, workspace, 7
bind = $supMod, 8, workspace, 8
bind = $supMod, 9, workspace, 9
bind = $supMod, 0, workspace, 10
bind = $supMod_$conMod, 1, workspace, 11
bind = $supMod_$conMod, 2, workspace, 12
bind = $supMod_$conMod, 3, workspace, 13
bind = $supMod_$conMod, 4, workspace, 14
bind = $supMod_$conMod, 5, workspace, 15
bind = $supMod_$conMod, 6, workspace, 16
bind = $supMod_$conMod, 7, workspace, 17
bind = $supMod_$conMod, 8, workspace, 18
bind = $supMod_$conMod, 9, workspace, 19
bind = $supMod_$conMod, 0, workspace, 20
## Move active window to a workspace with supmod + shift + [0-9]
bind = $supMod_SHIFT, 1, movetoworkspace, 1
bind = $supMod_SHIFT, 2, movetoworkspace, 2
bind = $supMod_SHIFT, 3, movetoworkspace, 3
bind = $supMod_SHIFT, 4, movetoworkspace, 4
bind = $supMod_SHIFT, 5, movetoworkspace, 5
bind = $supMod_SHIFT, 6, movetoworkspace, 6
bind = $supMod_SHIFT, 7, movetoworkspace, 7
bind = $supMod_SHIFT, 8, movetoworkspace, 8
bind = $supMod_SHIFT, 9, movetoworkspace, 9
bind = $supMod_SHIFT, 0, movetoworkspace, 10
bind = $supMod_$conMod_SHIFT, 1, movetoworkspace, 11
bind = $supMod_$conMod_SHIFT, 2, movetoworkspace, 12
bind = $supMod_$conMod_SHIFT, 3, movetoworkspace, 13
bind = $supMod_$conMod_SHIFT, 4, movetoworkspace, 14
bind = $supMod_$conMod_SHIFT, 5, movetoworkspace, 15
bind = $supMod_$conMod_SHIFT, 6, movetoworkspace, 16
bind = $supMod_$conMod_SHIFT, 7, movetoworkspace, 17
bind = $supMod_$conMod_SHIFT, 8, movetoworkspace, 18
bind = $supMod_$conMod_SHIFT, 9, movetoworkspace, 19
bind = $supMod_$conMod_SHIFT, 0, movetoworkspace, 20
## Scroll through existing workspaces with supmod + scroll
bind = $supMod, mouse_down, workspace, e+1
bind = $supMod, mouse_up, workspace, e-1
# Scroll through existing workspaces with supmod + arrow keys
bind = $supMod, Right, workspace, e+1
bind = $supMod, Left, workspace, e-1
## Move active window through existing workspaces with supmod + arrow keys
bind = $supMod_SHIFT, Left, movetoworkspace, e+1
bind = $supMod_SHIFT, Right, movetoworkspace, e-1
# XF86 KEYS
## Media control
bindl=, XF86AudioRaiseVolume, exec, pamixer -i 5 # Increase volume by 5%
bindl=, XF86AudioLowerVolume, exec, pamixer -d 5 # Decrease volume by 5%
bindl=, XF86AudioMute, exec, pamixer -t # Toggle mute
bindl=, XF86AudioMicMute, exec, pamixer --default-source -t # Toggle microphone mute
bindl=, XF86AudioPause, exec, playerctl play-pause # Play/pause
bindl=, XF86AudioPlay, exec, playerctl play-pause # Play/pause
bindl=, XF86AudioNext, exec, playerctl next # Next song
bindl=, XF86AudioPrev, exec, playerctl previous # Previous song
bindl=, XF86AudioStop, exec, playerctl stop # Stop playback
## News
bindl=, XF86News, exec, wezterm start --class newsboat -- newsboat
## Brightness control
bindl=, XF86MonBrightnessUp, exec, brightnessctl s 10%+ # Increase brightness by 10%
bindl=, XF86MonBrightnessDown, exec, brightnessctl s 10%- # Decrease brightness by 10%
## Display setup
bindl=, XF86Display, exec, wdisplays # Open the display config tool (wdisplays)
# ROFI
binde = $supMod_SHIFT, d, exec, pkill wofi || $RUNNER_EX --show drun # Desktop launcher
binde = $supMod_SHIFT, r, exec, pkill wofi || $RUNNER_EX --show run # Standard launcher
binde = $supMod_SHIFT, w, exec, pkill wofi || $HOME/.local/bin/rs_wall # Wallpaper setup
binde = $supMod_SHIFT, i, exec, pkill wofi || $HOME/.local/bin/rs_wifi # Wifi setup
binde = $supMod_SHIFT, e, exec, pkill wofi || $HOME/.local/bin/rs_emoji # Emoji picker
binde = $supMod_SHIFT, s, exec, pkill wofi || $HOME/.local/bin/rs_scrot # Screenshot tool
binde = $supMod_$conMod, s, exec, pkill wofi || $HOME/.local/bin/rs_scrot -s # Stop recording (for the screenshot tool)
binde = $supMod_SHIFT, q, exec, pkill wofi || $HOME/.local/bin/rs_power # Power setup
binde = $supMod_SHIFT, b, exec, pkill wofi || $HOME/.local/bin/rs_blue # Bluetooth setup
binde = $supMod_SHIFT, m, exec, pkill wofi || $HOME/.local/bin/rs_mount # External drive mount utility
binde = $supMod_SHIFT, c, exec, pkill wofi || cliphist list | $RUNNER -p "  Clipboard " | cliphist decode | wl-copy # Clipboard history
# COLOR PICKER
binde = $supMod_$conMod, c, exec, hyprpicker -n -a
# QUICK TERMINAL SCRIPTS/COMMANDS
## Workspace 3 - Web
binde = $supMod_$altMod, r, exec, wezterm start --class newsboat -- newsboat # RSS feed reader
binde = $supMod_$altMod, t, exec, wezterm start --class tut -- tut # Mastodon client
## Workspace 5 - Audio
binde = $supMod_$altMod, m, exec, wezterm start --class ytfzf_music -- ytfzf -mlstT chafa # Listen to YouTube Music on the terminal
## Workspace 6 - Video
binde = $supMod_$altMod, f, exec, wezterm start --class flix_cli -- flix-cli # Watch movies on the terminal
binde = $supMod_$altMod, a, exec, wezterm start --class ani_cli -- ani-cli # Watch anime on the terminal
binde = $supMod_$altMod, y, exec, wezterm start --class ytfzf -- ytfzf -flstT chafa # Watch YouTube on the terminal
## Workspace 9 - Extras
binde = $supMod_$altMod, p, exec, wezterm start --class pulsemixer -- pulsemixer # Open the volume mixer (pulsemixer)
binde = $supMod_$altMod, o, exec, wezterm start --class alsamixer -- alsamixer # Open the volume mixer (alsamixer)
binde = $supMod_$altMod, b, exec, wezterm start --class btop -- btop # Open the system monitor (btop)
binde = $supMod_$altMod, h, exec, wezterm start --class htop -- htop # Open the system monitor (htop)
# MAIN APPS
## Workspace 1 - Web
binde = $supMod, w, exec, firefox
## Workspace 2 - File management
binde = $supMod, f, exec, wezterm start --class file_manager -- vifm
## Workspace 3 - Editors
binde = $supMod, e, exec, neovide --neovim-bin $HOME/.local/bin/lvim
## Workspace 4 - Chat
binde = $supMod, c, exec, signal-desktop
## Workspace 5 - Audio
binde = $supMod, m, exec, wezterm start --class music_player -- cmus
## Workspace 9 - Games
binde = $supMod, g, exec, retroarch
## Workspace 10 - Extras
binde = $supMod, p, exec, keepassxc
##################################
### end___ _____ _____ ____ ###
### / _ )/ _/ |/ / _ \/ __/ ###
### / _ |/ // / // /\ \ ###
### /____/___/_/|_/____/___/ ###
### ###
############## {{{{ ##############