Skip to content

Repository files navigation

My Dotfiles

Have a look around and feel free to copy the stuff you like 😊

This dotfiles does not download anything during install, update or usage, besides git clone and git fetch / pull to the git repo.

Project Links

TODO

  • Addmpv configs

Install

Keep always an existing terminal open, just in case

Debian / Ubuntu

Debian / Ubuntu

# How to get rid of purple background color in newt apps? -> https://askubuntu.com/q/750237
ln -sf /etc/newt/palette.original /etc/alternatives/newt-palette

Required Packages

apt install \
bash \
coreutils \
curl \
git \
lsb-release \
python3 \
python3-yaml \
zsh \
zsh-autosuggestions \
zsh-syntax-highlighting \
zstd

Optional Packages

apt install \
acl \
bind9-utils \
brotli \
gzip \
htop \
iftop \
iotop \
jq \
logrotate \
lsd \
ncdu \
neovim \
net-tools \
plocate \
rsync \
sqlite3 \
sudo \
systemd-coredump \
tmux \
unzip \
wget \
zip

Install

curl https://git.compilenix.org/CompileNix/dotfiles/-/raw/main/install.sh --output /tmp/install.sh \
&& /bin/bash /tmp/install.sh \
&& rm -f /tmp/install.sh
Fedora

Fedora

Required Packages

dnf install \
coreutils \
curl \
git \
python3 \
python3-pyyaml \
redhat-lsb \
which \
zsh \
zsh-autosuggestions \
zsh-syntax-highlighting \
zstd

Optional Packages

dnf install \
NetworkManager-tui \
acl \
bind9-next-utils \
dua-cli \
findutils \
htop \
iftop \
iotop \
iptables \
jq \
logrotate \
lsd \
ncdu \
neovim \
plocate \
python3-rich \
rsync \
sqlite \
sudo \
tmux \
util-linux-user \
wget

Install

curl https://git.compilenix.org/CompileNix/dotfiles/-/raw/main/install.sh --output /tmp/install.sh \
&& /bin/bash /tmp/install.sh \
&& rm -f /tmp/install.sh

Fonts

Replace the default emoji font with one that offers some more colors: Google Noto

dnf remove gdouros-symbola-fonts
dnf install google-noto-emoji-color-fonts

Remove boot splash screen

So you can see more bootup details.

plymouth-set-default-theme details -R
grubby --update-kernel=ALL --remove-args="quiet"
grubby --update-kernel=ALL --remove-args="rhgb"
MacOS

MacOS

# Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# Install software & tools
brew install \
acl2 \
brotli \
coreutils \
curl \
git \
gzip \
htop \
iftop \
lsd \
ncdu \
neovim \
net-tools \
python3 \
rsync \
sqlite \
tmux \
unzip \
vim \
wget \
zip \
zsh \
zsh-autosuggestions \
zsh-syntax-highlighting \
zstd
# Install python modules required to install dotfiles
pip3 install rich pyyaml neovim
wget https://git.compilenix.org/CompileNix/dotfiles/-/raw/main/install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& rm -f install.sh

Table Of Contents

[TOC]

ZSH Prompt

I have two options for the zsh prompt built-in: spaceship-prompt and my own.

If you'd like to use spaceship-prompt open up ~/.zshrc.env, set ENABLE_ZSH_SPACESHIP_PROMPT=true and start a new shell. From here you can use and configure spaceship-prompt as usual.

My own zsh prompt is visually very similar to spaceship-prompt, with the key difference that no zsh functions or other scripts are invoked between prompt renders. This makes new prompts appear instantly. Only the most basic and fast to render things are included; time, date, username, path, hostname and exit code. Here are the available options with some suggested values, which you can tweak in ~/.zshrc.env:

ZSH_PROMPT_EXIT_CODE_COLOR_FAILURE='red'
ZSH_PROMPT_EXIT_CODE_PREFIX='with code'
ZSH_PROMPT_EXIT_CODE_SUFFIX=' (╯°□°)╯︵ ┻━┻'
ZSH_PROMPT_SEPARATE_LINE=true

Here is an example, how this looks like:

zsh prompt example screenshot

Add Your Local Changes

Some configs do support including your (local) changes and overrides, such that they less likely clash with dotfiles updates. Here are the supported tools and configs and how to add your own changes for them:

ConfigNotes
.gitconfig~/.gitconfig_include
.tmux.conf~/.tmux.conf_include. This get's included at the end of .tmux.conf
.vimrc~/.vimrc_include
.zlogout~/.zlogout_include. A place for logout tasks & actions
.zshrc~/.zshrc_include. This get's included after all aliases and functions are defined and before the shell prompt is set-up

Automatic Updates

This dotfiles repo does async background update checks, by default, using git fetch every time a new shell is started. You'll find the code for this in home/.zshrc, the zsh function named test-dotfiles-updates is called in the background during shell startup and if there is an update in the git repo it will create the temporary file /tmp/$USER-zsh-dotfiles-async-update-exists.yep.

When the update check did find some updates in the git repo, it'll show you the git log and ask you if you'd like to pull / merge these changes.

Disable Automatic Update Checks Permanently

If you'd like to fully disable this, set ENABLE_ZSH_ASYNC_UPDATE_CHECK=false in ~/.zshrc.env.

Disable Automatic Update Checks temporarily

Use the zsh alias disable-dotfiles-update-prompt-temp to disable checking for updates, until either the next reboot or removal of the file /tmp/$USER-zsh-dotfiles-async-update-check.disabled.

ZSH Functions And Aliases

I've added a lot of aliases and functions over the time. To list the functions and aliases, from this repo run get-functions-dotfiles and get-aliases-dotfiles.

Most of my aliases and zsh functions are named in a similar structure as Powershell recommends; verb-noun.

Additionally, all zsh functions from this repo will always show a description of the function on missing arguments or when given --help and -h.

Tools

NameDescriptionAdditional Tags
powerline-fontsPatched fonts for Powerline userscli, font, statusline, vim, neovim, python, zsh, bash, fish, tmux, IPython, Awesome, i3, Qtile
httpstathttpstat visualizes curl(1) statistics in a way of beauty and clarity.visualization, python, cli, http, curl
curlconverterConvert cURL commands to Python, JavaScript, PHP, R, Go, Ruby, Rust, Elixir, Java, MATLAB, C#, Dart and morewebsite
jqCommand-line JSON processorcli
ssh-auditSSH server & client auditing (banner, key exchange, encryption, mac, compression, compatibility, security, etc)cli, ssh, audit, python, security
XCAX Certificate and Key managementgui, X509, certificate, management, pkcs7, crl, ec, pkcs11, pkcs12, dsa, pkcs8
richRich is a Python library for rich text and beautiful formatting in the terminal.lib
diveA tool for exploring each layer in a docker imagecli, container, image
pciPacket communication investigatorcli, gui, security, pcap, wireshark, network, analyzer, tshark, graph, python
regexrRegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.website
Grok DebuggerDebug your Grok patternswebsite
Security HeadersScan a public websites HTTP security related headerswebsite
Qualys SSL LabsThis free online service performs a deep analysis of the configuration of any SSL web server on the public Internet.website, X509, certificate
TableConvertThis converter is used to convert Excel (or other spreadsheets) into Markdown Table.website
Compiler ExplorerRun compilers interactively from your web browser and interact with the assemblywebsite
ctopTop-like interface for container metricscli, go, docker, htop
tldr++fast and interactive tldr client written with gocli, man-page, help
Photopeaweb-based photo and graphics editor supporting Photoshop's PSD as well as JPEG, PNG, DNG, GIF, SVG, PDF and otherswebsite
BrunoRe-Inventing the API Client. Bruno is a Git-integrated, fully offline, and open-source API clientgui, cli, http, test, postman

Rust Tools

