Skip to content

Instantly share code, notes, and snippets.

@yuanweixin
Last active January 27, 2023 11:50
Show Gist options
  • Save yuanweixin/61eba81aeb12db1b27eab5025305bf76 to your computer and use it in GitHub Desktop.
Save yuanweixin/61eba81aeb12db1b27eab5025305bf76 to your computer and use it in GitHub Desktop.
Ubuntu UI Setup

This is to tweak the gnome UI that come out of box on 22.4.

It's a whole bunch of tweaks, without which the touchpad and keyboard are useless.

This is intended to emulate the feel of a mac laptop, with most of the keyboard bindings and trackpad behavior!

The nuclear option: reset gnome to factory setting

Sadly if gnome just stops working for...no reason after an update, for instance mouse works before login but completely stops moving/responding, even though all the drivers exist and all mice are detected, then it's probably something messed up in your gnome setting.

dconf reset -f /org/gnome/

You will have to put in the settings below. It's probably scriptable but I am too lazy and life too short to write script to fix shitty design and software.

Mac keyboard mapping

Kinto

Multitouch

  • Touchegg - multitouch, need this for customizing behavior of 3 finger swipes
  • Touche - UI to manage above

Other

  • Gnome tweaks : install

  • Gnome tweaks > Keyboard & Mouse > Mouse Click Emulation > Check the "Fingers" entry for 2 finger click

  • In settings > appearance, move the dock to the bottom + autohide + disable panel mode + made icons larger + show in all windows

  • Redshift : install

  • Turn off the notifications from "software updater". Don't need flow constantly interrupted by this trash. I tried it in Settings UI but that shit does not work. Try the gsettings command given in reddit thread

  • Disable Activities overview toggle Disable the nasty "activities" desktop view from being toggled by ctrl key (shoot whoever designed this crap): Disable keys: https://askubuntu.com/questions/1090202/how-do-i-disable-showing-the-activities-overview-forever

    Setting toggle-overview to tab: https://www.reddit.com/r/gnome/comments/107y30q/how_can_i_change_the_overview_keybind_tweaks_lets/

    gsettings set org.gnome.mutter overlay-key ''
    gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]"
    gsettings set org.gnome.shell.keybindings toggle-overview "['<Super>Tab']"
    gsettings set org.gnome.shell.keybindings toggle-application-view "['']"
    
  • Add back pinyin input

  • Power button should put computer to sleep

  • Disable super-l as the lock screen shortcut because I keep triggering it

  • ~/.config/touchegg/touchegg.conf: This one handles 3 finger swipe left, right, up (calls xdotool key super per this to toggle the activities overview, needed after we get rid of the Super key as the toggle, which in turn is the ctrl key due to the kinto remap...what a bloody convoluted mess)

    <touchégg>
      <settings>
        <property name="composed_gestures_time">0</property>
      </settings>
      <application name="All">
        <gesture type="TAP" fingers="2" direction="UNKNOWN">
          <action type="MOUSE_CLICK">undefined</action>
        </gesture>
        <gesture type="TAP" fingers="3" direction="UNKNOWN">
          <action type="MOUSE_CLICK">undefined</action>
        </gesture>
        <gesture type="TAP" fingers="5" direction="UNKNOWN">
          <action type="CLOSE_WINDOW"></action>
        </gesture>
        <gesture type="DRAG" fingers="2" direction="ALL">
          <action type="SCROLL">undefined</action>
        </gesture>
        <gesture type="DRAG" fingers="3" direction="UP">
          <action type="MAXIMIZE_RESTORE_WINDOW"></action>
        </gesture>
        <gesture type="DRAG" fingers="3" direction="DOWN">
          <action type="MINIMIZE_WINDOW"></action>
        </gesture>
        <gesture type="DRAG" fingers="3" direction="LEFT">
          <action type="MOVE_WINDOW"></action>
        </gesture>
        <gesture type="DRAG" fingers="3" direction="RIGHT">
          <action type="MOVE_WINDOW"></action>
        </gesture>
        <gesture type="DRAG" fingers="4" direction="UP">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="DRAG" fingers="4" direction="DOWN">
          <action type="SHOW_DESKTOP"></action>
        </gesture>
        <gesture type="PINCH" fingers="3" direction="ALL">
          <action type="RESIZE_WINDOW"></action>
        </gesture>
        <gesture type="PINCH" fingers="5" direction="ALL">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="PINCH" fingers="2" direction="IN">
          <action type="SEND_KEYS">
            <modifiers>Control_R</modifiers>
            <keys>minus</keys>
            <repeat>true</repeat>
            <animation>NONE</animation>
            <decreaseKeys>Control_R+equal</decreaseKeys>
          </action>
        </gesture>
        <gesture type="PINCH" fingers="2" direction="OUT">
          <action type="SEND_KEYS">
            <modifiers>Control_R</modifiers>
            <keys>equal</keys>
            <repeat>true</repeat>
            <animation>NONE</animation>
            <decreaseKeys>Control_R+minus</decreaseKeys>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="RIGHT">
          <action type="SEND_KEYS">
            <modifiers>Alt_L</modifiers>
            <keys>Tab</keys>
            <repeat>true</repeat>
            <animation>NONE</animation>
            <decreaseKeys>Shift_L+Tab</decreaseKeys>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="LEFT">
          <action type="SEND_KEYS">
            <modifiers>Alt_L</modifiers>
            <keys>Shift_L+Tab</keys>
            <repeat>true</repeat>
            <animation>NONE</animation>
            <decreaseKeys>Tab</decreaseKeys>
          </action>
        </gesture>
        <gesture type="SWIPE" fingers="3" direction="UP">
          <action type="SEND_KEYS">
            <modifiers>Super_L</modifiers>
            <keys>Tab</keys>
            <repeat>false</repeat>
            <animation>NONE</animation>
            <on>begin</on>
          </action>
        </gesture>
      </application>
      <application name=" dolphin">
      </application>
      <application name=" gwenview">
      </application>
      <application name="chromium-browser">
        <gesture type="DRAG" fingers="2" direction="LEFT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="DRAG" fingers="2" direction="RIGHT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
      </application>
      <application name="dolphin">
        <gesture type="DRAG" fingers="2" direction="LEFT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="DRAG" fingers="2" direction="RIGHT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
      </application>
      <application name="gwenview">
        <gesture type="PINCH" fingers="2" direction="IN">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="PINCH" fingers="2" direction="OUT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="ROTATE" fingers="2" direction="LEFT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="ROTATE" fingers="2" direction="RIGHT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
      </application>
      <application name="okular">
        <gesture type="PINCH" fingers="2" direction="IN">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="PINCH" fingers="2" direction="OUT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="ROTATE" fingers="2" direction="LEFT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
        <gesture type="ROTATE" fingers="2" direction="RIGHT">
          <action type="SEND_KEYS">undefined</action>
        </gesture>
      </application>
    </touchégg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment