mirror of
https://github.com/ksyasuda/rice.git
synced 2024-11-22 03:19:58 -08:00
fix openweathermap polybar module
add rofi-stream module
This commit is contained in:
parent
41b035ed4d
commit
2bada90e42
@ -10,7 +10,7 @@ label-background = ${color.shade4}
|
||||
# label-foreground = #56a7b5
|
||||
# orange
|
||||
# label-foreground = #e5c07b
|
||||
label-foreground = #d19a66
|
||||
label-foreground = #ecbe7b
|
||||
# time = %r
|
||||
# time = %l:%M:%S %p
|
||||
time = %l:%M %p
|
||||
|
@ -121,13 +121,13 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
|
||||
# "%{F#e5c07b}xyz%{F- }"
|
||||
COLOR=""
|
||||
if [ "$current_temp" -lt 0 ]; then
|
||||
COLOR="%{F#1e88e5}"
|
||||
COLOR="%{F#1E90FF}"
|
||||
elif [ "$current_temp" -ge 0 ] && [ "$current_temp" -le 40 ]; then
|
||||
COLOR="%{F#55aebb}"
|
||||
COLOR="%{F#46d9ff}"
|
||||
elif [ "$current_temp" -gt 40 ] && [ "$current_temp" -le 80 ]; then
|
||||
COLOR="%{F#fc8353}"
|
||||
COLOR="%{F#ecbe7b}"
|
||||
elif [ "$current_temp" -gt 80 ] && [ "$current_temp" -le 120 ]; then
|
||||
COLOR="%{F#d8524c}"
|
||||
COLOR="%{F#ff6c6b}"
|
||||
fi
|
||||
echo "$COLOR$(get_icon "$current_icon") $current_temp$SYMBOL%{F- }"
|
||||
# echo "$(get_icon "$current_icon") $current_temp$SYMBOL $now2_symbol $now2"
|
||||
|
23
scripts/rofi/rofi-stream.sh
Executable file
23
scripts/rofi/rofi-stream.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PLAYER="mpv"
|
||||
|
||||
ARGS=(
|
||||
"lofi-hip-hop-radio - https://www.youtube.com/watch?v=5qap5aO4i9A"
|
||||
"QUIT"
|
||||
)
|
||||
|
||||
CHOICE=$(
|
||||
printf "%s\n" "${ARGS[@]}" | rofi -config ~/SudacodeRice/rofi/flat-orange.rasi -dmenu -l 5 -i -p "Choose Stream"
|
||||
)
|
||||
|
||||
if [[ "$CHOICE" == "Quit" ]]; then
|
||||
printf "%s\n" "Bye." && exit 1 || exit 1
|
||||
elif [[ "$CHOICE" ]]; then
|
||||
TARGET=$(printf "%s\n" "${CHOICE}" | awk '{print $NF}')
|
||||
printf "%s\n" "TARGET: $TARGET"
|
||||
$PLAYER $TARGET
|
||||
# "$PLAYER $TARGET" &>/dev/null &
|
||||
else
|
||||
printf "%s\n" "Should not get here"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user