Skip to content

Instantly share code, notes, and snippets.

@the0neWhoKnocks
Last active December 1, 2022 19:59
Show Gist options
  • Save the0neWhoKnocks/364277866665192a088f8356bf8472fd to your computer and use it in GitHub Desktop.
Save the0neWhoKnocks/364277866665192a088f8356bf8472fd to your computer and use it in GitHub Desktop.
Linux Mint

Linux Mint


During Install

  • Installation Type
    • Erase disk and install
      • Advanced > use LVM

Post-OS-Install

Adding/Removing Packages

# get list of new/upgradeable packages
sudo apt update

# search for package
sudo apt search cairo-dock

# install
sudo apt install cairo-dock

# remove package
sudo apt remove cairo-dock
# remove packages matching pattern
sudo apt remove 'cairo-dock*'

System Reports

  • Install GPU driver (restart)
  • Install language packs

Update Manager

  1. Edit > Software Sources
  • Official Repositories (click on URLs to scan for new sources)
    Mirrors
    Main (una): http://mintmirror.math.washington.edu/linuxmint-repo
    Base (focal): http://mirror.uoregon.edu/ubunut/
    Select OK, after you've changed your mirrors, and it'll update data.
  • PPA: Add, Edit, or Remove them here
  • Additional Repositories: Add, Edit, or Remove them here
  1. New version of Update Manager may install
  2. Review the list of updates, and Install Updates

Desktop

Right-click > Customize

  • Use the sliders on the bottom and side to change how icons are spaced. I usually reset both to zero, and do one tick over for the bottom, and two for the right slider.

System Settings

Font Selection

Default font: Ubuntu Regular 12
Desktop font: Ubuntu Bold 12
Document font: Sans Regular 12
Monospace font: Monospace Regular 12
Window title font: Ubuntu Medium 12
Text scaling factor: 1.2

Themes

Themes

Window borders: Mint-Y
Icons: Mint-Y-Dark-Aqua
Controls: Mint-Y-Dark-Aqua
Mouse Pointer: DMZ-White
Desktop: Mint-Y-Dark-Aqua

Account Details

  • Set Picture
  • Change Name

Applets

Activate

  • User Applet
  • Panel Launchers
  • Workspace switcher
    Type of display: Simple buttons
    Scroll wheel behavior: Disabled
    

Download and activate

  • QRedshift
  • Num Lock/Caps Lock indicator with notifications
  • CinnVIIStarkMenu
    • Menu
      Menu layout: MATE-Menu
      (check) Show bookmarks and places
      
    • Panel
      (check) Use a custom icon and label
      Icon: linuxmint-logo-simple-symbolic
      Text: Menu
      (check) Use menu animations
      
    • Sidebar
      Quit buttons layout: Horizontal
      (check) Separator below user acount info box
      
    • Web Search
      (un-check) all items
      

Hot Corners

Enable top left: Show the desktop

Windows

Alt-Tab

Alt-Tab switcher style: Coverflow (3D)

Bluetooth

Toggle to disable

Disks

Manage partition sizes, and what disks are mounted

Keyboard

Shortcuts (where you set up custom key commands)

Mouse and Touchpad

Touchpad

Click actions: Use multiple fingers for right and middle click
(uncheck) Reverse scrolling direction
(check) Horizontal scrolling
Custom Acceleration: Roughly 65%

Power Management

Power

Turn off the screen when inactive for: 15 minutes

Sound

Sounds (set effect sounds and volume)