CommandCrates.io LinkDescriptionAdditional Tags
alacrittyalacrittyA fast, cross-platform, OpenGL terminal emulatorrust, gui
amdgpu_topamdgpu_topTool to displays AMDGPU usage. The tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, gpu_metrics and AMDGPU driver.rust, cli, tui, gui, video
atuinatuinmagical shell history. A replacement for Arrow+Up and Ctrl+Rrust, cli
batbatGo implement CLI, cURL-like tool for humansrust, cli, http
cargo-asmcargo-asmA cargo subcommand that displays the generated assembly of Rust source code.rust, cli
cargo-auditcargo-auditAudit Cargo.lock for crates with security vulnerabilitiesrust, cli
cargo-auditablecargo-auditableMake production Rust binaries auditablerust, cli
cargo-bloatcargo-bloatFind out what takes most of the space in your executable.rust, cli
cargo-cachecargo-cacheManage cargo cache ($CARGO_HOME or~/.cargo/), show sizes and remove directories selectivelyrust, cli
cargo-debcargo-debMake Debian packages (.deb) easily with a Cargo subcommandrust, cli
cargo-featurecargo-featureCargo plugin to manage dependency featuresrust, cli
cargo-generate-rpmcargo-generate-rpmGenerate a binary RPM package (.rpm) from Cargo projectsrust, cli
cargo-infocargo-infoExtends cargo to query crates.io registry for crates detailsrust, cli
cargo-nextestcargo-nextestA next-generation test runner for Rust.rust, cli
cargo-sortcargo-sortCheck if tables and items in a .toml file are lexically sortedrust, cli
cargo-updatecargo-updateA cargo subcommand for checking and applying updates to installed executablesrust, cli
cargo-watchcargo-watchWatches over your Cargo project's sourcerust, cli
dua-cliduaDisk Usage Analyzer (DUA) is a tool to conveniently learn about the disk usage of directories, fast!rust, cli, du, ncdu, disk usage
evaevaCalculator REPL similar to bc(1)rust, cli
gpg-tuigpg-tuiManage your GnuPG keys with ease!rust, cli
hurlhurlHurl, run and test HTTP requestsrust, cli
hyperfinehyperfineA command-line benchmarking toolrust, cli
lsdlsdAn ls command with a lot of pretty colors and some other stuff.rust, cli
mprocsmprocsTUI for running multiple processesrust, cli, tui
ohaohaOhayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.rust, cli
ripgrepripgrepLike grep but betterrust, cli
sccachesccacheSccache is a ccache-like tool.rust, cli
sdsdsd is an intuitive find & replace CLI.rust, cli, sed
starshipstarshipThe minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️rust, cli, shell
tokeitokeiCount your code, quickly.rust, cli
toluoltoluolA crate for making DNS queriesrust, cli, dig
trippytrippyA network diagnostic toolrust, cli, tcp, udp, icmp, ping, probe
zellijzellijA terminal workspace with batteries includedrust, cli, tmux

Rust Tools Install Requirements

sccache
dnf install openssl openssl-devel
alacritty
dnf install cmake freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel g++

VIM / NeoVIM

Keybinds

Most of them are just the default binds and this just serves as a reminder for the ones I find useful to know and want to remember better.

Mode: KeybindDescriptionNotes
N: ciwReplace wordDelete word under cursor and change to insert mode
N: ci"Replace text inside "Delete text under cursor within the nearest occurrences of "
N: VapSelect current block of text
N: ctrl+v 2j shift+I # ESCBlock commentctrl+v : change to "Visual Block" mode <br>2j : move cursor two lines down <br>shift+I : change to "Insert" mode <br># : line comment text, you want to insert <br>ESC : exit "Insert" / "Visual Block" mode and apply changes to all selected lines
V: gqWrap text according to textwidthFormat lines with 'gq' in Vim
V: =Apply text format according to filetypeCorrect alignment of code

File Options

Some options I often use in modelines.

OptionDescription
:set tabstop=4Indent using 4 tabstops
:set expandtabUse spaces for indentation, instead of tabstops
:set [no]autoindentDisable / Enable autoindenting
:set [no]smartindentDisable / Enable smartindenting
:set filetype?show current filetype
:set filetype=pythonOverride default filetype detection

Additional Plugins Setup for NeoVIM Setup

Install vim-plug

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

Install Dependencies

NodeJS is required for coc.nvim.

dnf install nodejs

Update ~/.vimrc_include

