Faaiz Linux Config - Ubuntu 20.04 on T480s
Tags: @linux @ubuntu @zsh @themes @sublime @plugins @service @systemd @throttle @undervolt
Gnome Tweaks
Generally, Gnome tweak settings are backed up to home folder. So if you reinstall just the root partition, your tweaks will be mostly preserved except for themes, which are automatically set as soon as you install them. Alternatively, install themes, icons, and fonts in your home folder (create folders .themes, .icons, .fonts in your home folder and Ubuntu will automatically see them).
I have done this, so as long as my home folder is backed up, I should not need to mess with these settings.
I use the following themes:
- Applications Material Black Blueberry 3.36
- Cursor DMZ White
- Icons Papirus Dark
- Shell Material Black Blueberry 3.36
- Fonts:
- Interface Roboto Bold 11
- Document Roboto Regular 11
- Monospace Roboto Mono for Powerline Regular 11
- Legacy Roboto Bold 11
Gnome Extensions
I use the following extensions. Extensions with a [*] have already been backed up using their native settings export feature.
- Blyr
- Circular Battery indicator
- CPU Power Manager
- Dash to Panel [*] backed up to dotfiles repo on github
- Freon
- Impatience set to 0.5
- Multi Monitors Add-On all things unchecked
- Prime indicator
- Remove Dropdown Arrows
- Show apps top panel
- user themes
- Ubunutu Appindicators built-in
Desktop
I use Nemo as my default file manager: > sudo apt install nemo
Then, configure Nemo to be the default file manager: > xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
Finally, tell Nemo to handle the desktop icons:
> gsettings set org.gnome.desktop.background show-desktop-icons false
> gsettings set org.nemo.desktop show-desktop-icons true
Also remember to add nemo-desktop to your list of startup apps
Check if Nemo is defalt by doing: > xdg-open $HOME
Terminal
I use Tilix with zsh and use oh-my-zsh as the theming framework.
My zsh settings are in ./.zshrc which is usually stored in ~/.zshrc
My theme is a custom theme that should be added to ~/.oh-my-zsh/themes/. The theme file is ./faaiz-zsh-theme.zsh-theme.
I have also updated the virtualenv_prompt_info function in ~/.oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh. The modified file is here: ./virtualenv.plugin.zsh
For plugins, I use colored-man-pages, git, virtualenv, django, zsh-autosuggestions
SublimeText
Sublime settings are synced using the Sync Settings package. The backup is uploaded to my GitHub. However, just in case, these are the packages used:
- UI Theme: Cyanide
- Color Scheme: Chromodynamics
- Anaconda
- ColorHints
- Djaneiro
- Git
- Django
- MagicPython
- Python3
- Terminus
Fix wake from sleep problem
[ See also: Creating services with systemd ]
First, you need to do > cat /proc/acpi/wakeup and find the codes for all the ones that are enabled (except power button). Then, for each one you want to disable, create a command in the service file. See the existing service file for command syntax. The 3 character codes are what you need to change.
Here is my service file: ./disable-xhc-wakeup.service
Then, copy to /etc/systemd/system
Then, give the service correct permissions > sudo chmod 644 /etc/systemd/system/disable-xhc-wakeup.service
Start the service by > sudo systemctl start disable-xhc-wakeup
Enable it to run at boot > sudo systemctl enable disable-xhc-wakeup
Check status by > sudo systemctl status disable-xhc-wakeup
Power settings
- Install TLP:
- > sudo apt install tlp
- then run > tlp-stat -b
- depending on output of above, apt install either acpi-call-dkms or tp-smapi-dkms
- Install powertop
- Fix the login screen date/time (if in Urdu):
- > sudo update-locale LC_TIME=en_US.UTF-8
- Install lenovo-throttling-fix from Github
- Make sure thermald isn't fucking up
- > sudo systemctl stop thermald.service
- > sudo systemctl disable thermald.service
- > sudo systemctl mask thermald.service
- Then go to /etc/lenovo_fix.conf
- CORE -90
- GPU -40
- CACHE -90
- Check if it is running by:
- > cd ~/Tools/lenovo-throttling-fix
- > ./lenovo_fix.py --monitor
- Make sure thermald isn't fucking up
Getting trackpad gestures working
Install libinput-gestures - https://github.com/bulletmark/libinput-gestures
Install the gestures GUI - https://gitlab.com/cunidev/gestures
USE THIS BACKED UP GESTURES CONF FILE: ./Gestures.conf
Thunderbolt Dock
To default to onboard audio (not thunderbolt output):
- Run pactl list short sinks
- The name of the onboard device is something like: alsa_output.pci-0000_00_1f.3.analog-stereo
- Then add a startup command: pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
- Add a 10 sec delay if you want
Backing up installed programs
# Create backup list
$ apt list --manual-installed | sed -E 's|([^/]+).*|\1|' > my_package_list.txt
# THen, restore by
$ sudo apt -y install $(<my_package_list.txt)