Skip to content

Instantly share code, notes, and snippets.

View pkgbuild2_service.sh
aurpkg=proton-ge-custom
data="$(curl https://aur.archlinux.org/cgit/aur.git/tree/.SRCINFO\?h\=$aurpkg 2> /dev/null | grep source\ = | cut -f 2- -d =)"
(
echo '<services>
<service name="tar_scm">
<param name="scm">git</param>
<param name="url">'"https://aur.archlinux.org/${aurpkg}.git"'</param>
</service>'
@nicman23
nicman23 / vol
Last active Feb 10, 2021
volume manipulation of pipewire split front and back
View vol
#!/bin/bash
card_name='Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]' ##### PLEASE EDIT THIS
card_name=$(sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' <<< "$card_name")
[[ -z "$1" || -n "$2" ]] && {
echo usage: $(basename $0) '[:num]?(%)(-+)'
echo same number / percentage accepted by 'amixer set'
echo ie vol 5%+
echo ie vol 5
exit 1
View gist:5fabd882c4c60e5659156955bdad7b14
#! /bin/bash -e
if [ -z "$1" ]; then
echo 'usage: [OPTIONS] <file>|<dir>'
echo 'same as btrfs filesystem defrag (look at its --help)'
exit
fi
if [ ! "$(id -u)" -eq 0 ]; then
echo 'This probably needs root, if not edit' "$0"
echo 'Remove line 10: sed -e '\''10d'\'' -i' "$0"
exit 2
View KvArcDark#.kvconfig
[%General]
author=Tsu Jan
comment=A minimalistic dark theme inspired by the Arc GTK theme
x11drag=all
alt_mnemonic=true
left_tabs=true
attach_active_tab=true
mirror_doc_tabs=true
group_toolbar_buttons=false
toolbar_item_spacing=1
View userChrome for transparency
html, html > *, html > * > *, .browser-toolbar {
border: none !important;
-moz-appearance: none !important;
box-shadow: none !important;
background: transparent!important;
}
.titlebar-color, .browser-toolbar, findbar {
background: rgba(49, 54, 59, 0.75)!important;
}
@nicman23
nicman23 / .zshrc
Last active Aug 22, 2021
zshrc just works (TM) +ssh agent
View .zshrc
. ~/.antigen/init.zsh || eval "$(curl -L git.io/antigen)"
antigen use oh-my-zsh
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-completions
@nicman23
nicman23 / paccheck-lite.sh
Created Jan 12, 2019
paccheck checking only the existance and size of the the reported files, going to the next package on first error.
View paccheck-lite.sh
#! /usr/bin/bash
pacman -Qsq | while read line;
do echo \> checking $line; pacman -Qlq $line | grep -vP '^/etc' | grep -vP '/$' |
while read line2
do if [[ ! -e "$line2" ]] && [[ ! -s "$line2" ]]
then echo $line $line2 | tee -a corrupt; break
fi
done
done
@nicman23
nicman23 / upgrade
Created Apr 21, 2018
Openwrt upgrade script
View upgrade
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
if [ -e /root/.upgrade ]
then exit
else touch /root/.upgrade
fi