refresh dotfiles
This commit is contained in:
parent
f2684e3cc3
commit
a54e94bbb0
26 changed files with 506 additions and 552 deletions
31
eww/scripts/audio_devices
Executable file
31
eww/scripts/audio_devices
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
CLIENTS=$(pactl list sink-inputs | grep "application.process.binary" | awk -F '= ' ' { print $2 } ' | tr -d '"')
|
||||
|
||||
readarray -t lines <<<"$CLIENTS"
|
||||
|
||||
printf "%s\n" "${lines[@]}"
|
||||
echo ${lines[2]}
|
||||
|
||||
|
||||
#echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"hyprctl dispatch workspace 1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"hyprctl dispatch workspace 2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"hyprctl dispatch workspace 3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"hyprctl dispatch workspace 4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"hyprctl dispatch workspace 5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"hyprctl dispatch workspace 6\" :class \"$un$o6$f6\" \"$ic_6\") (button :onclick \"hyprctl dispatch workspace 7\" :class \"$un$o7$f7\" \"$ic_7\") (button :onclick \"hyprctl dispatch workspace 8\" :class \"$un$o8$f8\" \"$ic_8\"))"
|
||||
|
||||
# (eventbox :onhover "scripts/pop hoverCreate"
|
||||
# :onhoverlost "scripts/pop hoverGet audio_ctl"
|
||||
# (box :class "audio-box" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
|
||||
# (box :halign "center" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
# (box :class "speaker_icon" :orientation "v")
|
||||
# (box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
# (label :class "speaker_text" :text "speaker" :valign "center" :halign "left" )
|
||||
# (box :class "speaker_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
# (scale :value volume_percent
|
||||
# :space-evenly "false"
|
||||
# :orientation "h"
|
||||
# :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
# :tooltip "volume on ${volume_percent}%"
|
||||
# :max 100
|
||||
# :min 0))))
|
||||
|
||||
# (label :text "" :class "audio_sep" :halign "center")
|
||||
|
||||
# ))))
|
||||
8
eww/scripts/cockpit_toggle
Executable file
8
eww/scripts/cockpit_toggle
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#! /bin/bash
|
||||
|
||||
ISOPEN=$(eww windows | grep "*cockpit")
|
||||
if [ "$ISOPEN" = "" ]; then
|
||||
eww open cockpit_window
|
||||
else
|
||||
eww close cockpit_window
|
||||
fi
|
||||
5
eww/scripts/firefox_control.sh
Executable file
5
eww/scripts/firefox_control.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
NUM=$(pactl list clients short | grep "firefox" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||
CLIENT=$(pactl list sink-inputs short | grep "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||
pactl set-sink-input-volume "$CLIENT" "$1"
|
||||
2
eww/scripts/getwethquote
Executable file
2
eww/scripts/getwethquote
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo -e $(cat $HOME/.cache/weather/weather-quote) | head -n1
|
||||
2
eww/scripts/getwethquote2
Executable file
2
eww/scripts/getwethquote2
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo -e $(cat $HOME/.cache/weather/weather-quote) | tail -n1
|
||||
2
eww/scripts/music_control
Executable file
2
eww/scripts/music_control
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo $(playerctl metadata -p ncspot,%any --format "{{ artist }}\n{{ album }}\n{{ title }}")
|
||||
3
eww/scripts/music_control2
Executable file
3
eww/scripts/music_control2
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
echo $(playerctl -p ncspot,%any metadata mpris:artUrl)
|
||||
|
||||
5
eww/scripts/ncspot_control.sh
Executable file
5
eww/scripts/ncspot_control.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
NUM=$(pactl list clients short | grep "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||
CLIENT=$(pactl list sink-inputs short | grep "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||
pactl set-sink-input-volume "$CLIENT" "$1"
|
||||
10
eww/scripts/spotifyd
Executable file
10
eww/scripts/spotifyd
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
#if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ];
|
||||
#then
|
||||
trackName=$(playerctl -p spotifyd,%any metadata title)
|
||||
artistAndAlbumName=$(playerctl -p spotifyd,%any metadata --format "{{ artist }} ({{ album }})")
|
||||
Thumbnail_url=$(playerctl -p spotifyd,%any metadata mpris:artUrl)
|
||||
Thumbnail=$(curl "$Thumbnail_url")
|
||||
notify-send -u low "$trackName" "$artistAndAlbumName " -i "$Thumbnail"
|
||||
#fi
|
||||
10
eww/scripts/spotifyd.sh
Executable file
10
eww/scripts/spotifyd.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ];
|
||||
then
|
||||
song=$(playerctl metadata -p spotifyd --format "{{ title }}\n{{ artist }}\n{{ album }}")
|
||||
if [ ! -f "/home/dashie/.cache/icons/$song" ]; then
|
||||
thumb=$(playerctl metadata -p spotifyd --format '{{lc(mpris:artUrl)}}')
|
||||
convert "$thumb" -flatten -thumbnail 256x256 /home/dashie/.cache/icons/"$song"
|
||||
fi
|
||||
dunstify -I /home/dashie/.cache/icons/"$song" -t 3000 "Spotify" "$song"
|
||||
fi
|
||||
12
eww/scripts/toggle-mute
Executable file
12
eww/scripts/toggle-mute
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
SINK=$(pactl info | grep "Default Sink"| awk -F 'Default Sink: ' ' { print $2 } ')
|
||||
pactl set-sink-mute $SINK toggle
|
||||
MUTE=$(pactl list sinks | grep -A 6 "$SINK" | grep "Mute: yes" | tr -d '\t')
|
||||
|
||||
if [ "$MUTE" = "Mute: yes" ]; then
|
||||
dunstify -a "toggleMute" -r 2 -u low "Muted"
|
||||
else
|
||||
dunstify -a "toggleMute" -r 2 -u low "Unmuted"
|
||||
fi
|
||||
|
||||
125
eww/scripts/weather
Executable file
125
eww/scripts/weather
Executable file
|
|
@ -0,0 +1,125 @@
|
|||
#!/bin/bash
|
||||
|
||||
tmp_weather="$HOME/.cache/weather"
|
||||
tmp_weather_stat=$tmp_weather/weather-stat
|
||||
tmp_weather_degree=$tmp_weather/weather-degree
|
||||
tmp_weather_quote=$tmp_weather/weather-quote
|
||||
tmp_weather_hex=$tmp_weather/weather-hex
|
||||
tmp_weather_icon=$tmp_weather/weather-icon
|
||||
|
||||
if [ ! -d $tmp_weather ]; then
|
||||
mkdir -p $tmp_weather
|
||||
fi
|
||||
|
||||
# Put in your api and stuff link here
|
||||
# If you dunno, head to openweathermap.org, and make and account
|
||||
#(completely free I swear, and then get your API Key and your City ID)
|
||||
# I wish I was smart enough to do it like Elena, but this is the top I could do lol
|
||||
KEY="{your key}"
|
||||
ID="{your city id}"
|
||||
UNIT="{metric}" #Options are 'metric' and 'imperial'
|
||||
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT"")
|
||||
echo $weather
|
||||
if [ ! -z "$weather" ]; then
|
||||
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
|
||||
weather_icon_code=$(echo "$weather" | jq -r ".weather[].icon" | head -1)
|
||||
weather_description=$(echo "$weather" | jq -r ".weather[].description" | head -1 | sed -e "s/\b\(.\)/\u\1/g")
|
||||
|
||||
#Big long if statement of doom
|
||||
if [ "$weather_icon_code" == "50d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
|
||||
weather_hex="#84afdb" #a7b8b2
|
||||
elif [ "$weather_icon_code" == "50n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
|
||||
weather_hex="#84afdb"
|
||||
elif [ "$weather_icon_code" == "01d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a sunny day, gonna be fun! \nDon't go wandering all by yourself though..."
|
||||
weather_hex="#ffd86b"
|
||||
elif [ "$weather_icon_code" == "01n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a clear night \nYou might want to take a evening stroll to relax..."
|
||||
weather_hex="#fcdcf6"
|
||||
elif [ "$weather_icon_code" == "02d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "02n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "03d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "03n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "04d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "04n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "09d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "09n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "10d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "10n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "11d" ]; then
|
||||
weather_icon=""
|
||||
weather_quote="There's storm for forecast today \nMake sure you don't get blown away..."
|
||||
weather_hex="#ffeb57"
|
||||
elif [ "$weather_icon_code" == "11n" ]; then
|
||||
weather_icon=""
|
||||
weather_quote="There's gonna be storms tonight \nMake sure you're warm in bed and the windows are shut..."
|
||||
weather_hex="#ffeb57"
|
||||
elif [ "$weather_icon_code" == "13d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's gonna snow today \nYou'd better wear thick clothes and make a snowman as well!"
|
||||
weather_hex="#e3e6fc"
|
||||
elif [ "$weather_icon_code" == "13n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's gonna snow tonight \nMake sure you get up early tomorrow to see the sights..."
|
||||
weather_hex="#e3e6fc"
|
||||
elif [ "$weather_icon_code" == "40d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
|
||||
weather_hex="#84afdb"
|
||||
elif [ "$weather_icon_code" == "40n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
|
||||
weather_hex="#84afdb"
|
||||
else
|
||||
weather_icon=" "
|
||||
weather_quote="Sort of odd, I don't know what to forecast \nMake sure you have a good time!"
|
||||
weather_hex="#adadff"
|
||||
fi
|
||||
echo "$weather_icon" > $tmp_weather_icon
|
||||
echo "$weather_description" > $tmp_weather_stat
|
||||
echo "$weather_temp""°C" > $tmp_weather_degree
|
||||
echo "$weather_quote" > $tmp_weather_quote
|
||||
echo "$weather_hex" > $tmp_weather_hex
|
||||
else
|
||||
echo "Weather Unavailable" > $tmp_weather_stat
|
||||
echo " " > $tmp_weather_icon
|
||||
echo "Ah well, no weather huh? \nEven if there's no weather, it's gonna be a great day!" > $tmp_weather_quote
|
||||
echo "-" > $tmp_weather_degree
|
||||
echo "#adadff" > $tmp_weather_hex
|
||||
fi
|
||||
9
eww/scripts/weather-trimmer
Executable file
9
eww/scripts/weather-trimmer
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
weather=$(cat $HOME/.cache/weather/weather-stat)
|
||||
weather_count=$(cat $HOME/.cache/weather/weather-stat | wc -c)
|
||||
|
||||
if [ "$weather_count" -lt 10 ]; then
|
||||
echo $weather;
|
||||
else
|
||||
echo $(cat $HOME/.cache/weather/weather-stat | cut -c1-6)...
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue