-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
@define-color accent_bg_color #c4a7e7; | ||
@define-color accent_fg_color #191724; | ||
@define-color accent_color #c4a7e7; | ||
|
||
@define-color destructive_bg_color #eb6f92; | ||
@define-color destructive_fg_color #191724; | ||
@define-color destructive_color #eb6f92; | ||
|
||
@define-color success_bg_color #9ccfd8; | ||
@define-color success_fg_color #e0def4; | ||
@define-color success_color #9ccfd8; | ||
|
||
@define-color warning_bg_color #f6c177; | ||
@define-color warning_fg_color #e0def4; | ||
@define-color warning_color #f6c177; | ||
|
||
@define-color error_bg_color #eb6f92; | ||
@define-color error_fg_color #e0def4; | ||
@define-color error_color #eb6f92; | ||
|
||
@define-color window_bg_color #191724; | ||
@define-color window_fg_color #e0def4; | ||
|
||
@define-color view_bg_color #26233a; | ||
@define-color view_fg_color #e0def4; | ||
|
||
@define-color headerbar_bg_color #191724; | ||
@define-color headerbar_fg_color #e0def4; | ||
@define-color headerbar_backdrop_color @window_bg_color; | ||
@define-color headerbar_shade_color #191724; | ||
|
||
|
||
@define-color card_bg_color #1f1d2e; | ||
@define-color card_fg_color #e0def4; | ||
@define-color card_shade_color #1f1d2e; | ||
|
||
@define-color popover_bg_color #26233a; | ||
@define-color popover_fg_color #e0def4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# Default maximum length | ||
default_max_length=26 | ||
|
||
# Function to trim the info if it exceeds 'max_length' characters | ||
trim_info() { | ||
local info="$1" | ||
local max_length="$2" | ||
|
||
if [ ${#info} -gt $max_length ]; then | ||
info="${info:0:$max_length}…" | ||
fi | ||
|
||
echo "$info" | ||
} | ||
|
||
# Parse the command-line argument for max_length | ||
if [[ $1 =~ max_length=([0-9]+) ]]; then | ||
max_length="${BASH_REMATCH[1]}" | ||
else | ||
max_length=$default_max_length | ||
fi | ||
|
||
# Check if Spotify is playing | ||
spotify_status=$(playerctl --player=spotify status 2>/dev/null) | ||
|
||
if [ "$spotify_status" == "Playing" ]; then | ||
# Get currently playing song from Spotify | ||
info=$(playerctl metadata --player=spotify --format ' {{title}} • {{artist}}') | ||
else | ||
# Get currently playing song from Musikcube | ||
info=$(playerctl metadata --player=musikcube --format ' {{title}} • {{artist}}') | ||
fi | ||
|
||
# Add seperator for waybar | ||
|
||
# Trim info if necessary and display it | ||
trimmed_info=$(trim_info "$info" "$max_length") | ||
echo "$trimmed_info" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
spotify_status=$(playerctl --player=spotify status 2>/dev/null) | ||
|
||
if [ "$spotify_status" == "Playing" ]; then | ||
playerctl --player=spotify next | ||
else | ||
playerctl --player=musikcube next | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
spotify_status=$(playerctl --player=spotify status 2>/dev/null) | ||
|
||
if [ "$spotify_status" == "Playing" ]; then | ||
playerctl --player=spotify previous | ||
else | ||
playerctl --player=musikcube previous | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
class=$(playerctl metadata --player=spotify --format '{{lc(status)}}') | ||
icon=" " | ||
|
||
if [[ $class == "playing" ]]; then | ||
info=$(playerctl metadata --player=spotify --format '{{artist}} - {{title}}') | ||
|
||
# Check if the info length exceeds 28 characters | ||
if (( ${#info} > 28 )); then | ||
# Trim info to 28 characters and add ".." | ||
info="${info:0:28}.." | ||
fi | ||
|
||
text="$icon $info" | ||
elif [[ $class == "paused" ]]; then | ||
text="$icon" | ||
else | ||
text="" | ||
fi | ||
|
||
echo -e "{\"text\":\"$text\", \"class\":\"$class\"}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters