Code Monkey home page Code Monkey logo

helpers-for-i3's Introduction

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 <[email protected]>

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.