parent
c6a82fa4aa
commit
b5da688577
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh -x
|
||||
#!/bin/sh
|
||||
|
||||
X11_CONFIG="$XDG_CONFIG_HOME/X11"
|
||||
SESSIONFILES=$(run-parts --list "$X11_CONFIG/xsession.d")
|
||||
|
||||
SESSIONDIR="$XDG_CONFIG_HOME/X11/xsession.d"
|
||||
SESSIONFILES=$(run-parts --list $SESSIONDIR)
|
||||
if [ -n "$SESSIONFILES" ]; then
|
||||
set +e
|
||||
for SESSIONFILE in $SESSIONFILES; do
|
||||
|
@ -11,6 +12,6 @@ if [ -n "$SESSIONFILES" ]; then
|
|||
set -e
|
||||
fi
|
||||
|
||||
. "$XDG_CONFIG_HOME/X11/xprofile"
|
||||
. "$X11_CONFIG/xprofile"
|
||||
|
||||
exec dwm
|
||||
|
|
|
@ -51,14 +51,14 @@ set promptfmt "\033[34;1m%u\033[36m@\033[34m%h \033[35m[\033[0;1m%d\033[33m%f\03
|
|||
# esac
|
||||
# }}
|
||||
|
||||
cmd open $set -f; rifle -p 0 $fx; clear
|
||||
cmd open $set -f; rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -p 0 $fx; clear
|
||||
|
||||
cmd open-with ${{
|
||||
clear
|
||||
set -f
|
||||
rifle -l $fx
|
||||
rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -l $fx
|
||||
read -p "Open with: " method
|
||||
rifle -p $method $fx
|
||||
rifle -c $XDG_CONFIG_HOME/lf/rifle.conf -p $method $fx
|
||||
clear
|
||||
}}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# vim: ft=cfg
|
||||
#
|
||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
|
@ -94,5 +94,5 @@ export NVM_DIR="$HOME/.config/nvm"
|
|||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
exec startx
|
||||
exec startx $XINITRC
|
||||
fi
|
||||
|
|
|
@ -22,7 +22,7 @@ fi
|
|||
printf "\n"
|
||||
|
||||
printf "%b" "$BOLD${BLUE}Pulling updates from dotfiles repo...$NC\n"
|
||||
git pull origin main
|
||||
git pull origin main --recurse-submodules=yes
|
||||
printf "\n"
|
||||
|
||||
if [ $needs_pop -eq 1 ]; then
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# If given a file, set that as the new wallpaper.
|
||||
# If given a directory, choose random file in it.
|
||||
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
|
||||
bgloc="$XDG_DATA_HOME/bg"
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
|
|
|
@ -17,7 +17,7 @@ printf "# vim: filetype=sh\\nalias " >"$shell_shortcuts"
|
|||
|
||||
# Format the `directories` file in the correct syntax and sent it to all three configs.
|
||||
eval "echo \"$(cat "$bmdirs")\"" | awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
||||
printf(\"%s=\42cd %s && tput cuu1;tput el\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||
printf(\"%s=\42cd %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
||||
printf(\"map g%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
|
||||
printf(\"%s\n\",\$2) >> \"$lf_dirs\" }"
|
||||
|
|
|
@ -1,3 +1,34 @@
|
|||
#!/bin/sh
|
||||
# TODO: Add color
|
||||
sensors | awk '/Core 0/ {print "\033[11m🌡\033[10m" $3}'
|
||||
|
||||
reset="\033[0m"
|
||||
normal="\033[10m"
|
||||
big="\033[11m"
|
||||
red="\033[31m"
|
||||
green="\033[32m"
|
||||
orange="\033[33m"
|
||||
|
||||
cache=/tmp/cpubarscache
|
||||
temp=$(sensors | awk '/CPU/ {print $2}' | tr -d "+")
|
||||
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
||||
[ ! -f $cache ] && echo "$stats" >"$cache"
|
||||
old=$(cat "$cache")
|
||||
printf "%b" "$big$normal $temp "
|
||||
echo "$stats" | while read -r row; do
|
||||
id=${row%% *}
|
||||
rest=${row#* }
|
||||
total=${rest%% *}
|
||||
idle=${rest##* }
|
||||
case "$(echo "$old" | awk '{if ($1 == id)
|
||||
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
||||
id="$id" total="$total" idle="$idle")" in
|
||||
"0") printf "%b" "$green▁" ;;
|
||||
"1") printf "%b" "$green▂" ;;
|
||||
"2") printf "%b" "$green▃" ;;
|
||||
"3") printf "%b" "$orange▄" ;;
|
||||
"4") printf "%b" "$orange▅" ;;
|
||||
"5") printf "%b" "$orange▆" ;;
|
||||
"6" | "7" | "8") printf "%b" "$red▇" ;;
|
||||
esac
|
||||
done
|
||||
printf "%b" "$reset\n"
|
||||
echo "$stats" >"$cache"
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
reset="\033[0m"
|
||||
normal="\033[10m"
|
||||
big="\033[11m"
|
||||
red="\033[31m"
|
||||
green="\033[32m"
|
||||
orange="\033[33m"
|
||||
|
||||
cache=/tmp/cpubarscache
|
||||
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
||||
[ ! -f $cache ] && echo "$stats" >"$cache"
|
||||
old=$(cat "$cache")
|
||||
printf "%b" "$big$normal "
|
||||
echo "$stats" | while read -r row; do
|
||||
id=${row%% *}
|
||||
rest=${row#* }
|
||||
total=${rest%% *}
|
||||
idle=${rest##* }
|
||||
case "$(echo "$old" | awk '{if ($1 == id)
|
||||
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
||||
id="$id" total="$total" idle="$idle")" in
|
||||
"0") printf "%b" "$green▁" ;;
|
||||
"1") printf "%b" "$green▂" ;;
|
||||
"2") printf "%b" "$green▃" ;;
|
||||
"3") printf "%b" "$orange▄" ;;
|
||||
"4") printf "%b" "$orange▅" ;;
|
||||
"5") printf "%b" "$orange▆" ;;
|
||||
"6" | "7" | "8") printf "%b" "$red▇" ;;
|
||||
|
||||
esac
|
||||
done
|
||||
printf "%b" "$reset\n"
|
||||
echo "$stats" >"$cache"
|
|
@ -1,10 +1,11 @@
|
|||
#!/bin/sh
|
||||
transmission-remote "$1" -l | grep % |
|
||||
sed " # The letters are for sorting and will not appear.
|
||||
s/.*Stopped.*/A /;
|
||||
transmission-remote $@ -l -N "$XDG_CONFIG_HOME/netrc" | grep % |
|
||||
# The letters are for sorting and will not appear. \
|
||||
sed "
|
||||
s/.*Stopped.*/A /;
|
||||
s/.*Seeding.*/Z /;
|
||||
s/.*100%.*/N /;
|
||||
s/.*Idle.*/B ﭦ/;
|
||||
s/.*Uploading.*/L /;
|
||||
s/.*%.*/M /" |
|
||||
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
|
||||
s/.*%.*/M /
|
||||
" | sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Helps open a file with xdg-open from mutt in a external program without weird side effects.
|
||||
tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files"
|
||||
file="$tempdir/$(basename "$1")"
|
||||
opener="setsid -f xdg-open"
|
||||
mkdir -p "$tempdir"
|
||||
cp -f "$1" "$file"
|
||||
$opener "$file" >/dev/null 2>&1
|
||||
find "${tempdir:?}" -mtime +1 -type f -delete
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/sh
|
||||
# These are the groups that will be toggled between. They take the format <layout>:<variant>
|
||||
# If you want the default US layout, use us:basic
|
||||
groups="us:dvorak de:nodeadkeys"
|
||||
|
||||
index() {
|
||||
echo "$groups" | cut -d ' ' -f "$1"
|
||||
}
|
||||
|
||||
if [ "$1" = "-n" ]; then
|
||||
newgroup="$(setxkbmap -query | grep -oP '(layout|variant):\s*\K\w+' | sed ':a;N;s/\n/:/')"
|
||||
elif [ "$1" = "" ]; then
|
||||
current="$(setxkbmap -query | grep -oP '(layout|variant):\s*\K\w+' | sed ':a;N;s/\n/:/')"
|
||||
i=1
|
||||
while [ ! "$found" ]; do
|
||||
group=$(index $i)
|
||||
if [ "$group" = "$current" ]; then
|
||||
newgroup=$(index $((i + 1)))
|
||||
[ -z "$newgroup" ] && newgroup=$(index 1)
|
||||
found=true
|
||||
elif [ -z "$group" ]; then
|
||||
newgroup=$(index 1)
|
||||
found=true
|
||||
fi
|
||||
i=$((i + 1))
|
||||
done
|
||||
else
|
||||
newgroup="$1"
|
||||
fi
|
||||
|
||||
setxkbmap \
|
||||
-layout "$(echo "$newgroup" | cut -d ':' -f1)" \
|
||||
-variant "$(echo "$newgroup" | cut -d ':' -f2)" \
|
||||
-option caps:super \
|
||||
1>/dev/null 2>&1 ||
|
||||
echo "Unkown keyboard layout" >&2
|
||||
|
||||
xset r rate 300 50
|
||||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
||||
|
||||
killall xcape 2>/dev/null
|
||||
xcape -e 'Super_L=Escape'
|
||||
|
||||
sleep 0.03
|
||||
[ "$1" != "-n" ] && pkill -RTMIN+15 dwmblocks
|
|
@ -43,7 +43,7 @@ command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
|
|||
command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
||||
|
||||
printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n"
|
||||
"$DOTFILES_DIR/.local/share/firefox/updater.sh" -s
|
||||
"$DOTFILES_DIR/.local/share/firefox/updater.sh" -sb
|
||||
|
||||
printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress <Enter> to exit window.\n"
|
||||
read -r _
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
These are the dotfiles that I use on an Ubuntu and an Arch machine.
|
||||
These are the dotfiles that I use on an Ubuntu, Arch and Void machine.
|
||||
I keep them on a selfhosted git server for easy synchronization, and mirror them to github so that others can use parts of them as well.
|
||||
|
||||
## Installation?
|
||||
I'd advise against using my setup currently. I am currently in the process of writing a script that will automatically install the various software dependencies of my setup, which will be usable on Arch and Ubuntu systems. Once that is finished it might actually make sense to install them.
|
||||
I'd advise against using my setup currently. I am currently in the process of writing a script that will automatically install the various software dependencies of my setup, which will be usable on Void Linux systems. Once that is finished it might actually make sense to install them.
|
||||
|
||||
Theoretically they could be installed by cloning this repo to ~/.dotfiles and running ~/.dotfiles/.local/bin/dotsync.
|
||||
This script requires gnu stow to be installed, which symlinks the dotfiles to the correct locations.
|
||||
|
|
3
TODO.md
3
TODO.md
|
@ -1,11 +1,8 @@
|
|||
# TODO
|
||||
- [ ] Create a better bitwarden integration
|
||||
- [ ] Remove username from ssh completion
|
||||
- [ ] Look into rifle.py for LF
|
||||
- [ ] rework shift-o function of LF to detach opening program from terminal
|
||||
- [ ] add a messaging function to dotsync to warn for breaking changes
|
||||
- [ ] check font names for void, adjust fontconfig
|
||||
- [ ] integrate sb-cpu into sb-cpubars
|
||||
|
||||
# FIX
|
||||
- [ ] sb-playerctl trailing dash when no artist
|
||||
|
|
Loading…
Reference in New Issue