ølkaølkafosf

This commit is contained in:
Peder Bergebakken Sundt 2024-08-11 00:10:10 +02:00
parent 1b97ccf6be
commit cb6f1e5be9
2 changed files with 10 additions and 14 deletions

View File

@ -33,10 +33,11 @@
nix run nixpkgs#atom -- --disable-gpu --in-process-gpu --no-sandbox "$@" nix run nixpkgs#atom -- --disable-gpu --in-process-gpu --no-sandbox "$@"
} }
function vpn { if [[ -n "''${SSH_CLIENT-}" || -n "''${SSH_TTY-}" || -z "''${WAYLAND_DISPLAY-}" ]]; then
ip="$(dig +short -x a $1 | tail -n 1)" alias clip="xclip -sel clip -i -rmlastnl -t text/plain";
( set -x; sshuttle 0.0.0.0/0 --disable-ipv6 --dns -r "$1" -x $ip -x 127.0.0.1 -x 172.0.0.0/8 ) else
} alias clip="wl-copy --trim-newline --type text/plain";
fi
''; '';
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -65,7 +66,7 @@
vgmstream vgmstream
ffmpeg-full ffmpeg-full
(pkgs.termsvg or pkgs.unstable.termsvg) /* (pkgs.termsvg or pkgs.unstable.termsvg) */
lolcat lolcat
toilet toilet
@ -125,10 +126,6 @@
#TODO: vpn #TODO: vpn
# TODO: fix both wayland, and x-forwarding
#clip = "( if command -v wl-copy >/dev/null; then wl-copy --trim-newline --type text/plain; else xclip -sel clip -t text/plain -rmlastnl -i; fi )";
clip = "xclip -sel clip -i -rmlastnl -t text/plain";
# TODO: ps1? # TODO: ps1?
pwd-fqdn = ''echo "$(whoami)@$(hostname -f):$(printf "%q" "$(realpath .)/")"''; pwd-fqdn = ''echo "$(whoami)@$(hostname -f):$(printf "%q" "$(realpath .)/")"'';

View File

@ -50,7 +50,6 @@
home.shellAliases = { home.shellAliases = {
# git gud # git gud
gs = "git status"; gs = "git status";
gb = "git blame";
gl = "git log --oneline --color | head -n 30"; gl = "git log --oneline --color | head -n 30";
glg = "git log --all --decorate --oneline --graph"; glg = "git log --all --decorate --oneline --graph";
gpra = "git pull --rebase --autostash"; gpra = "git pull --rebase --autostash";
@ -63,11 +62,11 @@
gcp = "git cherry-pick"; gcp = "git cherry-pick";
gca = "git commit --amend"; gca = "git commit --amend";
gcara = "git commit --amend --reset-author"; gcara = "git commit --amend --reset-author";
gpo = "git push origin";
gpasr = "git pull --autostash --rebase";
#gfr = "git fetch origin master && git rebase FETCH_HEAD";
gfr = "git pull --rebase"; gfr = "git pull --rebase";
gp = "git pull --rebase --autostash"; gc = "git branch | cut -c2- | gum choose | xargs git checkout";
gbrm = "git fetch origin; git branch --merged | cut -c3- | grep -vE '^(main|master)$' | gum choose --no-limit --header 'Which branches to delete:' | xargs git branch -D";
#gb = "git blame";
#gpo = "git push origin";
}; };
} }