Skip to content

vivien/helpers-for-i3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Helpers for i3

Bench of handy scripts making your life easier within the i3 window manager.

Install

Simply clone this repository and add it to your PATH.

Scripts

i3-new-workspace

This helper script jumps to the next numbered workspace available on the current screen. For example, if workspaces 1, 2, and 4 are in use, calling this script will jump to the unused workspace 3 (equivalent to run workspace number 3). That way, you don’t need to look for the next workspace available.

Binding example for your i3 config:

bindsym $mod+n exec i3-new-workspace

i3-smart-resize

This script allows to resize a window depending on its position in the layout. For instance, the default i3 bindings in "resize" mode will bind the arrow up key to "shrink height" no matter where the window is, but it only makes sense when the window is at the top edge, much less so when it is in the bottom edge. With this script, pressing up will shrink window’s height when it is at the top, grow it when it is at the bottom; making the keys more natural.

Usage: i3-smart-resize <direction> [increment]

  • direction: "Left", "Right", "Up", or "Down", case insensitive

  • increment: string passed as is to the resize command, default to "10 px or 10ppt"

Binding example for your i3 config:

mode "resize" {
        bindsym Left exec i3-smart-resize "Left" "1 px or 1 ppt"
        bindsym Right exec i3-smart-resize "Right" "1 px or 1 ppt"
        bindsym Up exec i3-smart-resize "Up" "1 px or 1 ppt"
        bindsym Down exec i3-smart-resize "Down" "1 px or 1 ppt"

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

Copyright © 2016 Vivien Didelot <vivien@didelot.org>

These scripts are distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

About

Bench of handy scripts for the i3 window manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published