contents
callplug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'dense-analysis/ale'
Plug 'tpope/vim-surround'
Plug 'ctrlpvim/ctrlp.vim'callplug#end()
setsigncolumn=yes
" Having longer updatetime (default is 4000 ms = 4s) leads to noticeable" delays and poor user experiencesetupdatetime=300" Use tab for trigger completion with characters ahead and navigate" NOTE: There's always complete item selected by default, you may want to enable" no select by `"suggest.noselect": true` in your configuration file" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by" other plugin before putting this into your config"inoremap <silent><expr> <TAB>" \ coc#pum#visible() ? coc#pum#next(1) :" \ CheckBackspace() ? "\<Tab>" :" \ coc#refresh()"inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"" Make <CR> to accept selected completion item or notify coc.nvim to format" <C-g>u breaks current undo, please make your own choice"inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()" \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"inoremap<silent><expr><TAB>\ coc#pum#visible() ? coc#pum#confirm() : "\<Tab>"function!CheckBackspace() abortletcol=col('.') -1return!col||getline('.')[col-1] =~# '\s'endfunction" Use <c-space> to trigger completionifhas('nvim')
inoremap<silent><expr><c-space> coc#refresh()elseinoremap<silent><expr><c-@> coc#refresh()endifnmap<silent>gd<Plug>(coc-definition)nmap<silent>gy<Plug>(coc-type-definition)nmap<silent>gi<Plug>(coc-implementation)nmap<silent>gr<Plug>(coc-references)" Highlight the symbol and its references when holding the cursorautocmdCursorHold*silentcallCocActionAsync('highlight')
" Symbol renamingnmap<leader>rn <Plug>(coc-rename)" Use K to show documentation in preview window.nnoremap<silent>K:call <SID>show_documentation()<CR>function!s:show_documentation()
if (index(['vim','help'], &filetype) >=0)
execute'h '.expand('<cword>')
elsecallCocAction('doHover')
endifendfunction" Remap <PageDown> and <PageUp> to scroll float windows/popupsifhas('nvim-0.4.0') ||has('patch-8.2.0750')
nnoremap<silent><nowait><expr><PageDown> coc#float#has_scroll() ? coc#float#scroll(1) : "\<PageDown>"nnoremap<silent><nowait><expr><PageUp> coc#float#has_scroll() ? coc#float#scroll(0) : "\<PageUp>"inoremap<silent><nowait><expr><PageDown> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"inoremap<silent><nowait><expr><PageUp> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"vnoremap<silent><nowait><expr><PageDown> coc#float#has_scroll() ? coc#float#scroll(1) : "\<PageDown>"vnoremap<silent><nowait><expr><PageUp> coc#float#has_scroll() ? coc#float#scroll(0) : "\<PageUp>"endif

Save the config and install the plugins, using the commands inside vim

:PlugInstall

Plugins

CoC JSON

Install in Vim

:CocInstall coc-json

Rust Language Server Plugin (LSP)

:CocInstall coc-rust-analyzer
:CocConfig

JSON snippet to add

{
"rust-analyzer.check.overrideCommand": [
"cargo",
"clippy",
"--message-format=json",
"--all-targets",
"--all-features",
"--",
"-Wclippy::pedantic",
"-Wclippy::cognitive_complexity",
"-Wclippy::indexing_slicing",
"-Wclippy::large_include_file",
"-Wclippy::linkedlist",
"-Wclippy::map_unwrap_or",
"-Wclippy::option_option",
"-Wclippy::verbose_bit_mask",
"-Wclippy::unused_self",
"-Wclippy::unreadable_literal",
"-Wclippy::unnested_or_patterns",
"-Wclippy::unnecessary_wraps",
"-Wclippy::uninlined_format_args",
"-Wclippy::unchecked_duration_subtraction",
"-Wclippy::too_many_lines",
"-Wclippy::unwrap_used"
],
"inlayHint.enable": false
}

Update ~/.vimrc_include

contents
callplug#begin('~/.vim/plugged')
Plug 'rust-lang/rust.vim'callplug#end()
letg:rustfmt_autosave=1letg:rustfmt_fail_silently=0

Bash LSP

Install in Vim

:CocInstall coc-sh

Dockerfile LSP

Install LSP in shell

npm install dockerfile-language-server-nodejs

Configure CoC

:CocConfig

JSON snippet to add

"languageserver": {
"dockerfile": {
"command": "docker-langserver",
"filetypes": ["dockerfile"],
"args": ["--stdio"]
}
}

JavaScript / TypeScript LSP

Install LSP in VIM

:CocInstall coc-tsserver

Markdown LSP

Install LSP in VIM

:CocInstall coc-markdownlint

Markdown Composer

vim-markdown-composer An asynchronous markdown preview plugin for Vim and Neovim.

Update ~/.vimrc_include

contents
function!BuildComposer(info)
ifa:info.status !='unchanged'||a:info.force
ifhas('nvim')
!cargo build --release --locked
else!cargo build --release --locked --no-default-features --features json-rpcendifendifendfunctioncallplug#begin('~/.vim/plugged')
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }
callplug#end()
letg:markdown_composer_autostart=0

Because the markdown composer does not autostart, here is the vim command for it:

:ComposerStart

PHP LSP

Install LSP in shell

npm install intelephense

Configure CoC

:CocConfig

JSON snippet to add

"languageserver": {
"intelephense": {
"command": "intelephense",
"args": ["--stdio"],
"filetypes": ["php"],
"initializationOptions": {
"storagePath": "/tmp/intelephense"
}
}
}

Python LSP

Configure CoC

:CocInstall coc-pyright

Comment in and out

Update ~/.vimrc_include

contents
callplug#begin('~/.vim/plugged')
Plug 'gennaro-tedesco/nvim-commaround'callplug#end()
vmap<leader>c <Plug>ToggleCommaround

Treesitter

Update ~/.vimrc_include

contents
callplug#begin('~/.vim/plugged')
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'nvim-treesitter/nvim-treesitter-context'callplug#end()
highlight TreesitterContext ctermfg=White ctermbg=DarkGrey
lua <<EOF
require'treesitter-context'.setup{
enable= true, -- Enable this plugin (Can be enabled/disabled later via commands)
}
EOF

Install language parsers

:TSInstall bash c cpp diff dockerfile git_config gitattributes gitcommit gitignore go gomod gosum html http ini javascript jq jsdoc json json5 jsonc latex lua make markdown markdown_inline passwd perl php python regex rust scheme sc
ss sql toml typescript vue yaml

KDE

Alt+Tab window switcher only show windows of the current monitor

Settings -> Window Manager Settings -> Window Behavior -> Task Switcher -> Main -> Screens checkbox

Source: reddit.com/r/kde

