GithubHelp home page GithubHelp logo

bytebutcher / i3-workspace-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 35 KB

Manage i3 workspaces

License: GNU General Public License v3.0

Shell 100.00%
bash i3 i3-wm workspace-management workspace-manager

i3-workspace-manager's Introduction

i3-workspace-manager

i3-workspace-manager is an interactive command line tool for managing i3 workspaces. With this tool, you can create new workspaces, rename existing ones, delete them, move windows between workspaces, and switch between workspaces. This tool uses rofi for user input, making it easy and convenient to use.

Usage

i3-workspace-manager [OPTION]

Options:
  create    Create a new workspace
  rename    Rename an existing workspace
  delete    Delete an existing workspace
  move      Move a selected window to a selected workspace
  switch    Switch to a selected workspace
  version   Show version number and quit
  help      Display this help message

Installation

This installation guide describes the steps to download and link the i3-workspace-manager tool from GitHub, so that it can be run from anywhere in the command line.

git clone https://github.com/bytebutcher/i3-workspace-manager.git
cd i3-workspace-manager
ln -s "$(pwd)/i3-workspace-manager" ~/.local/bin/i3-workspace-manager

Make sure that the ~/.local/bin directory is in your PATH. You can add the following line to your .bashrc or .zshrc:

export PATH="$HOME/.local/bin:$PATH"

Keybindings

Here are some suggested keybindings that you can use, but feel free to customize them to your preference.

  • Pressing Mod + F1 enters "workspace mode" where you can create, rename, or delete workspaces using the keys c, r, and d respectively. Pressing Enter or Escape exits this mode.
  • Pressing Mod + Tab opens a workspace switcher which allows you to switch to another workspace.
  • Pressing Mod + m allows you to move the current window to another workspace.

The following lines should be placed inside your i3 config file:

# manage workspaces
set $mode_workspace workspace:  (c) create, (r) rename, (d) delete 
mode "$mode_workspace" {
	bindsym --release c exec "i3-workspace-manager create", mode "default"	
	bindsym --release r exec "i3-workspace-manager rename", mode "default"
	bindsym --release d exec "i3-workspace-manager delete", mode "default"
    
	# back to normal: Enter or Escape
	bindsym Return mode "default"
	bindsym Escape mode "default"
}
bindsym $mod+F1 mode "$mode_workspace"
bindsym $mod+Tab exec "i3-workspace-manager switch"
bindsym $mod+m exec "i3-workspace-manager move"

Predefined Workspaces

i3-workspace-manager supports the use of predefined workspaces. This feature offers these predefined workspaces as options when moving, or switching.

To use predefined workspaces, simply add your workspace names to a file named workspaces.lst. This file should be located in the i3-workspace-manager directory. The tool will automatically read this file and incorporate these workspaces into its functionality.

Contributions

If you find any bugs or have any suggestions for improvements, please open an issue or submit a pull request.

License

i3-workspace-manager is licensed under the GPLv3 License. See LICENSE for more information.

i3-workspace-manager's People

Contributors

bytebutcher avatar

Stargazers

 avatar

Watchers

 avatar  avatar

i3-workspace-manager's Issues

Add case-insensitve fuzzy search to prompts

Currently, the selection prompt only performs a case-sensitive search, which can lead to suboptimal user experiences and make it challenging to quickly locate entries, especially when the user is unsure about the exact letter casing.

To address this issue, a case-insensitive fuzzy search should be implemented which makes it easier to find and select entries, even when the letter casing or spelling is not 100% correct.

When renaming do abort when no workspace was selected.

When executing "i3-workspace-manager rename" a list shows up where a workspace can be selected to be renamed. if no selection is made the script does not abort but shows a second dialog where the new name should be entered.

The correct procedure should be to abort when no workspace was selected.

Implement Predefined Workspaces Feature

Summary:
Introduce the functionality to use predefined workspaces in i3-workspace-manager.

Details:
The proposed feature will allow users to define a list of their commonly used workspaces in a file named workspaces.lst. This file should be placed in the i3-workspace-manager directory. The tool will then offer these predefined workspaces as options when moving, or switching.

Expected Benefits:
This enhancement aims to streamline the workspace management process, making it more efficient and user-friendly, especially for users who regularly work with a set of specific workspaces.

Implementation Considerations:

  • Ensure the tool can read the workspaces.lst file and correctly parse workspace names.
  • Update the move, and switch workspace functionalities to incorporate predefined workspace options.
  • Handle cases where the workspaces.lst file is missing, empty, or contains invalid entries.

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.