Skip to content

Commit

Permalink
bicc
Browse files Browse the repository at this point in the history
  • Loading branch information
neeasade committed Sep 4, 2019
1 parent f3e314a commit 69c5daa
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
1 change: 1 addition & 0 deletions shell/.sh.d/environment
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ succ .go/bin
succ .cargo/bin
succ .wm/scripts/interact
succ .wm/scripts/visual
succ .wm/panel/lemons
# pip --user location
succ .local/bin

Expand Down
39 changes: 25 additions & 14 deletions shell/.sh.d/functions
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ sysinfo() {
printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')"
}

bicc() {
du -Sa "${1:-$HOME}" | sort -n -r | head -n 20 | awk '{"numfmt --to=si "$1"000" | getline size; $1=""; print size $0}'
}

sleepm() {
sleep $(($1 * 60))
}
Expand Down Expand Up @@ -211,26 +215,32 @@ passadd() {
}

gset() {
g_conf() {
echo git config user.name "$1"
git config user.name "$1"
echo git config user.email "$2"
git config user.email "$2"
}

if [ ! -z "$2" ]; then
g_conf "$1" "$2"
return
fi

case $1 in
pass)
git config user.name "$(pass git/name)"
git config user.email "$(pass git/email)"
;;
pass) g_conf "$(pass git/name)" "$(pass git/email)" ;;
manual)
echo name:; read _name
git config user.name "$_name"

echo email:; read _email
git config user.email "$_email"
echo name:; read name
echo email:; read email
g_conf "$name" "$email"
;;
adhoc)
_name="$(getent passwd "$USER" | cut -d ':' -f 5 | sed 's/,//g')"
_name="${name:-$USER}"
git config user.name "$_name"
git config user.email "${USER}@$(hostname).machine"
name="$(getent passwd "$USER" | cut -d ':' -f 5 | sed 's/,//g')"
g_conf "${name:-$USER}" "${USER}@$(hostname).machine"
;;
*)
echo options: pass home adhoc
echo "gset <name> <email>"
echo "or: gset manual|adhoc|pass"
;;
esac
}
Expand All @@ -241,6 +251,7 @@ ttemp() {

mkdir -p "${working_dir}/${current}"
cd "${working_dir}/${current}"
pwd

if [ ! -z "$*" ]; then
echo "$*" > ./context.txt
Expand Down
2 changes: 1 addition & 1 deletion wm/.wm/panel/lemons/battery
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env dash
#!/bin/sh

icon battery

Expand Down
4 changes: 2 additions & 2 deletions wm/.wm/scripts/theming/ltheme
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ load_qutebrowser() {
margs qutebrowser .config/qutebrowser/config.py

# bspc config ignore_ewmh_focus true
qb_command ':config-source'
qb_command ':reload' # reload current page w/ css
# qb_command ':config-source'
# qb_command ':reload' # reload current page w/ css
# bspc config ignore_ewmh_focus false
}

Expand Down

0 comments on commit 69c5daa

Please sign in to comment.