The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
4

Custom order of workspaces

asked 2014-04-01 09:48:32 +0000

simendsjo gravatar image

Hi. I'm using the programmer dvorak keyboard layout. This means my numbers are "7531902468". This doesn't fit well with the current workspace layout scheme in i3bar as they're ordered 1-10. Is there a way to change the ordering of the workspaces in i3bar?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
7

answered 2014-12-17 13:09:06 +0000

Tahtisilma gravatar image

updated 2015-04-09 06:18:54 +0000

I know this is old question, but I had the same problem which I solved today. From some time (not sure from when), it is possible to hide number in the workspace name (if you use i3bar). Here is the relevant configuration parts that set up reordering of workspaces for me in dvorak programmers style:

To hide number from workspace name:

bar {
    ...
    strip_workspace_numbers yes
    ...
}

Then naming and assigning keys:

# assign workspaces to screens
workspace "1:$"  output HDMI3
workspace "2:&"  output HDMI3
workspace "3:7"  output HDMI3
workspace "4:5"  output HDMI3
workspace "5:3"  output HDMI3
workspace "6:1"  output HDMI3
workspace "7:9"  output HDMI3
workspace "8:0"  output HDMI3
workspace "9:2"  output HDMI3
workspace "10:4" output HDMI3
workspace "11:6" output HDMI3
workspace "12:8" output HDMI3
workspace "13:#" output HDMI3

# switch to workspace
bindcode $myModC+$dollarC workspace "1:$"
bindcode $myModC+$ampC    workspace "2:&"
bindcode $myModC+$sevenC  workspace "3:7"
bindcode $myModC+$fiveC   workspace "4:5"
bindcode $myModC+$threeC  workspace "5:3"
bindcode $myModC+$oneC    workspace "6:1"
bindcode $myModC+$nineC   workspace "7:9"
bindcode $myModC+$zeroC   workspace "8:0"
bindcode $myModC+$twoC    workspace "9:2"
bindcode $myModC+$fourC   workspace "10:4"
bindcode $myModC+$sixC    workspace "11:6"
bindcode $myModC+$eightC  workspace "12:8"
bindcode $myModC+$hashC   workspace "13:#"

# move focused container to workspace
bindcode $myModC+Shift+$dollarC move workspace "1:$"
bindcode $myModC+Shift+$ampC    move workspace "2:&"
bindcode $myModC+Shift+$sevenC  move workspace "3:7"
bindcode $myModC+Shift+$fiveC   move workspace "4:5"
bindcode $myModC+Shift+$threeC  move workspace "5:3"
bindcode $myModC+Shift+$oneC    move workspace "6:1"
bindcode $myModC+Shift+$nineC   move workspace "7:9"
bindcode $myModC+Shift+$zeroC   move workspace "8:0"
bindcode $myModC+Shift+$twoC    move workspace "9:2"
bindcode $myModC+Shift+$fourC   move workspace "10:4"
bindcode $myModC+Shift+$sixC    move workspace "11:6"
bindcode $myModC+Shift+$eightC  move workspace "12:8"
bindcode $myModC+Shift+$hashC   move workspace "13:#"

And finally definition of keys:

set $myModC Mod4
set $dollarC 49
set $ampC 10
set $sevenC 11
set $fiveC 12
set $threeC 13
set $oneC 14
set $nineC 15
set $zeroC 16
set $twoC 17
set $fourC 18
set $sixC 19
set $eightC 20
set $hashC 21
edit flag offensive delete link more
0

answered 2014-04-17 12:39:58 +0000

Michael gravatar image

No, you cannot change the order, and it is unlikely to come.

I didn’t even know that programmer dvorak changed the order of the numbers, I think no other keyboard layout does that :). I’d recommend to write a patch for i3bar to use a custom sort order that corresponds with your numbers.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-04-01 09:48:32 +0000

Seen: 940 times

Last updated: Apr 09