Skip to content

Instantly share code, notes, and snippets.

@phanect
Last active July 17, 2024 08:23
Show Gist options
  • Save phanect/9c692396d6d7a468d189fca0b4939fa7 to your computer and use it in GitHub Desktop.
Save phanect/9c692396d6d7a468d189fca0b4939fa7 to your computer and use it in GitHub Desktop.
Personal setup instruction for my KDE neon box

1. Update and install software

sudo pkcon refresh
sudo pkcon update

sudo apt install --ignore-missing \
  curl \
  git \
  git-filter-repo \
  kate \
  kcalc \
  kolourpaint \
  fcitx5-mozc kde-config-fcitx5 mozc-utils-gui \
  uvccapture guvcview \
  vlc \
  wget \
  whois \
  yakuake \
  language-pack-ja fonts-noto-cjk-extra

# im-config and its config file prevents fcitx5 from working with Wayland
sudo apt remove --purge im-config
sudo apt remove --purge kwrite maliit-framework maliit-keyboard


# TODO also install `clamav`

2. Manually install following software

undefined machine only

3. Setup for installed software

sudo apt update
sudo apt install --fix-broken
sudo apt autoremove

# Login to GitHub for GitHub CLI
gh auth login

# Install gh-poi: https://github.com/seachicken/gh-poi
gh extension install seachicken/gh-poi

# Update npm
sudo npm update --global

# Install npm completion
npm completion | sudo tee /etc/bash_completion.d/npm

# Allow Dropbox to watch more number of files
echo "fs.inotify.max_user_watches = 100000" | sudo tee /etc/sysctl.d/dropbox.conf

#
# Template for user home directory
#
sudo mkdir --parents "/etc/skel/.config/autostart/"
sudo cp "/usr/share/applications/dropbox.desktop" "/etc/skel/.config/autostart/dropbox.desktop"
sudo cp "/usr/share/applications/org.kde.yakuake.desktop" "/etc/skel/.config/autostart/org.kde.yakuake.desktop"

sudo tee "/etc/skel/.gitconfig" <<'__SKEL_GIT__'
[core]
  autocrlf = false
  fileMode = false
[init]
  defaultBranch = main
[format]
	pretty = fuller
[pager]
  log = /usr/share/doc/git/contrib/diff-highlight/diff-highlight | less
  show = /usr/share/doc/git/contrib/diff-highlight/diff-highlight | less
  diff = /usr/share/doc/git/contrib/diff-highlight/diff-highlight | less
__SKEL_GIT__

sudo mkdir --parents "/etc/skel/.config/gtk-4.0/"
sudo mkdir --parents "/etc/skel/.config/gtk-3.0/"

sudo tee "/etc/skel/.config/gtk-4.0/settings.ini" <<'__SKEL_FCITX_GTK4__'
[Settings]
gtk-im-module=fcitx
__SKEL_FCITX_GTK4__

sudo tee "/etc/skel/.config/gtk-3.0/settings.ini" <<'__SKEL_FCITX_GTK3__'
[Settings]
gtk-im-module=fcitx
__SKEL_FCITX_GTK3__

sudo tee "/etc/skel/.gtkrc-2.0" <<'__SKEL_FCITX_GTK2__'
gtk-im-module="fcitx"
__SKEL_FCITX_GTK2__

#
# git config
#

# Don't convert line endings to CRLF
sudo git config --system core.autocrlf false
# Don't commit file permission change
sudo git config --system core.fileMode false
# Set default branch name
sudo git config --system init.defaultBranch main
# Log format
sudo git config --system format.pretty fuller


# Set up better colorization of git diff
sudo chmod +x /usr/share/doc/git/contrib/diff-highlight/diff-highlight

sudo git config --system pager.log "/usr/share/doc/git/contrib/diff-highlight/diff-highlight | less"
sudo git config --system pager.show "/usr/share/doc/git/contrib/diff-highlight/diff-highlight | less"
sudo git config --system pager.diff "/usr/share/doc/git/contrib/diff-highlight/diff-highlight | less"


#
# SSH key
#
if [[ ! -f ~/.ssh/id_ed25519 ]]; then
  ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
fi

4. Setup Git identity

git config --global user.name "John Doe"
git config --global user.email "git@example.com"

5. Start apps to set up

yakuake &
dropbox start -i

6. Other manual configurations

Fonts

(TODO: Write an automation script)

https://github.com/yuru7/udev-gothic

  1. Download UDEVGothic_v*.zip (Without NF in the file name) from its Release page
  2. Extract zip and install UDEVGothic35JPDOC-*.ttf (With 35 and JPDOCin the file name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment