You are not logged in.
The recovery partition that has spaces in its name is /dev/sda1. I actually tried writing /dev/sda1 everyhere, and it did not work, either.
Everything there is "{fs_x}" type objects which do not accept /dev/sda1 type paths they accept paths to mount points in user space like "/media/whateverinamedit".
I mentioned this in my last post.
"${fs_used}", "${fs_size}", and "${fs_free}" only want the path to the mount point of the drive I believe and should accept "/run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/" if that is the mount point and the tools conky uses to get this data actually work on samba shares.
These conky objects have been improved in what paths they work with in conky v1.10.0 but as I said before I have no idea if they work with samba shares because I don't use samba.
One thing you should try with your samba share is mounting it manually with the samba command line tools to a directory you create in a less strange place than "/run/usr" like "/media/".
I have no idea what the commands to do that are since I don't use samba.
I use NFS instead since I don't need Windows compatibility on my network drives.
Last edited by arclance (2015-09-06 15:46:03)
Offline
ghorvath wrote:The recovery partition that has spaces in its name is /dev/sda1. I actually tried writing /dev/sda1 everyhere, and it did not work, either.
Everything there is "{fs_x}" type objects which do not accept /dev/sda1 type paths they accept paths to mount points in user space like "/media/whateverinamedit".
I mentioned this in my last post.
Sorry, you are right. This somehow escaped me.... In any case, I basically tried all sensible possibilities that came to mind, none of them worked. Even tried to give a symlink to the directory, ans use that, but it did not work, either. I probably will just live with the fact that conky will not show this partition to me.
One thing you should try with your samba share is mounting it manually with the samba command line tools to a directory you create in a less strange place than "/run/usr" like "/media/".
I have no idea what the commands to do that are since I don't use samba.
I use NFS instead since I don't need Windows compatibility on my network drives.
Thank you, I will check later if this works.
Offline
Different ways to display calendars in conky (v1.9) using ncal (cal)
The code:
TEXT
TIME FORMATS:
Set by "locale" = %X:
${alignc}${color0}${time %X}${color}
force 24 HR = %T:
${alignc}${color0}${time %T}${color}
force 12 HR AM/PM = %r:
${alignc}${color0}${time %r}${color}
${alignc}CALENDAR (Options)
${alignc}NO HARDLINE CODING
${alignc}Good for both Sun and Mon
${alignc}${color0}${time %X}
${goto 37}${color1}${execpi 7200 LAR=`date +%-d`; ncal -bh | sed 's/\<'$LAR'\>/${color0}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 37}/g'}${color}
${alignc}TIME + HARDLINE CODING
${alignc}Week starts: Sunday
${alignc}${color0}${time %X}
${alignc}${color}SU MO ${color0}${time %b %Y}${color} FR SA
${alignc}Week starts: Monday
${alignc}${color0}${time %X}
${alignc}${color}MO TU ${color0}${time %b %Y}${color} SA SU
${alignc}Week starts: Monday (long)
${alignc}${color0}${time %X}
${alignc}${time %B %Y}${color}
${goto 37}${if_match ${time %w}==0}${color0}MO${color} TU WE TH FR SA SU${else}\
${if_match ${time %w}==1}MO ${color0}TU${color} WE TH FR SA SU${else}\
${if_match ${time %w}==2}MO TU ${color0}WE${color} TH FR SA SU${else}\
${if_match ${time %w}==3}MO TU WE ${color0}TH${color} FR SA SU${else}\
${if_match ${time %w}==4}MO TU WE TH ${color0}FR${color0} SA SU${else}\
${if_match ${time %w}==5}MO TU WE TH FR ${color0}SA${color} SU${else}\
MO TU WE TH FR SA ${color0}SU${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}Week starts: Sunday (short)
${alignc}${color0}${time %X}
${alignc}${time %b %Y}${color}
${goto 37}${if_match ${time %w}==0}${color0}SU${color} MO TU WE TH FR SA${else}\
${if_match ${time %w}==1}SU ${color0}MO${color} TU WE TH FR SA${else}\
${if_match ${time %w}==2}SU MO ${color0}TU${color} WE TH FR SA${else}\
${if_match ${time %w}==3}SU MO TU ${color0}WE${color} TH FR SA${else}\
${if_match ${time %w}==4}SU MO TU WE ${color0}TH${color0} FR SA${else}\
${if_match ${time %w}==5}SU MO TU WE TH ${color0}FR${color} SA${else}\
SU MO TU WE TH FR ${color0}SA${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}With This Calendar Line
${goto 37}${color1}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 37}/g'}${color}
${alignc}HARDLINE CODING
${alignc}With This Calendar Line:
${alignc}(NOTE: my locale is Sun)
${alignc}${color0}${time %X}
${alignc}${color}SU MO ${color0}${time %b %Y}${color} FR SA${color}
${goto 37}${color1}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color0}&${color1}/' | sed ':a;N;$!ba;s/\n/\n${goto 37}/g'}${color}
${color}${alignc}S Y S T E M I N F O
continue here
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Finally, I'm not so ashamed of my work and I would like to present... My still not finished but OKAY Conky!
Firstly, my main goal from the beginning was to try to put everything important to me in a single line, that way I could run apps maxed (without window decoration) and keep me informed. Many things have been added and removed multiple times...
I also tried adding videogame elements (like hearts in place of a plain battery bar), but I wasn't satisfied with the vague info they provided and, well, this was the result I achieved so far:
http://i.imgur.com/PVfww32l.png
From left to right:
Fancy icon (that changes if day or night) followed by a random game phrase using fortune >> /tmp/fortune OR DeaDBeeF output if running (also with icons if playing something or not);
Shortened battery watts value;
Battery discharge/charge time using ibam (yellow when charging, gray when discharging, blinking red when too low and green when fully charged);
CPU and RAM usage (with colors variations from yellow to red if high);
Workspace indicator with Space Invaders;
CPU and HDD temperature (actually FAKE since I'm using a VM);
Local IP, download speed and upload speed if using eth0. Signal strength is shown in the local IP place if using wlan0. Nothing displayed if not connected;
Volume bar with color and icon variant if mute;
The last line contains notifications on whether the battery is too low or fully charged. Also, if the battery is too low the Metal Gear Solid alert sound is played and- When full, the Sonic (when getting a ring) sound.
Below a fancy and lazy gif with some of the variations mentioned...
http://i.imgur.com/ckpH6LV.gif
Necessary stuff (I guess):
Apps: fortune and ibam;
Fonts (most can be found on dafont.com): BM Stamp, Pixel Invaders, PF Tempesta Five Condensed, Visitor TT2 BRK and Starbound JP Misaki;
Cool sounds.
Conky:
# ----- Position ----------------------- # alignment top_middle gap_x 0 gap_y 0 use_spacer left minimum_size 1366 17 maximum_width 1366 # ----- Text --------------------------- # use_xft yes font PF Tempesta Five Condensed-6 xftalpha 1 uppercase no short_units no # ----- Optimization ------------------- # double_buffer yes update_interval 1 update_interval_on_battery 2 text_buffer_size 1024 # ----- Misc --------------------------- # own_window yes own_window_type override own_window_class conky own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager default_bar_size 50 4 default_graph_size 30 7 draw_graph_borders no draw_borders no border_width 1 draw_outline no draw_shades no # ----- Colors ------------------------- # default_color 121212 default_outline_color 202020 default_shade_color 101010 own_window_colour 151515 own_window_transparent yes # ----- Palette ------------------------ # color0 EEE # Cinza color1 505050 # Carbono color2 FFDB4D # Amarelo color3 FF3333 # Vermelho color4 6699FF # Azul color5 F073BF # Rosa color6 A6E22E # Verde color7 7F1E31 # Vinho color8 BFBFBF # Cinza 2 color9 1F1F20 # Carbono 2 # ----- Templates ---------------------- # template0 ${voffset 1}${font BM Stamp-6.7}Z${voffset -1}${goto 22}${font Starbound JP Misaki-6}${tail /tmp/fortune 1} template1 ${execi 10 ibam | grep "Battery time left:" | awk '{print $4}' | head -c4} template2 ${execi 10 ibam | grep "Charge time left:" | awk '{print $4}' | head -c4} TEXT ${image $HOME/.conky/1373.png -p -1,0}\ ${goto 8}${voffset 2}${color0}${if_running deadbeef-gtkui}${execpi 2 ~/.conky/nowplaying.sh}${else}${if_match ${time %H} >= 19}${template0}${else}${if_match ${time %H%M} <= 459}${template0}${else}${voffset 1}${font BM Stamp-6.7}Y${font Starbound JP Misaki-6}${voffset -1} ${tail /tmp/fortune 1}${endif}${endif}${endif}\ ${goto 325}${voffset -4}${font Visitor TT2 BRK-14.7}${execi 10 cat /sys/class/power_supply/BAT0/energy_now | rev | cut -c 6-8 | rev}\ ${goto 360}${voffset -1}${font Starbound JP Misaki-6}${if_existing /sys/class/power_supply/AC/online 0}${if_match ${battery_percent BAT0} <= 19}${color3}${blink ${execi 10 ibam | grep "Battery time left:" | awk '{print $4}' | head -c4}}${color0}${endif}${endif}${if_existing /sys/class/power_supply/AC/online 0}${if_match ${battery_percent BAT0} >= 20}${if_match ${battery_percent BAT0} <= 100}${template1}${endif}${endif}${endif}${if_existing /sys/class/power_supply/AC/online 1}${if_match ${battery_percent BAT0} <= 99}${color2}${template2}${endif}${endif}${if_existing /sys/class/power_supply/AC/online 1}${if_match ${battery_percent BAT0} == 100}${color6}${blink MAX}${color0}${endif}${endif}\ ${goto 521}${voffset -3}${color1}${font}CPU:${color0} ${if_match ${cpu cpu} >= 50}${color2}${endif}${if_match ${cpu cpu} >= 80}${color3}${endif}${cpu cpu}%\ ${goto 566}${color1}${font}RAM:${color0}${if_match ${memperc} >= 50}${color2}${endif}${if_match ${memperc} >= 80}${color3}${endif}${mem}\ ${goto 660}${voffset -1}${font Pixel Invaders-12}${color8}${if_match ${desktop} == 1}${color5}${endif}A ${color8}${if_match ${desktop} == 2}${color5}${endif}B ${color8}${if_match ${desktop} == 3}${color5}${endif}a ${color8}${if_match ${desktop} == 4}${color5}${endif}F\ ${goto 761}${voffset -1}${font}${color1}CPU:${color0} 31°C\ ${goto 810}${color1}HDD:${color0} 32°C\ ${if_existing /sys/class/net/eth0/operstate up}\ ${goto 970}${color1}IP:${color0} ${texeci 6000 wget -q -O - canihazip.com/s}\ ${goto 1042}${color1}DL:${color0} ${downspeed eth0}\ ${goto 1097}${color1}UP:${color0} ${upspeed eth0}${endif}\ ${if_existing /sys/class/net/wlan0/operstate up}\ ${goto 975}${color1}LV:${color0} ${wireless_link_qual_perc wlan0}%\ ${goto 1037}${color1}DL:${color0} ${downspeed wlan0}\ ${goto 1094}${color1}UP:${color0} ${upspeed wlan0}${endif}\ ${goto 1300}${voffset 1}${font BM Stamp-6.7}${if_match ${exec ~/.conky/mute.sh} == 1}${color1}x${else}T${endif}${font}${voffset -1} ${execbar amixer get Master | grep "Front Left:" | awk '{print $5}' | tr -d '[]%'} ${if_existing /sys/class/power_supply/AC/online 0}${if_match ${battery_percent BAT0} <= 19}${execi 180 notify-send -u critical "Bateria" "Nível abaixo de 20%!" && play -q ~/.conky/MGS_ALERT.wav}${endif}${endif}${if_existing /sys/class/power_supply/AC/online 1}${if_match ${battery_percent BAT0} == 100}${execi 3600 notify-send -u normal "Bateria" "Bateria completamente carregada." && play -q ~/.conky/SONIC_RING.wav}${endif}${endif}
Scripts:
nowplaying.sh
#!/bin/bash # Display DeaDBeeF track info + play icon, if not playing anything a different message + icon is displayed. # NOTE: Musics with "#" will have part of the output treated as comment by Conky. Dunno if there's a easy fix, probably not. | UPDATE: Fixed with sed, LOL. PLAY_ICON='${voffset 1}${font BM Stamp-6.7}J${font Starbound JP Misaki-6}${voffset -1} ' STOP_ICON='${voffset 1}${font BM Stamp-6.7}F${font Starbound JP Misaki-6}${voffset -1} ' if [[ $(echo $(deadbeef --nowplaying "%t")) == "nothing" ]] ; then echo -n "$STOP_ICON";echo "Parado" else if [ $(echo -n $(deadbeef --nowplaying "%t - %a") | wc -c) -ge 50 ] ; then echo -n "$PLAY_ICON";echo $(deadbeef --nowplaying "%t" | cut -c 1-50 | sed -r 's/[#]+/\\#/g') else echo -n "$PLAY_ICON";echo $(deadbeef --nowplaying "%t / %a" | sed -r 's/[#]+/\\#/g') fi fi
mute.sh
#!/bin/bash MUTE=`amixer get Master | grep "Front Left:" | awk '{print $7}'` if [ $MUTE == "[on]" ] ; then echo 0 else echo 1 fi
TODO (or procrastinating):
Optimize the code (cuz it's messy as hell);
Use less fonts;
Draw a beautiful and high-tech bar;
Use less fonts;
Rethink the nowplaying.sh;
And lastly but not least, use less fonts.
Hi ! I'm a little late for this answer but... :8 When I was configuring a conky I realized that I had a "lua script" to display deadbeef music status Didier-T is the author of this lua script (french ubuntu forum)
example to set it in conky:
lua_load /your/path_to/.conky/conky21/db/DBC.lua
${voffset 3}${color4}${lua DBMaj}${if_match "${lua Titre}"!="N/A"}${color f2d873}${font }${lua Titre} ${color White}${lua Artiste} ${lua Annee} ${color OrangeRed2}${font }${lua Ecoule}${offset 2}/${offset 2}${lua Duree} ${else}Top cpu 1 :${top name 1} ${top cpu 1}% ${top pid 1}${color } ${goto 330}${color9}Top ram 1 :${top_mem name 1} ${top_mem mem 1}% ${top_mem pid 1}${color }${endif}
DBC.lua:
-- Créé par Didier-T (forum.ubuntu-fr.org)
-- Version 1.0
require "os"
require "io"
local pat="%é%è%à%ä%â%ê%ô%ç%É%È%À%Â%Ä%Ê%Ô%Ç"
local Artiste, Titre, Album, Duree, DureeM, DureeS, Piste, Annee, Ecoule, EcouleM, EcouleS, TitreHold
function conky_DBMaj()
local s = "${exec deadbeef --nowplaying \"%e;%t\"}"
s = conky_parse( s )
EcouleM, EcouleS, Titre = s:match("(%d*):(%d*);([%a%d%p%s"..pat.."]*)")
if EcouleS ~= nil then
Ecoule = (EcouleM*60)+EcouleS
if Titre ~= TitreHold then
s = "${exec deadbeef --nowplaying \"%a;%b;%l;%n;%y\"}"
s = conky_parse( s )
Artiste, Album, DureeM, DureeS, Piste, Annee=s:match("([%a%d%p%s"..pat.."]*);([%a%d%p%s"..pat.."]*);(%d*):(%d*);(%d*);(%d*)")
Duree = (DureeM*60)+DureeS
--os.execute("~/.conky/conky21/db/db-cover2.sh")
end
TitreHold=Titre
else
Artiste="N/A"
Titre="N/A"
Album="N/A"
Duree=0
DureeM=0
DureeS=0
Piste=0
Annee=0
Ecoule=0
EcouleM=0
EcouleS=0
TitreHold=Titre
end
return ""
end
function conky_Artiste()
return Artiste
end
function conky_Titre()
return Titre
end
function conky_Album()
return Album
end
function conky_DureeSeconde()
return Duree
end
function conky_Duree()
return DureeM..":"..DureeS
end
function conky_Piste()
return Piste
end
function conky_Annee()
return Annee
end
function conky_EcouleSeconde()
return Ecoule
end
function conky_Ecoule()
return EcouleM..":"..EcouleS
end
Offline
@ragamatrix
Many thankz, dude! Recently I found a script on the internet by accident that seemed to solve my "problem".
(Link: https://github.com/Cloudef/dotFiles/blo … /db.conky)
But in the end this script was doing the same thing (calling DeaDBeeF multiple times per second ).
I'm going to study this one!
I definitely need to learn Lua. 8.(
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat