├── mba-screen-remove ├── mba-fix-tilde ├── mba-screen-add ├── i3-select-workspace ├── i3-move-workspace ├── mba-fix-mouse ├── README.md └── i3-rename-workspace /mba-screen-remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | xrandr --output DP1 --off 4 | -------------------------------------------------------------------------------- /mba-fix-tilde: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | xmodmap -e "keycode 94 = grave asciitilde" 4 | -------------------------------------------------------------------------------- /mba-screen-add: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | xrandr --output DP1 --mode 1920x1080 --right-of eDP1 4 | -------------------------------------------------------------------------------- /i3-select-workspace: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SUCCESS=$(i3-msg "workspace number $1") 3 | if echo "$SUCCESS" | grep -q "false" 4 | then 5 | i3-msg "workspace $1" 6 | fi 7 | -------------------------------------------------------------------------------- /i3-move-workspace: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SUCCESS=$(i3-msg "move workspace number $1") 3 | if echo "$SUCCESS" | grep -q "false" 4 | then 5 | i3-msg "move workspace $1" 6 | fi 7 | -------------------------------------------------------------------------------- /mba-fix-mouse: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | xinput --set-prop "Apple Magic Mouse" "Device Accel Constant Deceleration" 2.5 4 | xinput --set-prop "Apple Magic Mouse" "Device Accel Velocity Scaling" 1 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | i3-wm-scripts 2 | ============= 3 | 4 | Various scripts for the i3 window manager to allow for renaming workspaces. See my [i3 config](https://github.com/jeroenjanssens/dotfiles/blob/master/home/.i3/config) for how to set this up. 5 | -------------------------------------------------------------------------------- /i3-rename-workspace: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OLD=$(i3-msg -t 'get_workspaces' | sed -e 's/{"num/\n{"num/g' | grep \"focused\":true | sed -e 's/,"/\n/g' | grep name | cut -d\" -f 3) 3 | NEW=$(zenity --text="Enter new name:" --entry --title="Rename workspace $OLD" --entry-text="$OLD") 4 | echo "rename workspace \"$OLD\" to \"$NEW\"" 5 | i3-msg "rename workspace \"$OLD\" to \"$NEW\"" 6 | --------------------------------------------------------------------------------