i3wm: more than 10 workspaces with double modifier key?i3wm : start applications on specific workspaces when...

When calculating averages, why can we treat exploding die as if they're independent?

How should Thaumaturgy's "three times as loud as normal" be interpreted?

Is every sentence we write or utter either true or false?

The meaning of "offing" in "an agreement in the offing"

Who is the uncredited actor leading the squad in the Valerian movie?

Equilibrium points of bounce/instanton solution after Wick's rotation

Capacitors with same voltage, same capacitance, same temp, different diameter?

Does the 2019 UA artificer need to prepare the Lesser Restoration spell to cast it with their Alchemical Mastery feature?

Is mountain bike good for long distances?

What is this sticking out of my wall?

Can you mark a new target with the Hunter's Mark spell if the original target shifts to a different plane?

How there are 3 possible tautomers of 2,2,4-trimethylheptane-3,5-dione?

What is the difference between tl_to_str:V and tl_to_str:N?

Gap in tcolorbox after title

What happens when a file that is 100% paged in to the page cache gets modified by another process

Supervisor wants me to support a diploma-thesis software tool after I graduated

How to set any file manager in Linux to show the duration like the Length feature in Windows Explorer?

Problem with listing a directory to grep

How should we understand "unobscured by flying friends" in this context?

Walking on an infinite grid

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

How can Schrödinger's cat be both dead and alive?

When did computers stop checking memory on boot?

Lost & Found Mobile Telepone



i3wm: more than 10 workspaces with double modifier key?


i3wm : start applications on specific workspaces when i3 startsHow do I allocate a key shortcut to moving GNOME 3 workspaces up/down?Use only left alt as modifier in i3wm?i3wm: how to make multiple monitors switch workspaces in a single bindingHow to define a shortcut with more than one key (other than mod, ctrl and shift)i3wm: Start applications without class attribute on specific workspacesSuper key (A.K.A. Windows Key) not working in i3wm (Fedora 26)i3wm: How to move workspaces between monitors?i3wm: Switching to workspaces and moving container to (same) workspace map to different workspacesUsing Menu key as modifier in X






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







11















Recently, I started to use i3wm and fell in love with it. However, one thing bothers me: controlling more than 10 workspaces.



In my config $mod+1 to $mod+9 switches between the workspaces 1 to 9 (and $mod+0 for 10), but sometimes 10 workspaces just aren't enough.



At the moment I reach out to workspace 11 to 20 with $mod+mod1+1 to $mod+mod1+0, i.e. hitting mod+alt+number. Of course this works without any problems, but it is quite a hassle to switch workspaces like that, since the keys aren't hit easily. Additionally, moving applications between workspaces 11 to 20 requires to mod+shift+alt+number -> ugly.



In my Vim bindings (I have lots of plugins) I started to use double modifier shortcuts, like modkey + r for Plugin 1 and modkey + modkey + r for Plugin 2. This way I can bind every key twice and hitting the mod key twice is easy and fast.



Can I do something similar in i3wm?



How do you make use of more than 10 workspaces in i3wm? Any other solutions?










share|improve this question

























  • I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

    – airhuff
    Jan 18 '17 at 6:38











  • Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

    – daniel451
    Jan 18 '17 at 11:35




















11















Recently, I started to use i3wm and fell in love with it. However, one thing bothers me: controlling more than 10 workspaces.



In my config $mod+1 to $mod+9 switches between the workspaces 1 to 9 (and $mod+0 for 10), but sometimes 10 workspaces just aren't enough.



At the moment I reach out to workspace 11 to 20 with $mod+mod1+1 to $mod+mod1+0, i.e. hitting mod+alt+number. Of course this works without any problems, but it is quite a hassle to switch workspaces like that, since the keys aren't hit easily. Additionally, moving applications between workspaces 11 to 20 requires to mod+shift+alt+number -> ugly.



In my Vim bindings (I have lots of plugins) I started to use double modifier shortcuts, like modkey + r for Plugin 1 and modkey + modkey + r for Plugin 2. This way I can bind every key twice and hitting the mod key twice is easy and fast.



Can I do something similar in i3wm?