Applications (if an App isn't sending/reciving audio, check in here)

System Info

List or upload system specs

Driver Manager

Choose what GPU driver to use

Login Window

Appearance

Icon theme: Mint-Y-Dark-Aqua

Users

(check) Allow guest sessions

Users and Groups

Users (add, edit, delete)

Picture: set to custom image
Name: change display name (doesn't change actual username)

Calendar

(check) Use a custom date format: %b. %e 【%a.】【%l: %M %p】


Files ('Nemo' the default file manager)

Preferences

  • Views
    View new folders using: List View
    (uncheck) Sort favorites before other files
    Default Zoom Level: (change all to) 66%
    Tree View Defaults: (uncheck) Show only folders
    
  • Behavior
    (check) Click on a file's name twice to rename it
    (check) Automatically close the device's tab, pane, or window when a divice is unmounted or ejected
    
  • Display
    (check) Show advanced permissions in the file property dialog
    
  • Toolbar
    (check) Refresh
    (check) Open in Terminal
    (check) New folder
    (check) Show Thumbnails
    
  • Context Menus
    # Selection
    (check) Make Link
    (check) Copy to
    (check) Move to
    

Files ('Nautilus' extra file manager)

Preferences

  • Views
    (check) Allow folder to be expanded
    
  • Behavior
    (check) Show actoin to create symbolic links
    Executable Text Files: Ask what to do
    

Install Packages

Don't Require Password for Sudo

echo "${USER} ALL = NOPASSWD: ALL" | (sudo EDITOR='tee -a' visudo)

Install Software

Via Software Manager (or apt install)

aegisub                              # subtitle editor
backintime-qt                        # backup/snapshot system
cairo-dock                           # dock
cairo-dock-gnome-integration-plug-in # needed for things like the trash
chromium                             # browser
flameshot                            # screenshots
git                                  # version control
grub-customizer                      # easily change and compile grub config
handbrake                            # GUI for ffmpeg video transcoding
inkscape                             # vector drawing
kid3-qt                              # audio tag editor
meld                                 # diff gui
mkvtoolnix-gui                       # GUI for 'mkvmerge', 'mkvinfo', and 'mkvpropedit'
obs-studio (non-flatpak)             # record video/audio streams
okular                               # document viewers (PDFs and other)
peek                                 # capture specific parts of screen, and can output '.apng', '.gif', '.mp4', and '.webm'
plasma-sdk                           # mainly for Cuttlefish (an icon viewer)
sddm                                 # different GDM than default lightdm
sddm-theme-breeze                    # clean centered theme with avatar
soundconverter                       # convert audio files
tilix                                # terminal
ttf-mscorefonts-installer            # Microsoft fonts
vlc                                  # multimedia player
wireshark                            # (meta-package) network traffic sniffer
xclip                                # copy from CLI to clipboard
xserver-xorg-input-synaptics         # enables smooth/inertial/kinetic scroll (requires reboot) 
zsh                                  # shell

## Optional ##############################################

figlet                               # generate text banners for CLI
lolcat                               # add rainbow colors to text in CLI
  • If you want to install extra fonts for figlet, go to http://www.jave.de/figlet/fonts/overview.html, and download the fonts you want to use. Then use the -d (directory), and -f (font) flags to specify where your custom font files are, and which font to render with.

Via Flatpak (search for packages with flatpak search <PACKAGE>, like flatpak search org.gimp.GIMP.Plugin)

Software Package Description
GIMP org.gimp.GIMP Image editor
G'MIC org.gimp.GIMP.Plugin.GMic A large set of filters
Kdenlive org.kde.kdenlive Video editor
LiquidRescale org.gimp.GIMP.Plugin.LiquidRescale Scale an image, but don't scale selected items
Resynthesizer org.gimp.GIMP.Plugin.Resynthesizer Content-aware removal of selected items

Via .deb files

Software Download URL
Atom https://atom.io/download/deb
Blender https://www.blender.org/download/
Chrome https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Discord https://discord.com/api/download?platform=linux&format=deb
Insomnia https://updates.insomnia.rest/downloads/ubuntu/latest?&app=com.insomnia.app&source=website
lsd https://github.com/Peltoche/lsd/releases/download/0.21.0/lsd_0.21.0_amd64.deb
Origin https://lutris.net/games/origin/ (via Lutris)
Snowflake https://github.com/subhra74/snowflake/releases/download/v1.0.4/snowflake-1.0.4-setup-amd64.deb
Steam https://cdn.cloudflare.steamstatic.com/client/installer/steam.deb
ULauncher https://ulauncher.io/#Download

Via .appimage files (after download, make executable, and run)

Software Download URL
Krita https://download.kde.org/stable/krita/5.0.2/krita-5.0.2-x86_64.appimage

Via .zip files

Software Download URL
btop https://github.com/aristocratos/btop/releases
godot https://godotengine.org/download/linux
jmkvpropedit https://github.com/BrunoReX/jmkvpropedit/releases (btop-x86_64-linux-musl.tbz
)

Via CLI

#######
# bat #
#######
sudo apt install bat
sudo ln -s $(which batcat) /usr/bin/bat

##########
# docker #
##########
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo usermod -aG docker $USER
# verify install
systemctl is-enabled docker
systemctl status docker

##################
# docker-compose #
##################
curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url  | grep docker-compose-linux-x86_64 | cut -d '"' -f 4 | wget -qi -
chmod +x docker-compose-linux-x86_64
sudo mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose

##########
# lutris #
##########
sudo add-apt-repository ppa:lutris-team/lutris
sudo apt update
sudo apt install lutris

######################
# 'n' NodeJS manager #
######################
# https://github.com/tj/n#third-party-installers
curl -L https://git.io/n-install | bash

########
# qemu #
########
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
sudo adduser $USER libvirt && sudo adduser $USER kvm && sudo adduser $USER libvirt-qemu

#########
# Unity #
#########
# add repo
sudo sh -c 'echo "deb https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
# add signing key
wget -qO - https://hub.unity3d.com/linux/keys/public | sudo apt-key add -
# install
sudo apt update && sudo apt install unityhub

Grub (boot loader)

  • Open Grub Customizer
  • Go to General Settings
    • Boot default entry after: 1 second
  • Once you're done making changes, click the Save button

There's a known issue where the timeout doesn't always work and defaults to 30s no matter what. To fix that run

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
sudo update-grub

SDDM (GDM)

  • Once installed, switch to it with sudo dpkg-reconfigure sddm and choose sddm
  • Themes are located in /usr/share/sddm/themes/.
    • You can test the theme via sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze. If there are errors, pick a different theme.
  • Print current config sddm --example-config
  • To change a theme
    sudo mkdir -p /usr/lib/sddm/sddm.conf.d
    sudo vim /usr/lib/sddm/sddm.conf.d/10-custom.conf
    [General]
    Numlock=on
    
    [Theme]
    Current=breeze
    
  • The backgrounds for a theme are set in /usr/share/sddm/themes/<THEME>/theme.conf on the background= line.
    • Generally themes point to the global wallpapers so an image can be displayed for any user. Those wallpapers are in /usr/share/wallpapers.
    • To more easily view all wallpapers I open that directory with a file mananger, and do a search for screenshot.jpg, then I can just browse through the results, and find the path for the wallpaper I want. Below are some of the wallpapers I currently like.
      /usr/share/wallpapers/Floral Ulyssa/contents/images/5184x3456.jpg
      /usr/share/wallpapers/Georgia Uma/contents/images/4288x2848.jpg
      /usr/share/wallpapers/Pearl Una/contents/images/5472x3078.jpg
      /usr/share/wallpapers/Winter Ball Una/contents/images/3394x2587.jpg
      
    • Once you have a wallpaper you like, just update the theme.conf's background line, and you'll see the new image after a reboot. Note that you'll see your User wallpaper on the lock screen. An example of my Breeze theme config is:
      [General]
      showlogo=hidden
      logo=/usr/share/sddm/themes/breeze/default-logo.svg
      type=image
      color=#1d99f3
      fontSize=10
      background=/usr/share/wallpapers/Pearl Una/contents/images/5472x3078.jpg
      needsFullUserModel=false
      
      Since the theme.conf file appears to be generated, when the theme is updated (via install) your custom changes may be wiped out.

Xed (text editor)

I was using notepadqq but it suddenly started taking a very long time to open.

Xed comes default with Mint, but it requires a little customization.

  • Download theme styles from https://github.com/trusktr/gedit-color-schemes
    • There are a few places where styles could possibly go. Run ls -la /usr/share/gtksourceview-*/styles, and take note of the folders that have a styles.rng file. For each one of those folders, you'll need to create a .local version where you'll dump the custom styles.
      # currently these folders match the above criteria
      mkdir -p .local/share/gtksourceview-3.0/styles
      mkdir -p .local/share/gtksourceview-4/styles
      
    • Now you can copy the contents of the repo's gtksourceview-3.0/styles folder over to the new folders.
  • Open a file with Xed (Text Editor)
    • Go to Edit > Preferences
      • Editor
        (check) Display line numbers
        (check) Display overview map
        (check) Display right margin (set to 80)
        (check) Highlight the current line
        (check) Highlight matching brackets
        Tab width: 2
        (check) Automatic indentation
        (un-check) Allow mouse wheel scrolling to change tabs
        
      • Theme: Twilight

btop

sudo tar xf ~/Downloads/btop.tbz -C /usr/local bin/btop

Cairo-Dock

To have it start on boot

  • CTRL+SPACE, start, choose Startup Applications
  • Add > Choose Applications > pick Cairo-Dock

In order to add launchers for Flatpak items:

  • Find the App under /var/lib/flatpak/<APP>
  • Looks like Flatpak creates symlinks of the current version (which is a folder named with a long hash). An example path for a launcher would be
    org.gimp.GIMP/current/active/export/share/applications/<LAUNCHER>
    
  • The icon will likely be a question mark so there are a couple options to correct that:
    1. Use a system icon (use Cuttlefish to find the name) gimp
    2. Use a hardcoded path /var/lib/flatpak/app/org.gimp.GIMP/current/active/export/share/icons/hicolor/256x256/apps/org.gimp.GIMP.png

Some apps, like system binaries may not have an icon either, so I created a folder in ~/Pictures/app-icons to house custom icons.

Blender

To fully install the downloaded version

  • Extract the zipped folder
  • Then move everything over
    mkdir -p ~/Software/Blender
    mv ~/Downloads/blender-3.0.1-linux-x64 ~/Software/Blender/v3.0.1
  • Update the Exec and Icon entries in ~/Software/Blender/v3.0.1/blender.desktop
    -Exec=blender %f
    -Icon=blender
    +Exec=/home/<USER>/Software/Blender/v3.0.1/blender %f
    +Icon=/home/<USER>/Software/Blender/v3.0.1/blender.svg
  • Make files searchable/runnable
    sudo ln -s ~/Software/Blender/v3.0.1/blender.desktop /usr/share/applications/
    sudo ln -s ~/Software/Blender/v3.0.1/blender /usr/local/bin/

Godot

  • Extract the binary into ~/bin/godot/<VERSION>/
    • Rename the binary to godot
  • Run touch ~/.local/share/applications/godot.desktop && chmod +x ~/.local/share/applications/godot.desktop
    • Add this (change <USER> to your username)
      [Desktop Entry]
      Type=Application
      Name=Godot
      GenericName=Game Editor
      Comment=Game editor
      Icon=godot
      Exec=/home/<USER>/bin/godot/v3.4.4/godot %U
      Terminal=false
      StartupNotify=false
      Path=/home/<USER>/bin/godot/v3.4.4
      

Synapse

Preferences

  • General
    Theme: Side Doish
    (check) Startup on login
    Activate: <ALT>space
    

Zsh

Install oh-my-zsh, plugins, and my custom theme

sh -c "$(curl -fsSL https://gist.githubusercontent.com/the0neWhoKnocks/364277866665192a088f8356bf8472fd/raw/set-up-zsh.sh)"

Once the install is done

  • Update your terminal's font to use the newly installed Fantasque
  • Update the color scheme to the one in ~/.oh-my-zsh/custom/themes/zsh-theme-boom/colors.sh. Normally just sourcing that file should work, but some terminals will override with their own colors.

Tilix

Preferences

  • Global
    (check) Save and restore window state
    (check) Automatically copy text to clipboard when selecting
    
  • Appearance
    Theme variant: Dark
    
  • Shortcuts
    [Terminal]
      Paste: Ctrl+V
    
  • Profiles > Default
    • General
      (check) Custom font: FantasqueSansMono NF Regular 16
      
    • Color
      (updated colors to match my zsh theme)
      (uncheck) Use theme colors for foreground/background
      Unfocused dim: 50%
      

Get rid of start error

sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
JMKVPropEdit
  • Download the zip file
  • Extract it to ~/Software/jmkvpropedit
  • Run chmod +x ~/Software/jmkvpropedit/JMkvpropedit.jar
  • You'll have to create a custom Launcher so you can more easily run it.
    • In cairo-dock
      • Create a custom launcher
        Launcher's name: JMKVPropEdit
        Image's name or path: mkv-gui
        Command to launch on click: java -jar ~/Software/jmkvpropedit/JMkvpropedit.jar
        
  • If the files are on a Network, they need to be writeable by anyone.

qemu

  • After the initial install, a reboot may be required to run virsh commands without sudo.
  • Verify things are running correctly with
    # list VMs - should be empty
    virsh -c qemu:///system list
    # make sure virtualization daemon is running
    systemctl status libvirtd.service
    
  • Start up virt-manager. If you run your quick launcher and type virt, an entry for Virtual Machine Manager should come up. Run it.
    • Go to Edit > Preferences
      [General]
        [X] Enable system tray icon
      

VLC

There was a noticeable boot time (like 30s everytime it was opened). Came across this post which led me to this post that outlines this fix.

  • Run this code
    sudo apt install qt5-style-kvantum qt5-style-kvantum-themes
    sudo sh -c "echo 'export QT_STYLE_OVERRIDE=kvantum' >> /etc/environment"
  • Log out and back in again. Now it should open within a second.

Gimp

To make things easier to work with since I'm used to Photoshop, I installed PhotoGIMP.

  • Download from https://github.com/Diolinux/PhotoGIMP/archive/refs/tags/1.0.zip
  • Make sure that GIMP has run at least once, and currently isn't running.
  • Open up ~/.config/GIMP
  • Rename the folder 2.10 to 2.10.bak
  • When you open the .zip file, there's some extranious stuff in there that doesn't matter. Here's the only folder I needed PhotoGIMP-1.0/.var/app/ort.gimp.GIMP/config/GIMP/2.10. Just extract the 2.10 folder next to the 2.10.bak folder.
  • Run GIMP and you should have a Photoshop-esque env.

Plugins:

  • G'MIC: Had to install the gimp-gmic package since installing from the repo failed with Python errors.

I couldn't find a built-in way of batch processing files, but either Linux or one of my tools installs ImageMagick so I can run something like this

###
# mogrify edits files in place
###

# convert all 'png' files in the current folder to a 'jpg'
mogrify -format jpg ./*.png

# resize png to either 1000 width or 562 height
mogrify -resize 1000x562 thumb.png

###
# convert allows for creating a uniquely named file
###

# resize png to exact width and height, and convert to a jpg (changing the output extension forces use of jpg encoder) 
convert "thumb.png" -resize 1000x562! "thumb.jpg"

WireShark

To fix error on start of sniffing

sudo chmod +x /usr/bin/dumpcap

Chrome

I prefer to save my passwords locally only, and noticed that I wasn't able to Edit/Delete them anymore when going to chrome://settings/passwords. Turns out it's a known common issue, and the fix is this:

  • Go to chrome://flags/#skip-undecryptable-passwords
  • Change the skip-undecryptable-passwords to Enabled, and restart Chrome

Kodi

This isn't something I use often, more for random development. Adding installation notes that I stumbled through.

Unreal Engine

https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/

  • Log in to your Epic account and go to Account > Connections
    • Connect GitHub
    • Select the Publishing EULA
  • Go to https://github.com/EpicGames/UnrealEngine, you may have to Accept Invitation (notice banner at top of page) in order to see the UnrealEngine repo.
    • While on the release branch, choose Code > Download ZIP. I add the latest version number at the end of the zip name so I know what I'm running.
    • Extract the zip's contents to ~/Software/Unreal Engine/<VERSION>
  • Build
    cd ~/Software/Unreal Engine/<VERSION>
    # bootstrap
    ./Setup.sh
    # set up project files
    ./GenerateProjectFiles.sh
    # build the binary
    make
  • Run
    ~/Software/Unreal Engine/<VERSION>/Engine/Binaries/Linux/UE4Editor
  • Troubleshooting
    • May need to run this stuff https://unrealcommunity.wiki/building-on-linux-qr8t0si2
      sudo apt install git build-essential clang-3.8 libglew-dev libcheese8 libcheese-gtk25 libclutter-gst-3.0-0 libcogl20 libclutter-gtk-1.0-0 libclutter-1.0-0  xserver-xorg-input-all
      
      # Now that Clang is installed; Mint users should also make a Symlink for clang & clang++:
      
      sudo ln -s /usr/bin/clang-3.8 /usr/bin/clang
      sudo ln -s /usr/bin/clang++-3.8 /usr/bin/clang++

Network Shares

SMB

Open up the default file manager

  • File > Connecto to Server...
    Server: <IP>
    Type: Windows share
    Folder: /<PATH>
    Domain name: <WORKGROUP> (or the group you have set up on your network)
    User name: <USERNAME>
    Password: <PASSWORD>
    
  • Once mounted, you can create a Bookmark of the mount, so after a reboot, you can quickly re-mount a location

Certificates

The CA trust store is generated by update-ca-certificates and is available at the following locations:

# As a single file (PEM bundle)
/etc/ssl/certs/ca-certificates.crt

# As an OpenSSL compatible certificate directory
/etc/ssl/certs

Add a cert

sudo apt-get install -y ca-certificates
sudo cp <CERT_NAME>.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

Troubleshooting

  • In some cases, changes don't take effect right away and a restart may be required.
  • In some cases a restart doesn't work, for example Browsers sometimes have their own certificate area where you have to manually add a cert. For example, in Chrome you can go to Settings > search for cert > click Security > click Manage Certificates > go to Authorities and add your cert.

Backup/Restore Data

Chrome and Chromium

  • Paths
    ~/.config/chromium
    ~/.config/google-chrome
    
  • Profiles: If you're logged in, it'll be in a Profile <#> folder. If you don't log in, it'll be in the Default folder.
  • In order to restore the profile, you'll want to back up the Local State file. It's a JSON file with some current profile info in it.

Nemo

Paths

~/.config/gtk-3.0/bookmarks
~/.config/nemo
~/.local/share/nemo

Passwords & Keys

Path

~/.local/share/keyrings

There's an Import option in the Passwords & Keys dialog. If that doesn't work, copying over the backed up files should work after a logout/login, or reboot.

Restarting Cinnamon

Some changes may require rebooting Cinnamon. You do that with CTRL+ALT+ESC.


Troubleshooting

Screen Brightness not working

It stops working when I switch to the Nvidia driver. I ended up having to download an Applet which actually gives me control over color temp (blue light filter) and brightness. I tried a bunch of things, but qredshift was the only thing that worked.

There are a couple ways to install it:

  1. You can download it from https://cinnamon-spices.linuxmint.com/applets/view/313, and follow the install instructions
  2. Or, right-click the bottom bar > Applets > Download > Search for Qredshift, and install it.

Just enable it, and set Day Settings to

Temperature: 4500
Brightness: 70

If you want to reset a setting, just right-click a slider in the applet

Determine BIOS info

sudo dmidecode --type bios

# all system info
sudo dmidecode | less

Timezone / Localtime

Files are located at

/etc/localtime  (timezone data)
/etc/timezone  (plain text)

Useful Commands

Use file to get file info. Helpful in determining if a file can be read as text or binary.

> file --mime /usr/share/zoneinfo/America/Los_Angeles | grep -oE ': (.*)' 
# : application/octet-stream; charset=binary

> file --mime ~/.zshrc | grep -oE ': (.*)'
# : text/plain; charset=us-ascii

Sources

#!/usr/bin/env bash
echo " ╭───────────────────╮ "
echo " │ Install Oh-My-ZSH │ "
echo " ╰───────────────────╯ "
# Install
rm -rf "${HOME}/.oh-my-zsh"
CHSH=no RUNZSH=no sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RCFILE="${HOME}/.zshrc"
DEFAULT__ZSH_CUSTOM="${HOME}/.oh-my-zsh/custom"
PATH__OMZ_CUSTOM="${ZSH_CUSTOM:-"${DEFAULT__ZSH_CUSTOM}"}"
PATH__ZSH_THEME="${PATH__OMZ_CUSTOM}/themes/zsh-theme-boom"
PATH__OMZ_PLUGINS="${PATH__OMZ_CUSTOM}/plugins"
# Add external plugins
if [ ! -d "${PATH__OMZ_PLUGINS}/zsh-autosuggestions" ]; then
(
cd "${PATH__OMZ_PLUGINS}"
git clone https://github.com/zsh-users/zsh-autosuggestions.git
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
)
fi
sed -i '/plugins=(/,/)/c\plugins=(\n zsh-autosuggestions\n zsh-syntax-highlighting\n)' "${RCFILE}"
# Add my theme
if [ ! -d "${PATH__ZSH_THEME}" ]; then
(
mkdir -p "${PATH__ZSH_THEME}"
cd "${PATH__ZSH_THEME}"
git clone https://github.com/the0neWhoKnocks/zsh-theme-boom.git .
git remote set-url origin [email protected]:the0neWhoKnocks/zsh-theme-boom.git
git checkout linux
)
fi
# set theme
sed -i -E 's|ZSH_THEME=".*"|ZSH_THEME="zsh-theme-boom/skin"|' "${RCFILE}"
# add custom fonts
TTF_DIR=/usr/share/fonts/truetype
sudo mkdir -p "${TTF_DIR}"
sudo cp "${PATH__ZSH_THEME}/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono Windows Compatible.ttf" "${TTF_DIR}"
# update font cache.
sudo fc-cache -fv
# change shell
sudo chsh -s $(which zsh) && zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment