Skip to content

Instantly share code, notes, and snippets.

View dtomvan's full-sized avatar

Tom van Dijk dtomvan

View GitHub Profile
@dtomvan
dtomvan / sxiv.sh
Created January 21, 2024 17:33
Wrapper for `sxiv -`
#!/usr/bin/env bash
# When used as drop-in script, sxiv can now also read an image from stdin
# through `sxiv -`. Would've solved xyb3rt/sxiv#250.
# To use: write to /usr/local/bin/sxiv and chmod a+x.
# Note: this doesn't guarantee the input args are correct, it just separates
# files from options.
TEMP=$(getopt -o "A::abce::fG::g::hin::N::opqrS::s::tvZz::" -n sxiv -q $@)
if [ $? -ne 0 ]; then
@dtomvan
dtomvan / kickstart.sh
Last active May 2, 2023 19:00
Installs kickstart.nvim
#!/usr/bin/env bash
set -euo pipefail
[ -d ~/.config/nvim/ ] && echo "Backing up existing .config/nvim to appname nvim-old" && mv -v ~/.config/nvim ~/.config/nvim-old
[ -d ~/.local/share/nvim/ ] && echo "Backing up existing .local/share/nvim to appname nvim-old" && mv -v ~/.local/share/nvim ~/.local/share/nvim-old
echo "Installing kickstart.nvim"
git --version || (echo "GIT not found. Please install it https://git-scm.com/downloads" && exit 1)
git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim
echo "Successfully downloaded your new config!"

Keybase proof

I hereby claim:

  • I am dtomvan on github.
  • I am dtomvan (https://keybase.io/dtomvan) on keybase.
  • I have a public key ASBUa0ScFkkKpj9tRie3P6e1oU_Hy0sTnGhWfbt7SrAKDAo

To claim this, I am signing this object:

@dtomvan
dtomvan / solar-tweaks-updater.sh
Last active May 14, 2022 15:19
Updater for Solar Tweaks for Arch Linux.
#!/bin/bash
bail() {
echo "$@"
echo "Fatal error occured. Exiting."
exit 1
}
echo "Solar Tweaks installer for Arch Linux"
echo "-------------------------------------"
@dtomvan
dtomvan / archgrub.sh
Created August 6, 2021 17:08
Arch install
#!/bin/sh
set -e
ls /sys/firmware/efi/efivars && systemctl start iwd && iwctl
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error
echo "/dev/sda1: efi sys 200mib; /dev/sda2 swap 4gib; /dev/sda3 ext4 the rest"
parted --script /dev/sda \
mklabel gpt \
mkpart primary fat32 1MiB 200MiB \
set 1 esp on \
mkpart primary linux-swap 200MiB 4296MiB \

Keybase proof

I hereby claim:

  • I am 18gatenmaker on github.
  • I am dtomvan (https://keybase.io/dtomvan) on keybase.
  • I have a public key ASBKaai3R-6wC771p4VHKFQSbw1GMcF5pJAXw1ewaG-b5Ao

To claim this, I am signing this object: