vrde / i3-quiet

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

Enable quiet "mode" so multiple commands can be run #7

Closed vrde closed 4 years ago

vrde commented 4 years ago

Some users suggested to have a quiet-mode "mode" so multiple commands can be run.

@BizarroQ shared some ideas on a reddit comment. In issue #2 BizarroQ suggests to have something like this:

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"
  }

Other commands that can be added are for resizing the quiet window. I'm currently testing something like this:

mode "quiet" {    
        # These bindings trigger as soon as you enter the resize mode    
        bindsym s exec ~/.config/i3/quiet-cmd.py resize s
        bindsym m exec ~/.config/i3/quiet-cmd.py resize m
        bindsym l exec ~/.config/i3/quiet-cmd.py resize l
        bindsym e exec ~/.config/i3/quiet-cmd.py toggle

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Caps_Lock mode "default"
}    

bindsym $mod+Shift+q mode "quiet"
vrde commented 4 years ago

Fixed in https://github.com/vrde/i3-quiet/commit/28fa76afa4ed47698dabe65e0eddbad0f04e40de