Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with current version #44

Closed
xelite opened this issue Sep 23, 2014 · 10 comments
Closed

problem with current version #44

xelite opened this issue Sep 23, 2014 · 10 comments

Comments

@xelite
Copy link

xelite commented Sep 23, 2014

Current version doesn't read property my configs from arg -c (i have 2 configs for 2 monitors). When I back to 1.2-19-gb6d98be everything works with the same configuration.

@vivien
Copy link
Owner

vivien commented Sep 23, 2014

Hi @xelite,

If you make clean debug then ./i3blocks -c <your_config>, what do the first debug lines say?

@xelite
Copy link
Author

xelite commented Sep 23, 2014

$ i3blocks -c /home/xelite/.i3/.i3blocks-left-monitor.conf
DEBUG ini_load:198: try custom config /home/xelite/.i3/.i3blocks-left-monitor.conf
DEBUG parse_bar:149: parsing global properties
{
full_text: ""
....

@vivien
Copy link
Owner

vivien commented Sep 24, 2014

So it seems to use the correct file. I tried the following i3 conf:

bar {
  status_command ~/src/i3blocks/i3blocks -c /tmp/up.conf
  position top
}

bar {
  status_command ~/src/i3blocks/i3blocks -c /tmp/down.conf
  position bottom
}

And it works properly. What were you expecting exactly?

@xelite
Copy link
Author

xelite commented Sep 24, 2014

i3block is using good file but not show all sections from config. Look at screenshots below:

1 2-19-gb6d98be

1 2-54-ga178240

My config:

separator_block_width=15

# customowy separator – wymaga wstawienia bloku [separator]
#full_text=〉
#align=center
#color=#666666
#separator=false
#separator_block_width=7

[dunst]
command=/home/xelite/.i3/i3blocks-scripts/dunst
signal=12

#[clickme]
#command=echo button=$BLOCK_BUTTON x=$BLOCK_X y=$BLOCK_Y
#min_width=button=1 x=1366 y=768
#align=left

[volume]
command=~/.i3/i3blocks-scripts/volume
signal=10

[memory]
command=~/.i3/i3blocks-scripts/memory
separator=false
interval=30

#[swap]
#command=~/.i3/i3blocks-scripts/memory swap
#interval=30

[disk-home]
command=~/.i3/i3blocks-scripts/disk $HOME
interval=30

[wireless]
command=~/.i3/i3blocks-scripts/network wlan0 W
color=#00FF00
interval=10

[ethernet]
command=~/.i3/i3blocks-scripts/network eth0 E
color=#00FF00
interval=10

#[cpu]
#command=~/.i3/i3blocks-scripts/cpu_usage
#interval=10
#min_width=CPU: 99.99%
#separator=false

[temp]
command=echo "CPU $(sensors coretemp-isa-0000 | awk '/Physical/ { print $4 }')"
interval=10

[load]
command=~/.i3/i3blocks-scripts/load_average
interval=10

[battery]
command=~/.i3/i3blocks-scripts/battery BAT0
interval=30

[time]
command=date '+%Y-%m-%d %H:%M:%S'
interval=5

When I am using current version I don't have some sections and I don't have idea why?

@xelite
Copy link
Author

xelite commented Sep 24, 2014

After move old binary and restart wm i3blocks looks property.

@vivien
Copy link
Owner

vivien commented Sep 27, 2014

Looking at the screenshot and the config, the only missing block is dunst, but you may have no notification.

With the current version, stderr is caught and written to i3blocks debug output. Can you:

make clean debug
./i3blocks -c <your_config>

and look for stderr: output, for example:

DEBUG block_reap:224: [wireless] stderr:
{
cat: /sys/class/net/eth0/operstate: No such file or directory

}

The general debug output should give you a good clue about what's going on.

@xelite
Copy link
Author

xelite commented Sep 28, 2014

I also don't have volume block. Debug says (at every refresh):

DEBUG json_print_bar:138: [dunst] no text to display, skipping
DEBUG json_print_bar:138: [volume] no text to display, skipping

About dunst, you have right. If doesn't have notification, it will be show nothing. But volume's script have always output:

xelite@debian:/tmp/i3blocks$ ~/.i3/i3blocks-scripts/volume 
♪ 100%

My volume script:

CARD="${1:-0}"
MIXER="${2:-default}" # use pulse for pulseaudio, default is alsa

case $BLOCK_BUTTON in
    5) amixer -q sset Master 10%- ;; # scroll down
    4) amixer -q sset Master 10%+ ;; # scroll up
    1) amixer -q sset Master 0% ;;   # left button click
    3) amixer -q sset Master 100% ;; # right button click
esac

amixer -c $CARD -M -D $MIXER get Master |
    sed -n 's/^[^:]*: Playback [0-9]* \[\([0-9]*%\)\] .*/♪ \1/p' |
    head -n1

killall -USR2 i3blocks
exit

@vivien
Copy link
Owner

vivien commented Sep 28, 2014

ho ok. Since ede5851, if no interval is specified, the block won't be executed. This was introduced to easily make "buttons" (click-only commands). For a block such as the volume, you have to add interval=once. See https://github.com/vivien/i3blocks/blob/master/i3blocks.conf#L3

In the meantime, feel free to update the wiki with your script, the button switch case is nice!

@vivien
Copy link
Owner

vivien commented Sep 28, 2014

Also, since 6712002 I switched to real-time signals, so if you specify signal=12, you'll have to signal i3blocks with pkill -RTMIN+12 i3blocks. See http://vivien.github.io/i3blocks/#BLOCK

@xelite
Copy link
Author

xelite commented Sep 28, 2014

I corrected config and now everything works properly. Thanks a lot for support. I created pull request with updated volume's script. After merge I'll update wiki. Cheers.

@xelite xelite closed this as completed Sep 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants