Waybar now remembers when it must hide or show after reboot, set-wallpaper and batteryctl patches, changed waybar style once again, plus various minor tweaks

This commit is contained in:
Gu://em_ 2025-01-20 12:53:06 +01:00
parent 806d59b71d
commit 3a293cf0f3
15 changed files with 107 additions and 32 deletions

View file

@ -46,7 +46,7 @@ decoration {
blur {
enabled = true
size = 6
passes = 2
passes = 3
vibrancy = 0.1696
}
@ -121,6 +121,7 @@ misc {
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
disable_splash_rendering = true # Disable default wallpapers rendering
vfr = true # Lower sent frames when idle
}

View file

@ -16,12 +16,9 @@ $notificationsManager = fnott
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
exec-once = ~/.config/hypr/scripts/autostart.sh
# Or execute your favorite apps at launch like this:
exec-once = hyprpaper & waybar
exec-once = albert
exec-once = mako
exec-once = systemctl --user start hyprpolkitagent
# exec-once = firefox
#############################
@ -30,7 +27,36 @@ exec-once = systemctl --user start hyprpolkitagent
# See https://wiki.hyprland.org/Configuring/Environment-variables/
# HyprCursor
env = HYPRCURSOR_THEME,VolantesCursors
env = XCURSOR_THEME,VolantesCursors
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
# XDG Desktop Portal
env = XDG_SESSION_DESKTOP,Hyprland
env = XDG_CURRENT_DESKTOP,Hyprland
# Experimental
# GTK
# env = GTK_USE_PORTAL,1
# env = GDK_SCALE,2 # Xwayland scale
# Qt
# env = QT_WAYLAND_DISABLE_WINDOWDECORATION,
# Firefox
# env = MOZ_ENABLE_WAYLAND,1
# env = MOZ_USE_XINPUT2,1
# WLRoots
# env = WLR_NO_HARDWARE_CURSORS,1
# env = WLR_RENDERER,vulkan
# SDL
# env = SDL_VIDEODRIVER,wayland
# Nvidia
# GBM backend
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# Hardware acceleration
# env = LIBVA_DRIVER_NAME,nvidia
# env = NVD_BACKEND,direct

View file

@ -13,7 +13,7 @@ input {
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = true
@ -42,6 +42,7 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod, SPACE, exec, $terminal
bind = $mainMod, Q, killactive,
bind = $mainMod SHIFT, M, exit,
bind = $mainMod, E, exec, $fileManager
@ -113,12 +114,10 @@ bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
# Screenshot
bind = , Print, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%F_%T_grim.png') && hyprctl notify 1 2000 0 Screenshot saved!
#bind = , Print, exec, hyprctl notify 1 2000 0 Screenshot saved!
#bind = , Print, exec, hyprctl notify 0 2000 0 Slurp not implemented
bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh
# Toggle waybar
bind = $mainMod, B, exec, $HOME/.config/hypr/scripts/toggle-waybar.sh
bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh
# Reload desktop
bind = $mainMod SHIFT, R, exec, $HOME/.config/hypr/scripts/reload.sh
bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -0,0 +1,18 @@
#!/bin/sh
# This script is launched on every hyprland startup
# Please note that it is intended for desktop related programs ONLY, as it will be called every time you reload the desktop
# If you want to add your own applications you may rather want to use exec-once in the environment.conf file
hyprpaper &
albert &
# mako &
systemctl --user start hyprpolkitagent &
# Launch waybar depending on the last status
waybar_status=~/.config/hypr/status/waybar
if [ "$(cat $waybar_status)" == "on" ]; then
waybar &
elif [ "$(cat $waybar_status)" != "off" ]; then
hyprctl notify 0 3000 0 Failed to retrieve waybar status
fi

View file

@ -1,10 +1,9 @@
killall albert
albert &
killall hyprpaper
hyprpaper &
killall waybar
waybar &
hyprctl reload
~/.config/hypr/scripts/autostart.sh
hyprctl notify 1 2000 0 Desktop reloaded

View file

@ -0,0 +1 @@
grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%F_%T.png') && hyprctl notify 1 2000 0 Screenshot saved!

View file

@ -2,8 +2,10 @@
pidof waybar # Check if waybar is running
if [ $? = 0 ]; then
killall waybar # If running, stop it
else
waybar # Else, run it
if [ $? = 0 ]; then
# If running, stop it
killall waybar & echo "off" > ~/.config/hypr/status/waybar
else
# Else, run it
waybar & echo "on" > ~/.config/hypr/status/waybar
fi

View file

@ -0,0 +1 @@
off

View file

@ -9,7 +9,7 @@ bold_italic_font auto
# BEGIN_KITTY_THEME
# GitHub Dark
include current-theme.conf
#background_opacity 0.6
# background_opacity 0.6
# END_KITTY_THEME
# Decent scrolling speed

View file

@ -1,4 +1,4 @@
@define-color foreground #c5c5c5;
@define-color background #191919;
@define-color background #242424;
@define-color accentColor #b6c8d3;

View file

@ -18,7 +18,7 @@ window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
border-radius: 4px;
border: 2px solid alpha(@active, 0.4);
border: 1px solid alpha(@active, 0.7);
background: @background;
background: alpha(@background, 0.8);
color: lighter(@active);

View file

@ -2,7 +2,7 @@
# Definitions
threshold_config=/sys/class/power_supply/BAT1/charge_control_end_threshold
show_help() {
print_help() {
echo "Usage: ${0} (get|set) [level]"
echo
echo " get Gets the current battery charging limit"
@ -35,6 +35,6 @@ elif [ $# -eq 2 ] && [[ $1 == "set" ]] && [ $2 -le 99 ] && [ $2 -ge 0 ]; then
fi
else
show_help
print_help
fi

View file

@ -1,8 +1,8 @@
#!/bin/sh
if [ $(whoami) != root ]; then
echo "- Please run this script as root"
echo "sudo $0"
echo "Please run this script as root"
echo "-> sudo $0"
echo
sudo $0
exit $?

View file

@ -1,25 +1,53 @@
#!/bin/sh
print_help() {
echo "Usage: $0 [input-file]"
echo
echo "Changes your current wallpaper"
echo "Please note that this script is made to be used with the Atlas Desktop and will probably not work on most other desktops."
}
if [ $# -ne 1 ]; then
print_help
exit 1
fi
# Check if file exists
if [ -e $1 ]; then
if [ -e "$1" ]; then
# Variables declaration
wallpaper_config=~/.config/hypr/hyprpaper.conf
wallpaper_path=~/.config/hypr/images/wallpaper # Doesn't contain file extension
file_extension="${1##*.}"
# In case file has no extension
if [ "${file_extension}" == "$1" ]; then
echo "Error: please provide a file extension (ex: .jpg, .png...)"
exit 1
fi
# Remove old wallpaper
rm $wallpaper_path*
# Copy file
cp $1 "${wallpaper_path}.${file_extension}"
cp "$1" "${wallpaper_path}.${file_extension}"
if [ $? != 0 ]; then
echo "Aborted."
exit 1
fi
# Update config
sed -i "s/wallpaper\.[^[:space:]]*/wallpaper.$file_extension/g" $wallpaper_config # Replace current extension by new extension
if [ $? != 0 ]; then
echo "Aborted."
exit 1
fi
# Reload Hyprpaper
pkill hyprpaper
nohup hyprpaper </dev/null >/dev/null 2>&1 &
hyprctl dispatch exec hyprpaper > /dev/null # Start hyprpaper and hide stdout output
# Or you can do the old fashioned way :
# nohup hyprpaper </dev/null >/dev/null 2>&1 &
echo "Done"
exit 0