♻️ refactor: move hyprland config files to hypr

This commit is contained in:
João Dias
2024-09-04 22:39:10 -03:00
parent 0fe1fcae67
commit fda5b2426c
12 changed files with 107 additions and 53 deletions
@@ -3,17 +3,18 @@
## APPEARANCE ##
################
# See https://wiki.hyprland.org/Configuring/Variables for more information on how to configure appearance
source = ~/.cache/wal/colors-hypr.conf
general {
gaps_in = 4
gaps_out = 6
border_size = 2
col.active_border = rgb(AC8A3D)
col.inactive_border = rgb(313244)
col.active_border = $color1
col.inactive_border = $background
resize_on_border = false
@@ -9,6 +9,9 @@ exec-once = swaync # Run notification center / daemon
exec-once = hyprpaper
exec-once = hypridle # Idle daemon for Hyprland
# Re-run pywal
exec-once = wal -R
# Clipboard manager
exec-once = wl-paste --type text --watch cliphist store # Stores text
exec-once = wl-paste --type image --watch cliphist store # Stores images
@@ -7,11 +7,12 @@
$terminal = kitty
$fileManager = nautilus
$menu = anyrun
$dmenu = anyrun --plugins libstdin.so
$mainMod = SUPER
$lockscreen = hyprlock
$screenshotDir = "$HOME/Screenshots"
$screenshotFull = hyprshot -m output
$screenshotSelect = hyprshot -m region
$screenshotDir = $HOME/Screenshots
$screenshotFull = hyprshot -m output -o $screenshotDir
$screenshotSelect = hyprshot -m region -o $screenshotDir
input {
@@ -46,6 +47,7 @@ bind = $mainMod, J, togglesplit
bind = $mainMod, F11, fullscreen
bind = $mainMod, N, exec, swaync-client -t
bind = $mainMod, L, exec, $lockscreen
bind = $mainMod, C, centerwindow
# Media keys
bind = , code:121, exec, pamixer --mute # Mute
@@ -62,7 +64,10 @@ bind = , Print, exec, $screenshotSelect
bind = $mainMod, Print, exec, $screenshotFull
# Open wofi clipboard
bind = $mainMod, V, exec, cliphist list | wofi -S dmenu | cliphist decode | wl-copy
bind = $mainMod, V, exec, cliphist list | $dmenu | cliphist decode | wl-copy
# Open wallpaper menu
bind = $mainMod, W, exec, /usr/bin/env bash $HOME/.config/hypr/scripts/change-wallpaper.sh
# Reloading Components
# Waybar
@@ -10,4 +10,4 @@ env = QT_QPA_PLATFORMTHEME, qt6ct
env = XDG_CURRENT_DESKTOP, Hyprland
env = ADW_DISABLE_PORTAL, 1
env = AQ_DRM_DEVICES, /dev/dri/card0:/dev/dri/card1
env = WALLPAPER, $wallpaper
+22 -20
View File
@@ -1,14 +1,15 @@
# Colors
$text = rgb(ffffff)
$accent = rgb(e6c272)
$clockAccent = rgba(249, 226, 175, .7)
$background = rgb(312d23)
$backgroundAlt = rgb(50462f)
##############
# LOCKSCREEN #
##############
# Source colors from pywal
source = ~/.cache/wal/colors-hypr.conf
# Fonts
$font = Cantarell Regular
$clockFont = Cantarell Black
$minimalFont = Noto Sans Mono
general {
disable_loading_bar = true
@@ -17,9 +18,9 @@ general {
background {
monitor =
path = ~/wallpapers/nijika-ijichi-btr.jpg
path = $wallpaper
blur_passes = 2
# color = $COLOR / rgb(COLOR)
color = $background
}
# Time
@@ -27,7 +28,7 @@ label {
monitor =
text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hour style
# text = cmd[update:30000] echo -e "$(date +"%r")"
color = $clockAccent
color = $foreground
font_size = 120
font_family = $clockFont
position = 0, -60
@@ -39,7 +40,7 @@ label {
label {
monitor =
text = cmd[update:43200000] echo -e "$(date +"%A, %d %B %Y")"
color = $text
color = $foreground
font_size = 20
font_family = $font
position = 0, -250
@@ -51,7 +52,8 @@ label {
label {
monitor =
font_size = 6
font_family = Noto Sans Mono
font_family = $minimalFont
color = $foreground
text = Currently logged in as $USER
halign = center
valign = bottom
@@ -62,8 +64,8 @@ label {
image {
monitor =
path = ~/.face
size = 70
border_color = $accent
size = 72
border_color = $color2
position = 0, 100
halign = center
valign = bottom
@@ -73,20 +75,20 @@ image {
input-field {
monitor =
size = 180, 35
outline_thickness = 1
outline_thickness = 2
dots_size = .15
dots_spacing = .6
dots_center = true
outer_color = $backgroundAlt
inner_color = $background
font_color = $text
outer_color = $background
inner_color = $color3
font_color = $foreground
fade_on_empty = false
placeholder_text =
hide_input = false
check_color = $accent
fail_color = $accent
check_color = $color4
fail_color = $color1
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
capslock_color = $accent
capslock_color = $color1
position = 0, 40
halign = center
valign = bottom
@@ -1,5 +1,5 @@
$wallpaper =
$wallpaper = /home/joaov/wallpapers/Ryo Yamada.png
splash = true
preload = $wallpaper
+11 -4
View File
@@ -10,12 +10,17 @@ 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
# Resize
windowrulev2 = size 70% 65%, class:org.pulseaudio.pavucontrol
windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol
# Center
windowrulev2 = center, class:org.pulseaudio.pavucontrol
# Moving
windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
# Maximize
windowrulev2 = tile, title:^(Resources)$
# Animations
windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol
@@ -33,6 +38,8 @@ windowrulev2 = opacity , class:kitty
# Blur
blurls = logout_dialog
blurls = kitty
blurls = waybar
# No blur
windowrulev2 = noblur, title:^()
windowrulev2 = suppressevent maximize, class:.*
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/wallpapers"
HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf"
WALLPAPER_DMENU="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 )"
SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
echo $SET_WALLPAPER_NAME
# Check if input wallpaper is empty
if [[ $SET_WALLPAPER_NAME == "" ]] || [[ $SET_WALLPAPER_NAME == " " ]]
then
echo "No wallpaper has been selected by user!"
if [ $RANDOM_WALLPAPER_WHEN_EMPTY = true ]
then
SET_WALLPAPER_NAME=$(ls $WALLPAPER_DIR | shuf -n 1)
echo "Selected random wallpaper from $HOME/wallpapers: $SET_WALLPAPER_NAME"
SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
else
echo "Skipping hyprpaper changes and exiting."
exit 1
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
exit 0
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf"
SET_WALLPAPER=$(find $HOME/wallpapers/ | wofi --dmenu --allow-images true)
echo "" > $HYPRPAPER_FILE # Cleans hyprpaper file
echo "\$wallpaper = $SET_WALLPAPER" >> $HYPRPAPER_FILE
echo "" >> $HYPRPAPER_FILE
echo "splash = true" >> $HYPRPAPER_FILE
echo "preload = \$wallpaper" >> $HYPRPAPER_FILE
echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE
if ! [[ $SET_WALLPAPER == "" ]] && ! [[ $SET_WALLPAPER == " " ]]
then
killall -q hyprpaper
exec hyprpaper &
fi
exit 0