Skip to content

Instantly share code, notes, and snippets.

Avatar
🦇

Alad Wenter AladW

🦇
View GitHub Profile
View aur-fetch
#!/bin/bash
# aur-fetch - retrieve build files from the AUR
[[ -v AUR_DEBUG ]] && set -o xtrace
argv0=fetch
AUR_LOCATION=${AUR_LOCATION:-https://aur.archlinux.org}
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[1]}(): }'
# default options
verbose=0 recurse=0 results=0 sync=no log_fmt=diff
View aur-sync
#!/bin/bash
# aur-sync - download and build AUR packages automatically
[[ -v AUR_DEBUG ]] && set -o xtrace
set -o errexit
argv0=sync
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/$argv0}
PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
View keybase.md

Keybase proof

I hereby claim:

  • I am aladw on github.
  • I am alad (https://keybase.io/alad) on keybase.
  • I have a public key whose fingerprint is DBE7 D3DD 8C81 D58D 0A13 D0E7 6BC2 6A17 B9B7 018A

To claim this, I am signing this object:

View weechat_meskarune
/set weechat.color.chat_nick_colors = "cyan,lightcyan,magenta,lightmagenta,yellow,lightyellow,blue,lightblue,36,42,48,38,44,50,57,63,69,73,76,85,75,81,87,99,105,111,117,135,141,29,35,41,47,166,172,220,185,215"
View vcsprepare
#!/bin/bash
PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -e -o pipefail
argv0=vcsprepare
tmp=$(mktemp -d)
readonly argv0 tmp
# /!\ EXPERIMENTAL
View gist:de1c5676d93d05a5a0e1
#!/bin/bash
pid=$(pgrep -t tty$(fgconsole) xinit)
pid=$(pgrep -P $pid -n)
import_environment() {
(( pid )) && for var; do
IFS='=' read key val < <(egrep -z "$var" /proc/$pid/environ)
printf -v "$key" %s "$val"
You can’t perform that action at this time.