SwayWM

  • ImageMagick (for screen lock image processing)
  • dmenu
  • dunst
  • gimp
  • gnome-terminal
  • grimshot
  • imv
  • jtc
  • kanshi
  • light
  • mako
  • mako (notifications)
  • rofi
  • slurp (for screenshots)
  • sway
  • swayidle (turn off & on displays)
  • swaylock
  • thunar (filemanager)
  • waybar
  • wf-recorder (cli screen recorder, obs doesn't work)
  • wl-clipboard

X11 .xinitrc

  • i3
  • xrdb
  • xinput
  • xset
  • setxkbmap
  • xsetroot
  • numlockx
  • autocutsel
  • dbus-launch
  • ImageMagick (for screen lock image processing)
  • dmenu
  • rofi
  • lxterminal
  • gimp
  • thunar (filemanager)

Update

Use the zsh function update-dotfiles.

If you have a really old version, you may need to update it manually.

Manual Update

Copy and paste into terminal, after that start a new (separat) terminal / session to verify everything worked out fine.

Keep always a additional terminal open, in case of any issues!

rm -rf ~/dotfiles 2>/dev/null
wget https://git.compilenix.org/CompileNix/dotfiles/-/raw/main/install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& rm -f install.sh
exit
zsh

Update Spaceship Prompt Plugin

cd~/dotfiles
temp_dir="/tmp/$(uuidgen)"
mkdir -pv "$temp_dir"cd"$temp_dir"
git clone https://github.com/spaceship-prompt/spaceship-prompt.git git_repo
cd git_repo
echo"Which tag or commit to checkout? ";read checkout_target
git checkout "$checkout_target"
commit_id=$(git rev-parse HEAD)echo"commit id: $commit_id"
rm -rf .git tests .github docs
tar --create --file "../${commit_id}.tar.zstd" --preserve-permissions --zstd .
cp -v "../${commit_id}.tar.zstd"~/dotfiles/zsh-plugins/spaceship-prompt/
popd>/dev/null
popd>/dev/null
unset checkout_target
unset commit_id
rm -rf "$temp_dir"

Test / Build / Dev

  • Comment out "git clone" in install.sh
  • Comment out "git reset --hard" in home/.zshrc
  • Comment out "git pull" in home/.zshrc
cdtest
docker build -t local/dotfiles:ubuntu -f ./ubuntu.Dockerfile .cd ..
docker run -it --rm -v $(pwd)/:/root/dotfiles:z local/dotfiles:ubuntu
# Run bash ./dotfiles/install.sh# Run zshcdtest
docker build -t local/dotfiles:fedora -f ./fedora.Dockerfile .cd ..
docker run -it --rm -v $(pwd)/:/root/dotfiles:z local/dotfiles:fedora
# Run bash ./dotfiles/install.sh# Run zsh

Sway Desktop Notifications (Wayland)

Install:

i3 Desktop Notifications (X11)

Install:

GNOME Settings

# switch the input focus on mouse hover, without clicking, like in i3 and SwayWM
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'# this also unfocuses a window when mouse moves out (i.e. to desktop bg)
gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'smart'# don't focus new windows (that aren't under the mouse)
gsettings set org.gnome.mutter focus-change-on-pointer-rest false# don't wait for the mouse to stay still until focus
gsettings set org.gnome.mutter center-new-windows true# Disable "hot corner"
gsettings set org.gnome.desktop.interface enable-hot-corners false# keyboard settings
gsettings set org.gnome.desktop.peripherals.keyboard delay 150
gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 28
# mouse accel profile
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'# my personal mouse speed
gsettings set org.gnome.desktop.peripherals.mouse speed 0
# Whether to resize windows with the right button
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true# disable bells
gsettings set org.gnome.desktop.wm.preferences audible-bell false
gsettings set org.gnome.desktop.wm.preferences visual-bell false# disable desktop workspaces
gsettings set org.gnome.desktop.wm.preferences num-workspaces 1
# Disable Desktop Animations
gsettings set org.gnome.desktop.interface enable-animations false# disable automatic update
gsettings set org.gnome.software download-updates false
gsettings set org.gnome.software download-updates-notify false# Files App# disable recursive search
gsettings set org.gnome.nautilus.preferences recursive-search 'never'# don't count files of dirs
gsettings set org.gnome.nautilus.preferences show-directory-item-counts 'never'# switch between windows in current workspace only
gsettings set org.gnome.shell.window-switcher current-workspace-only true# Alt+Tab behavior# The default is to have `Alt-Tab` switch you between applications in the current workspace. One can use `Alt-backtick` (or whatever key you have above Tab) to switch between windows in the current application.# I prefer a Windows-like setup, where `Alt-Tab` switches between windows in the current workspace, regardless of the application to which they belong.
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab', '<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Alt><Shift>Tab', '<Super><Shift>Tab']"# custom keybinding to start new terminal with Super+Enter
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Start Terminal'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super>Return'# gnome-terminal
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command'gnome-terminal'# alacritty (via cargo install alacritty)# gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '/home/kweis/.cargo/bin/alacritty'# Characters And Emoji Application
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name 'Characters And Emoji Application'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding '<Super>period'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command'/usr/bin/gjs-console /usr/bin/gnome-characters'# Blank Screen
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ name 'Blank Screen'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding '<Super>k'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ command'busctl --user call org.gnome.Shell.ScreenShield /org/gnome/ScreenSaver org.gnome.ScreenSaver SetActive b true'# custom keybinding start start files app in home dir with Super+E
gsettings set org.gnome.settings-daemon.plugins.media-keys home "['<Super>e']"# Font things
gsettings set org.gnome.desktop.interface monospace-font-name 'Source Code Pro 10'
gsettings set org.gnome.gedit.preferences.editor editor-font 'Fira Code 11'
gsettings set org.gnome.TextEditor custom-font 'Fira Code 11'
gsettings set org.gnome.desktop.interface font-hinting 'full'
gsettings set org.gnome.desktop.interface font-antialiasing 'grayscale'# automatically remove old files from trash after 30 days
gsettings set org.gnome.desktop.privacy recent-files-max-age 30
gsettings set org.gnome.desktop.privacy remove-old-trash-files true
gsettings set org.gnome.desktop.privacy remove-old-temp-files true

GNOME Extensions

  • Tactile
    • Tile windows on a custom grid using your keyboard. Type Super-T to show the grid, then type two tiles (or the same tile twice) to move the active window. The grid can be up to 4x3 (corresponding to one hand on the keyboard) and each row/column can be weighted to take up more or less space.
  • Tiling Assistant
    • Expand GNOME's 2 column tiling and add a Windows-snap-assist-inspired popup
  • Animation Tweaks
    • Additional Gnome UI effects
  • AppIndicator and KStatusNotifierItem Support
    • Tray icon support
  • GSConnect
    • A complete implementation of KDE Connect
  • Grand Theft Focus
    • Removes the 'Window is ready' notification and brings the window into focus instead.

Load Extensions Config

dconf load /org/gnome/shell/extensions/ <~/dotfiles/dconf/extensions.dconf
dconf load /org/gnome/desktop/wm/keybindings/ <~/dotfiles/dconf/keybindings.dconf

Gnome Environment

The configuration of systemd user environment variables, which get inherited by all processes in the gnome session.

mkdir -pv ~/.config/systemd/user-environment.d
cat <<'EOF' > ~/.config/systemd/user-environment.d/rust.confCARGO_BUILD_JOBS=16RUSTFLAGS="-C target-cpu=native"# requires `cargo install sccache`# adjust path to your needsRUSTC_WRAPPER="/home/kweis/.cargo/bin/sccache"#CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1#CARGO_PROFILE_RELEASE_LTO=true#CARGO_PROFILE_RELEASE_OPT_LEVEL=3#CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparseEOF
cat <<'EOF' > ~/.config/systemd/user-environment.d/dotnet.confDOTNET_CLI_TELEMETRY_OPTOUT=1EOF

UI Settings

Using:

  • lxappearance
  • Default Font: Helvetica LT Pro 11

Replace text cursor with regular mouse pointer

cd /usr/share/icons/Adwaita/cursors/
ln -sf left_ptr text
ln -sf left_ptr xterm

GTK Themes

Troubleshooting

Create links to missing cursors

cd~/.icons/theme/cursors/
ln -s right_ptr arrow
ln -s cross crosshair
ln -s right_ptr draft_large
ln -s right_ptr draft_small
ln -s cross plus
ln -s left_ptr top_left_arrow
ln -s cross tcross
ln -s hand hand1
ln -s hand hand2
ln -s left_side left_tee
ln -s left_ptr ul_angle
ln -s left_ptr ur_angle

How to keep using ad blockers on chrome and chromium

  1. google's manifest v3 has no analogue to the webRequestBlocking API, which is necessary for (effective) ad blockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions altogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

sudo mkdir -p /etc/opt/chrome/policies/managed /etc/opt/chromium/policies/managed
echo'{ "ExtensionManifestV2Availability": 2 }'| sudo tee /etc/opt/chrome/policies/managed/policy.json /etc/opt/chromium/policies/managed/policy.json

ChromeOS

  • enable developer mode
  • upon rebooting, go into vt2 (shift+ctrl+right arrow function key)
  • log in as root
  • type in /usr/libexec/debugd/helpers/dev_features_rootfs_verification && reboot
  • upon rebooting, go into vt2 again and log in as root
  • run the commands from the linux section

Windows

Open regedit, and create Software\Policies\Google\Chrome\ExtensionManifestV2Availability in HKEY_LOCAL_MACHINE as a dword set to 0x00000002

MacOS

In a terminal, run:

  • defaults write com.google.Chrome ExtensionManifestV2Availability -int 2
  • defaults write com.google.Chromium ExtensionManifestV2Availability -int 2

(note that i haven't tested this for mac. please let me know if it doesn't work)

Windows

A meme with three panels, each showing the "blinking white guy meme" (also known as Drew Scanlon Reaction) next to different versions of the Windows logo. Top panel: "Windows 10" logo and Drew Scanlon looking to the same side (left) as the Windows logo. Middle panel: "Windows 11" with Drew Scanlon looking straight at the viewer. Bottom panel: "Windows 12" with Drew Scanlon looking to the right side.

Tools / Software

  • VeraCrypt: Free open source disk encryption software for Windows, Mac OSX and Linux
  • 7-ZIP: archive file management
  • Process Explorer: more advanced Task Manager
  • TeraCopy: better file copy & move
  • NetLimiter: alternative firewall (not based on Windows Firewall)
  • DiskUsage: A Windows utility to show disk usage in a tree map

Used by

Contributors

Languages