neodotfiles/user/.config/hypr/hyprland.conf
2023-06-20 10:17:21 -04:00

395 lines
15 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 = $HOME/.wbg
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 = 2
col.active_border = rgb(cc241d) #rgb(d79921) 45deg
col.inactive_border = rgb(504945)
layout = master
}
# DECORATIONS
decoration {
rounding = 0 # Rounded corners
blur = yes # Window background blur
blur_size = 4
blur_passes = 1.5
blur_new_optimizations = yes
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 - Web
windowrule = workspace 1, ^(org.qutebrowser.qutebrowser)$
windowrule = workspace 1, ^(newsboat)$
windowrule = workspace 1, ^(firefox)$
windowrule = workspace 1, ^(Librewolf)$
windowrule = workspace 1, ^(Chromium)$
windowrule = workspace 1, ^(Brave-browser)$
## Workspace 2 - File management
windowrule = workspace 2, ^(file_manager)$
windowrule = workspace 2, ^(Pcmanfm)$
## Workspace 3 - Editors
windowrule = workspace 3, ^(editor)$
windowrule = workspace 3, ^(goneovim)$
windowrule = workspace 3, ^(Code)$
windowrule = workspace 3, ^(Emacs)$
windowrule = workspace 3, ^(Notesnook)$
## Workspace 4 - Chat
windowrule = workspace 4, ^(chat_app)$
windowrule = workspace 4, ^(Signal)$
## Workspace 5 - Audio
windowrule = workspace 5, ^(music_player)$
windowrule = workspace 5, ^(ytfzf_music)$
windowrule = workspace 5, ^(audacity)$
windowrule = workspace 5, ^(Ardour)$
windowrule = workspace 5, ^(carla)$
windowrule = workspace 5, ^(carla-control)$
windowrule = workspace 5, ^(hydrogen)$
windowrule = workspace 5, ^(guitarix)$
windowrule = workspace 5, ^(lsp-plugins)$
windowrule = workspace 5, ^(QjackCtl)$
windowrule = workspace 5, ^(org.rncbc.qpwgraph)$
windowrule = workspace 5, ^(soundconverter)$
windowrule = workspace 5, ^(kid3-qt)$
## Workspace 6 - Video
windowrule = workspace 6, ^(pitivi)$
windowrule = workspace 6, ^(org.kde.kdenlive)$
windowrule = workspace 6, ^(mpv)$
windowrule = workspace 6, ^(ytfzf)$
windowrule = workspace 6, ^(flix_cli)$
windowrule = workspace 6, ^(ani_cli)$
windowrule = workspace 6, ^(blender)$
windowrule = workspace 6, ^(com.obsproject.Studio)$
windowrule = workspace 6, ^(fr.handbrake.ghb)$
## Workspace 7 - Graphics
windowrule = workspace 7, ^(org.inkscape.Inkscape)$
windowrule = workspace 7, ^(Gimp-2.10)$
windowrule = workspace 7, ^(xournalpp)$
windowrule = workspace 7, ^(krita)$
windowrule = workspace 7, ^(darktable)$
windowrule = workspace 7, ^(org.kde.digikam)$
## Workspace 8 - Office
windowrule = workspace 8, ^(libreoffice-writer)$
windowrule = workspace 8, ^(libreoffice-calc)$
windowrule = workspace 8, ^(libreoffice-impress)$
windowrule = workspace 8, ^(libreoffice-base)$
windowrule = workspace 8, ^(libreoffice-draw)$
windowrule = workspace 8, ^(libreoffice-math)$
windowrule = workspace 8, ^(soffice)$
windowrule = workspace 8, ^(GeoGebra)$
## Workspace 9 - Games
windowrule = workspace 9, ^(org.libretro.RetroArch)$
windowrule = workspace 9, ^(com.github.tkashkin.gamehub)$
windowrule = workspace 9, ^(DarkPlaces)$
windowrule = workspace 9, ^(pyrogenesis)$
windowrule = workspace 9, ^(wesnoth)$
windowrule = workspace 9, ^(Steam)$
windowrule = workspace 9, ^(Minetest)$
## Workspace 10 - Extras
windowrule = workspace 10, ^(Todoist)$
windowrule = workspace 10, ^(btop)$
windowrule = workspace 10, ^(htop)$
windowrule = workspace 10, ^(pulsemixer)$
windowrule = workspace 10, ^(alsamixer)$
windowrule = workspace 10, ^(wdisplays)$
windowrule = workspace 10, ^(font-manager)$
windowrule = workspace 10, ^(org.qbittorrent.qBittorrent)$
windowrule = workspace 10, ^(org.keepassxc.KeePassXC)$
windowrule = workspace 10, ^(virt-manager)$
###################################
### 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
## 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
## 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, wpctl set-volume @DEFAULT_SINK@ 5%+ # Increase volume by 5%
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%- # Decrease volume by 5%
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # Toggle mute
bindl=, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # 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 rofi || rofi -show drun # Desktop launcher
binde = $supMod_SHIFT, r, exec, pkill rofi || rofi -show run # Standard launcher
binde = $supMod_SHIFT, w, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wall # Wallpaper setup
binde = $supMod_SHIFT, i, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wifi # Wifi setup
binde = $supMod_SHIFT, e, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_emoji # Emoji picker
binde = $supMod_SHIFT, s, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot # Screenshot tool
binde = $supMod_$conMod, s, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot -s # Stop recording (for the screenshot tool)
binde = $supMod_SHIFT, q, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_power # Power setup
binde = $supMod_SHIFT, b, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_blue # Bluetooth setup
binde = $supMod_SHIFT, m, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_mount # External drive mount utility
binde = $supMod_SHIFT, c, exec, pkill rofi || cliphist list | rofi -dmenu -p "  Clipboard " | cliphist decode | wl-copy # Clipboard history
# COLOR PICKER
binde = $supMod_$conMod, c, exec, hyprpicker -n -a
# QUICK TERMINAL SCRIPTS/COMMANDS
## Workspace 1 - Web
binde = $supMod_$altMod, r, exec, wezterm start --class newsboat -- newsboat # RSS feed reader
## 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 10 - 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, wezterm start --class editor -- $HOME/.local/bin/lvim
binde = $supMod, n, exec, com.notesnook.Notesnook
## 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___ _____ _____ ____ ###
### / _ )/ _/ |/ / _ \/ __/ ###
### / _ |/ // / // /\ \ ###
### /____/___/_/|_/____/___/ ###
### ###
############## {{{{ ##############