Giter Club home page Giter Club logo

Comments (10)

vivien avatar vivien commented on August 14, 2024

Hi @xelite,

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

from i3blocks.

xelite avatar xelite commented on August 14, 2024

$ 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: ""
....

from i3blocks.

vivien avatar vivien commented on August 14, 2024

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?

from i3blocks.

xelite avatar xelite commented on August 14, 2024

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?

from i3blocks.

xelite avatar xelite commented on August 14, 2024

After move old binary and restart wm i3blocks looks property.

from i3blocks.

vivien avatar vivien commented on August 14, 2024

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.

from i3blocks.

xelite avatar xelite commented on August 14, 2024

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

from i3blocks.

vivien avatar vivien commented on August 14, 2024

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!

from i3blocks.

vivien avatar vivien commented on August 14, 2024

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

from i3blocks.

xelite avatar xelite commented on August 14, 2024

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.

from i3blocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.