How do you make use of more than 10 workspaces in i3wm? Any other solutions?










share|improve this question

























  • I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

    – airhuff
    Jan 18 '17 at 6:38











  • Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

    – daniel451
    Jan 18 '17 at 11:35
















11












11








11


4






Recently, I started to use i3wm and fell in love with it. However, one thing bothers me: controlling more than 10 workspaces.



In my config $mod+1 to $mod+9 switches between the workspaces 1 to 9 (and $mod+0 for 10), but sometimes 10 workspaces just aren't enough.



At the moment I reach out to workspace 11 to 20 with $mod+mod1+1 to $mod+mod1+0, i.e. hitting mod+alt+number. Of course this works without any problems, but it is quite a hassle to switch workspaces like that, since the keys aren't hit easily. Additionally, moving applications between workspaces 11 to 20 requires to mod+shift+alt+number -> ugly.



In my Vim bindings (I have lots of plugins) I started to use double modifier shortcuts, like modkey + r for Plugin 1 and modkey + modkey + r for Plugin 2. This way I can bind every key twice and hitting the mod key twice is easy and fast.



Can I do something similar in i3wm?



How do you make use of more than 10 workspaces in i3wm? Any other solutions?










share|improve this question














Recently, I started to use i3wm and fell in love with it. However, one thing bothers me: controlling more than 10 workspaces.



In my config $mod+1 to $mod+9 switches between the workspaces 1 to 9 (and $mod+0 for 10), but sometimes 10 workspaces just aren't enough.



At the moment I reach out to workspace 11 to 20 with $mod+mod1+1 to $mod+mod1+0, i.e. hitting mod+alt+number. Of course this works without any problems, but it is quite a hassle to switch workspaces like that, since the keys aren't hit easily. Additionally, moving applications between workspaces 11 to 20 requires to mod+shift+alt+number -> ugly.



In my Vim bindings (I have lots of plugins) I started to use double modifier shortcuts, like modkey + r for Plugin 1 and modkey + modkey + r for Plugin 2. This way I can bind every key twice and hitting the mod key twice is easy and fast.



Can I do something similar in i3wm?



How do you make use of more than 10 workspaces in i3wm? Any other solutions?







linux arch-linux keyboard-shortcuts i3 workspaces






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 18 '17 at 3:46









daniel451daniel451

4453 gold badges8 silver badges22 bronze badges




4453 gold badges8 silver badges22 bronze badges
















  • I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

    – airhuff
    Jan 18 '17 at 6:38











  • Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

    – daniel451
    Jan 18 '17 at 11:35





















  • I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

    – airhuff
    Jan 18 '17 at 6:38











  • Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

    – daniel451
    Jan 18 '17 at 11:35



















I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

– airhuff
Jan 18 '17 at 6:38





I don't know what kind of keyboard layout you have, but could you use some/all of the keys below and to the right of the numbers across the top? i.e. $mod+q is workspace 11, etc. Of course you would have to reassign any of those keys that are in use.

– airhuff
Jan 18 '17 at 6:38













Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

– daniel451
Jan 18 '17 at 11:35







Yes, but this effectively reduces the number of shortcuts available for i3 actions. Preferably, I would like to have something like $mod + $mod + 1 for workspace 11, so that a fast double key press of the mod key directly enables me to go for workspace 11-20 with number key 1, 2, ...,9, 0. In Vim I have this behavior: leader + r is mapped to another action than leader + leader + r, thus I can trigger different actions with the same hotkey by just pressing the leader key once or twice.

– daniel451
Jan 18 '17 at 11:35












2 Answers
2






active

oldest

votes


















12
















i3 does not really support key sequences like vim. Any key binding consists of a single key preceded by an optional list of distinct (so no Shift+Shift) modifiers. And all of the modifiers need to be pressed down at the time the main key is pressed.



That being said, there are two main ways to have a lot of workspaces without having to bind them to long lists of modifiers:



1. Dynamically create and access workspaces with external programs



You can do not have to define a shortcut for every single workspace, you can just create them on the fly by sending a workspace NEW_WS to i3, for example with the i3-msg program:



