first commit

This commit is contained in:
Guillem George 2025-09-12 17:00:38 +02:00
commit 38a53acd48
47 changed files with 3916 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#!/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 &
hyprpm reload -nn &
albert &
swaync &
systemctl --user start hyprpolkitagent &
~/.config/hypr/scripts/restore-waybar.sh

View file

@ -0,0 +1,33 @@
#!/bin/sh
status_file="$HOME/.config/hypr/status/kb_layout"
hyprland_cfg_file="$HOME/.config/hypr/hyprland.conf"
fr_to_en() {
printf "en" > "${status_file}"
hyprctl notify 1 2000 0 "Keyboard set to QWERTY"
sed -i 's/kb_layouts\/fr/kb_layouts\/us/g' "$hyprland_cfg_file"
}
en_to_fr() {
printf "fr" > "${status_file}"
hyprctl notify 1 2000 0 "Keyboard set to AZERTY"
sed -i 's/kb_layouts\/us/kb_layouts\/fr/g' "$hyprland_cfg_file"
}
if ! [ -f "${status_file}" ]; then
hyprctl notify 3 3000 0 "Status file missing"
hyprctl notify 2 6000 0 "Use Mod + Ctrl + Space to change keyboard layout"
en_to_fr
else
if [ $(cat "${status_file}") = "fr" ]; then
fr_to_en
elif [ $(cat "${status_file}") = "en" ]; then
en_to_fr
fi
fi

View file

@ -0,0 +1,22 @@
#!/usr/bin/env sh
# From Hyprland documentation - https://wiki.hyprland.org/0.41.2/Configuring/Uncommon-tips--tricks/#toggle-animationsbluretc-hotkey
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
killall waybar
hyprctl notify 1 2000 0 "Enabled game mode"
exit
fi
hyprctl reload
~/.config/hypr/scripts/restore-waybar.sh
hyprctl notify 1 2000 0 "Disabled game mode"

10
.config/hypr/scripts/reload.sh Executable file
View file

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

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Launch waybar depending on the last status
waybar_status=~/.config/hypr/status/waybar
if [ "$(cat $waybar_status)" == "on" ]; then
killall waybar
waybar &
elif [ "$(cat $waybar_status)" != "off" ]; then
hyprctl notify 0 3000 0 Failed to retrieve waybar status
fi

View file

@ -0,0 +1,13 @@
save_path=$HOME/Pictures/Screenshots/$(date +'%F_%T.png')
if [ $# -eq 0 ]; then
grim -g "$(slurp)" $save_path && hyprctl notify 1 2000 0 "Screenshot saved!"
elif [ $# -eq 1 ]; then
if [[ $1 == "--fullscreen" ]]; then
grim $save_path && hyprctl notify 1 2000 0 Screenshot saved!
fi
fi
exit 0

View file

@ -0,0 +1,2 @@
song_info=$(playerctl metadata --format '{{title}} 󰎆 {{artist}}')
echo "$song_info"

View file

@ -0,0 +1,35 @@
#!/bin/sh
device=znt0001:00-14e5:650e-touchpad
toggle_variable="device[${device}]:enabled"
hyprctl keyword "${toggle_variable}" true
status_file="$HOME/.config/hypr/status/touchpad"
enable_touchpad() {
printf "on" > "${status_file}"
hyprctl notify 1 2000 0 "Enabled touchpad"
hyprctl keyword "${toggle_variable}" true
}
disable_touchpad() {
printf "off" > "${status_file}"
hyprctl notify 0 2000 0 "Disabled Touchpad"
hyprctl keyword "${toggle_variable}" false
}
if ! [ -f "${status_file}" ]; then
hyprctl notify 3 3000 0 "Status file missing"
enable_touchpad
else
if [ $(cat "${status_file}") = "on" ]; then
disable_touchpad
elif [ $(cat "${status_file}") = "off" ]; then
enable_touchpad
fi
fi

View file

@ -0,0 +1,11 @@
#!/bin/sh
pidof waybar # Check if waybar is running
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