Completely reset dotfiles (#2)
This commit is contained in:
parent
4abd1a6ffc
commit
bf26003ab3
38 changed files with 305 additions and 1101 deletions
25
bin/bin/,
25
bin/bin/,
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
function find-local-bin {
|
||||
local readonly prefix=$1; shift
|
||||
local bin_dir="$prefix-bin"
|
||||
local found_bin_dir=""
|
||||
|
||||
current_dir=$(pwd)
|
||||
found_bin_dir=$current_dir/$bin_dir
|
||||
while [ ! -d $found_bin_dir ]; do
|
||||
if [[ $current_dir == $HOME ]]; then
|
||||
found_bin_dir=$HOME/bin
|
||||
break
|
||||
fi
|
||||
|
||||
current_dir=$(realpath "$current_dir/..")
|
||||
found_bin_dir=$current_dir/$bin_dir
|
||||
done
|
||||
|
||||
echo $found_bin_dir
|
||||
}
|
||||
|
||||
dir=$(find-local-bin aet)
|
||||
|
||||
exec $dir/$@
|
|
@ -1,99 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This file echoes a bunch of 24-bit color codes
|
||||
# to the terminal to demonstrate its functionality.
|
||||
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
|
||||
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
|
||||
# <r> <g> <b> range from 0 to 255 inclusive.
|
||||
# The escape sequence ^[0m returns output to default
|
||||
|
||||
setBackgroundColor()
|
||||
{
|
||||
echo -en "\x1b[48;2;$1;$2;$3""m"
|
||||
}
|
||||
|
||||
resetOutput()
|
||||
{
|
||||
echo -en "\x1b[0m\n"
|
||||
}
|
||||
|
||||
# Gives a color $1/255 % along HSV
|
||||
# Who knows what happens when $1 is outside 0-255
|
||||
# Echoes "$red $green $blue" where
|
||||
# $red $green and $blue are integers
|
||||
# ranging between 0 and 255 inclusive
|
||||
rainbowColor()
|
||||
{
|
||||
let h=$1/43
|
||||
let f=$1-43*$h
|
||||
let t=$f*255/43
|
||||
let q=255-t
|
||||
|
||||
if [ $h -eq 0 ]
|
||||
then
|
||||
echo "255 $t 0"
|
||||
elif [ $h -eq 1 ]
|
||||
then
|
||||
echo "$q 255 0"
|
||||
elif [ $h -eq 2 ]
|
||||
then
|
||||
echo "0 255 $t"
|
||||
elif [ $h -eq 3 ]
|
||||
then
|
||||
echo "0 $q 255"
|
||||
elif [ $h -eq 4 ]
|
||||
then
|
||||
echo "$t 0 255"
|
||||
elif [ $h -eq 5 ]
|
||||
then
|
||||
echo "255 0 $q"
|
||||
else
|
||||
# execution should never reach here
|
||||
echo "0 0 0"
|
||||
fi
|
||||
}
|
||||
|
||||
for i in `seq 0 127`; do
|
||||
setBackgroundColor $i 0 0
|
||||
echo -en " "
|
||||
done
|
||||
resetOutput
|
||||
for i in `seq 255 128`; do
|
||||
setBackgroundColor $i 0 0
|
||||
echo -en " "
|
||||
done
|
||||
resetOutput
|
||||
|
||||
for i in `seq 0 127`; do
|
||||
setBackgroundColor 0 $i 0
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
for i in `seq 255 128`; do
|
||||
setBackgroundColor 0 $i 0
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
|
||||
for i in `seq 0 127`; do
|
||||
setBackgroundColor 0 0 $i
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
for i in `seq 255 128`; do
|
||||
setBackgroundColor 0 0 $i
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
|
||||
for i in `seq 0 127`; do
|
||||
setBackgroundColor `rainbowColor $i`
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
for i in `seq 255 128`; do
|
||||
setBackgroundColor `rainbowColor $i`
|
||||
echo -n " "
|
||||
done
|
||||
resetOutput
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
|
||||
git branch --track "${branch##*/}" "$branch"
|
||||
done
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
color_file=$HOME/.config/atomaka/color.yml
|
||||
if ! test -f $color_file; then
|
||||
mkdir -p $HOME/.config/atomaka
|
||||
echo light > $color_file
|
||||
fi
|
||||
old_color=$(cat $color_file)
|
||||
|
||||
if [[ $old_color == "dark" ]]; then
|
||||
|
@ -16,7 +20,3 @@ echo $alacritty_header > $alacritty/alacritty.yml
|
|||
cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty/alacritty.yml
|
||||
|
||||
echo $new_color > $color_file
|
||||
|
||||
if [[ $TMUX ]]; then
|
||||
tmux source-file $HOME/.tmux/${new_color}.conf
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue