diff --git a/aliases b/aliases index e4755f4..cecb18d 100644 --- a/aliases +++ b/aliases @@ -9,23 +9,11 @@ alias ....="cd ../../.." alias .....="cd ../../../.." export EDITOR="/usr/bin/vim" -# trash bin -alias trash='mkdir -p "$HOME/.trash" && mv -b -t "$HOME/.trash"' -alias cleartrash='rm -fv "$HOME/.trash/*"' - -# weather forecast -alias forecast="curl -s wttr.in | head -n -1" - # improved reset and clear alias reset="tput reset" alias clear="tput reset" -# get ip alias -alias getip="curl -s https://ipecho.net/plain | xargs echo" - # better du alias du="du -h" -alias weather="curl -s wttr.in | head -n-1" - alias feh="feh -." diff --git a/dunstrc b/config/dunst/dunstrc similarity index 100% rename from dunstrc rename to config/dunst/dunstrc diff --git a/picom.conf b/config/picom/picom.conf similarity index 100% rename from picom.conf rename to config/picom/picom.conf diff --git a/config.py b/config/qutebrowser/config.py similarity index 100% rename from config.py rename to config/qutebrowser/config.py diff --git a/Xmodmap b/home/Xmodmap similarity index 100% rename from Xmodmap rename to home/Xmodmap diff --git a/tmux.conf b/home/tmux.conf similarity index 100% rename from tmux.conf rename to home/tmux.conf diff --git a/vimrc b/home/vimrc similarity index 100% rename from vimrc rename to home/vimrc diff --git a/wallpaper.png b/home/wallpaper.png similarity index 100% rename from wallpaper.png rename to home/wallpaper.png diff --git a/xinitrc b/home/xinitrc similarity index 100% rename from xinitrc rename to home/xinitrc diff --git a/zshrc b/home/zshrc similarity index 100% rename from zshrc rename to home/zshrc diff --git a/install.sh b/install.sh index 90d5219..dacd698 100755 --- a/install.sh +++ b/install.sh @@ -1,27 +1,25 @@ #!/bin/sh -mydir=$(dirname "$0") -mydir=$(realpath "$mydir") +cd "$(dirname "$0")" +PWD="$(pwd)" -if [ ! "$mydir" = "$HOME/dotfiles" ]; then - mv "$mydir" "$HOME/dotfiles" - mydir="$HOME/dotfiles" -fi +#dotfiles from +#~/.config +for f in config/*; do + mkdir -p "$HOME/.$f" + for d in $f/*; do + ln -sf "$PWD/$d" "$HOME/.$d" + done +done -install() { - ln "$mydir/$1" "$HOME/.$1" -sf -} +#dotfiles from +#~ +for f in home/*; do + ln -sf "$PWD/$f" "$HOME/.$(basename $f)" +done -installto() { - mkdir -p "$HOME/$2" - ln "$mydir/$1" "$HOME/$2/$1" -sf -} - -install tmux.conf -install zshrc -install xinitrc -install Xmodmap -install wallpaper.png -install vimrc -installto picom.conf .config/picom -installto dunstrc .config/dunst -installto config.py .config/qutebrowser +#scripts +#~/.local/bin +mkdir -p "$HOME/.local/bin" +for f in local/bin/*; do + ln -sf "$PWD/$f" "$HOME/.$f" +done diff --git a/local/bin/cleartrash b/local/bin/cleartrash new file mode 100755 index 0000000..83524a5 --- /dev/null +++ b/local/bin/cleartrash @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -rfv "$HOME/.trash" diff --git a/local/bin/forecast b/local/bin/forecast new file mode 100755 index 0000000..d822fb4 --- /dev/null +++ b/local/bin/forecast @@ -0,0 +1,3 @@ +#!/bin/sh + +curl -s wttr.in | head -n -1 diff --git a/local/bin/getip b/local/bin/getip new file mode 100755 index 0000000..f4f697d --- /dev/null +++ b/local/bin/getip @@ -0,0 +1,4 @@ +#!/bin/sh + +curl -s ipecho.net/plain +echo diff --git a/local/bin/trash b/local/bin/trash new file mode 100755 index 0000000..ba2f7ef --- /dev/null +++ b/local/bin/trash @@ -0,0 +1,4 @@ +#!/bin/sh + +mkdir -p "$HOME/.trash" +mv $@ "$HOME/.trash" diff --git a/local/bin/weather b/local/bin/weather new file mode 100755 index 0000000..d822fb4 --- /dev/null +++ b/local/bin/weather @@ -0,0 +1,3 @@ +#!/bin/sh + +curl -s wttr.in | head -n -1