Skip to content

Instantly share code, notes, and snippets.

@askvictor
Last active January 11, 2022 05:06
Show Gist options
  • Save askvictor/83d796e835897cc3c8979771316ddae1 to your computer and use it in GitHub Desktop.
Save askvictor/83d796e835897cc3c8979771316ddae1 to your computer and use it in GitHub Desktop.

Notes about setting up PopOS 21.04 on a Lenovo Thinkpad Yoga 460

Including touchpad, touchscreen, dock, external screen, trackball. Mostly for my reference, but might be useful for others on same or similar laptops or OSes. Coming from Windows 10 + Chrome

Configure trackball

Logitech Trackman Marble trackball. Left small button to be a middle click when clicked once, scroll modifier when held.
Right small button -> back button, Left small button -> middle-click. Run the following to create a shell script that sets the right settings, then add this to the "Startup Applications" in the desktop manager. (Could not reliably get this working using .xinitrc, .xprofile or xorg.conf but running the xinput settings after desktop login works reliably). Note - this doesn't work after disconnecting/reconnecting - might need to add a trigger to run this on a USB connect event.

cat <<EOT >> ~/startup_commands.sh
#!/bin/sh

xinput --set-button-map "Logitech USB Trackball" 1 9 3 4 5 6 7 2 8
xinput --set-prop "Logitech USB Trackball" "libinput Scroll Method Enabled" 0 0 1
xinput --set-prop "Logitech USB Trackball" "libinput Button Scrolling Button" 8
EOT
chmod +x ~/startup_commands.sh

Touchscreen

add MOZ_USE_XINPUT2 DEFAULT=1 to /etc/security/pam_env.conf to allow touchscreen gestures in firefox

Display

inbuilt screen seems to forget resolution settings external monitor is plugged in. Disabling the HiDPI daemon seems to fix this.

Firefox settings

https://addons.mozilla.org/en-US/firefox/addon/ctrl-number-to-switch-tabs/

Alt-tab to switch windows instead of applications:

Settings | Keyboard | Keyboard Shortcuts | Customise Shortcuts | Find "Switch Windows" | replace with Alt-Tab (this will remove the previous binding to "Switch Applications"

via https://superuser.com/questions/394376/how-to-prevent-gnome-shells-alttab-from-grouping-windows-from-similar-apps#:~:text=80,the%20old%20shortcut)

TODO

Touchpad

two-finger swipes to go back/forward instead of horizontal scrolling - looks like something low level might prevent access to this without a lot of pain - time to retrain my muscle memory }:-| EDIT - currently, on a Dell laptop, xev seems to register two-finger left and right swipes as buttons 6 & 7 respectively. Using xbindkeys and xte, and the following in ~/.xbindkeysrc

"xte 'keydown XF86Back' 'keyup XF86Back'"
   b:6

"xte 'keydown XF86Forward' 'keyup XF86Forward'"
   b:7

Seems to tentatively work, though there is no hysteresis, so a single swipe seems to go back/forward many pages. Also, this will clobber other pointing devices buttons 6 & 7 as is not specific to the touchpad

An alternative is to use Gnome-Web-Browser (Epiphany) which has this working out of the box.

three-finger click -> middle click

two-finger click -> right click

Display

sound over DP cable doesn't work (reliably? At all?) might be cable?

Ethernet (dock)

seems to drop out after a couple of minutes use - not doing it now !?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment