vrde / i3-quiet

Distraction free i3 experience
MIT License
76 stars 3 forks source link

Support i3bar #2

Closed vrde closed 4 years ago

vrde commented 4 years ago

Problem

i3 default bar (i3bar) is not hidden when the user switches to quiet mode.

Solution

Seems like controlling i3bar is quite easy. The script quiet-toggle-bar.py should check wherever polybar or i3bar is installed, and send the right command.

BizzaroQ commented 4 years ago

And to take it a step further, this i3 IPC page shows how to address i3bar and change the dock type.

That is, If you don't want to go down the route I suggested on Reddit.

bindsym $mod+Shift+u mode "$quiet_mode"
// set command displays the keybindings on i3 bar for usability
set $quiet_mode (q)uiet, (Shift+q)uit, (h)ide bar, (Esc)ape

mode "$quiet_mode" {
       bindsym q exec $HOME/.config/i3/quiet-cmd.py
       bindsym Shift+q exec $HOME/config/i3/quiet-cmd.py toggle
       / polybar control
       //exec_always $HOME/.config/i3/quiet-toggle-bar.py
       / i3-bar toggle key
       // bindsym h bar mode toggle
       bindsym Return mode "default"
  }