apply continous middle click actions

This commit is contained in:
koksnuss 2018-08-08 21:34:21 +02:00
parent 2905efa5aa
commit 83d2abae92
3 changed files with 12 additions and 6 deletions

View File

@ -3,7 +3,7 @@
![demo1](https://will.kein.hk/git/koksnuss/simple-i3blocks/raw/master/demo-full-1.png) ![demo1](https://will.kein.hk/git/koksnuss/simple-i3blocks/raw/master/demo-full-1.png)
This is a simple collection of i3blocks-modules accompagnied by a config file with the aim to display only important information in favor of not spilling lots of numbers into the status bar. This is a simple collection of i3blocks-modules accompagnied by a config file with the aim to display only important information in favor of not spilling lots of numbers into the status bar.
# Usage # Usage
- module *datetime*: A left click will toggle long and short displays. The short version is displayed in the format `HH:MM`. The long version also shows the day of the week, weeknumber, date and seconds. - module *datetime*: A left click will toggle long and short displays. The short version is displayed in the format `HH:MM`. The long version also shows the day of the week, weeknumber, date and seconds.
@ -21,6 +21,7 @@ module dependency
audio amixer audio amixer
battery none, searches in /sys/class/power_supply/BAT... battery none, searches in /sys/class/power_supply/BAT...
cpu top, htop for click support cpu top, htop for click support
temp sensors
datetime date datetime date
ip curl ip curl
ram none, searches in /proc/meminfo, htop for click support ram none, searches in /proc/meminfo, htop for click support
@ -44,19 +45,22 @@ One-Liner: Open up a terminal and paste: `bash <(curl -s https://will.kein.hk/gi
- [x] datetime - [x] datetime
- [x] ram/swap - [x] ram/swap
- [x] cpu - [x] cpu
- [x] cpu temp
- [x] audio/mic - [x] audio/mic
- [x] storage - [x] storage
- [x] ip - [x] ip
- [x] battery - [x] battery
- [x] backlight - [x] backlight
- [ ] wifi/ethernet/bluetooth - [ ] wifi/ethernet/bluetooth
- [ ] external storage - [ ] external storage
- [ ] ethernet bandwith - [ ] ethernet bandwith
## Click interactions ## Click interactions
- [x] datetime: left: show weekday, date, weeknumber and seconds - [x] general: left: toggle long preview
- [x] audio/mic: left: toggle mute - [x] audio/mic: middle: open pavucontrol, right: toggle mute
- [x] ram/cpu: left: open `top` in a terminal - [x] ram/cpu/temp: middle: open htop
- [x] storage: middle: open ranger
- [x] ip: middle: open firefox
- [ ] external storage: mount it somewhere - [ ] external storage: mount it somewhere
## Signals ## Signals

View File

@ -4,6 +4,8 @@
[[ "$BLOCK_BUTTON" == 1 ]] && LONG=true [[ "$BLOCK_BUTTON" == 1 ]] && LONG=true
[[ "$BLOCK_BUTTON" == 2 ]] && pavucontrol &
[[ "$BLOCK_BUTTON" == 3 ]] && amixer set $DEV toggle &> /dev/null [[ "$BLOCK_BUTTON" == 3 ]] && amixer set $DEV toggle &> /dev/null
amixer get $DEV | gawk -v LONG="$LONG" ' amixer get $DEV | gawk -v LONG="$LONG" '

View File

@ -3,7 +3,7 @@
[[ "$BLOCK_BUTTON" == 1 ]] && LONG=true [[ "$BLOCK_BUTTON" == 1 ]] && LONG=true
[[ "$BLOCK_BUTTON" == 3 ]] && i3-sensible-terminal -e ranger [[ "$BLOCK_BUTTON" == 2 ]] && i3-sensible-terminal -e ranger
df | gawk -v LONG="$LONG" ' df | gawk -v LONG="$LONG" '
/\/$/ { /\/$/ {