From 2df4e7a091ca7d52ca3e84d2cf46716b71ce1604 Mon Sep 17 00:00:00 2001 From: DuckDuckWhale Date: Wed, 27 Sep 2023 16:48:38 -0700 Subject: [PATCH] Misc: SSH, Vim, Helix, Ubuntu, setup, shells, ... - SSH config: disable password and send COLORTERM - Vim: use u instead of w - Helix: - Update for bug fixes after 23.10 - Install bash completions, desktop file, and icon - Fix bufferline and inlay hints color - Reenable auto pairs since smart tabs is a thing now - Ubuntu: - Update to 23.10 - Change naming convention - Add podman and qemu-user-static - Setup: - Update install and swap config - Add fish, Pods, Steam - Fix CJK font config path - Remove Firefox Wayland override now that it's the default - Shells: configure fish - Manual: - Configure starship - Use cargo locked install - Remove sparse protocol config now that it's the default - Fix failure when fish config directory is not found - tmux: fix truecolor support for Alacritty --- auto/auto | 4 +- auto/{bash => shells}/bash | 4 + auto/shells/fish | 67 ++++++++++++++++ auto/shells/shells | 3 + auto/ssh/config | 2 + auto/tmux/.tmux.conf | 2 +- auto/vim/.vimrc | 2 +- manual/helix/helix | 20 +++-- manual/rust/rust | 8 +- manual/rust/rust-configure | 33 +++++++- manual/starship/starship | 156 ++++++++++++++++++++++++++++++++++++ setup/debian-setup.md | 3 - setup/ubuntu-install.md | 25 +++--- setup/ubuntu-setup.md | 51 ++++++------ setup/ubuntu-user-config.md | 20 ++++- 15 files changed, 335 insertions(+), 65 deletions(-) rename auto/{bash => shells}/bash (93%) create mode 100755 auto/shells/fish create mode 100755 auto/shells/shells create mode 100755 manual/starship/starship diff --git a/auto/auto b/auto/auto index 716e170..fef6b17 100755 --- a/auto/auto +++ b/auto/auto @@ -3,8 +3,8 @@ cd ssh ./ssh cd .. -cd bash -./bash +cd shells +./shells cd .. cd git diff --git a/auto/bash/bash b/auto/shells/bash similarity index 93% rename from auto/bash/bash rename to auto/shells/bash index 508fe75..29f8b9c 100755 --- a/auto/bash/bash +++ b/auto/shells/bash @@ -1,4 +1,8 @@ #!/bin/sh +if grep -q '# custom' ~/.bashrc; then + echo 'found custom bash config, skipping' + exit 0 +fi cat >> ~/.bashrc << 'EOF' # custom diff --git a/auto/shells/fish b/auto/shells/fish new file mode 100755 index 0000000..545b5ac --- /dev/null +++ b/auto/shells/fish @@ -0,0 +1,67 @@ +#!/bin/sh -e +if [ -f ~/.config/fish/config.fish ]; then + echo 'fish config found, skipping' + exit 0 +fi +mkdir -p ~/.config/fish +cat >> ~/.config/fish/config.fish << 'EOF' +function fish_greeting + echo ' '(set_color F00)'___ + ___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)') +/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '\ +(set_color yellow)(whoami)(set_color FF7F00)'@'(set_color blue)(hostname)(set_color red)' +[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'\ +(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color FF7F00)' Uptime: '\ +(set_color white)(uptime -p | sed 's/up \(.*\)/\1/')(set_color red)' + \ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '\ +(set_color white)(begin; ip -o route get to 1.1.1.1 2> /dev/null || echo network error; end | \ +sed 's/.*src \([0-9.]\+\).*/\1/' || echo not found)(set_color red)' + \\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color red)\ +'Memory used: '(set_color white)(free -h | grep Mem | awk '/Mem/ { print "mem " $3 " / " $2 ", "}')\ +(free -h | grep Swap | awk '/Swap/ { print "swap " $3 " / " $2 }')(set_color red)' + \_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\ '\ +(set_color yellow)'Load average: '(set_color white)(uptime | sed 's/.*average: \(.*\)/\1/')\ +(set_color red)' + '(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'\ +(set_color FF7F00)'~~~'(set_color FF0)'~~ '(set_color FF7F00)'\\ + (-'(set_color FF0)'\)'(set_color F00)'\='(set_color FF7F00)'|'(set_color FF0)'\\\\\\'\ +(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color FF7F00)'L_'(set_color FF0)'_ + '(set_color FF7F00)'('(set_color F00)'\\'(set_color FF7F00)'\\) ('(set_color FF0)'\\'\ +(set_color FF7F00)'\\\)'(set_color F00)'_ '(set_color FF0)'\=='(set_color FF7F00)'__ + '(set_color F00)'\V '(set_color FF7F00)'\\\\'(set_color F00)'\) =='(set_color FF7F00)\ +'=_____ '(set_color FF0)'\\\\\\\\'(set_color FF7F00)'\\\\ + '(set_color F00)'\V) \_) '(set_color FF7F00)'\\\\'(set_color FF0)'\\\\JJ\\'\ +(set_color FF7F00)'J\) + '(set_color F00)'/'(set_color FF7F00)'J'(set_color FF0)'\\'(set_color FF7F00)\ +'J'(set_color F00)'T\\'(set_color FF7F00)'JJJ'(set_color F00)'J) + (J'(set_color FF7F00)'JJ'(set_color F00)'| \UUU) + (UU)'(set_color normal) + if status is-interactive + if [ -z "$TMUX" -a -n "$SSH_TTY" ] + tput sc + set stty_orig (stty -g) + stty -echo + read -n 1 -P (set_color -r)'tmux: space / shell: any key' input + stty "$stty_orig" + tput rc + tput el + if [ "$input" = ' ' ] + exec tmux new -As default + end + end + end +end + +umask 007 + +export EDITOR='vim' +export VISUAL='vim' +export GPG_TTY=$(tty) +export PATH="$HOME/.local/bin:$PATH:/usr/lib/llvm-15/bin" + +alias bat='batcat' +alias md='pulldown-cmark -TFSLH' +alias mosh='mosh -o' +alias cargo='cargo auditable' +alias auto-av1='ab-av1 auto-encode --min-samples 2 --keyint 2s --scd true' +EOF diff --git a/auto/shells/shells b/auto/shells/shells new file mode 100755 index 0000000..ccd743b --- /dev/null +++ b/auto/shells/shells @@ -0,0 +1,3 @@ +#!/bin/sh -e +./bash +./fish diff --git a/auto/ssh/config b/auto/ssh/config index 25a160a..29f439c 100644 --- a/auto/ssh/config +++ b/auto/ssh/config @@ -2,3 +2,5 @@ Host * ForwardX11Trusted no HashKnownHosts no IdentitiesOnly yes + KbdInteractiveAuthentication no + SendEnv COLORTERM diff --git a/auto/tmux/.tmux.conf b/auto/tmux/.tmux.conf index 331c323..1c4dc36 100644 --- a/auto/tmux/.tmux.conf +++ b/auto/tmux/.tmux.conf @@ -1,7 +1,7 @@ set -g clock-mode-style 12 set -g default-command "${SHELL}" set -g default-terminal "tmux-256color" -set -as terminal-features ",xterm-256color:RGB" +set -as terminal-features ",xterm-256color:RGB,alacritty:RGB" # curly underline support set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # underline colors - needs tmux-3.0 diff --git a/auto/vim/.vimrc b/auto/vim/.vimrc index 6ccf078..546279b 100644 --- a/auto/vim/.vimrc +++ b/auto/vim/.vimrc @@ -23,7 +23,7 @@ nnoremap l :set list! nnoremap q gwap nnoremap r :set relativenumber! nnoremap s :call ToggleSpellCheck() -nnoremap w :update +nnoremap u :update set backspace=indent,eol,start " powerful backspace set complete+=kspell " dictionary completion diff --git a/manual/helix/helix b/manual/helix/helix index f1bae94..68d3eb7 100755 --- a/manual/helix/helix +++ b/manual/helix/helix @@ -21,15 +21,21 @@ fi rm -rf helix-git git clone --single-branch https://github.com/helix-editor/helix helix-git cd helix-git -git checkout 7f5940be80eaa3aec7903903072b7108f41dd97b +git checkout 84e24b33dcda16d1d64805f34dcc02d82d0de8f1 cargo install -f --locked --path helix-term mkdir -p ~/.config/helix rm -rf runtime/grammars/sources mv runtime ~/.config/helix +mkdir -p ~/.local/share/bash-completion/completions ~/.local/share/fish/vendor_completions.d \ + ~/.local/share/applications ~/.local/share/icons +cp contrib/completion/hx.bash ~/.local/share/bash-completion/completions/ +cp contrib/completion/hx.fish ~/.local/share/fish/vendor_completions.d/ +cp contrib/Helix.desktop ~/.local/share/applications/ +cp contrib/helix.png ~/.local/share/icons/ cd .. rm -rf helix-git cat > ~/.config/helix/config.toml << 'EOF' -theme = "monokai_pro_ristretto" +theme = "monokai_pro_spectrum" [keys.normal] space.z = ":reflow 100" @@ -38,7 +44,6 @@ space.u = ":update" [editor] line-number = "relative" -auto-pairs = false bufferline = "multiple" rulers = [101] @@ -57,15 +62,14 @@ right = [ ] EOF cat > ~/.config/helix/languages.toml << 'EOF' -[editor] -auto-pairs = false - [[language]] name = 'rust' indent = { tab-width = 4, unit = "\t" } -config.checkOnSave = { command = "clippy" } shebangs = ["rust-script"] +[language-server.rust-analyzer.config] +checkOnSave = { command = "clippy" } + [[language]] name = "c" indent = { tab-width = 4, unit = "\t" } @@ -89,7 +93,7 @@ indent = { tab-width = 4, unit = "\t" } [[language]] name = "markdown" indent = { tab-width = 4, unit = "\t" } -language-server = { command = "ltex-ls" } +language-servers = [ "ltex-ls" ] file-types = ["md"] scope = "source.markdown" roots = [] diff --git a/manual/rust/rust b/manual/rust/rust index 6e135d9..87d8622 100755 --- a/manual/rust/rust +++ b/manual/rust/rust @@ -21,10 +21,6 @@ fi curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh -s -- -y . "$HOME/.cargo/env" rustup component add rust-analyzer -cat > ~/.cargo/config.toml << 'EOF' -[registries.crates-io] -protocol = "sparse" -EOF mkdir -p ~/.config/rustfmt cat > ~/.config/rustfmt/rustfmt.toml << 'EOF' hard_tabs = true @@ -35,6 +31,6 @@ cat > ~/.local/bin/rust-analyzer << 'EOF' $(rustup which rust-analyzer) "$@" EOF chmod +x ~/.local/bin/rust-analyzer -cargo install cargo-auditable -cargo install --force cargo-auditable rust-script +cargo install --locked cargo-auditable +cargo install --locked --force cargo-auditable rust-script ./rust-configure diff --git a/manual/rust/rust-configure b/manual/rust/rust-configure index 53c430b..6abfec3 100755 --- a/manual/rust/rust-configure +++ b/manual/rust/rust-configure @@ -1,8 +1,8 @@ #!/usr/bin/env rust-script //! ```cargo //! [dependencies] -//! anyhow = "1.0.69" -//! dirs = "4.0.0" +//! anyhow = "1.0.75" +//! dirs = "5.0.1" //! ``` use anyhow::{anyhow, bail, Context}; @@ -13,6 +13,8 @@ use std::{ }; const ENV: &str = r#". "$HOME/.cargo/env""#; +// until the release of https://github.com/rust-lang/rustup/pull/3506/files +const ENV_FISH: &str = r#"export PATH="$HOME/.cargo/bin:$PATH""#; fn main() -> anyhow::Result<()> { let home = dirs::home_dir().context("can't find home directory")?; @@ -80,5 +82,32 @@ fn main() -> anyhow::Result<()> { }; fs::write(bashrc_path, &bashrc).context("failed to write new ~/.bashrc")?; + let mut config_fish_path = dirs::config_dir().context("can't find config directory")?; + config_fish_path.push("fish"); + fs::create_dir_all(&config_fish_path)?; + config_fish_path.push("config.fish"); + let config_fish = match File::open(&config_fish_path) { + Ok(file) => { + let config_fish = BufReader::new(file); + let mut skip = false; + let mut new_config_fish = String::new(); + for line in config_fish.lines() { + let line = line.context("failed to read line in config.fish")?; + if line.is_empty() && skip { + continue; + } + skip = line.is_empty(); + if line != ENV_FISH { + new_config_fish.push_str(&line); + new_config_fish.push('\n'); + } + } + new_config_fish.trim().to_owned() + "\n" + } + Err(e) if e.kind() == ErrorKind::NotFound => String::new(), + Err(e) => bail!(anyhow!(e).context("failed to read config.fish")), + }; + fs::write(config_fish_path, &config_fish).context("failed to write new config.fish")?; + Ok(()) } diff --git a/manual/starship/starship b/manual/starship/starship new file mode 100755 index 0000000..246bbaa --- /dev/null +++ b/manual/starship/starship @@ -0,0 +1,156 @@ +#!/bin/sh -e +if ! command -v cargo > /dev/null; then + echo "Error: cargo not found" + exit 1 +fi +if ! command -v cmake > /dev/null; then + echo "Error: cmake not found" + exit 1 +fi +cargo install starship --locked +echo 'eval "$(starship init bash)"' >> ~/.bashrc +mkdir -p ~/.config/fish +echo 'starship init fish | source' >> ~/.config/fish/config.fish +cat >> ~/.config << 'EOF' +[status] +map_symbol = true +format = '[$symbol$common_meaning$signal_name$maybe_int]($style) ' +disabled = false + +[aws] +symbol = " " + +[buf] +symbol = " " + +[c] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " 󰌾" + +[docker_context] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[fossil_branch] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[guix_shell] +symbol = " " + +[haskell] +symbol = " " + +[haxe] +symbol = " " + +[hg_branch] +symbol = " " + +[hostname] +ssh_symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[lua] +symbol = " " + +[memory_usage] +symbol = "󰍛 " + +[meson] +symbol = "󰔷 " + +[nim] +symbol = "󰆥 " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[os.symbols] +Alpaquita = " " +Alpine = " " +Amazon = " " +Android = " " +Arch = " " +Artix = " " +CentOS = " " +Debian = " " +DragonFly = " " +Emscripten = " " +EndeavourOS = " " +Fedora = " " +FreeBSD = " " +Garuda = "󰛓 " +Gentoo = " " +HardenedBSD = "󰞌 " +Illumos = "󰈸 " +Linux = " " +Mabox = " " +Macos = " " +Manjaro = " " +Mariner = " " +MidnightBSD = " " +Mint = " " +NetBSD = " " +NixOS = " " +OpenBSD = "󰈺 " +openSUSE = " " +OracleLinux = "󰌷 " +Pop = " " +Raspbian = " " +Redhat = " " +RedHatEnterprise = " " +Redox = "󰀘 " +Solus = "󰠳 " +SUSE = " " +Ubuntu = " " +Unknown = " " +Windows = "󰍲 " + +[package] +symbol = "󰏗 " + +[pijul_channel] +symbol = " " + +[python] +symbol = " " + +[rlang] +symbol = "󰟔 " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[scala] +symbol = " " +EOF diff --git a/setup/debian-setup.md b/setup/debian-setup.md index e4bece6..ae2ba89 100644 --- a/setup/debian-setup.md +++ b/setup/debian-setup.md @@ -92,9 +92,6 @@ Here's my personal Debian 12 Bookworm setup. - Proxy DNS when using SOCKS v5 - Enable DNS over HTTPS - In `about:config` set `browser.sessionstore.max_windows_undo` to 10. - - Use Wayland for correct fractional scaling: - `sudo flatpak override --socket=wayland --env=MOZ_ENABLE_WAYLAND=1 - org.mozilla.firefox` - Go to settings -> `Region & Language` and install `Chinese (simplified)`. - VSCodium - `flatpak install flathub com.vscodium.codium` diff --git a/setup/ubuntu-install.md b/setup/ubuntu-install.md index cf3a1b7..5f2bb89 100644 --- a/setup/ubuntu-install.md +++ b/setup/ubuntu-install.md @@ -6,7 +6,7 @@ By following these steps, you will be able to install Ubuntu with a separate `/` `/boot`, with everything encrypted except `/boot`. A disk password will be required upon boot and a separate user password will be required. -- Booting Ubuntu 23.04 live image with `Try Ubuntu` option. +- Booting Ubuntu 23.10 live image with `Try Ubuntu` option. - Verify that we are using UEFI: `$ [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS` - Give 1 GiB (or 500 MiB if you are short on space) for `/boot` using GParted and make a partition @@ -15,31 +15,32 @@ separate user password will be required. --use-random /dev/` - Defaults, spell it out if you want to be extra certain: `--cipher aes-xts-plain64 --iter-time 2000 --verify-passphrase` -- `$ sudo cryptsetup open /dev/ pvroot` +- `$ sudo cryptsetup open /dev/ ` - No need to overwrite data since it is originally BitLocker encrypted and would cause loss of performance and lifespan of the SSD. -- `$ sudo pvcreate /dev/mapper/pvroot` -- `$ sudo vgcreate vgroot /dev/mapper/pvroot` -- `$ sudo lvcreate -n lvhome -L 10G vgroot` (`G` refers to GiB according to the +- `$ sudo pvcreate /dev/mapper/` +- `$ sudo vgcreate vgroot /dev/mapper/` +- `$ sudo lvcreate -n home -L 10G ` (`G` refers to GiB according to the man page) - Remember to monitor disk usage and when prompted, live extend the LVs! -- `$ sudo lvcreate -n lvroot -L 15G vgroot` +- `$ sudo lvcreate -n root -L 15G ` - Start the Ubuntu installation from the shortcut icon on Desktop. - Choose extra software and set a password. - Choose `Something else`. - Format `/dev/` as ext4 and mount to `/boot`. -- Format `/dev/mapper/vgroot-lvroot` as ext4 and mount to `/`. -- Format `/dev/mapper/vgroot-lvhome` as ext4 and mount to `/home`. -- Choose the main disk (e.g. `/dev/sda` or `/dev/nvme0n1p2`) as the `Device for boot loader +- Format `/dev/mapper/-root` as ext4 and mount to `/`. +- Format `/dev/mapper/-home` as ext4 and mount to `/home`. +- Get a swap partition the size of your RAM too. +- Choose the main disk (e.g. `/dev/sda` or `/dev/nvme0n1`) as the `Device for boot loader installation`. - Name the partitions if you are feeling fancy. - Once the installation is complete, click `Continue Testing` to make necessary changes to load the encrypted partitions at startup. -- Make note of the UUID: `$ blkid /dev/` +- Make note of the UUID: `$ blkid /dev/` - Mount the installed Ubuntu OS on `/mnt` and use `chroot` to change the root directory to `/mnt`. ``` - $ sudo mount /dev/mapper/vgroot-lvroot /mnt + $ sudo mount /dev/mapper/root-root /mnt $ sudo mount /dev/ /mnt/boot $ sudo mount --bind /dev /mnt/dev $ sudo chroot /mnt @@ -52,7 +53,7 @@ separate user password will be required. obtained from `blkid` command earlier): ``` # - pvroot UUID= none luks,discard + UUID= none luks,discard ``` - This guide assumes you have an SSD so we have `discard`. - Update the Linux kernel to load encrypted partitions at startup: `# diff --git a/setup/ubuntu-setup.md b/setup/ubuntu-setup.md index b7caa4f..89e5d94 100644 --- a/setup/ubuntu-setup.md +++ b/setup/ubuntu-setup.md @@ -1,19 +1,21 @@ # Ubuntu Setup -Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) +Here's my personal Ubuntu 23.10 setup. (Make sure to use Wayland on Nvidia!) ## Packages - Must haves: - - `sudo apt install curl ddcutil deja-dup earlyoom endeavour ffmpeg flatpak git gnome-boxes - gnome-clocks gnome-software-plugin-flatpak gnome-sound-recorder gnome-weather goldendict - gparted keepassxc mpv needrestart obs-studio ripgrep shadowsocks-libev sshfs synaptic tmux - trash-cli ufw vim-gtk3 wl-clipboard linux-tools-generic build-essential` + - `sudo apt install alacritty curl deja-dup earlyoom endeavour ffmpeg fish flatpak git + gnome-boxes gnome-clocks gnome-software-plugin-flatpak gnome-sound-recorder gnome-weather + goldendict gparted keepassxc mpv needrestart obs-studio ripgrep sshfs synaptic tmux trash-cli + ufw vim-gtk3 wl-clipboard linux-tools-generic build-essential` - Optional: - `sudo apt install arp-scan asciinema bookworm foliate gimp gnome-firmware gnome-games gnome-nettool gnome-packagekit gnome-passwordsafe gnome-shell-pomodoro gnome-usage gthumb - heif-gdk-pixbuf heif-thumbnailer mkvtoolnix-gui openjdk-17-jdk pulseeffectsqpdf ranger - syncplay virtualbox-qt vlc audacity f3 prusa-slicer cmake gstreamer1.0-plugins-bad` + heif-gdk-pixbuf heif-thumbnailer mkvtoolnix-gui openjdk-17-jdk pulseeffects qpdf ranger + syncplay virtualbox-qt vlc audacity f3 prusa-slicer cmake gstreamer1.0-plugins-bad ddcutil + shadowsocks-libev qemu-user-static podman + ` - Remove all snaps: - ``` # if this command fails, do the following then try again: @@ -28,10 +30,6 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) - `--avoid '(^|/)(systemd|sshd|mosh-server|ssh|vim|sudo|sudoedit|gnome-shell|gnome-terminal-)$' --prefer '(^|/)(Web Content|Isolated Web Co)$'` -- `ddcutil` for monitor brightness shortcuts: - - `sudo usermod -aG i2c $(whoami)` - - External Monitor Brightness Up: `ddcutil setvcp 10 + 10` - - External Monitor Brightness Down: `ddcutil setvcp 10 - 10` ## Optional packages @@ -39,6 +37,7 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) `llvm-vs-code-extensions.vscode-clangd` (?) - `imagemagick` for `convert`, comment out with `` PDF policy in `/etc/ImageMagick-6/policy.xml` (?) + - Or `graphicsmagick-imagemagick-compat`, which doesn't need this policy change somehow. - Cross compiling (?) - `gcc-aarch64-linux-gnu` - `gcc-arm-linux-gnueabihf` @@ -55,6 +54,10 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) - - - Hiding: check all except hide/show by clicking icon +- `ddcutil` for monitor brightness shortcuts: + - `sudo usermod -aG i2c $(whoami)` + - External Monitor Brightness Up: `ddcutil setvcp 10 + 10` + - External Monitor Brightness Down: `ddcutil setvcp 10 - 10` ## Apps @@ -72,8 +75,6 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) - `flatpak install flathub com.github.tchx84.Flatseal` - Firefox - `flatpak install flathub org.mozilla.firefox` - - Use Wayland for correct fractional scaling and less bugginess - `sudo flatpak override --socket=wayland --env=MOZ_ENABLE_WAYLAND=1 org.mozilla.firefox` - Xournal++ - `sudo apt install xournalpp texlive-latex-extra` - cameractrls @@ -95,9 +96,13 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) - `flatpak install com.obsproject.Studio.Plugin.BackgroundRemoval` - Video Trimmer - `flatpak install flathub org.gnome.gitlab.YaLTeR.VideoTrimmer` +- Pods + - `flatpak install com.github.marhkb.Pods` ## Optional Apps +- Steam + - `flatpak install flathub com.valvesoftware.Steam` - Zoom - `flatpak install flathub us.zoom.Zoom` - Impatience (adjust Gnome animation speed) @@ -141,19 +146,20 @@ Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!) ### Swap partition/file -- Allocate 16 GiB for LVM swap partition (if not set during installation): +- Allocate 32 GiB for LVM swap partition (if not set during installation): ``` - sudo lvcreate -n lvswap-ubuntu-23.04 -L 16G -C y vgroot + sudo swapoff -a + sudo lvcreate -n swap-ubuntu-23.10 -L 32G -C y # note down UUID: - sudo mkswap /dev/mapper/vgroot-lvswap--ubuntu--23.04 + sudo mkswap /dev/mapper/-swap--ubuntu--23.10 echo 'UUID= none swap swap 0 0' | sudo tee -a /etc/fstab > /dev/null sudo swapon -a ``` -- Or, allocate 8 GiB for swapfile: +- Or, allocate `n` GiB for swapfile: ``` # if /swapfile already exists sudo swapoff /swapfile - sudo fallocate -l 8GiB /swapfile + sudo fallocate -l GiB /swapfile sudo chmod 0600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile @@ -204,7 +210,7 @@ See the `system` folder and run each script as they apply to your installation. Move SC to the top by: ``` -$ sudoedit $(realpath /etc/fonts/conf.d/64-language-selector-prefer.conf) +$ sudoedit $(realpath /etc/fonts/conf.d/64-language-selector-cjk-prefer.conf) ``` Source: @@ -280,13 +286,6 @@ $ sudo mount -o loop /mnt/dislocker/dislocker-file /media/"$(whoami)" ### Unused -#### Wayland, if it doesn't show up - -- `sudoedit /usr/lib/udev/rules.d/61-gdm.rules` and comment the two uncommented - lines -- Reboot or restart gdm3 (didn't try) - - #### Razer mouse ``` diff --git a/setup/ubuntu-user-config.md b/setup/ubuntu-user-config.md index 0f05422..ae94640 100644 --- a/setup/ubuntu-user-config.md +++ b/setup/ubuntu-user-config.md @@ -5,10 +5,22 @@ directory. ## Terminal -- Set font size in Terminal to 15 and initial column count to 85 -- `git clone https://git.duckduckwhale.com/DuckDuckWhale/dotfiles && cd dotfiles/auto && ./auto` -- `cd ../manual/rust && ./rust` -- `cd ../helix && ./helix` +- Set font size in Terminal to 16 and initial column count to 85 +- Set Alacritty as the terminal command in GNOME Settings -> Shortcuts +``` +chsh -s /usr/bin/fish +git clone https://git.duckduckwhale.com/DuckDuckWhale/dotfiles && cd dotfiles/auto && ./auto +cd ../manual/rust && ./rust +cd ../helix && ./helix +mkdir -p ~/.local/share/nautilus/scripts ~/.config/nautilus +cat > ~/.local/share/nautilus/scripts/terminal << 'EOF' +#!/bin/sh +alacritty +EOF +chmod +x ~/.local/share/nautilus/scripts/terminal +echo 'F4 terminal' >> ~/.config/nautilus/scripts-accels +nautilus -q +``` ## Settings