This commit is contained in:
Fabio Lenherr 2023-04-06 09:03:27 +02:00
parent ff98e6fbf0
commit 3d1cc13c15
8 changed files with 235 additions and 116 deletions

View file

@ -1,134 +1,129 @@
#!/bin/bash
calendar() {
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
EWW_BIN="$HOME/.local/bin/eww"
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
EWW_BIN="$HOME/.local/bin/eww"
run() {
${EWW_BIN} -c $HOME/.config/eww open calendar
run() {
${EWW_BIN} -c $HOME/.config/eww open calendar
}
# Open widgets
if [[ ! -f "$LOCK_FILE" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system music_win audio_ctl brightness
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close calendar
rm "$LOCK_FILE" && echo "closed"
fi
}
# Open widgets
if [[ ! -f "$LOCK_FILE" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system music_win audio_ctl brightness
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close calendar
rm "$LOCK_FILE" && echo "closed"
fi
}
system() {
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
EWW_BIN="$HOME/.local/bin/eww"
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
EWW_BIN="$HOME/.local/bin/eww"
run() {
${EWW_BIN} -c $HOME/.config/eww open system
run() {
${EWW_BIN} -c $HOME/.config/eww open system
}
# Open widgets
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
${EWW_BIN} -c $HOME/.config/eww close calendar music_win audio_ctl brightness
touch "$LOCK_FILE_MEM"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close system
rm "$LOCK_FILE_MEM" && echo "closed"
fi
}
# Open widgets
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
${EWW_BIN} -c $HOME/.config/eww close calendar music_win audio_ctl brightness
touch "$LOCK_FILE_MEM"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close system
rm "$LOCK_FILE_MEM" && echo "closed"
fi
}
music() {
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
EWW_BIN="$HOME/.local/bin/eww"
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
EWW_BIN="$HOME/.local/bin/eww"
run() {
${EWW_BIN} -c $HOME/.config/eww open music_win
run() {
${EWW_BIN} -c $HOME/.config/eww open music_win
}
# Open widgets
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar brightness
touch "$LOCK_FILE_SONG"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close music_win
rm "$LOCK_FILE_SONG" && echo "closed"
fi
}
# Open widgets
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar brightness
touch "$LOCK_FILE_SONG"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close music_win
rm "$LOCK_FILE_SONG" && echo "closed"
fi
}
audio() {
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
EWW_BIN="$HOME/.local/bin/eww"
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
EWW_BIN="$HOME/.local/bin/eww"
run() {
${EWW_BIN} -c $HOME/.config/eww open audio_ctl
}
run() {
${EWW_BIN} -c $HOME/.config/eww open audio_ctl
}
# Open widgets
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar music brightness
touch "$LOCK_FILE_AUDIO"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close audio_ctl
rm "$LOCK_FILE_AUDIO" && echo "closed"
fi
# Open widgets
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar music brightness
touch "$LOCK_FILE_AUDIO"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close audio_ctl
rm "$LOCK_FILE_AUDIO" && echo "closed"
fi
}
brightness() {
LOCK_FILE_AUDIO="$HOME/.cache/eww-brightness.lock"
EWW_BIN="$HOME/.local/bin/eww"
LOCK_FILE_AUDIO="$HOME/.cache/eww-brightness.lock"
EWW_BIN="$HOME/.local/bin/eww"
run() {
${EWW_BIN} -c $HOME/.config/eww open brightness_window
}
run() {
${EWW_BIN} -c $HOME/.config/eww open brightness_window
}
# Open widgets
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar music audio_ctl
touch "$LOCK_FILE_AUDIO"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close brightness_window
rm "$LOCK_FILE_AUDIO" && echo "closed"
fi
# Open widgets
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
${EWW_BIN} -c $HOME/.config/eww close system calendar music audio_ctl
touch "$LOCK_FILE_AUDIO"
run && echo "ok good!"
else
${EWW_BIN} -c $HOME/.config/eww close brightness_window
rm "$LOCK_FILE_AUDIO" && echo "closed"
fi
}
hoverGet() {
NAME="$1"
EWW_BIN="$HOME/.local/bin/eww"
if [[ -f "$STORE" ]]; then
rm "$STORE"
${EWW_BIN} -c $HOME/.config/eww close "$NAME"
fi
NAME="$1"
EWW_BIN="$HOME/.local/bin/eww"
if [[ -f "$STORE" ]]; then
rm "$STORE"
${EWW_BIN} -c $HOME/.config/eww close "$NAME"
fi
}
hoverCreate() {
if [[ ! -f "$STORE" ]]; then
touch "$STORE"
else
echo "failure!"
fi
if [[ ! -f "$STORE" ]]; then
touch "$STORE"
else
echo "failure!"
fi
}
STORE=true
if [ "$1" = "calendar" ]; then
calendar
calendar
elif [ "$1" = "system" ]; then
system
system
#elif [ "$1" = "music" ]; then
#music
elif [ "$1" = "audio" ]; then
audio
audio
elif [ "$1" = "brightness" ]; then
brightness
brightness
elif [ "$1" = "hoverGet" ]; then
hoverGet "$2"
hoverGet "$2"
elif [ "$1" = "hoverCreate" ]; then
hoverCreate
hoverCreate
fi

View file

@ -0,0 +1,34 @@
#!/bin/sh
MONITOR=$(hyprctl monitors | grep "ID 1" | awk '{print ($2)}')
echo MONITOR
extend() {
hyprctl keyword wsbind 1,
hyprctl keyword wsbind 2,
hyprctl keyword wsbind 3,
hyprctl keyword wsbind 4,
hyprctl keyword wsbind 5,
hyprctl keyword wsbind 6,
hyprctl keyword wsbind 7,
hyprctl keyword wsbind 8,
hyprctl keyword wsbind 9,
hyprctl keyword wsbind 10,eDP-1
}
retract() {
hyprctl keyword wsbind 1,eDP-1
hyprctl keyword wsbind 2,eDP-1
hyprctl keyword wsbind 3,eDP-1
hyprctl keyword wsbind 4,eDP-1
hyprctl keyword wsbind 5,eDP-1
hyprctl keyword wsbind 6,eDP-1
hyprctl keyword wsbind 7,eDP-1
hyprctl keyword wsbind 8,eDP-1
hyprctl keyword wsbind 9,eDP-1
hyprctl keyword wsbind 10,eDP-1
}
if [ "$1" == "extend" ]; then
extend
elif [ "$1" == "retract" ]; then
retract
fi