Skip to content

Instantly share code, notes, and snippets.

@RB-Lab
Last active December 10, 2021 19:14
Show Gist options
  • Save RB-Lab/7e54633b8b88331ade757585b65de8f6 to your computer and use it in GitHub Desktop.
Save RB-Lab/7e54633b8b88331ade757585b65de8f6 to your computer and use it in GitHub Desktop.
My Tweaks and Hacks for Linux

Install & configure OhMyZSH & vim

See here

Make Gnome Terminal open new tab in the same directory

Go to PreferencesProfile [default profile]Command

  1. Check "Run command as a login shell"
  2. Select "Preserve working directory: always"

Hide Dock

See this my answer on Ask Ubuntu. Ans also you need to set to false "Extend height" to minimize Dock when "Activities" activated

Add memory monitoring applet

It's a Gnome extension.

Set Fn Lock by default

Looks like it is in BIOS

Enable Compose Key

Gnome Tweaks ⇒ Keyboard & Mouse ⇒ Compose key. Here are mappings.

Map PgDown → End PgUp → Home

In /usr/share/x11/xkb/symbols/pc rewrite according key's strings:

    key <HOME> {        [  Prior, Home          ]       };
    key <PGUP> {        [  Home, Home,  Prior   ]       };
    key  <END> {        [  Next                 ]       };
    key <PGDN> {        [  End,   End,  Next    ]       };

This will be overridden most likelly on next update, so it would be better to figure out a better place to put this mapping next time (for more info see here and here).

Add Ctrl+T, Ctrl+Tab to use tabs in terminal

In Dconf Editor:

  • /org/gnome/terminal/legacy/keybindings/close-tab<Ctrl>w
  • /org/gnome/terminal/legacy/keybindings/new-tab<Ctrl>t
  • /org/gnome/terminal/legacy/keybindings/next-tab<Primary>Tab
  • /org/gnome/terminal/legacy/keybindings/prev-tab<Primary><Shift>Tab

Also could be done as

dconf write /org/gnome/terminal/legacy/keybindings/next-tab "'<Primary>Tab'"

New open terminal in the same directory

Go to PreferencisProfiles<your profile>, check: ✅ Run command as login shell; set: Preserve working directory: Always.

Configure SSH client

See here https://unix.stackexchange.com/a/156770

Disable snaps

snap list # This shows you what snaps are installed
sudo snap remove program # Fill in all snaps listed above
sudo apt purge snapd
sudo apt-mark hold snapd
sudo umount /snap/snapd/XXXX # to unmount the snap core service
sudo rm -rf ~/snap /snap /var/snap /var/lib/snapd # to remove all the folder related to snap, if existing
@RB-Lab
Copy link
Author

RB-Lab commented Sep 30, 2021

@RB-Lab
Copy link
Author

RB-Lab commented Nov 6, 2021

Regrading broken suspend on MSI Summit:

  • Enable swap (create swap partition that 5% larger than memory)
  • Make swap to partition: sudo swapoff /dev/dm-1 && sudo swapon -p 0 /dev/dm-1 (to find device name (/dev/dm-1): swapon -s)
  • Install Gnome extension "Hibernate Status Button" by p91paul
  • Use "Hybrid sleep" instead of "Suspend"

@RB-Lab
Copy link
Author

RB-Lab commented Dec 10, 2021

On Arch it denies login for 10 min after 3 failed login attempts in 15 minutes. Which is stupid, because it happens A LOT when you'r in rush and your keyboard in ru or [caps lock]. To change it, edit

 sudo vim /etc/security/faillock.conf 

set deny = 5 and unlock_time = 30

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