♻️ refactor(hypr): organize conf to other files

This commit is contained in:
retrozinndev
2024-10-21 21:03:53 -03:00
parent 91482a6c65
commit e49ddc86ba
7 changed files with 129 additions and 74 deletions
+3 -22
View File
@@ -1,6 +1,6 @@
################
### BINDINGS ###
################
##############
## BINDINGS ##
##############
# https://wiki.hyprland.org/Configuring/Keywords and https://wiki.hyprland.org/Configuring/Binds for information on how to configure input
@@ -15,26 +15,7 @@ $screenshotFull = hyprshot -m output -o $screenshotDir
$screenshotSelect = hyprshot -m region -o $screenshotDir
$media = spotify-launcher
input {
kb_layout = br
kb_variant = abnt2
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = true
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = true
}
# Main binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, K, exec, $terminal
+3
View File
@@ -12,6 +12,9 @@ source = ~/.config/hypr/environment.conf
# Monitors
source = ~/.config/hypr/monitors.conf
# Input
source = ~/.config/hypr/input.conf
# Devices
# source = ~/.config/hypr/devices.conf # Uncomment this line to apply file, remember to make it first!
+1 -1
View File
@@ -1,5 +1,5 @@
$wallpaper = /home/joaov/wallpapers/Kita-chan!!.jpg
$wallpaper = /home/joaov/wallpapers/Ryo Yamada Maid Dress.png
splash = true
preload = $wallpaper
+26
View File
@@ -0,0 +1,26 @@
###########
## INPUT ##
###########
input {
kb_layout = br
kb_variant = abnt2
# kb_model =
# kb_options =
# kb_rules =
numlock_by_default = true
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = true
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = true
}
+11
View File
@@ -1,4 +1,15 @@
####################
# HYPRLAND PLUGINS #
####################
plugin {
# Example plugin configuration
hyprbars {
bar_height = 24
hyprbars-button = rgb(ff4040), 16, 󰖭, hyprctl dispatch killactive
hyprbars-button = rgb(eeee11), 16, , hyprctl dispatch fullscreen 1
}
}
+33 -25
View File
@@ -6,42 +6,50 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ and https://wiki.hyprland.org/Configuring/Workspace-Rules/ for information on how to configure this
# Floating windows
windowrulev2 = float, class:moe.launcher.*
windowrulev2 = float, title:^(Clapper)$
windowrulev2 = float, class:xdg-desktop-portal*
windowrulev2 = float, class:org.pulseaudio.pavucontrol
windowrulev2 = float, class:org.gnome.Loupe
windowrulev2 = float, class:mcpelauncher-webview
windowrulev2 = float, class:org.gnome.Calculator
windowrulev2 = float, class:moe.launcher.*
windowrulev2 = float, class:com.github.rafostar.Clapper
windowrulev2 = float, class:xdg-desktop-portal*
windowrulev2 = float, class:org.pulseaudio.pavucontrol
windowrulev2 = float, class:org.gnome.Loupe
windowrulev2 = float, class:mcpelauncher-webview
windowrulev2 = float, class:org.gnome.Calculator
windowrulev2 = float, class:io.mrarm.mcpelauncher-ui-qt
# Resize
windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol
windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol
windowrulev2 = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt
# Moving
windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol
windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol
# Maximize
windowrulev2 = tile, title:^(Resources)$
windowrulev2 = tile, title:^(Resources)$
# Animations
windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol
layerrule = animation slide right, swaync-control-center
layerrule = animation fade, selection
layerrule = animation fade, logout_dialog
layerrule = animation fade, waybar
layerrule = animation fade, hyprpaper
layerrule = animation slide right, swaync-notification-window
layerrule = animation fade, hyprpicker
windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol
layerrule = animation slide right, swaync-control-center
layerrule = animation fade, selection
layerrule = animation fade, logout_dialog
layerrule = animation fade, waybar
layerrule = animation fade, hyprpaper
layerrule = animation slide right, swaync-notification-window
layerrule = animation fade, hyprpicker
# Opacity
windowrulev2 = opacity , class:kitty
windowrulev2 = opacity .95 .95, class:kitty
windowrulev2 = opacity .88 .88, class:spotify
# Blur
blurls = logout_dialog
blurls = kitty
windowrulev2 = noblur, class:^()$, title:^()$
# No blur
windowrulev2 = noblur, title:^()
# Window Blur list
blurls = logout_dialog
blurls = kitty
windowrulev2 = suppressevent maximize, class:.*
# Layer Blur list
layerrule = blur, waybar
layerrule = ignorezero, waybar
# Suppress maximize event from windows
windowrulev2 = suppressevent maximize, class:.*
+51 -25
View File
@@ -1,20 +1,62 @@
#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/wallpapers"
# This script is made by retrozinndev (João Dias), This script
# is licensed under the MIT License as in retrozinndev/Hyprland-Dots repository.
# GitHub: https://github.com/retrozinndev
# Dotfiles: https://github.com/retrozinndev/Hyprland-Dots
# The script prompts the user with anyrun to choose an image file inside the defined
# $WALLPAPER_DIR, after user selected a file, it automatically writes it to the
# hyprpaper.conf file and hot reloads if hyprpaper is running.
if [[ $WALLPAPER_DIR == "" ]]; then
WALLPAPER_DIR="$HOME/wallpapers"
fi
HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf"
WALLPAPER_DMENU="anyrun --plugins libstdin.so"
WALLPAPER_SELECT_CMD="anyrun --plugins libstdin.so"
if [[ -z $(ls -A $WALLPAPER_DIR) ]]
then
exit 1
fi
# Prompt wallpaper list via dmenu
SET_WALLPAPER_NAME="$(ls $WALLPAPER_DIR | $WALLPAPER_DMENU )"
Update_wallpaper_settings() {
echo "Writing to hyprpaper config file"
echo "" > $HYPRPAPER_FILE # Cleans Hyprpaper conf
echo "\$wallpaper = $SET_WALLPAPER_FULL" >> $HYPRPAPER_FILE
echo "" >> $HYPRPAPER_FILE
echo "splash = true" >> $HYPRPAPER_FILE
echo "preload = \$wallpaper" >> $HYPRPAPER_FILE
echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE
}
Hot_reload_wallpaper() {
echo "Hot-reloading wallpaper"
hyprctl hyprpaper unload all
hyprctl hyprpaper preload "$SET_WALLPAPER_FULL"
hyprctl hyprpaper wallpaper ", $SET_WALLPAPER_FULL"
}
Reload_pywal() {
echo "Reloading pywal colorscheme"
wal -q -s -t -i "$SET_WALLPAPER_FULL"
}
Reload_swaync() {
echo "Reloading stylesheet for SwayNC"
swaync-client -rs
}
# Prompt wallpapers via dmenu
SET_WALLPAPER_NAME="$(ls $WALLPAPER_DIR | $WALLPAPER_SELECT_CMD)"
SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
echo $SET_WALLPAPER_NAME
echo "Wallpaper: $SET_WALLPAPER_NAME"
# Check if input wallpaper is empty
if [[ $SET_WALLPAPER_NAME == "" ]] || [[ $SET_WALLPAPER_NAME == " " ]]
@@ -32,25 +74,9 @@ then
fi
fi
echo "Writing change to hyprpaper"
echo "" > $HYPRPAPER_FILE # Cleans hyprpaper file
echo "\$wallpaper = $SET_WALLPAPER_FULL" >> $HYPRPAPER_FILE
echo "" >> $HYPRPAPER_FILE
echo "splash = true" >> $HYPRPAPER_FILE
echo "preload = \$wallpaper" >> $HYPRPAPER_FILE
echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE
echo "Reloading pywal colorscheme"
wal -q -s -t -i "$SET_WALLPAPER_FULL"
echo "Updating hyprpaper wallpaper"
hyprctl hyprpaper unload all
hyprctl hyprpaper preload "$SET_WALLPAPER_FULL"
hyprctl hyprpaper wallpaper ", $SET_WALLPAPER_FULL"
echo "Reloading stylsheet for SwayNC"
swaync-client -rs
Hot_reload_wallpaper
Reload_pywal
Update_wallpaper_settings
Reload_swaync
exit 0