up su Gitea

This commit is contained in:
2026-04-19 17:07:18 +02:00
parent e78ce720bb
commit fe54b28378
298 changed files with 23460 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Airplane Mode. Turning on or off all wifi using rfkill.
notif="$HOME/.config/swaync/images/airplane.png"
# Check if any wireless device is blocked
wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes")
if [ -n "$wifi_blocked" ]; then
rfkill unblock wifi
notify-send -u low -i "$notif" " Airplane" " mode: OFF"
else
rfkill block wifi
notify-send -u low -i "$notif" " Airplane" " mode: ON"
fi
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Copied from Discord post. Thanks to @Zorg
# Get id of an active window
active_pid=$(hyprctl activewindow | grep -o 'pid: [0-9]*' | cut -d' ' -f2)
# Close active window
kill $active_pid
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for waybar layout or configs
IFS=$'\n\t'
# Define directories
waybar_layouts="$HOME/.config/waybar/configs"
waybar_config="$HOME/.config/waybar/config"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
rofi_config="$HOME/.config/rofi/config.rasi"
msg=' Choose Waybar Layout '
# Function to display menu options
menu() {
options=()
while IFS= read -r file; do
options+=("$(basename "$file")")
done < <(find -L "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort )
printf '%s\n' "${options[@]}"
}
# Apply selected configuration
apply_config() {
ln -sf "$waybar_layouts/$1" "$waybar_config"
"${SCRIPTSDIR}/wbrestart.sh" &
}
# Main function
main() {
choice=$(menu | rofi -i -dmenu -config "$rofi_config" -mesg "$msg")
if [[ -z "$choice" ]]; then
echo "No option selected. Exiting."
exit 0
fi
case $choice in
"no panel")
pgrep -x "waybar" && pkill waybar || true
;;
*)
apply_config "$choice"
;;
esac
}
# Kill Rofi if already running before execution
if pgrep -x "rofi" >/dev/null; then
pkill rofi
#exit 0
fi
main
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for waybar styles
IFS=$'\n\t'
# Define directories
waybar_styles="$HOME/.config/waybar/style"
waybar_style="$HOME/.config/waybar/style.css"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
rofi_config="$HOME/.config/rofi/config.rasi"
msg=' Choose Waybar Style'
# Function to display menu options
menu() {
options=()
while IFS= read -r file; do
if [ -f "$waybar_styles/$file" ]; then
options+=("$(basename "$file" .css)")
fi
done < <(find -L "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort )
printf '%s\n' "${options[@]}"
}
# Apply selected style
apply_style() {
ln -sf "$waybar_styles/$1.css" "$waybar_style"
"${SCRIPTSDIR}/wbrestart.sh" &
}
# Main function
main() {
choice=$(menu | rofi -i -dmenu -config "$rofi_config" -mesg "$msg")
if [[ -z "$choice" ]]; then
echo "No option selected. Exiting."
exit 0
fi
apply_style "$choice"
}
# Kill Rofi if already running before execution
if pgrep -x "rofi" >/dev/null; then
pkill rofi
#exit 0
fi
main
+2
View File
@@ -0,0 +1,2 @@
#!/bin/zsh
wlogout
+74
View File
@@ -0,0 +1,74 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for Monitor backlights (if supported) using brightnessctl
iDIR="$HOME/.config/swaync/icons"
notification_timeout=1000
step=5 # INCREASE/DECREASE BY THIS VALUE
# Get brightness
get_backlight() {
brightnessctl -m | cut -d, -f4 | sed 's/%//'
}
# Get icons
get_icon() {
current=$(get_backlight)
if [ "$current" -le "20" ]; then
icon="$iDIR/brightness-20.png"
elif [ "$current" -le "40" ]; then
icon="$iDIR/brightness-40.png"
elif [ "$current" -le "60" ]; then
icon="$iDIR/brightness-60.png"
elif [ "$current" -le "80" ]; then
icon="$iDIR/brightness-80.png"
else
icon="$iDIR/brightness-100.png"
fi
}
# Notify
notify_user() {
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i $icon "Screen" "Brightness:$current%"
}
# Change brightness
change_backlight() {
local current_brightness
current_brightness=$(get_backlight)
# Calculate new brightness
if [[ "$1" == "+${step}%" ]]; then
new_brightness=$((current_brightness + step))
elif [[ "$1" == "${step}%-" ]]; then
new_brightness=$((current_brightness - step))
fi
# Ensure new brightness is within valid range
if ((new_brightness < 5)); then
new_brightness=5
elif ((new_brightness > 100)); then
new_brightness=100
fi
brightnessctl set "${new_brightness}%"
get_icon
current=$new_brightness
notify_user
}
# Execute accordingly
case "$1" in
"--get")
get_backlight
;;
"--inc")
change_backlight "+${step}%"
;;
"--dec")
change_backlight "${step}%-"
;;
*)
get_backlight
;;
esac
+2
View File
@@ -0,0 +1,2 @@
#!/bin/zsh
hyprlock
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
pkill waybar
waybar -c /home/sinsa/.config/waybar/configs/default -s /home/sinsa/.config/waybar/style/islands.css
+2
View File
@@ -0,0 +1,2 @@
!#/bin/zsh
grim -g "$(slurp)" &
+144
View File
@@ -0,0 +1,144 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Scripts for volume controls for audio and mic
iDIR="$HOME/.config/swaync/icons"
sDIR="$HOME/.config/hypr/scripts"
# Get Volume
get_volume() {
volume=$(pamixer --get-volume)
if [[ "$volume" -eq "0" ]]; then
echo "Muted"
else
echo "$volume %"
fi
}
# Get icons
get_icon() {
current=$(get_volume)
if [[ "$current" == "Muted" ]]; then
echo "$iDIR/volume-mute.png"
elif [[ "${current%\%}" -le 30 ]]; then
echo "$iDIR/volume-low.png"
elif [[ "${current%\%}" -le 60 ]]; then
echo "$iDIR/volume-mid.png"
else
echo "$iDIR/volume-high.png"
fi
}
# Notify
notify_user() {
if [[ "$(get_volume)" == "Muted" ]]; then
notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" " Volume:" " Muted"
else
notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" " Volume Level:" " $(get_volume)" &&
"$sDIR/Sounds.sh" --volume
fi
}
# Increase Volume
inc_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
pamixer -i 5 --allow-boost --set-limit 150 && notify_user
fi
}
# Decrease Volume
dec_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
pamixer -d 5 && notify_user
fi
}
# Toggle Mute
toggle_mute() {
if [ "$(pamixer --get-mute)" == "false" ]; then
pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" " Mute"
elif [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && notify-send -e -u low -i "$(get_icon)" " Volume:" " Switched ON"
fi
}
# Toggle Mic
toggle_mic() {
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" " Microphone:" " Switched OFF"
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" " Microphone:" " Switched ON"
fi
}
# Get Mic Icon
get_mic_icon() {
current=$(pamixer --default-source --get-volume)
if [[ "$current" -eq "0" ]]; then
echo "$iDIR/microphone-mute.png"
else
echo "$iDIR/microphone.png"
fi
}
# Get Microphone Volume
get_mic_volume() {
volume=$(pamixer --default-source --get-volume)
if [[ "$volume" -eq "0" ]]; then
echo "Muted"
else
echo "$volume %"
fi
}
# Notify for Microphone
notify_mic_user() {
volume=$(get_mic_volume)
icon=$(get_mic_icon)
notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" " Mic Level:" " $volume"
}
# Increase MIC Volume
inc_mic_volume() {
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
toggle_mic
else
pamixer --default-source -i 5 && notify_mic_user
fi
}
# Decrease MIC Volume
dec_mic_volume() {
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
toggle-mic
else
pamixer --default-source -d 5 && notify_mic_user
fi
}
# Execute accordingly
if [[ "$1" == "--get" ]]; then
get_volume
elif [[ "$1" == "--inc" ]]; then
inc_volume
elif [[ "$1" == "--dec" ]]; then
dec_volume
elif [[ "$1" == "--toggle" ]]; then
toggle_mute
elif [[ "$1" == "--toggle-mic" ]]; then
toggle_mic
elif [[ "$1" == "--get-icon" ]]; then
get_icon
elif [[ "$1" == "--get-mic-icon" ]]; then
get_mic_icon
elif [[ "$1" == "--mic-inc" ]]; then
inc_mic_volume
elif [[ "$1" == "--mic-dec" ]]; then
dec_mic_volume
else
get_volume
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
ICON_CONN="󰒄"
ICON_DISCONN="󰲛"
a=$(nmcli connection show --active | grep "casa")
if [ $(nmcli connection show --active | grep "casa") ]; then
TEXT="$ICON_CONN"
else
TEXT="$ICON_DISCONN"
fi
printf '{"text":"%s"}\n' "$TEXT"
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Not my own work. This was added through Github PR. Credit to original author
#----- Optimized bars animation without much CPU usage increase --------
bar="▁▂▃▄▅▆▇█"
dict="s/;//g"
# Calculate the length of the bar outside the loop
bar_length=${#bar}
# Create dictionary to replace char with bar
for ((i = 0; i < bar_length; i++)); do
dict+=";s/$i/${bar:$i:1}/g"
done
# Create cava config
config_file="/tmp/bar_cava_config"
cat >"$config_file" <<EOF
[general]
# Older systems show significant CPU use with default framerate
# Setting maximum framerate to 30
# You can increase the value if you wish
framerate = 30
bars = 10
[input]
method = pulse
source = auto
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
EOF
# Kill cava if it's already running
pkill -f "cava -p $config_file"
# Read stdout from cava and perform substitution in a single sed command
cava -p "$config_file" | sed -u "$dict"
+7
View File
@@ -0,0 +1,7 @@
#!/bin/zsh
killall -9 swaync
killall -9 waybar
swaync &
waybar &
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# === CONFIG ===
WALLPAPER_DIR="$HOME/Pictures/wallpapers"
SYMLINK_PATH="$HOME/.config/hypr/current_wallpaper"
cd "$WALLPAPER_DIR" || exit 1
# === handle spaces name
IFS=$'\n'
# === ICON-PREVIEW SELECTION WITH ROFI, SORTED BY NEWEST ===
SELECTED_WALL=$(for a in $(ls -t *.jpg *.png *.gif *.jpeg 2>/dev/null); do echo -en "$a\0icon\x1f$a\n"; done | rofi -dmenu -p "")
[ -z "$SELECTED_WALL" ] && exit 1
SELECTED_PATH="$WALLPAPER_DIR/$SELECTED_WALL"
# === SET WALLPAPER ===
matugen image "$SELECTED_PATH"
# === CREATE SYMLINK ===
mkdir -p "$(dirname "$SYMLINK_PATH")"
ln -sf "$SELECTED_PATH" "$SYMLINK_PATH"