i3-msg workspace NEW_WS
i3-msg move container to workspace NEW_WS


i3 also comes with the i3-input command, which opens a small input field then runs a command with the given input as parameter



i3-input -F 'workspace %s' -P 'go to workspace: '
i3-input -F 'move container to workspace %s' -P 'move to workspace: '


Bind these these two commands to shortcuts and you can access an arbitrary number of workspaces by just pressing the shortcut and then entering the name (or number) of the workspace you want. (If you only work with numbered workspaces, you might want to use workspace number %s instead of just workspace %s)



2. Statically bind workspaces to simple Shortcuts within key binding modes



Alternatively, for a more static approach, you could use modes in your i3 configuration. You could have separate modes for focusing and moving to workspaces:



set $mode_workspace "goto_ws"
mode $mode_workspace {
bindsym 1 workspace 1; mode "default"
bindsym 2 workspace 2; mode "default"
# […]
bindsym a workspace a; mode "default"
bindsym b workspace b; mode "default"
# […]
bindsym Escape mode "default"
}
bindsym $mod+w mode $mode_workspace

set $mode_move_to_workspace "moveto_ws"
mode $mode_move_to_workspace {
bindsym 1 move container to workspace 1; mode "default"
bindsym 2 move container to workspace 2; mode "default"
# […]
bindsym a move container to workspace a; mode "default"
bindsym b move container to workspace b; mode "default"
# […]
bindsym Escape mode "default"
}
bindsym $mod+shift+w mode $mode_move_to_workspace


Or you could have separate bindings for focusing and moving within a single mode:



set $mode_ws "workspaces"
mode $mode_ws {
bindsym 1 workspace 1; mode "default"
bindsym Shift+1 move container to workspace 1; mode "default"
bindsym 2 workspace 2; mode "default"
bindsym Shift+2 move container to workspace 2; mode "default"
# […]
bindsym a workspace a; mode "default"
bindsym Shift+a move container to workspace a; mode "default"
bindsym b workspace b; mode "default"
bindsym Shift+b move container to workspace b; mode "default"
# […]
bindsym Escape mode "default"
}
bindsym $mod+shift+w mode $mode_move_to_workspace


In both examples the workspace or move commands are chained with mode "default", so that i3 automatically returns back to the default key binding map after each command.






