Skip to content

Instantly share code, notes, and snippets.

@grafov
Created April 3, 2021 14:08
Show Gist options
  • Save grafov/3bd5bb0ee03e4549ca70e63959b6df4b to your computer and use it in GitHub Desktop.
Save grafov/3bd5bb0ee03e4549ca70e63959b6df4b to your computer and use it in GitHub Desktop.

Revisions

  1. grafov created this gist Apr 3, 2021.
    24 changes: 24 additions & 0 deletions part-of-sway-config
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # Copypaste it to your ~/.config/sway/config

    set $TBALL 1149:4128:Kensington______Kensington_Expert_Mouse

    # Turns on scrolling with the ball when right bottom button pressed.
    input $TBALL {
    scroll_method on_button_down
    scroll_button 273
    }

    # Remapping swaps upper and bottom rows of the buttons.
    # By default buttons work this way:
    # MIDDLE SIDE
    # BALL
    # LEFT RIGHT
    #
    # After remapping it could be used as:
    # LEFT RIGHT
    # BALL
    # MIDDLE RIGHT
    bindsym --input-device=1149:4128:Kensington______Kensington_Expert_Mouse --whole-window BTN_LEFT seat seat0 cursor press BTN_MIDDLE; seat seat0 cursor release BTN_MIDDLE
    bindsym --input-device=1149:4128:Kensington______Kensington_Expert_Mouse --whole-window BTN_MIDDLE seat seat0 cursor press BTN_LEFT; seat seat0 cursor release BTN_LEFT
    bindsym --input-device=1149:4128:Kensington______Kensington_Expert_Mouse --whole-window BTN_SIDE seat seat0 cursor press BTN_RIGHT; seat seat0 cursor release BTN_RIGHT
    bindsym --input-device=1149:4128:Kensington______Kensington_Expert_Mouse --whole-window BTN_RIGHT seat seat0 cursor press BTN_SIDE; seat seat0 cursor release BTN_SIDE