[lemonbar] All about that bar !
[lemonbar] All about that bar !
Yes, this a lemonbar hacking thread !
Share your or other people's lemonbar scripts or a interesting fork !
Also, Please post a preview of the result of your awesome lemonbar script !
Share your or other people's lemonbar scripts or a interesting fork !
Also, Please post a preview of the result of your awesome lemonbar script !
Last edited by stark on Tue May 26, 2015 7:20 am, edited 1 time in total.
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: [lemonbar] All about that bar !
xft-fork of lemonbar: https://github.com/neeasade/bar
herbstluftwm lemonbar panel:
herbstluftwm lemonbar panel:
Code: Select all
#!/bin/bash
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
monitor=${1:-0}
geometry=( $(herbstclient monitor_rect "$monitor") )
if [ -z "$geometry" ] ;then
echo "Invalid monitor $monitor"
exit 1
fi
# geometry has the format W H X Y
x=${geometry[0]}
y=${geometry[1]}
panel_width=${geometry[2]}
panel_height=12
font='GohuFont-7,-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1'
#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
bgcolor=$(hc get frame_border_normal_color)
selbg=$(hc get window_border_active_color)
selfg='#c3c3c3'
separator="%{B-}%{F$selfg}|"
tags_update() {
IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
bordercolor="#3d5a72"
separator="%{B-}%{F$selbg}|"
# draw tags
for i in "${tags[@]}" ; do
case ${i:0:1} in
'#')
echo -n "%{B$selbg}%{F$selfg}"
;;
'+')
echo -n "%{B#9CA668}%{F#141414}"
;;
':')
echo -n "%{B-}%{F#ffffff}"
;;
'!')
echo -n "%{B#FF0675}%{F#141414}"
;;
*)
echo -n "%{B-}%{F#ababab}"
;;
esac
# non-clickable tags because fuck you, mouse.
echo -n " ${i:1} "
done
#echo "$separator"
}
muz_update() {
moc_running=$(pidof "mocp" > /dev/null && echo 1)
if [ $moc_running -eq 1 ]; then
muz=$(mocp -Q %file | sed -e 's_/.*/__' -e 's/\.[^\.]*$//' -e 's/_/ /g') || muz="?"
else
muz=""
fi
}
vol_update() {
vol=$(amixer get Master | awk -F'[][]' '/Mono:/ {sub(/%/, ""); print $2; exit}')
}
wifi_interval=50
wifi_update() {
wifi=$(awk 'NR==3 {printf("%2.2d\n", ($3/70)*100)}' /proc/net/wireless)
}
times_interval=100
times_update() {
thedate=$(date -u +%d.%m.%y)
thetime=$(date -u +%H:%M)
}
#initialize
vol_update
muz_update
wifi_count=0; wifi_update
times_count=0; times_update
while true;
do
muz_update
vol_update
if [ $wifi_count -ge $wifi_interval ]; then wifi_update; wifi_count=0; fi
wifi_count=$((wifi_count+1))
if [ $times_count -ge $times_interval ]; then times_update; times_count=0; fi
times_count=$((times_count+1))
tags_update
vol_icon=$(echo -e "\uE0FD")
wifi_icon=$(echo -e "\uE048")
#wifi_icon=$(echo -e "\uE1AF")
right="%{r}%{F$selfg}$muz %{F$selbg}$vol_icon %{F$selfg}$vol% %{F$selbg}$wifi_icon %{F$selfg}$wifi% $separator %{F$selfg}$thedate %{F#ffffff}$thetime "
echo "$right"
done | lemonbar -g ${panel_width}x${panel_height} -f "$font" -B "$bgcolor" -F '#c36666'
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
- Dr_Chroot
- Alfalfa
- Posts: 1100
- Joined: Mon Jun 09, 2014 9:49 pm
- Location: among the sagebrush
- Contact:
Re: [lemonbar] All about that bar !
Mdoified version of dkeg's older Lemonbar ;)
Edit: Whoops! Forgot to add a scrot.
Code: Select all
#!/bin/bash
BLUE=#FF5D5971
BLACK=#FFCECECE
RED=#FF566FB4
GREEN=#FFA08BA0
YELLOW=#FF8a6d79
WHITE=#FFffffff
function statusbar {
bat() {
bat0=$(acpi|cut -d "," -f 2)
echo $bat0
}
clock() {
time=$(date "+%A %b %d %R")
echo $time
}
vol() {
vol="$(amixer get Master | sed -nr '$ s:.*\[(.+%)].*:\1:p')"
echo $vol
}
cur() {
cur=$(mpc current)
test -n "$cur" && echo $cur || echo "you ain't got nuthin' playin' "
}
echo "%{B$YELLOW}%{F$BLACK} %{B-}%{F-} %{F$BLACK}$(cur) %{B-}%{F-} %{r}% %{F$BLUE} %{B-}%{F-} %{F$BLACK}$(vol)% %{F$BLUE} %{B-}%{F-} %{F$BLACK}$(bat)% %{F$BLUE} %{B-}%{F-} %{F$BLACK}%$(clock) "
}
while true
do
echo "$(statusbar)"
sleep 0.5
done | lemonbar -g 700x25+275+20 -f "-artwiz-lime-medium-r-normal--10-110-75-75-m-50-iso8859-1" -f "-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1" -B "#FF191716" -F "#FFabacae" -p -d &
- Attachments
-
- 2015-05-28-162952_700x25_scrot.png (1.36 KiB) Viewed 25128 times
Last edited by Dr_Chroot on Thu May 28, 2015 5:31 pm, edited 1 time in total.
Fight internet censorship.
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
Re: [lemonbar] All about that bar !
Guys I forgot to add the preview tip as it makes it easier for the consumer ( lool ) to understand and make a choice :)
@rho That fork has a branch called slant which allows to set slanted separators which is cool Thanks for sharing !
@rho That fork has a branch called slant which allows to set slanted separators which is cool Thanks for sharing !
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: [lemonbar] All about that bar !
@stark: i tried looking for scrots of what the slant would do exactly, but without success. does it simply allow you to make shit italic or is it something different?
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
- Dr_Chroot
- Alfalfa
- Posts: 1100
- Joined: Mon Jun 09, 2014 9:49 pm
- Location: among the sagebrush
- Contact:
Re: [lemonbar] All about that bar !
A popup bar! I was just thinking about that this morning :D I didn't know that you could time it too; I was expecting just to toss something in my sxhkd config. Very nice :) So is the second script "popnotify"?
Fight internet censorship.
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
- Dr_Chroot
- Alfalfa
- Posts: 1100
- Joined: Mon Jun 09, 2014 9:49 pm
- Location: among the sagebrush
- Contact:
Re: [lemonbar] All about that bar !
^ Szép! Köszönöm.
Fight internet censorship.
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
Re: [lemonbar] All about that bar !
wonderful drew, thanks :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: [lemonbar] All about that bar !
Cleaning house. My bar config(s) are on my GH.
Work hard; Complain less
Re: [lemonbar] All about that bar !
I still see some herbstluftwm leftovers hanging around, or are you using it atm, Drew?
Someone told me that I am delusional, I almost fell off my unicorn.
Re: [lemonbar] All about that bar !
I do, I actually used it most of last week. Updated my config and everything. I was really digging it. But if I'm just on irc and putzing around, I really don't need anything more than a simple stacker.
Question: Why the image in my last post is only coming thru as an attachment?
Question: Why the image in my last post is only coming thru as an attachment?
Work hard; Complain less
Re: [lemonbar] All about that bar !
that's a good question. png? shouldn't matter, oder..?
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: [lemonbar] All about that bar !
I always use .PNG. I remember this happened before, don't remember the reason
Work hard; Complain less
Re: [lemonbar] All about that bar !
Took me longer than I actually anticipated, still a WIP .
Currently it's only useful for mpd users ...
Demo.mkv
Musicbar at Github
Currently it's only useful for mpd users ...
Demo.mkv
Musicbar at Github
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: [lemonbar] All about that bar !
that is pretty nice, nice and pretty :)
very future retro
very future retro
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: [lemonbar] All about that bar !
^^ very nice :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: [lemonbar] All about that bar !
Better late than never:dkeg wrote: Question: Why the image in my last post is only coming thru as an attachment?
because of the file or image size. if it's smaller than 100px (IIRC) in one dimension it is always an attachment. I can check the details if you want. If images are too big, they get resized, if they are too small, they will be attached. Something like that.
..gnutella..
Re: [lemonbar] All about that bar !
Almost a necro, but I will still consider as. No worries, you're probably right. Who even remembered this thread existed.
Work hard; Complain less
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国