You are not logged in.
I got a question about my clickable area. Am i doing something wrong? Because at the moment, I have test2 as an executable script in my $PATH folder, and making a clickable area using that method on the github page like so:
Only gives me an stdout out the file name. test2 is simply a #!/bin/bash script that contains a one liner of "notify-send "hello" "
Can someone lend me a hand? (Also, I tried replacing the test2 line with the actual command of notify-send, and that still doesn't seem to help).
Offline
I got a question about my clickable area. Am i doing something wrong? Because at the moment, I have test2 as an executable script in my $PATH folder, and making a clickable area using that method on the github page like so:
http://i.imgur.com/sVMAnzJ.png
Only gives me an stdout out the file name. test2 is simply a #!/bin/bash script that contains a one liner of "notify-send "hello" "
Can someone lend me a hand? (Also, I tried replacing the test2 line with the actual command of notify-send, and that still doesn't seem to help).
https://bbs.archlinux.org/viewtopic.php … 5#p1398915
Last edited by Stebalien (2014-05-04 03:37:05)
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
Hi Stebalien,
Thanks for the reply. So now that I see that it goes to stdout on the console, that means I can pipe the word to, say, bash and then simply eval it?
Or does it have to go through panel_fifo first?
Offline
Hi Stebalien,
Thanks for the reply. So now that I see that it goes to stdout on the console, that means I can pipe the word to, say, bash and then simply eval it?
Or does it have to go through panel_fifo first?
bar doesn't even know about panel_fifo. It reads text to display from stdin and spits action text to stdout. So no, it doesn't have to go through panel_fifo. You can parse this action text any way you want but the simplest method is to just eval it (as long as you trust bar's input text).
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
Looking at the example you replied to me;
echo '%{A:scrot:}asdf%{A}' | bar -p | while read line; do eval "$line"; done
I have a similar function in my 'panel' file:
cat "$PANEL_FIFO" | panel_bar | bar -p -g 1394x14+22 -f "$FONT_FAMILY2","$FONT_FAMILY" -u 2 -F "$COLOR_BACKGROUND" -B "$COLOR_FOREGROUND" &
where the properties of my BAR gets defined. Do I have to pipe the clickable area and pipe it through there? Or is it okay to do it separately, say, in a function?
Offline
cat "$PANEL_FIFO" | panel_bar | bar -p -g 1394x14+22 -f "$FONT_FAMILY2","$FONT_FAMILY" -u 2 -F "$COLOR_BACKGROUND" -B "$COLOR_FOREGROUND" | ...... &
# (1) (2) (3) (4)
1. Read data in from $PANEL_FIFO.
2. Format data read from $PANEL_FIFO into a format suitable for display by bar.
3. Display this data in a status bar.
4. Read bar's output and handle any actions. You can write a separate action-handler script that reads from stdin or you can just put your action handler inline (as shown below). For example, if you have a "play" action and you want `mpc play` to be called when you click on this action, you could do the following:
(cat "$PANEL_FIFO" | panel_bar | bar -p -g 1394x14+22 -f "$FONT_FAMILY2","$FONT_FAMILY" -u 2 -F "$COLOR_BACKGROUND" -B "$COLOR_FOREGROUND" | while read action; do
case $action in
play) mpc play ;;
esac
done) &
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
cat "$PANEL_FIFO" | panel_bar | bar -p -g 1394x14+22 -f "$FONT_FAMILY2","$FONT_FAMILY" -u 2 -F "$COLOR_BACKGROUND" -B "$COLOR_FOREGROUND" | ...... & # (1) (2) (3) (4)
1. Read data in from $PANEL_FIFO.
2. Format data read from $PANEL_FIFO into a format suitable for display by bar.
3. Display this data in a status bar.
4. Read bar's output and handle any actions. You can write a separate action-handler script that reads from stdin or you can just put your action handler inline (as shown below). For example, if you have a "play" action and you want `mpc play` to be called when you click on this action, you could do the following:(cat "$PANEL_FIFO" | panel_bar | bar -p -g 1394x14+22 -f "$FONT_FAMILY2","$FONT_FAMILY" -u 2 -F "$COLOR_BACKGROUND" -B "$COLOR_FOREGROUND" | while read action; do case $action in play) mpc play ;; esac done) &
That worked beautifully, thanks so much Stebalien
Offline
Is it possible to have the xtitle stop right right before the Desktop numbers (as represented by the dots in my screenshot). I find that the way it creeps past it when I have a longer than usual title makes my BAR look, well, ugly:
Offline
Ploppz, can you please try this branch ? I've tested it for a couple of minutes and seemed to render all the colors perfectly now
3xOSC Just use cut on the window title string
Offline
I've got a question. I'm trying to use the following to start the bar:
/home/yves/bin/bar.sh | bar -g 1220x25+350+20 -p -B #00222222 -F #00626262 -f "-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*" &
Executing this code from a terminal will start the bar normaly, but never on the position it's supposed to be, and puting it on '.xinitrc' starts it on it's correct position but will freeze the system (can't see mouse, can't launch anything). I'm using openbox.
Offline
I've got a question. I'm trying to use the following to start the bar:
/home/yves/bin/bar.sh | bar -g 1220x25+350+20 -p -B #00222222 -F #00626262 -f "-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*" &
Executing this code from a terminal will start the bar normaly, but never on the position it's supposed to be, and puting it on '.xinitrc' starts it on it's correct position but will freeze the system (can't see mouse, can't launch anything). I'm using openbox.
Just figured it out. You have to put the color codes inside quotes, or else bash gets confused. I wasn't having the problem from the terminal because of zsh.
Offline
Maybe I am doing it wrongly, but bar doesn't seem to be able to find my ttf fonts? Here is what happens for Dejavu Sans Mono:
% echo "muh" | bar-aint-recursive -p -g x24 -f "Dejavu Sans Mono"
Could not load font DejavuSansMono
Any ideas what's up with that?
% pacman -Qqs dejavu
ttf-dejavu
EDIT: Just to add: this seems to be happening with pretty much every font I try.
Forgot that bar doesn't support xft fonts.
Last edited by Stalafin (2014-06-22 12:55:55)
Offline
Ploppz, can you please try this branch ? I've tested it for a couple of minutes and seemed to render all the colors perfectly now
Sorry, didn't see your post before now. Unfortunately, it still doesn't work:
The white square is where the "test" text would be if it wasn't for the background, which seemingly gets interpreted as full white colour (the foreground is white).
Anyway, it's not that crucial for me
Last edited by Ploppz (2014-07-10 22:08:44)
Offline
In case someone was wondering, there's some good support for smoothed fonts too
Offline
In case someone was wondering, there's some good support for smoothed fonts too
Thanks a lot! But… How do I set the font name and size? I tried the -f argument, but I don't know how to make it use something other than the default font.
Offline
Hey, TheLemonMan. Bar is great, I love it. However, I was wondering if there's any particular reason why you won't/can't add xft support? Thanks.
Offline
Hey, TheLemonMan. Bar is great, I love it. However, I was wondering if there's any particular reason why you won't/can't add xft support? Thanks.
…but he just did?
Offline
Oh. Derp Didn't read back. Thanks, @TheLemonMan!
Offline
Am I doing something wrong? Is my knowledge of fonts flawed? I'm trying to use "droid sans mono 14" as the font. Here's a scrot: http://i.imgur.com/4UoaTUT.png
Offline
I wrote a patch for bar that prints enter/leave mouse events, if anyone wants it.
My usecase for it is stored and described here, but I basically use it to switch from window title to buttons.
Maybe this is of use to someone.
Last edited by sie (2014-08-03 05:11:42)
a & ☭
Offline
Am I doing something wrong? Is my knowledge of fonts flawed? I'm trying to use "droid sans mono 14" as the font. Here's a scrot: http://i.imgur.com/4UoaTUT.png
As far as I'm aware, choosing font sizes with Xft doesn't work (yet).
Offline
Why is there a difference in bar height when there is a vertical offset?
No offset:
Offset:
Offline