♻️ refactor(hypr): whole binds config file

using mainmod variable instead of super, default apps file and some other misc changes
This commit is contained in:
Sergio Laín 2024-05-26 20:20:36 +02:00
parent 5ae2599bd7
commit 01ee540655
No known key found for this signature in database
GPG key ID: FB00AF7015FFE76B
3 changed files with 141 additions and 117 deletions

View file

@ -1,150 +1,151 @@
# Variables # Variables
source = ~/.config/hypr/configs/default_apps.conf
$mainMod = SUPER
$scripts = ~/.config/hypr/scripts $scripts = ~/.config/hypr/scripts
$custom_app_launch = $scripts/custom_app_launch $rofi-scripts = ~/.config/rofi/scripts
$hyprshot = $scripts/hyprshot -o ~/Imagenes/Capturas/PC -f captura-$(date +%Y-%m-%d-%s).png
$workspace = $scripts/awesome_workspaces
# Mouse binds # Mouse binds
bindm = SUPER, mouse:272, movewindow bindm = $mainMod, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow bindm = $mainMod, mouse:273, resizewindow
# Basic keybinds # Basic keybinds
bind = SUPER, Q, killactive, bind = $mainMod, Q, killactive,
bind = SUPERCTRL, R, exec, pkill waybar || waybar bind = $mainMod CTRL, R, exec, killall $bar; $bar
bind = SUPERCTRL, M, exit bind = $mainMod SHIFT, R, exec, swaync -R && swaync -rs
bind = SUPER, A, exec, $scripts/toggle_floating bind = $mainMod, A, exec, $scripts/toggle_floating
bind = SUPER, P, pseudo bind = $mainMod, P, pseudo
bind = SUPER, F, fullscreen, 0 bind = $mainMod, F, fullscreen, 0
bind = SUPER, Z, exec, pypr zoom bind = $mainMod, Z, exec, pypr zoom
# Applications # Applications
bind = SUPER, W, exec, $custom_app_launch browser bind = $mainMod, W, exec, $browser
bind = SUPER, O, exec, $custom_app_launch obsidian bind = $mainMod, O, exec, $notetaking-app
bind = SUPERSHIFT, O, exec, $custom_app_launch office bind = $mainMod SHIFT, O, exec, $office-suite
bind = SUPERSHIFT, E,exec, $custom_app_launch nemo bind = $mainMod SHIFT, E,exec, $alter-file-manager
bind = SUPER, RETURN, exec, kitty bind = $mainMod, RETURN, exec, $terminal
bind = SUPERSHIFT, RETURN, exec, kitty --class=center-float-large bind = $mainMod SHIFT, RETURN, exec, $terminal --class=center-float-large
bind = SUPERALT, RETURN, exec, kitty --class=center-float bind = $mainMod ALT, RETURN, exec, $terminal --class=center-float
bind = SUPERCTRL, RETURN, exec, kitty --class=center-float-mini bind = $mainMod CTRL, RETURN, exec, $terminal --class=center-float-mini
bind = SUPER, BACKSPACE, exec, $custom_app_launch nvim bind = $mainMod, BACKSPACE, exec, $editor
bind = SUPERSHIFT, BACKSPACE, exec, $custom_app_launch codium bind = $mainMod SHIFT, BACKSPACE, exec, $alter-editor
# Pickers/Launchers # Pickers/Launchers
bind = SUPER, 23, exec, rofi -show drun # Tab bind = $mainMod, 23, exec, $launcher # Tab
bind = SUPER, INSERT, exec, $scripts/color_picker bind = $mainMod, INSERT, exec, $scripts/color_picker
bind = SUPERSHIFT, W, exec, $scripts/wallpaper select bind = $mainMod SHIFT, W, exec, $rofi-scripts/wallpaper/wallpaper
bind = SUPERCTRL, W, exec, pypr wall next bind = $mainMod, 61, exec, $rofi-scripts/keybindings/keybindings # /
bind = SUPER, 61, exec, $scripts/rofi/keybindings # / bind = $mainMod SHIFT, G, exec, rofi -modi games -show games -theme $rofi-scripts/game-launcher/style
bind = SUPERSHIFT, G, exec, $scripts/rofi/game_launcher bind = $mainMod, Y, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = SUPER, Y, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
# Scratchpads # Scratchpads
bind = SUPER, V, exec, pypr toggle volume bind = $mainMod, V, exec, pypr toggle volume
bind = SUPER, 51, exec, pypr toggle terminal # Backslash bind = $mainMod, 51, exec, pypr toggle terminal # Backslash
bind = SUPER, B, exec, pypr toggle btop bind = $mainMod, B, exec, pypr toggle btop
bind = SUPERSHIFT, I, exec, pypr toggle gpt bind = $mainMod SHIFT, I, exec, pypr toggle gpt
bind = SUPERSHIFT, B, exec, pypr toggle bluetooth bind = $mainMod SHIFT, B, exec, pypr toggle bluetooth
bind = SUPER, E, exec, pypr toggle yazi bind = $mainMod, E, exec, pypr toggle yazi
bind = SUPER, D, exec, pypr toggle dots bind = $mainMod, D, exec, pypr toggle dots
bind = SUPERSHIFT, C, exec, pypr toggle cava bind = $mainMod SHIFT, C, exec, pypr toggle cava
bind = SUPER, U, exec, pypr toggle topgrade-system bind = $mainMod, U, exec, pypr toggle topgrade-system
bind = SUPERSHIFT, U, exec, pypr toggle topgrade-all bind = $mainMod SHIFT, U, exec, pypr toggle topgrade-all
# Screenshot stuff # Screenshots
bind = SHIFT, INSERT, exec, $hyprshot -m output bind = CTRL, ESCAPE, exec, $rofi-scripts/screenshot/screenshot
bind = SUPERSHIFT, INSERT, exec, $hyprshot -m window bind = SHIFT, ESCAPE, exec, $rofi-scripts/screenshot/screenshot --freeze
bind = CTRL, INSERT, exec, $hyprshot -m region
bind = ALT, INSERT, exec, $scripts/rofi/screenshots_selection # Misc stuff
bind = $mainMod CTRL, W, exec, pypr wall next
# Notifications menu # Notifications menu
bind = SUPER, N, exec, swaync-client -t bind = $mainMod, N, exec, $notifications-menu
# Logout menu # Logout menu
bind = SUPER, ESCAPE, exec, wleave bind = $mainMod, ESCAPE, exec, $rofi-scripts/powermenu/powermenu
# Windows # Windows
# Focusing on windows # Focusing on windows
bind = SUPER, LEFT, movefocus, l bind = $mainMod, LEFT, movefocus, l
bind = SUPER, RIGHT, movefocus, r bind = $mainMod, RIGHT, movefocus, r
bind = SUPER, UP, movefocus, u bind = $mainMod, UP, movefocus, u
bind = SUPER, DOWN, movefocus, d bind = $mainMod, DOWN, movefocus, d
# Vim-keybinds # Vim-keybinds
bind = SUPER, H, movefocus, l bind = $mainMod, H, movefocus, l
bind = SUPER, L, movefocus, r bind = $mainMod, L, movefocus, r
bind = SUPER, K, movefocus, u bind = $mainMod, K, movefocus, u
bind = SUPER, J, movefocus, d bind = $mainMod, J, movefocus, d
# Moving windows # Moving windows
bind = SUPERSHIFT, LEFT, movewindow, l bind = $mainMod SHIFT, LEFT, movewindow, l
bind = SUPERSHIFT, RIGHT, movewindow, r bind = $mainMod SHIFT, RIGHT, movewindow, r
bind = SUPERSHIFT, UP, movewindow, u bind = $mainMod SHIFT, UP, movewindow, u
bind = SUPERSHIFT, DOWN, movewindow, d bind = $mainMod SHIFT, DOWN, movewindow, d
# Vim-keybinds # Vim-keybinds
bind = SUPERSHIFT, H, movewindow, l bind = $mainMod SHIFT, H, movewindow, l
bind = SUPERSHIFT, L, movewindow, r bind = $mainMod SHIFT, L, movewindow, r
bind = SUPERSHIFT, K, movewindow, u bind = $mainMod SHIFT, K, movewindow, u
bind = SUPERSHIFT, J, movewindow, d bind = $mainMod SHIFT, J, movewindow, d
bind = SUPERSHIFT, 51, exec, $scripts/move_by_rules # Backslash bind = $mainMod SHIFT, 51, exec, $scripts/move_by_rules # Backslash
# Center and split # Center and split
bind = SUPER, S, togglesplit bind = $mainMod, S, togglesplit
bind = SUPER, C, exec, hyprctl dispatch centerwindow 1 bind = $mainMod, C, exec, hyprctl dispatch centerwindow 1
# Workspaces # Workspaces
# Focusing other workspaces # Focusing other workspaces
bind = SUPER, 1, workspace, r~1 bind = $mainMod, 1, workspace, r~1
bind = SUPER, 2, workspace, r~2 bind = $mainMod, 2, workspace, r~2
bind = SUPER, 3, workspace, r~3 bind = $mainMod, 3, workspace, r~3
bind = SUPER, 4, workspace, r~4 bind = $mainMod, 4, workspace, r~4
bind = SUPER, 5, workspace, r~5 bind = $mainMod, 5, workspace, r~5
bind = SUPER, 6, workspace, r~6 bind = $mainMod, 6, workspace, r~6
bind = SUPER, 7, workspace, r~7 bind = $mainMod, 7, workspace, r~7
bind = SUPER, 8, workspace, r~8 bind = $mainMod, 8, workspace, r~8
bind = SUPER, 9, workspace, r~9 bind = $mainMod, 9, workspace, r~9
# Moving windows to other workspaces # Moving windows to other workspaces
bind = SUPERSHIFT, 1, movetoworkspace, r~1 bind = $mainMod SHIFT, 1, movetoworkspace, r~1
bind = SUPERSHIFT, 2, movetoworkspace, r~2 bind = $mainMod SHIFT, 2, movetoworkspace, r~2
bind = SUPERSHIFT, 3, movetoworkspace, r~3 bind = $mainMod SHIFT, 3, movetoworkspace, r~3
bind = SUPERSHIFT, 4, movetoworkspace, r~4 bind = $mainMod SHIFT, 4, movetoworkspace, r~4
bind = SUPERSHIFT, 5, movetoworkspace, r~5 bind = $mainMod SHIFT, 5, movetoworkspace, r~5
bind = SUPERSHIFT, 6, movetoworkspace, r~6 bind = $mainMod SHIFT, 6, movetoworkspace, r~6
bind = SUPERSHIFT, 7, movetoworkspace, r~7 bind = $mainMod SHIFT, 7, movetoworkspace, r~7
bind = SUPERSHIFT, 8, movetoworkspace, r~8 bind = $mainMod SHIFT, 8, movetoworkspace, r~8
bind = SUPERSHIFT, 9, movetoworkspace, r~9 bind = $mainMod SHIFT, 9, movetoworkspace, r~9
# Moving windows to other workspaces (silent) # Moving windows to other workspaces (silent)
bind = SUPERALT, 1, movetoworkspacesilent, r~1 bind = $mainMod ALT, 1, movetoworkspacesilent, r~1
bind = SUPERALT, 2, movetoworkspacesilent, r~2 bind = $mainMod ALT, 2, movetoworkspacesilent, r~2
bind = SUPERALT, 3, movetoworkspacesilent, r~3 bind = $mainMod ALT, 3, movetoworkspacesilent, r~3
bind = SUPERALT, 4, movetoworkspacesilent, r~4 bind = $mainMod ALT, 4, movetoworkspacesilent, r~4
bind = SUPERALT, 5, movetoworkspacesilent, r~5 bind = $mainMod ALT, 5, movetoworkspacesilent, r~5
bind = SUPERALT, 6, movetoworkspacesilent, r~6 bind = $mainMod ALT, 6, movetoworkspacesilent, r~6
bind = SUPERALT, 7, movetoworkspacesilent, r~7 bind = $mainMod ALT, 7, movetoworkspacesilent, r~7
bind = SUPERALT, 8, movetoworkspacesilent, r~8 bind = $mainMod ALT, 8, movetoworkspacesilent, r~8
bind = SUPERALT, 9, movetoworkspacesilent, r~9 bind = $mainMod ALT, 9, movetoworkspacesilent, r~9
# Moving to other workspace with mouse control # Moving to other workspace with mouse control
bind = SUPER, mouse_down, workspace, m-1 bind = $mainMod, mouse_down, workspace, m-1
bind = SUPER, mouse_up, workspace, m+1 bind = $mainMod, mouse_up, workspace, m+1
# Moving to other workspace with keyboard # Moving to other workspace with keyboard
bind = SUPERCTRL, LEFT, workspace, m-1 bind = $mainMod CTRL, LEFT, workspace, m-1
bind = SUPERCTRL, RIGHT, workspace, m+1 bind = $mainMod CTRL, RIGHT, workspace, m+1
bind = SUPERCTRL, H, workspace, m-1 bind = $mainMod CTRL, H, workspace, m-1
bind = SUPERCTRL, L, workspace, m+1 bind = $mainMod CTRL, L, workspace, m+1
# Moving to next and prev monitors # Moving to next and prev monitors
bind = SUPER, 59, focusmonitor, -1 # Comma bind = $mainMod, 59, focusmonitor, -1 # Comma
bind = SUPER, 60, focusmonitor, +1 # Period bind = $mainMod, 60, focusmonitor, +1 # Period
# Group control # Group control
bind = SUPER, G, togglegroup bind = $mainMod, G, togglegroup
bind = ALT, ESCAPE, changegroupactive bind = ALT, TAB, changegroupactive
# Submap for resizing windows # Submap for resizing windows
bind = SUPER, R, submap, resize bind = $mainMod, R, submap, resize
submap = resize submap = resize
binde = , RIGHT, resizeactive, 40 0 binde = , RIGHT, resizeactive, 40 0
@ -162,36 +163,36 @@ bind = , ESCAPE, submap, reset
submap = reset submap = reset
# Audio # Audio
bind = SUPERCTRL, V, exec, ~/.local/bin/restartAudio bind = $mainMod CTRL, V, exec, ~/.local/bin/restartAudio
bindl = SUPERCTRL, mouse:280, exec, swayosd-client --output-volume mute-toggle # Extra Up Button bindl = $mainMod CTRL, mouse:280, exec, swayosd-client --output-volume mute-toggle # Extra Up Button
bindl = , XF86AudioMute, exec, swayosd-client --output-volume mute-toggle bindl = , XF86AudioMute, exec, swayosd-client --output-volume mute-toggle
bindl = SUPERCTRL, mouse:281, exec, swayosd-client --input-volume mute-toggle # Extra Down Button bindl = $mainMod CTRL, mouse:281, exec, swayosd-client --input-volume mute-toggle # Extra Down Button
bindl = , XF86AudioMicMute, exec, exec swayosd-client --input-volume mute-toggle bindl = , XF86AudioMicMute, exec, exec swayosd-client --input-volume mute-toggle
bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = SUPERCTRL, mouse:282, exec, playerctl play-pause # Extra Center Button bindl = $mainMod CTRL, mouse:282, exec, playerctl play-pause # Extra Center Button
bindl = , XF86AudioPrev, exec, playerctl previous bindl = , XF86AudioPrev, exec, playerctl previous
bindl = SUPERCTRL, mouse:275, exec, playerctl previous # Extra Back Button bindl = $mainMod CTRL, mouse:275, exec, playerctl previous # Extra Back Button
bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioNext, exec, playerctl next
bindl = SUPERCTRL, mouse:276, exec, playerctl next # Extra Forward Button bindl = $mainMod CTRL, mouse:276, exec, playerctl next # Extra Forward Button
bindle = , XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise bindle = , XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise
bindle = SUPERCTRL, 21, exec, swayosd-client --output-volume raise # Minus key bindle = $mainMod CTRL, 21, exec, swayosd-client --output-volume raise # Minus key
bindle = , XF86AudioLowerVolume, exec, swayosd-client --output-volume lower bindle = , XF86AudioLowerVolume, exec, swayosd-client --output-volume lower
bindle = SUPERCTRL, 20, exec, swayosd-client --output-volume lower # Plus key bindle = $mainMod CTRL, 20, exec, swayosd-client --output-volume lower # Plus key
bindle = , XF86InputRaiseVolume, exec, swayosd-client --input-volume raise bindle = , XF86InputRaiseVolume, exec, swayosd-client --input-volume raise
bindle = SUPERSHIFT, 21, exec, swayosd-client --input-volume raise # Minus key bindle = $mainMod SHIFT, 21, exec, swayosd-client --input-volume raise # Minus key
bindle = , XF86InputLowerVolume, exec, swayosd-client --input-volume lower bindle = , XF86InputLowerVolume, exec, swayosd-client --input-volume lower
bindle = SUPERSHIFT, 20, exec, swayosd-client --input-volume lower # Plus key bindle = $mainMod SHIFT, 20, exec, swayosd-client --input-volume lower # Plus key
# Disable anim, blur, etc # Disable anim, blur, etc
bind = SUPER, F12, exec, $scripts/performance bind = $mainMod, F12, exec, $scripts/performance
# Open Wiki # Open Wiki
bind = SUPER, F1, exec, xdg-open https://wiki.hyprland.org/ bind = $mainMod, F1, exec, xdg-open https://wiki.hyprland.org/
bind = SUPERSHIFT, F1, exec, xdg-open https://github.com/Matt-FTW/dotfiles/wiki bind = $mainMod SHIFT, F1, exec, xdg-open https://github.com/Matt-FTW/dotfiles/wiki
# Freeze active window # Freeze active window
bind = SUPERSHIFT, ESCAPE, exec, $scripts/hyprfreeze -a bind = $mainMod SHIFT, ESCAPE, exec, $scripts/hyprfreeze -a

View file

@ -0,0 +1,12 @@
# Define your programs
$bar = waybar
$launcher = rofi -show drun
$notifications-menu = swaync-client -t
$browser = floorp
$notetaking-app = obsidian
$terminal = kitty
$office-suite = libreoffice
$editor = nvim
$alter-editor = vscodium
$file-manager = yazi
$alter-file-manager = nemo

View file

@ -0,0 +1,11 @@
#!/usr/bin/bash
random=$(fd --base-directory "$HOME/.config/hypr/theme/walls/" --type f . | shuf -n 1)
wallpaper="$HOME/.config/hypr/theme/walls/$random"
swww img "$wallpaper" \
--transition-bezier 0.5,1.19,.8,.4 \
--transition-type wipe \
--transition-duration 2 \
--transition-fps 75 && notify-send "Wallpaper Changed" -i "$wallpaper"