mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-22 23:12:32 +01:00
sway bindsym spotify
This commit is contained in:
parent
45bac4f40d
commit
1f92ed5c02
@ -46,5 +46,5 @@ bindsym XF86MonBrightnessDown exec light -U 10 && \
|
||||
# exec startup apps
|
||||
exec --no-startup-id swaymsg 'exec variety &'
|
||||
exec --no-startup-id swaymsg 'workspace $tag4; exec kitty -e "screen tiny"'
|
||||
exec --no-startup-id swaymsg 'workspace $tag2; exec kitty -e "ssh-add" && alacritty'
|
||||
exec --no-startup-id swaymsg 'workspace $tag2; exec kitty -e "ssh-add" && kitty'
|
||||
#INCLUDE####################################################
|
||||
|
@ -118,7 +118,7 @@ bindsym $mod+Shift+p exec grimshot save area
|
||||
bindsym $mod+p exec grimshot save output
|
||||
|
||||
# variety
|
||||
bindsym $mod+Control+w exec variety --next
|
||||
bindsym $mod+less exec variety --next
|
||||
|
||||
# apps
|
||||
bindsym $mod+Control+t exec thunar
|
||||
@ -126,9 +126,9 @@ bindsym $mod+Control+n exec connman-gtk
|
||||
bindsym $mod+Control+p exec pavucontrol
|
||||
|
||||
# bindsym spotify
|
||||
bindsym $mod+less exec playerctl previous
|
||||
bindsym $mod+Shift+less exec playerctl next
|
||||
bindsym $mod+space exec playerctl play-pause
|
||||
bindsym $mod+Control+left exec playerctl previous
|
||||
bindsym $mod+Control+down exec playerctl next
|
||||
bindsym $mod+Control+right exec playerctl play-pause
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+ampersand workspace $tag1
|
||||
@ -147,7 +147,7 @@ bindsym $mod+Shift+ampersand move container to workspace $tag1
|
||||
bindsym $mod+Shift+eacute move container to workspace $tag2
|
||||
bindsym $mod+Shift+quotedbl move container to workspace $tag3
|
||||
bindsym $mod+Shift+apostrophe move container to workspace $tag4
|
||||
bindsym $mod+Shift+5 move container to workspace $tag5
|
||||
bindsym $mod+Shift+parenleft move container to workspace $tag5
|
||||
bindsym $mod+Shift+minus move container to workspace $tag6
|
||||
bindsym $mod+Shift+egrave move container to workspace $tag7
|
||||
bindsym $mod+Shift+underscore move container to workspace $tag8
|
||||
@ -155,9 +155,6 @@ bindsym $mod+Shift+ccedilla move container to workspace $tag9
|
||||
bindsym $mod+Shift+agrave move container to workspace $tag10
|
||||
|
||||
# floatings
|
||||
for_window [class="XTerm"] floating enable, border normal
|
||||
for_window [class="feh"] floating enable, border normal
|
||||
for_window [class="Gpick"] floating enable, border pixel 1
|
||||
for_window [title="Images de Variety"] floating enable, border pixel 1, move left 647px
|
||||
|
||||
# assign and focus xwayland
|
||||
|
@ -75,11 +75,10 @@
|
||||
"modules-center": ["network#speed"],
|
||||
"modules-right": ["temperature", "custom/storage", "cpu", "memory" ],
|
||||
"custom/spotify": {
|
||||
"format": "<span foreground='#929292'></span> {}",
|
||||
"interval": 1,
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/modules/spotify.sh",
|
||||
"exec-if": "pgrep spotify",
|
||||
"escape": true
|
||||
"exec-if": "pgrep spotify"
|
||||
},
|
||||
"network#speed": {
|
||||
"format-wifi": "<span foreground='#929292'></span> {bandwidthDownOctets} <span foreground='#929292'></span> {bandwidthUpOctets}",
|
||||
|
@ -1,18 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
class=$(playerctl metadata --player=spotify --format '{{lc(status)}}')
|
||||
icon=""
|
||||
|
||||
if [[ $class == "playing" ]]; then
|
||||
info=$(playerctl metadata --player=spotify --format '{{artist}} - {{title}}')
|
||||
if [[ ${#info} > 40 ]]; then
|
||||
info=$(playerctl metadata --player=spotify --format '{{artist}} - {{title}}')
|
||||
if [[ ${#info} > 40 ]]; then
|
||||
info=$(echo $info | cut -c1-40)"..."
|
||||
fi
|
||||
text=$info" "$icon
|
||||
elif [[ $class == "paused" ]]; then
|
||||
text=$icon
|
||||
elif [[ $class == "stopped" ]]; then
|
||||
text=""
|
||||
fi
|
||||
|
||||
echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}"
|
||||
echo "$info"
|
||||
|
Loading…
Reference in New Issue
Block a user