- xcwd https://github.com/schischi/xcwd A simple tool that prints the current working directory of the currently focused window
Notes on the flags, learned the hard way:
-fmakes these idempotent. Without it, every line fails withFile existson a machine that already has the file — i.e. on every fresh install.-nmatters for the two directory links (ftplugin,polybar). Without itln -sfputs the link inside an existing target dir (~/.vim/ftplugin/ftplugin) instead of replacing it.- No
sudofor links under$HOME— it only creates root-owned symlinks in your own home and makes them awkward to edit later.sudois needed only for the two/etcpaths at the bottom.
Create parent directories first (but not ~/.config/polybar, which is itself a
link target):
mkdir -p ~/.config/nvim ~/.config/i3 ~/.config/yamllint ~/.vim ~/.local/share/applications
ln -sfn $HOME/Workspaces/rc/.bashrc ~/.bashrc
ln -sfn $HOME/Workspaces/rc/.vimrc ~/.vimrc
ln -sfn $HOME/Workspaces/rc/nvim/init.lua ~/.config/nvim/init.lua
ln -sfn $HOME/Workspaces/rc/.gitconfig ~/.gitconfig
ln -sfn $HOME/Workspaces/rc/.gitignore_global ~/.gitignore_global
ln -sfn $HOME/Workspaces/rc/i3config ~/.config/i3/config
ln -sfn $HOME/Workspaces/rc/.git-completion.bash ~/.git-completion.bash
ln -sfn $HOME/Workspaces/rc/.fzf.bash ~/.fzf.bash
ln -sfn $HOME/Workspaces/rc/ftplugin ~/.vim/ftplugin
ln -sfn $HOME/Workspaces/rc/Xresources ~/.Xresources
ln -sfn $HOME/Workspaces/rc/yamllint ~/.config/yamllint/config
ln -sfn $HOME/Workspaces/rc/nightly.desktop ~/.local/share/applications/nightly.desktop
ln -sfn $HOME/Workspaces/rc/lotion.desktop ~/.local/share/applications/lotion.desktop
ln -sfn $HOME/Workspaces/rc/polybar ~/.config/polybar
ln -sfn $HOME/Workspaces/rc/.psqlrc ~/.psqlrc
ln -sfn $HOME/Workspaces/rc/.alacritty.toml ~/.alacritty.toml
ln -sfn $HOME/Workspaces/rc/starship.toml ~/.config/starship.toml
ln -sfn $HOME/Workspaces/rc/.ideavimrc ~/.ideavimrc
ln -sfn $HOME/Workspaces/rc/profile ~/.profile
These two replace files shipped by Ubuntu, so keep a backup of the original:
sudo cp --no-clobber /etc/default/keyboard /etc/default/keyboard.orig
sudo ln -sfn $HOME/Workspaces/rc/keyboard /etc/default/keyboard
sudo mkdir -p /etc/X11/xorg.conf.d
sudo ln -sfn $HOME/Workspaces/rc/touchpad.conf /etc/X11/xorg.conf.d/touchpad.conf
/etc/default/keyboard sets the US layout and remaps Caps Lock to Ctrl
(XKBOPTIONS="ctrl:nocaps"). It only takes effect on login; to apply it to the
running session without a reboot:
setxkbmap -layout us,gb -variant altgr-intl, -option "" -option ctrl:nocaps
To list all variants for us layout: localectl list-x11-keymap-variants us
IBus can also sometimes override settings from /etc/default/keyboard. You can use the ibus-setup command to modify the settings for IBus. To force it to defer to the settings from /etc/default/keyboard, run ibus-setup, go to the Advanced tab, and check Use system keyboard layout.
The file pkglist can be re-generated with:
sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/pkglist
The packages can then be installed with:
sudo aptitude update && cat pkglist | xargs sudo aptitude install -y
Install https://github.com/rjekker/i3-battery-popup/blob/master/i3-battery-popup
-
Create a little script /bin/docker-compose with content
docker compose "$@" -
Make the script executable: sudo chmod +x /bin/docker-compose
-
Check that it works with
docker-compose version
https://askubuntu.com/questions/763994/screen-times-out-in-i3-wm
sudo apt install xclip