share|improve this answer



































    0
















    My solution to this is just using more keys:



    set $ws0 "0:`:www"
    set $ws1 "1:1"
    set $ws2 "2:2"
    set $ws3 "3:3:fm"
    set $ws4 "4:4"
    set $ws5 "5:5"
    set $ws6 "6:6:dev"
    set $ws7 "7:7"
    set $ws8 "8:8"
    set $ws9 "9:9"
    set $ws10 "10:0:music"
    set $ws11 "11:-:jd"
    set $ws12 "12:=:comm"
    set $ws13 "13:B"
    set $ws14 "14:H"
    set $ws15 "15:E"
    set $ws16 "16:I"
    set $ws17 "17:D:upwork"


    bindsym $mod+grave workspace $ws0
    bindsym $mod+1 workspace $ws1
    bindsym $mod+2 workspace $ws2
    bindsym $mod+3 workspace $ws3
    bindsym $mod+4 workspace $ws4
    bindsym $mod+5 workspace $ws5
    bindsym $mod+6 workspace $ws6
    bindsym $mod+7 workspace $ws7
    bindsym $mod+8 workspace $ws8
    bindsym $mod+9 workspace $ws9
    bindsym $mod+0 workspace $ws10
    bindsym $mod+minus workspace $ws11
    bindsym $mod+equal workspace $ws12
    bindsym $mod+BackSpace workspace $ws13
    bindsym $mod+Home workspace $ws14
    bindsym $mod+End workspace $ws15
    bindsym $mod+Insert workspace $ws16
    bindsym $mod+Delete workspace $ws17

    for_window [class="Upwork"] move container to workspace $ws17
    for_window [class="Spotify"] move container to workspace $ws10
    for_window [class="Brave-browser"] move container to workspace $ws0
    for_window [class="TelegramDesktop"] move container to workspace $ws12
    for_window [class="jetbrains-pycharm"] move container to workspace $ws6
    for_window [class="Caja"] move container to workspace $ws3
    for_window [class="JDownloader"] move container to workspace $ws11





    share|improve this answer








    New contributor



    Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });















      draft saved

      draft discarded
















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338228%2fi3wm-more-than-10-workspaces-with-double-modifier-key%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      12
















      i3 does not really support key sequences like vim. Any key binding consists of a single key preceded by an optional list of distinct (so no Shift+Shift) modifiers. And all of the modifiers need to be pressed down at the time the main key is pressed.



      That being said, there are two main ways to have a lot of workspaces without having to bind them to long lists of modifiers:



      1. Dynamically create and access workspaces with external programs



      You can do not have to define a shortcut for every single workspace, you can just create them on the fly by sending a workspace NEW_WS to i3, for example with the i3-msg program:



      i3-msg workspace NEW_WS
      i3-msg move container to workspace NEW_WS


      i3 also comes with the i3-input command, which opens a small input field then runs a command with the given input as parameter



      i3-input -F 'workspace %s' -P 'go to workspace: '
      i3-input -F 'move container to workspace %s' -P 'move to workspace: '


      Bind these these two commands to shortcuts and you can access an arbitrary number of workspaces by just pressing the shortcut and then entering the name (or number) of the workspace you want. (If you only work with numbered workspaces, you might want to use workspace number %s instead of just workspace %s)



      2. Statically bind workspaces to simple Shortcuts within key binding modes



      Alternatively, for a more static approach, you could use modes in your i3 configuration. You could have separate modes for focusing and moving to workspaces:



      set $mode_workspace "goto_ws"
      mode $mode_workspace {
      bindsym 1 workspace 1; mode "default"
      bindsym 2 workspace 2; mode "default"
      # […]
      bindsym a workspace a; mode "default"
      bindsym b workspace b; mode "default"
      # […]
      bindsym Escape mode "default"
      }
      bindsym $mod+w mode $mode_workspace

      set $mode_move_to_workspace "moveto_ws"
      mode $mode_move_to_workspace {
      bindsym 1 move container to workspace 1; mode "default"
      bindsym 2 move container to workspace 2; mode "default"
      # […]
      bindsym a move container to workspace a; mode "default"
      bindsym b move container to workspace b; mode "default"
      # […]
      bindsym Escape mode "default"
      }
      bindsym $mod+shift+w mode $mode_move_to_workspace


      Or you could have separate bindings for focusing and moving within a single mode:



      set $mode_ws "workspaces"
      mode $mode_ws {
      bindsym 1 workspace 1; mode "default"
      bindsym Shift+1 move container to workspace 1; mode "default"
      bindsym 2 workspace 2; mode "default"
      bindsym Shift+2 move container to workspace 2; mode "default"
      # […]
      bindsym a workspace a; mode "default"
      bindsym Shift+a move container to workspace a; mode "default"
      bindsym b workspace b; mode "default"
      bindsym Shift+b move container to workspace b; mode "default"
      # […]
      bindsym Escape mode "default"
      }
      bindsym $mod+shift+w mode $mode_move_to_workspace


      In both examples the workspace or move commands are chained with mode "default", so that i3 automatically returns back to the default key binding map after each command.






      share|improve this answer
































        12
















        i3 does not really support key sequences like vim. Any key binding consists of a single key preceded by an optional list of distinct (so no Shift+Shift) modifiers. And all of the modifiers need to be pressed down at the time the main key is pressed.



        That being said, there are two main ways to have a lot of workspaces without having to bind them to long lists of modifiers:



        1. Dynamically create and access workspaces with external programs



        You can do not have to define a shortcut for every single workspace, you can just create them on the fly by sending a workspace NEW_WS to i3, for example with the i3-msg program:



        i3-msg workspace NEW_WS
        i3-msg move container to workspace NEW_WS


        i3 also comes with the i3-input command, which opens a small input field then runs a command with the given input as parameter



        i3-input -F 'workspace %s' -P 'go to workspace: '
        i3-input -F 'move container to workspace %s' -P 'move to workspace: '


        Bind these these two commands to shortcuts and you can access an arbitrary number of workspaces by just pressing the shortcut and then entering the name (or number) of the workspace you want. (If you only work with numbered workspaces, you might want to use workspace number %s instead of just workspace %s)



        2. Statically bind workspaces to simple Shortcuts within key binding modes



        Alternatively, for a more static approach, you could use modes in your i3 configuration. You could have separate modes for focusing and moving to workspaces:



        set $mode_workspace "goto_ws"
        mode $mode_workspace {
        bindsym 1 workspace 1; mode "default"
        bindsym 2 workspace 2; mode "default"
        # […]
        bindsym a workspace a; mode "default"
        bindsym b workspace b; mode "default"
        # […]
        bindsym Escape mode "default"
        }
        bindsym $mod+w mode $mode_workspace

        set $mode_move_to_workspace "moveto_ws"
        mode $mode_move_to_workspace {
        bindsym 1 move container to workspace 1; mode "default"
        bindsym 2 move container to workspace 2; mode "default"
        # […]
        bindsym a move container to workspace a; mode "default"
        bindsym b move container to workspace b; mode "default"
        # […]
        bindsym Escape mode "default"
        }
        bindsym $mod+shift+w mode $mode_move_to_workspace


        Or you could have separate bindings for focusing and moving within a single mode:



        set $mode_ws "workspaces"
        mode $mode_ws {
        bindsym 1 workspace 1; mode "default"
        bindsym Shift+1 move container to workspace 1; mode "default"
        bindsym 2 workspace 2; mode "default"
        bindsym Shift+2 move container to workspace 2; mode "default"
        # […]
        bindsym a workspace a; mode "default"
        bindsym Shift+a move container to workspace a; mode "default"
        bindsym b workspace b; mode "default"
        bindsym Shift+b move container to workspace b; mode "default"
        # […]
        bindsym Escape mode "default"
        }
        bindsym $mod+shift+w mode $mode_move_to_workspace


        In both examples the workspace or move commands are chained with mode "default", so that i3 automatically returns back to the default key binding map after each command.






        share|improve this answer






























          12














          12










          12









          i3 does not really support key sequences like vim. Any key binding consists of a single key preceded by an optional list of distinct (so no Shift+Shift) modifiers. And all of the modifiers need to be pressed down at the time the main key is pressed.



          That being said, there are two main ways to have a lot of workspaces without having to bind them to long lists of modifiers:



          1. Dynamically create and access workspaces with external programs



          You can do not have to define a shortcut for every single workspace, you can just create them on the fly by sending a workspace NEW_WS to i3, for example with the i3-msg program:



          i3-msg workspace NEW_WS
          i3-msg move container to workspace NEW_WS


          i3 also comes with the i3-input command, which opens a small input field then runs a command with the given input as parameter



          i3-input -F 'workspace %s' -P 'go to workspace: '
          i3-input -F 'move container to workspace %s' -P 'move to workspace: '


          Bind these these two commands to shortcuts and you can access an arbitrary number of workspaces by just pressing the shortcut and then entering the name (or number) of the workspace you want. (If you only work with numbered workspaces, you might want to use workspace number %s instead of just workspace %s)



          2. Statically bind workspaces to simple Shortcuts within key binding modes



          Alternatively, for a more static approach, you could use modes in your i3 configuration. You could have separate modes for focusing and moving to workspaces:



          set $mode_workspace "goto_ws"
          mode $mode_workspace {
          bindsym 1 workspace 1; mode "default"
          bindsym 2 workspace 2; mode "default"
          # […]
          bindsym a workspace a; mode "default"
          bindsym b workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+w mode $mode_workspace

          set $mode_move_to_workspace "moveto_ws"
          mode $mode_move_to_workspace {
          bindsym 1 move container to workspace 1; mode "default"
          bindsym 2 move container to workspace 2; mode "default"
          # […]
          bindsym a move container to workspace a; mode "default"
          bindsym b move container to workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+shift+w mode $mode_move_to_workspace


          Or you could have separate bindings for focusing and moving within a single mode:



          set $mode_ws "workspaces"
          mode $mode_ws {
          bindsym 1 workspace 1; mode "default"
          bindsym Shift+1 move container to workspace 1; mode "default"
          bindsym 2 workspace 2; mode "default"
          bindsym Shift+2 move container to workspace 2; mode "default"
          # […]
          bindsym a workspace a; mode "default"
          bindsym Shift+a move container to workspace a; mode "default"
          bindsym b workspace b; mode "default"
          bindsym Shift+b move container to workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+shift+w mode $mode_move_to_workspace


          In both examples the workspace or move commands are chained with mode "default", so that i3 automatically returns back to the default key binding map after each command.






          share|improve this answer















          i3 does not really support key sequences like vim. Any key binding consists of a single key preceded by an optional list of distinct (so no Shift+Shift) modifiers. And all of the modifiers need to be pressed down at the time the main key is pressed.



          That being said, there are two main ways to have a lot of workspaces without having to bind them to long lists of modifiers:



          1. Dynamically create and access workspaces with external programs



          You can do not have to define a shortcut for every single workspace, you can just create them on the fly by sending a workspace NEW_WS to i3, for example with the i3-msg program:



          i3-msg workspace NEW_WS
          i3-msg move container to workspace NEW_WS


          i3 also comes with the i3-input command, which opens a small input field then runs a command with the given input as parameter



          i3-input -F 'workspace %s' -P 'go to workspace: '
          i3-input -F 'move container to workspace %s' -P 'move to workspace: '


          Bind these these two commands to shortcuts and you can access an arbitrary number of workspaces by just pressing the shortcut and then entering the name (or number) of the workspace you want. (If you only work with numbered workspaces, you might want to use workspace number %s instead of just workspace %s)



          2. Statically bind workspaces to simple Shortcuts within key binding modes



          Alternatively, for a more static approach, you could use modes in your i3 configuration. You could have separate modes for focusing and moving to workspaces:



          set $mode_workspace "goto_ws"
          mode $mode_workspace {
          bindsym 1 workspace 1; mode "default"
          bindsym 2 workspace 2; mode "default"
          # […]
          bindsym a workspace a; mode "default"
          bindsym b workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+w mode $mode_workspace

          set $mode_move_to_workspace "moveto_ws"
          mode $mode_move_to_workspace {
          bindsym 1 move container to workspace 1; mode "default"
          bindsym 2 move container to workspace 2; mode "default"
          # […]
          bindsym a move container to workspace a; mode "default"
          bindsym b move container to workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+shift+w mode $mode_move_to_workspace


          Or you could have separate bindings for focusing and moving within a single mode:



          set $mode_ws "workspaces"
          mode $mode_ws {
          bindsym 1 workspace 1; mode "default"
          bindsym Shift+1 move container to workspace 1; mode "default"
          bindsym 2 workspace 2; mode "default"
          bindsym Shift+2 move container to workspace 2; mode "default"
          # […]
          bindsym a workspace a; mode "default"
          bindsym Shift+a move container to workspace a; mode "default"
          bindsym b workspace b; mode "default"
          bindsym Shift+b move container to workspace b; mode "default"
          # […]
          bindsym Escape mode "default"
          }
          bindsym $mod+shift+w mode $mode_move_to_workspace


          In both examples the workspace or move commands are chained with mode "default", so that i3 automatically returns back to the default key binding map after each command.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 26 '17 at 5:59

























          answered Jan 25 '17 at 8:59









          AdaephonAdaephon

          2,8411 gold badge11 silver badges21 bronze badges




          2,8411 gold badge11 silver badges21 bronze badges




























              0
















              My solution to this is just using more keys:



              set $ws0 "0:`:www"
              set $ws1 "1:1"
              set $ws2 "2:2"
              set $ws3 "3:3:fm"
              set $ws4 "4:4"
              set $ws5 "5:5"
              set $ws6 "6:6:dev"
              set $ws7 "7:7"
              set $ws8 "8:8"
              set $ws9 "9:9"
              set $ws10 "10:0:music"
              set $ws11 "11:-:jd"
              set $ws12 "12:=:comm"
              set $ws13 "13:B"
              set $ws14 "14:H"
              set $ws15 "15:E"
              set $ws16 "16:I"
              set $ws17 "17:D:upwork"


              bindsym $mod+grave workspace $ws0
              bindsym $mod+1 workspace $ws1
              bindsym $mod+2 workspace $ws2
              bindsym $mod+3 workspace $ws3
              bindsym $mod+4 workspace $ws4
              bindsym $mod+5 workspace $ws5
              bindsym $mod+6 workspace $ws6
              bindsym $mod+7 workspace $ws7
              bindsym $mod+8 workspace $ws8
              bindsym $mod+9 workspace $ws9
              bindsym $mod+0 workspace $ws10
              bindsym $mod+minus workspace $ws11
              bindsym $mod+equal workspace $ws12
              bindsym $mod+BackSpace workspace $ws13
              bindsym $mod+Home workspace $ws14
              bindsym $mod+End workspace $ws15
              bindsym $mod+Insert workspace $ws16
              bindsym $mod+Delete workspace $ws17

              for_window [class="Upwork"] move container to workspace $ws17
              for_window [class="Spotify"] move container to workspace $ws10
              for_window [class="Brave-browser"] move container to workspace $ws0
              for_window [class="TelegramDesktop"] move container to workspace $ws12
              for_window [class="jetbrains-pycharm"] move container to workspace $ws6
              for_window [class="Caja"] move container to workspace $ws3
              for_window [class="JDownloader"] move container to workspace $ws11





              share|improve this answer








              New contributor



              Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.


























                0
















                My solution to this is just using more keys:



                set $ws0 "0:`:www"
                set $ws1 "1:1"
                set $ws2 "2:2"
                set $ws3 "3:3:fm"
                set $ws4 "4:4"
                set $ws5 "5:5"
                set $ws6 "6:6:dev"
                set $ws7 "7:7"
                set $ws8 "8:8"
                set $ws9 "9:9"
                set $ws10 "10:0:music"
                set $ws11 "11:-:jd"
                set $ws12 "12:=:comm"
                set $ws13 "13:B"
                set $ws14 "14:H"
                set $ws15 "15:E"
                set $ws16 "16:I"
                set $ws17 "17:D:upwork"


                bindsym $mod+grave workspace $ws0
                bindsym $mod+1 workspace $ws1
                bindsym $mod+2 workspace $ws2
                bindsym $mod+3 workspace $ws3
                bindsym $mod+4 workspace $ws4
                bindsym $mod+5 workspace $ws5
                bindsym $mod+6 workspace $ws6
                bindsym $mod+7 workspace $ws7
                bindsym $mod+8 workspace $ws8
                bindsym $mod+9 workspace $ws9
                bindsym $mod+0 workspace $ws10
                bindsym $mod+minus workspace $ws11
                bindsym $mod+equal workspace $ws12
                bindsym $mod+BackSpace workspace $ws13
                bindsym $mod+Home workspace $ws14
                bindsym $mod+End workspace $ws15
                bindsym $mod+Insert workspace $ws16
                bindsym $mod+Delete workspace $ws17

                for_window [class="Upwork"] move container to workspace $ws17
                for_window [class="Spotify"] move container to workspace $ws10
                for_window [class="Brave-browser"] move container to workspace $ws0
                for_window [class="TelegramDesktop"] move container to workspace $ws12
                for_window [class="jetbrains-pycharm"] move container to workspace $ws6
                for_window [class="Caja"] move container to workspace $ws3
                for_window [class="JDownloader"] move container to workspace $ws11





                share|improve this answer








                New contributor



                Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.
























                  0














                  0










                  0









                  My solution to this is just using more keys:



                  set $ws0 "0:`:www"
                  set $ws1 "1:1"
                  set $ws2 "2:2"
                  set $ws3 "3:3:fm"
                  set $ws4 "4:4"
                  set $ws5 "5:5"
                  set $ws6 "6:6:dev"
                  set $ws7 "7:7"
                  set $ws8 "8:8"
                  set $ws9 "9:9"
                  set $ws10 "10:0:music"
                  set $ws11 "11:-:jd"
                  set $ws12 "12:=:comm"
                  set $ws13 "13:B"
                  set $ws14 "14:H"
                  set $ws15 "15:E"
                  set $ws16 "16:I"
                  set $ws17 "17:D:upwork"


                  bindsym $mod+grave workspace $ws0
                  bindsym $mod+1 workspace $ws1
                  bindsym $mod+2 workspace $ws2
                  bindsym $mod+3 workspace $ws3
                  bindsym $mod+4 workspace $ws4
                  bindsym $mod+5 workspace $ws5
                  bindsym $mod+6 workspace $ws6
                  bindsym $mod+7 workspace $ws7
                  bindsym $mod+8 workspace $ws8
                  bindsym $mod+9 workspace $ws9
                  bindsym $mod+0 workspace $ws10
                  bindsym $mod+minus workspace $ws11
                  bindsym $mod+equal workspace $ws12
                  bindsym $mod+BackSpace workspace $ws13
                  bindsym $mod+Home workspace $ws14
                  bindsym $mod+End workspace $ws15
                  bindsym $mod+Insert workspace $ws16
                  bindsym $mod+Delete workspace $ws17

                  for_window [class="Upwork"] move container to workspace $ws17
                  for_window [class="Spotify"] move container to workspace $ws10
                  for_window [class="Brave-browser"] move container to workspace $ws0
                  for_window [class="TelegramDesktop"] move container to workspace $ws12
                  for_window [class="jetbrains-pycharm"] move container to workspace $ws6
                  for_window [class="Caja"] move container to workspace $ws3
                  for_window [class="JDownloader"] move container to workspace $ws11





                  share|improve this answer








                  New contributor



                  Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  My solution to this is just using more keys:



                  set $ws0 "0:`:www"
                  set $ws1 "1:1"
                  set $ws2 "2:2"
                  set $ws3 "3:3:fm"
                  set $ws4 "4:4"
                  set $ws5 "5:5"
                  set $ws6 "6:6:dev"
                  set $ws7 "7:7"
                  set $ws8 "8:8"
                  set $ws9 "9:9"
                  set $ws10 "10:0:music"
                  set $ws11 "11:-:jd"
                  set $ws12 "12:=:comm"
                  set $ws13 "13:B"
                  set $ws14 "14:H"
                  set $ws15 "15:E"
                  set $ws16 "16:I"
                  set $ws17 "17:D:upwork"


                  bindsym $mod+grave workspace $ws0
                  bindsym $mod+1 workspace $ws1
                  bindsym $mod+2 workspace $ws2
                  bindsym $mod+3 workspace $ws3
                  bindsym $mod+4 workspace $ws4
                  bindsym $mod+5 workspace $ws5
                  bindsym $mod+6 workspace $ws6
                  bindsym $mod+7 workspace $ws7
                  bindsym $mod+8 workspace $ws8
                  bindsym $mod+9 workspace $ws9
                  bindsym $mod+0 workspace $ws10
                  bindsym $mod+minus workspace $ws11
                  bindsym $mod+equal workspace $ws12
                  bindsym $mod+BackSpace workspace $ws13
                  bindsym $mod+Home workspace $ws14
                  bindsym $mod+End workspace $ws15
                  bindsym $mod+Insert workspace $ws16
                  bindsym $mod+Delete workspace $ws17

                  for_window [class="Upwork"] move container to workspace $ws17
                  for_window [class="Spotify"] move container to workspace $ws10
                  for_window [class="Brave-browser"] move container to workspace $ws0
                  for_window [class="TelegramDesktop"] move container to workspace $ws12
                  for_window [class="jetbrains-pycharm"] move container to workspace $ws6
                  for_window [class="Caja"] move container to workspace $ws3
                  for_window [class="JDownloader"] move container to workspace $ws11






                  share|improve this answer








                  New contributor



                  Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share|improve this answer



                  share|improve this answer






                  New contributor



                  Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  answered 45 mins ago









                  Lukas ElsnerLukas Elsner

                  1




                  1




                  New contributor



                  Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




                  New contributor




                  Lukas Elsner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




































                      draft saved

                      draft discarded



















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338228%2fi3wm-more-than-10-workspaces-with-double-modifier-key%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...