eww: remove player window
This commit is contained in:
@@ -18,15 +18,18 @@ network-manager-applet # nm-applet
|
|||||||
slurp # region selector
|
slurp # region selector
|
||||||
wf-recorder # screen recorder
|
wf-recorder # screen recorder
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
qt5ct
|
||||||
|
qt6ct
|
||||||
|
|
||||||
waybar
|
waybar
|
||||||
|
eww
|
||||||
wlogout
|
wlogout
|
||||||
fuzzel
|
fuzzel
|
||||||
hyprpicker
|
hyprpicker
|
||||||
cliphist
|
cliphist
|
||||||
blueman # bluetooth GUI & applet
|
blueman # bluetooth GUI & applet
|
||||||
pavucontrol
|
pavucontrol
|
||||||
easyeffects
|
pamixer
|
||||||
nautilus # dolphin doesn't look nice in Hyprland
|
nautilus # dolphin doesn't look nice in Hyprland
|
||||||
gnome-text-editor # neither does kwrite, even with Kvantum
|
gnome-text-editor # neither does kwrite, even with Kvantum
|
||||||
btop # system monitor
|
btop # system monitor
|
||||||
@@ -37,4 +40,7 @@ catppuccin-gtk-theme-mocha # theme of GTK apps
|
|||||||
polkit-gnome
|
polkit-gnome
|
||||||
|
|
||||||
kitty # normal terminal
|
kitty # normal terminal
|
||||||
ghostty # floating terminal, for btop for example
|
ghostty # floating terminal, for btop for example#
|
||||||
|
|
||||||
|
bc
|
||||||
|
jq
|
||||||
@@ -163,6 +163,47 @@
|
|||||||
background: linear-gradient(to right, $bg-alt, transparent);
|
background: linear-gradient(to right, $bg-alt, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.player-cover-box {
|
||||||
|
background-size: 140px;
|
||||||
|
min-height: 140px;
|
||||||
|
min-width: 140px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-box {
|
||||||
|
margin: 40px 30px 30px 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-info-box {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-info-title,
|
||||||
|
.player-info-artist {
|
||||||
|
color: $blue;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-info-album,
|
||||||
|
.player-info-length {
|
||||||
|
color: $fg-alt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-info-button {
|
||||||
|
background-color: $gray-alt;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cavabar {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $lavender;
|
||||||
|
}
|
||||||
|
|
||||||
.music-controls-box {
|
.music-controls-box {
|
||||||
margin: 20px 20px 0px 20px;
|
margin: 20px 20px 0px 20px;
|
||||||
background-color: $gray-alt;
|
background-color: $gray-alt;
|
||||||
|
|||||||
@@ -26,6 +26,12 @@
|
|||||||
(defpoll volume :interval "1s" "Main/scripts/system --vol")
|
(defpoll volume :interval "1s" "Main/scripts/system --vol")
|
||||||
(defpoll brightness :interval "1s" "Main/scripts/system --bri")
|
(defpoll brightness :interval "1s" "Main/scripts/system --bri")
|
||||||
(defpoll fortune :interval "1h" "Main/scripts/fortune.py 32 9")
|
(defpoll fortune :interval "1h" "Main/scripts/fortune.py 32 9")
|
||||||
|
(deflisten cava "Main/scripts/cava")
|
||||||
|
(defpoll title :interval "1s" "Main/scripts/music-title --status")
|
||||||
|
(defpoll artist :interval "1s" "Main/scripts/player --artist")
|
||||||
|
(defpoll album :interval "1s" "Main/scripts/player --album")
|
||||||
|
(defpoll length-info :interval "1s" "Main/scripts/player --length-info")
|
||||||
|
(defpoll art :interval "1s" "Main/scripts/player --cover")
|
||||||
|
|
||||||
|
|
||||||
;; widgets
|
;; widgets
|
||||||
@@ -60,9 +66,18 @@
|
|||||||
(box :class "third-row" :orientation "h" :space-evenly "false"
|
(box :class "third-row" :orientation "h" :space-evenly "false"
|
||||||
(box :class "music-art-box" :space-evenly "false" :orientation "v" :hexpand "false" :vexpand "false" :style "background-image: url(\"${music-art}\");"
|
(box :class "music-art-box" :space-evenly "false" :orientation "v" :hexpand "false" :vexpand "false" :style "background-image: url(\"${music-art}\");"
|
||||||
(box :class "music-stuff-box" :space-evenly "false" :hexpand "false" :vexpand "false" :orientation "v"
|
(box :class "music-stuff-box" :space-evenly "false" :hexpand "false" :vexpand "false" :orientation "v"
|
||||||
(label :class "music-title" :text music-title :halign "start" :limit-width 22 :tooltip music-title)
|
(box :class "player-box" :hexpand "false" :vexpand "false" :space-evenly "true"
|
||||||
(label :class "music-artist" :text music-artist :halign "start" :limit-width 22 :tooltip music-artist)
|
(box :class "player-info-box" :hexpand "false" :vexpand "false" :space-evenly "false" :orientation "v" :spacing 15
|
||||||
(label :class "music-length" :text music-length :halign "start" :valign "end")))
|
(label :class "player-info-title" :text " Title: ${title}" :halign "start" :limit-width 30 :tooltip "${title}")
|
||||||
|
(label :class "player-info-artist" :text " Artist: ${artist}" :halign "start" :limit-width 30 :tooltip "${artist}")
|
||||||
|
(label :class "player-info-album" :text " Album: ${album}" :halign "start" :limit-width 30 :tooltip "${album}")
|
||||||
|
(label :class "player-info-length" :text " Length: ${length-info}" :halign "start" :tooltip "${length-info}"))
|
||||||
|
(box :class "player-cover-box" :hexpand "false" :halign "end" :vexpand "false" :space-evenly "false" :style "background-image: url('${art}');"))
|
||||||
|
(box :class "cava-box" :hexpand "false" :vexpand "false"
|
||||||
|
(label :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||||
|
:class "cavabar"
|
||||||
|
:text cava
|
||||||
|
))))
|
||||||
(box :class "music-controls-box" :space-evenly "true" :hexpand "true" :vexpand "false" :orientation "v"
|
(box :class "music-controls-box" :space-evenly "true" :hexpand "true" :vexpand "false" :orientation "v"
|
||||||
(button :class "music-previous" :halign "center" :onclick "playerctl previous" "")
|
(button :class "music-previous" :halign "center" :onclick "playerctl previous" "")
|
||||||
(button :class "music-pp" :halign "center" :onclick "playerctl play-pause" "${music-pp}")
|
(button :class "music-pp" :halign "center" :onclick "playerctl play-pause" "${music-pp}")
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ mkfifo $pipe
|
|||||||
config_file="/tmp/waybar_cava_config"
|
config_file="/tmp/waybar_cava_config"
|
||||||
echo "
|
echo "
|
||||||
[general]
|
[general]
|
||||||
bars = 49
|
bars = 33
|
||||||
[output]
|
[output]
|
||||||
method = raw
|
method = raw
|
||||||
raw_target = $pipe
|
raw_target = $pipe
|
||||||
@@ -10,23 +10,23 @@ if [[ $1 == "--open" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--artist" ]]; then
|
if [[ $1 == "--artist" ]]; then
|
||||||
"$HOME/.config/eww/Player/scripts/music-artist"
|
"$HOME/.config/eww/Main/scripts/music-artist"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--length-time" ]]; then
|
if [[ $1 == "--length-time" ]]; then
|
||||||
"$HOME/.config/eww/Player/scripts/music-length"
|
"$HOME/.config/eww/Main/scripts/music-length"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--length-info" ]]; then
|
if [[ $1 == "--length-info" ]]; then
|
||||||
"$HOME/.config/eww/Player/scripts/music-length-info"
|
"$HOME/.config/eww/Main/scripts/music-length-info"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--cover" ]]; then
|
if [[ $1 == "--cover" ]]; then
|
||||||
"$HOME/.config/eww/Player/scripts/music-art"
|
"$HOME/.config/eww/Main/scripts/music-art"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--album" ]]; then
|
if [[ $1 == "--album" ]]; then
|
||||||
"$HOME/.config/eww/Player/scripts/music-album"
|
"$HOME/.config/eww/Main/scripts/music-album"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--current-volume" ]]; then
|
if [[ $1 == "--current-volume" ]]; then
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
* {
|
|
||||||
all: unset;
|
|
||||||
transition: 200ms ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-main-box {
|
|
||||||
background-color: $bg;
|
|
||||||
border-radius: 20px;
|
|
||||||
border: 3px solid $blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spotify-header-logo {
|
|
||||||
font-size: 24px;
|
|
||||||
color: $green;
|
|
||||||
margin: 30px 0px 0px 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spotify-header-title {
|
|
||||||
font-size: 28px;
|
|
||||||
color: $green;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spotify-header-player {
|
|
||||||
font-size: 28px;
|
|
||||||
color: $fg;
|
|
||||||
font-weight: 200;
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-cover-box {
|
|
||||||
background-size: 222px;
|
|
||||||
min-height: 222px;
|
|
||||||
min-width: 222px;
|
|
||||||
border-radius: 20px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
margin: 0px 40px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-box {
|
|
||||||
background-color: $bg;
|
|
||||||
margin: 40px 30px 30px 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-info-box {
|
|
||||||
margin: 20px 0px 0px 20px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-info-title,
|
|
||||||
.player-info-artist {
|
|
||||||
color: $blue;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-info-album,
|
|
||||||
.player-info-length {
|
|
||||||
color: $gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-info-button {
|
|
||||||
background-color: $gray-alt;
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-music-slider trough {
|
|
||||||
background-color: $gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-music-slider highlight {
|
|
||||||
background-color: $blue;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-volume-slider trough {
|
|
||||||
background-color: $gray;
|
|
||||||
border-radius: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-volume-slider highlight {
|
|
||||||
background: linear-gradient(to right, $cyan, $blue);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-player-control-box {
|
|
||||||
background-color: $bg-alt;
|
|
||||||
border-radius: 0px 0px 25px 25px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-volume-icon {
|
|
||||||
color: $cyan;
|
|
||||||
font-size: 24px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-volume-box {
|
|
||||||
padding-top: 15px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
margin-left: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shuffle-btn-on {
|
|
||||||
color: $green;
|
|
||||||
font-size: 26px;
|
|
||||||
font-weight: lighter;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shuffle-btn-off {
|
|
||||||
color: $gray;
|
|
||||||
font-size: 26px;
|
|
||||||
font-weight: lighter;
|
|
||||||
}
|
|
||||||
|
|
||||||
.previous-btn,
|
|
||||||
.next-btn {
|
|
||||||
font-size: 30px;
|
|
||||||
color: $fg;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-pp-btn {
|
|
||||||
font-size: 50px;
|
|
||||||
color: $blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
.current-position {
|
|
||||||
color: $fg;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.length-of-song {
|
|
||||||
color: $gray;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-album-box {
|
|
||||||
background-size: 150px;
|
|
||||||
min-height: 150px;
|
|
||||||
min-width: 150px;
|
|
||||||
border-radius: 100px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
border: 5px solid $cyan;
|
|
||||||
margin: 47px 0px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-album-box {
|
|
||||||
background-color: $bg;
|
|
||||||
}
|
|
||||||
|
|
||||||
.visualizer-btn-on {
|
|
||||||
background-color: $gray-alt;
|
|
||||||
padding: 5px 15px 5px 10px;
|
|
||||||
font-size: 24px;
|
|
||||||
border-radius: 10px;
|
|
||||||
color: $blue;
|
|
||||||
box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.visualizer-btn-off {
|
|
||||||
background-color: $gray-alt;
|
|
||||||
padding: 5px 15px 5px 10px;
|
|
||||||
font-size: 24px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.equalizer-btn-on {
|
|
||||||
background-color: $gray-alt;
|
|
||||||
padding: 5px 14px 5px 11px;
|
|
||||||
font-size: 24px;
|
|
||||||
border-radius: 10px;
|
|
||||||
color: $blue;
|
|
||||||
box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.equalizer-btn-off {
|
|
||||||
background-color: $gray-alt;
|
|
||||||
padding: 5px 14px 5px 11px;
|
|
||||||
font-size: 24px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-buttons {
|
|
||||||
padding-left: 45px;
|
|
||||||
text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-length-box {
|
|
||||||
padding-left: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player-control-box-right {
|
|
||||||
padding: 15px 0px 15px 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vz-title {
|
|
||||||
padding: 0px 0px 0px 0px;
|
|
||||||
font-size: 22px;
|
|
||||||
color: $blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cavabar {
|
|
||||||
font-size: 24px;
|
|
||||||
color: $lavender;
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
;; variables
|
|
||||||
(defpoll art :interval "1s" "Player/scripts/player --cover")
|
|
||||||
(defpoll title :interval "1s" "Player/scripts/music-title --status")
|
|
||||||
(defpoll artist :interval "1s" "Player/scripts/player --artist")
|
|
||||||
(defpoll album :interval "1s" "Player/scripts/player --album")
|
|
||||||
(defpoll current-pos :interval "1s" "Player/scripts/player --current-pos")
|
|
||||||
(defpoll length-info :interval "1s" "Player/scripts/player --length-info")
|
|
||||||
(defpoll length :interval "0s" "dbus-send --dest=org.mpris.MediaPlayer2.spotify --print-reply /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Metadata | grep uint | awk '{print $3}'")
|
|
||||||
(defpoll position :interval "1s" "dbus-send --dest=org.mpris.MediaPlayer2.spotify --print-reply /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Position | awk 'FNR==2 {print $3}'")
|
|
||||||
(defpoll trackid :interval "1s" "playerctl -p spotify metadata mpris:trackid")
|
|
||||||
(defpoll current-volume :interval "1s" "Player/scripts/player --current-volume")
|
|
||||||
(defpoll pp-icon :interval "1s" "Player/scripts/music-title --icon")
|
|
||||||
(defpoll shuffle :interval "1s" "playerctl -p spotify shuffle")
|
|
||||||
(deflisten eq-status "tail -F Player/status/eq-status")
|
|
||||||
(deflisten vz-status "tail -F Player/status/vz-status")
|
|
||||||
(deflisten ly-status "tail -F Player/status/ly-status")
|
|
||||||
(defvar hover false)
|
|
||||||
(deflisten cava "Player/scripts/cava")
|
|
||||||
|
|
||||||
;; widgets
|
|
||||||
(defwidget player[]
|
|
||||||
(box :class "player-main-box" :space-evenly "false" :orientation "v" :hexpand "false" :vexpand "false"
|
|
||||||
; (box :class "header-box" :hexpand "false" :vexpand "false" :space-evenly "true"
|
|
||||||
; (box :class "another-header-box" :space-evenly "false"
|
|
||||||
; (label :class "spotify-header-logo" :text " " :halign "center")
|
|
||||||
; (label :class "spotify-header-title" :text "Spotify" :halign "center")
|
|
||||||
; (label :class "spotify-header-player" :text "Player" :halign "center")))
|
|
||||||
(box :class "player-box" :hexpand "false" :vexpand "false" :space-evenly "true"
|
|
||||||
(box :class "player-info-box" :hexpand "false" :vexpand "false" :space-evenly "false" :orientation "v" :spacing 15
|
|
||||||
(label :class "player-info-title" :text " Title: ${title}" :halign "start" :limit-width 30 :tooltip "${title}")
|
|
||||||
(label :class "player-info-artist" :text " Artist: ${artist}" :halign "start" :limit-width 30 :tooltip "${artist}")
|
|
||||||
(label :class "player-info-album" :text " Album: ${album}" :halign "start" :limit-width 30 :tooltip "${album}")
|
|
||||||
(label :class "player-info-length" :text " Length: ${length-info}" :halign "start" :tooltip "${length-info}"))
|
|
||||||
(box :class "player-cover-box" :hexpand "false" :halign "end" :vexpand "false" :space-evenly "false" :style "background-image: url('${art}');"))
|
|
||||||
(box :class "cava-box" :hexpand "false" :vexpand "false"
|
|
||||||
(label :vexpand "false" :hexpand "false" :space-evenly "false"
|
|
||||||
:class "cavabar"
|
|
||||||
:text cava
|
|
||||||
))
|
|
||||||
(eventbox :onhover "eww update hover=true"
|
|
||||||
:onhoverlost "eww update hover=false"
|
|
||||||
:cursor "pointer"
|
|
||||||
:space-evenly "false"
|
|
||||||
(scale :orientation "h" :class "player-music-slider" :min 0 :max length :value position :tooltip current-pos :onchange { hover ? "dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetPosition objpath:${trackid} int64:{}" : "" }))
|
|
||||||
(box :class "main-player-control-box" :hexpand "false" :vexpand "false" :space-evenly "false" :orientation "h" :height 70
|
|
||||||
(box :class "player-volume-box" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 10
|
|
||||||
(label :class "player-volume-icon" :text "")
|
|
||||||
(scale :class "player-volume-slider" :width 140 :min 0 :max 100 :orientation "h" :value current-volume :halign "start" :onchange "Player/scripts/player --volume {}"))
|
|
||||||
(box :class "player-buttons" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 10
|
|
||||||
(button :class "shuffle-btn ${shuffle == "On" ? "shuffle-btn-on" : "shuffle-btn-off"}" :onclick "Player/scripts/player --shuffle" "")
|
|
||||||
(button :class "previous-btn" :onclick "playerctl -p spotify previous" "")
|
|
||||||
(button :class "player-pp-btn" :onclick "playerctl -p spotify play-pause" "${pp-icon}")
|
|
||||||
(button :class "next-btn" :onclick "playerctl -p spotify next" ""))
|
|
||||||
(box :class "player-length-box" :space-evenly "false" :hexpand "false" :vexpand "false" :halign "end" :width 150
|
|
||||||
(label :class "current-position" :text "${current-pos} ")
|
|
||||||
(label :class "length-of-song" :text "/ ${length-info}"))
|
|
||||||
(box :class "player-control-box-right" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 15 :halign "end"
|
|
||||||
(button :class "equalizer-btn ${eq-status == "On" ? "equalizer-btn-on" : "equalizer-btn-off"}" :onclick "Player/scripts/equalizer" "")))))
|
|
||||||
|
|
||||||
|
|
||||||
;; windows
|
|
||||||
(defwindow player
|
|
||||||
:windowtype "normal"
|
|
||||||
:wm-ignore true
|
|
||||||
:monitor 0
|
|
||||||
:geometry (geometry :anchor "top center" :y 100 :height 400 :width 680)
|
|
||||||
(player))
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
TRACK_ID=$(playerctl -p spotify metadata mpris:trackid)
|
|
||||||
dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetPosition objpath:/com/spotify/track/0LnS7aOdOdI1dNKZqdOLz4 int64:120000000
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if pgrep easyeffects; then
|
|
||||||
pkill easyeffects
|
|
||||||
echo "Off" > $HOME/.config/eww/Player/status/eq-status
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exec easyeffects --gapplication-service &
|
|
||||||
echo "On" > $HOME/.config/eww/Player/status/eq-status
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the source audio player here.
|
|
||||||
# Players supporting the MPRIS spec are supported.
|
|
||||||
# Examples: spotify, vlc, chrome, mpv and others.
|
|
||||||
# Use `playerctld` to always detect the latest player.
|
|
||||||
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
|
|
||||||
PLAYER="playerctld"
|
|
||||||
|
|
||||||
# Format of the information displayed
|
|
||||||
# Eg. {{ artist }} - {{ album }} - {{ title }}
|
|
||||||
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
|
|
||||||
FORMAT="{{ album }}"
|
|
||||||
|
|
||||||
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
|
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
if [ $EXIT_CODE -eq 0 ]; then
|
|
||||||
STATUS=$PLAYERCTL_STATUS
|
|
||||||
else
|
|
||||||
STATUS="No Album"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$STATUS" = "Stopped" ]; then
|
|
||||||
echo "No Album"
|
|
||||||
elif [ "$STATUS" = "Paused" ]; then
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
elif [ "$STATUS" = "No Alnum" ]; then
|
|
||||||
echo "$STATUS"
|
|
||||||
else
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
fi
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
tmp_dir="$HOME/.config/eww/Main/images"
|
|
||||||
tmp_cover_path=$tmp_dir/cover.png
|
|
||||||
tmp_temp_path=$tmp_dir/temp.png
|
|
||||||
|
|
||||||
if [ ! -d $tmp_dir ]; then
|
|
||||||
mkdir -p $tmp_dir
|
|
||||||
fi
|
|
||||||
|
|
||||||
artlink="$(playerctl -p spotify,$any,mpd,firefox,chromium,brave metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
|
|
||||||
artFromBrowser=$(playerctl metadata mpris:artUrl | sed 's/file:\/\///g')
|
|
||||||
|
|
||||||
if [ $(playerctl -p spotify,%any,firefox,chromium,brave,mpd metadata mpris:artUrl) ]; then
|
|
||||||
curl -s "$artlink" --output $tmp_temp_path
|
|
||||||
echo $tmp_temp_path
|
|
||||||
elif [[ -n $artFromBrowser ]]; then
|
|
||||||
cp $artFromBrowser $tmp_temp_path
|
|
||||||
echo $tmp_temp_path
|
|
||||||
else
|
|
||||||
echo Main/images/default-music.svg
|
|
||||||
fi
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the source audio player here.
|
|
||||||
# Players supporting the MPRIS spec are supported.
|
|
||||||
# Examples: spotify, vlc, chrome, mpv and others.
|
|
||||||
# Use `playerctld` to always detect the latest player.
|
|
||||||
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
|
|
||||||
PLAYER="playerctld"
|
|
||||||
|
|
||||||
# Format of the information displayed
|
|
||||||
# Eg. {{ artist }} - {{ album }} - {{ title }}
|
|
||||||
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
|
|
||||||
FORMAT="{{ artist }}"
|
|
||||||
|
|
||||||
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
|
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
if [ $EXIT_CODE -eq 0 ]; then
|
|
||||||
STATUS=$PLAYERCTL_STATUS
|
|
||||||
else
|
|
||||||
STATUS="No Artist"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$STATUS" = "Stopped" ]; then
|
|
||||||
echo "No Artist"
|
|
||||||
elif [ "$STATUS" = "Paused" ]; then
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
elif [ "$STATUS" = "No Artist" ]; then
|
|
||||||
echo "$STATUS"
|
|
||||||
else
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
fi
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the source audio player here.
|
|
||||||
# Players supporting the MPRIS spec are supported.
|
|
||||||
# Examples: spotify, vlc, chrome, mpv and others.
|
|
||||||
# Use `playerctld` to always detect the latest player.
|
|
||||||
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
|
|
||||||
PLAYER="playerctld"
|
|
||||||
|
|
||||||
# Format of the information displayed
|
|
||||||
# Eg. {{ artist }} - {{ album }} - {{ title }}
|
|
||||||
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
|
|
||||||
FORMAT="{{ duration(position) }} / {{ duration(mpris:length) }}"
|
|
||||||
|
|
||||||
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
|
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
if [ $EXIT_CODE -eq 0 ]; then
|
|
||||||
STATUS=$PLAYERCTL_STATUS
|
|
||||||
else
|
|
||||||
STATUS="--:-- / --:--"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$STATUS" = "Stopped" ]; then
|
|
||||||
echo "--:-- / --:--"
|
|
||||||
elif [ "$STATUS" = "Paused" ]; then
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
elif [ "$STATUS" = "--:-- / --:--" ]; then
|
|
||||||
echo "$STATUS"
|
|
||||||
else
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
fi
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the source audio player here.
|
|
||||||
# Players supporting the MPRIS spec are supported.
|
|
||||||
# Examples: spotify, vlc, chrome, mpv and others.
|
|
||||||
# Use `playerctld` to always detect the latest player.
|
|
||||||
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
|
|
||||||
PLAYER="playerctld"
|
|
||||||
|
|
||||||
# Format of the information displayed
|
|
||||||
# Eg. {{ artist }} - {{ album }} - {{ title }}
|
|
||||||
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
|
|
||||||
FORMAT="{{ title }}"
|
|
||||||
|
|
||||||
|
|
||||||
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
|
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
if [ $EXIT_CODE -eq 0 ]; then
|
|
||||||
STATUS=$PLAYERCTL_STATUS
|
|
||||||
else
|
|
||||||
STATUS="Nothing is playing"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" == "--status" ]; then
|
|
||||||
if [ "$STATUS" = "Stopped" ]; then
|
|
||||||
echo "Nothing is playing"
|
|
||||||
elif [ "$STATUS" = "Paused" ]; then
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
elif [ "$STATUS" = "Nothing is playing" ]; then
|
|
||||||
echo "$STATUS"
|
|
||||||
else
|
|
||||||
playerctl --player=$PLAYER metadata --format "$FORMAT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" == "--icon" ]; then
|
|
||||||
if [[ $STATUS == "Playing" ]]; then
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
On
|
|
||||||
@@ -14,5 +14,4 @@ $gray: #585b70;
|
|||||||
$gray-alt: #313244;
|
$gray-alt: #313244;
|
||||||
$lavender: #b4befe;
|
$lavender: #b4befe;
|
||||||
|
|
||||||
@import './Player/eww.scss';
|
|
||||||
@import './Main/eww.scss';
|
@import './Main/eww.scss';
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
(include "./Player/eww.yuck")
|
|
||||||
(include "./Main/eww.yuck")
|
(include "./Main/eww.yuck")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ exec-once = nm-applet
|
|||||||
exec-once = blueman-applet
|
exec-once = blueman-applet
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
exec-once = easyeffects --gapplication-service
|
# exec-once = easyeffects --gapplication-service
|
||||||
|
|
||||||
# Clipboard: history
|
# Clipboard: history
|
||||||
# exec-once = wl-paste --watch cliphist store &
|
# exec-once = wl-paste --watch cliphist store &
|
||||||
|
|||||||
@@ -237,7 +237,6 @@
|
|||||||
"escape": true,
|
"escape": true,
|
||||||
"exec": "$HOME/.config/waybar/modules/mediaplayer.py 2> /dev/null",
|
"exec": "$HOME/.config/waybar/modules/mediaplayer.py 2> /dev/null",
|
||||||
"on-click": "playerctl play-pause",
|
"on-click": "playerctl play-pause",
|
||||||
"on-click-right": "eww open --toggle player",
|
|
||||||
"on-scroll-up": "playerctl next",
|
"on-scroll-up": "playerctl next",
|
||||||
"on-scroll-down": "playerctl previous"
|
"on-scroll-down": "playerctl previous"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user