diff --git a/README.md b/README.md index 97ae35f..f71f168 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,10 @@ backlight none, searches in /sys/class/backlight, intel and ati/amd supported ``` # Install -- If you already have a folder `~/.config/i3blocks` move it somewhere else: -`mv ~/.config/i3blocks{,.bak}` -- Clone this repo to `~/.config/i3blocks`: -`git clone https://will.kein.hk/git/koksnuss/simple-i3blocks.git ~/.config/i3blocks` -- Make sure you've added `bar { status_command i3blocks }` in `~/config/i3/config`: +- Backup: `mv ~/.config/i3blocks{,.bak}` +- Clone: `git clone https://will.kein.hk/git/koksnuss/simple-i3blocks.git ~/.config/i3blocks` - Adjust `~/.config/i3blocks/config` to control i3 status bar output (see [Usage](#usage)). +- Make sure you've added `bar { status_command i3blocks }` in your i3-config file (i.e. `~/config/i3/config`). - Finally reload your `i3` window manager. The default shortcut is `mod + SHIFT + r`, you should see a flickering. # Usage diff --git a/config b/config index a43cfcd..e20a5bc 100644 --- a/config +++ b/config @@ -7,15 +7,18 @@ interval=5 [backlight] # label=backlight -label= +label=☼ +# label=☀,☼,✱,✲,✳,✴,✵,✺ [storage] # label=storage -label= +label=⛁ +# label=⛀,⛁,⛂,⛃ # if you want to display ram and swap seperately, you can assign another [ram] module # with instance=ram or instance=swap [ram] +label=⚟ # label=ram # instance=ram # [ram] @@ -24,11 +27,12 @@ label= # separator_block_width=0 [cpu] +label=☷ # label=cpu [ip] # label=ip -label= +label=⎋ interval=once # if you have more than one batteries attached to your device and ou like @@ -37,16 +41,28 @@ interval=once [battery] # label=battery # label=⚡ +# ▁▂▃▄▅▆▇█ +# █ +# ▉ +# ▊ +# ▋ +# ▌ +# ▍⎋ +# ▎⌨ +# ▏⟠, ⟰, ⟱, ⟲, ⟳, ⤋, ⤊, # [battery] # instance=1 # separator_block_width=0 [audio] # label=audio -label=♪ +label=◍ +# label=♩,♪,♫,♬ separator_block_width=0 [audio] # label=mic +label=◎ +#label=⋓ℹ⋒ⅈ instance=mic [datetime] diff --git a/modules/battery b/modules/battery index cd16503..77e9e77 100755 --- a/modules/battery +++ b/modules/battery @@ -26,7 +26,7 @@ cat $BATS | gawk -F '=' ' if (status == "") { status = $2 if (status == "Discharging") { - status = "↓" + status = "" } else if (status == "Charging") { status = "⚡" } else { diff --git a/modules/datetime b/modules/datetime index 507d045..123f62c 100755 --- a/modules/datetime +++ b/modules/datetime @@ -1,13 +1,17 @@ #!/bin/bash -FULL=$(date '+%A, %_d.%_m. %_H:%M:%S') -SHORT=$(date '+%_H:%M') -a=$I3_LONG_DATETIME/1 +FULL=$(date '+%A %-d.%-m.%Y W%V, %-H:%M:%S') +SHORT=$(date '+%-H:%M') + [[ "$BLOCK_INSTANCE" == "short" ]] && export I3_LONG_DATETIME=false -a+=$I3_LONG_DATETIME/2 -[[ "$BLOCK_BUTTON" == "1" && $I3_LONG_DATETIME == "true" ]] && echo a; export I3_LONG_DATETIME=false; -a+=$I3_LONG_DATETIME/3 -[[ "$BLOCK_BUTTON" == "1" && $I3_LONG_DATETIME == "false" ]] && echo b; export I3_LONG_DATETIME=true; -a+=$I3_LONG_DATETIME/4 -echo $a + +if [[ "$BLOCK_BUTTON" == "1" ]]; then + if [[ "$I3_LONG_DATETIME" == "true" ]]; then + export I3_LONG_DATETIME=false + else + export I3_LONG_DATETIME=true + fi +fi + [[ "$I3_LONG_DATETIME" == "true" ]] && echo $FULL || echo $SHORT +echo $SHORT