initialitation

This commit is contained in:
Robin
2025-07-05 16:01:18 +02:00
commit 47a35b863d
139 changed files with 57264 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
check() {
command -v "$1" 1>/dev/null
}
loc="$HOME/.cache/colorpicker"
[ -d "$loc" ] || mkdir -p "$loc"
[ -f "$loc/colors" ] || touch "$loc/colors"
limit=10
[[ $# -eq 1 && $1 = "-l" ]] && {
cat "$loc/colors"
exit
}
[[ $# -eq 1 && $1 = "-j" ]] && {
text="$(head -n 1 "$loc/colors")"
mapfile -t allcolors < <(tail -n +2 "$loc/colors")
# allcolors=($(tail -n +2 "$loc/colors"))
tooltip="<b> COLORS</b>\n\n"
tooltip+="-> <b>$text</b> <span color='$text'></span> \n"
for i in "${allcolors[@]}"; do
tooltip+=" <b>$i</b> <span color='$i'></span> \n"
done
cat <<EOF
{ "text":"<span color='$text'></span>", "tooltip":"$tooltip"}
EOF
exit
}
check hyprpicker || {
notify "hyprpicker is not installed"
exit
}
killall -q hyprpicker
color=$(hyprpicker)
check wl-copy && {
echo "$color" | sed -z 's/\n//g' | wl-copy
}
prevColors=$(head -n $((limit - 1)) "$loc/colors")
echo "$color" >"$loc/colors"
echo "$prevColors" >>"$loc/colors"
sed -i '/^$/d' "$loc/colors"
source ~/.cache/wal/colors.sh && notify-send "Color Picker" "This color has been selected: $color" -i $wallpaper
pkill -RTMIN+1 waybar

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Check if waybar is running
if pgrep -x "waybar" > /dev/null; then
# If running, kill the waybar process
pkill -x "waybar"
else
# If not running, start waybar
waybar &
fi

View File

@@ -0,0 +1,33 @@
#!/bin/bash
WAYBAR_DIR="$HOME/.config/waybar"
STYLECSS="$WAYBAR_DIR/style.css"
CONFIG="$WAYBAR_DIR/config"
ASSETS="$WAYBAR_DIR/assets"
THEMES="$WAYBAR_DIR/themes"
menu() {
find "${ASSETS}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" \) | awk '{print "img:"$0}'
}
main() {
choice=$(menu | wofi -c ~/.config/wofi/waybar -s ~/.config/wofi/style-waybar.css --show dmenu --prompt " Select Waybar (Scroll with Arrows)" -n)
selected_wallpaper=$(echo "$choice" | sed 's/^img://')
echo $selected_wallpaper
if [[ "$selected_wallpaper" == "$ASSETS/experimental.png" ]]; then
cat $THEMES/experimental/style-experimental.css > $STYLECSS
cat $THEMES/experimental/config-experimental > $CONFIG
pkill waybar && waybar
elif [[ "$selected_wallpaper" == "$ASSETS/main.png" ]]; then
cat $THEMES/default/style-default.css > $STYLECSS
cat $THEMES/default/config-default > $CONFIG
pkill waybar && waybar
elif [[ "$selected_wallpaper" == "$ASSETS/line.png" ]]; then
cat $THEMES/line/style-line.css > $STYLECSS
cat $THEMES/line/config-line > $CONFIG
pkill waybar && waybar
elif [[ "$selected_wallpaper" == "$ASSETS/zen.png" ]]; then
cat $THEMES/zen/style-zen.css > $STYLECSS
cat $THEMES/zen/config-zen > $CONFIG
pkill waybar && waybar
fi
}
main