diff options
author | Julian <julianteule@gmail.com> | 2017-01-23 20:23:04 +0100 |
---|---|---|
committer | Julian <julianteule@gmail.com> | 2017-01-23 20:23:04 +0100 |
commit | 3fc5e39e03933f7d8c736d7f66cbd86175188eda (patch) | |
tree | 1ce4ccd84c054c062481210e787dbbf1aba072f3 | |
parent | 5d1f5767bc2fe4b2681a7ce7d96131a9b3a16098 (diff) |
Updated conky
-rw-r--r-- | Conky/conkymain | 14 | ||||
-rwxr-xr-x | Conky/getInternalIp.sh | 3 | ||||
-rwxr-xr-x | Conky/spotify-nowplaying-length | 3 | ||||
-rwxr-xr-x | Conky/spotify-nowplaying.sh | 3 |
4 files changed, 22 insertions, 1 deletions
diff --git a/Conky/conkymain b/Conky/conkymain index 5e95923..5a01c03 100644 --- a/Conky/conkymain +++ b/Conky/conkymain @@ -62,4 +62,16 @@ ${color white}1. ${top_mem name 1}${top_mem pid 1} ${top_mem cpu 1} ${top_mem me 3. ${top_mem name 3}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3} 4. ${top_mem name 4}${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4} 5. ${top_mem name 5}${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5} - +${color orange}MUSIC${hr 2} +${if_running spotify}${texeci 1 /usr/bin/spotify-nowplaying-work}${color white}Song: + ${color gray}${exec /home/julian/Conky/spotify-nowplaying.sh} +${endif}${color orange}NETWORK${hr 2} +${color white}Hostname: +${color gray} ${exec hostname} +${color white}Internal Ip: +${color gray}${if_existing /proc/net/route wlan0} Wlan: ${exec /home/julian/Conky/getInternalIp.sh} +${else}${if_existing /proc/net/route enp4s0} Eth: ${exec /home/julian/Conky/getInternalIp.sh enp4s0} +${else} Network disconnected${endif}${endif}${alignc}${color Tan2}TX NETWORKING RX +${if_existing /proc/net/route wlan0}${color white}Wlan: ${color 20a5e4}${upspeed Wlan0}$alignr${downspeed wlan0}${color white}:Wlan +${else}${if_existing /proc/net/route enp4s0}${color white}Eth: ${color 20a5e4}${upspeed enp4s0}$alignr${downspeed enp4s0}${color white}:Eth +${else}${color white}Network disconnected${endif}${endif}
\ No newline at end of file diff --git a/Conky/getInternalIp.sh b/Conky/getInternalIp.sh new file mode 100755 index 0000000..8894199 --- /dev/null +++ b/Conky/getInternalIp.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +ifconfig $1 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
\ No newline at end of file diff --git a/Conky/spotify-nowplaying-length b/Conky/spotify-nowplaying-length new file mode 100755 index 0000000..45a0158 --- /dev/null +++ b/Conky/spotify-nowplaying-length @@ -0,0 +1,3 @@ +#!/bin/bash + +echo `dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "length"|egrep -v "length"|egrep -v "array"|cut -b 43-|cut -d '"' -f 1|egrep -v ^$`
\ No newline at end of file diff --git a/Conky/spotify-nowplaying.sh b/Conky/spotify-nowplaying.sh new file mode 100755 index 0000000..47a960d --- /dev/null +++ b/Conky/spotify-nowplaying.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo `dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$` "-" `dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$`
\ No newline at end of file |