From 6dcc6899a2e98b1f3a62d203f3586b5c0c8fba2b Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Wed, 11 Aug 2021 14:45:00 -0300 Subject: [PATCH] Major overhaul --- aliases | 12 ------ dunstrc => config/dunst/dunstrc | 0 picom.conf => config/picom/picom.conf | 0 config.py => config/qutebrowser/config.py | 0 Xmodmap => home/Xmodmap | 0 tmux.conf => home/tmux.conf | 0 vimrc => home/vimrc | 0 wallpaper.png => home/wallpaper.png | Bin xinitrc => home/xinitrc | 0 zshrc => home/zshrc | 0 install.sh | 44 +++++++++++----------- local/bin/cleartrash | 3 ++ local/bin/forecast | 3 ++ local/bin/getip | 4 ++ local/bin/trash | 4 ++ local/bin/weather | 3 ++ 16 files changed, 38 insertions(+), 35 deletions(-) rename dunstrc => config/dunst/dunstrc (100%) rename picom.conf => config/picom/picom.conf (100%) rename config.py => config/qutebrowser/config.py (100%) rename Xmodmap => home/Xmodmap (100%) rename tmux.conf => home/tmux.conf (100%) rename vimrc => home/vimrc (100%) rename wallpaper.png => home/wallpaper.png (100%) rename xinitrc => home/xinitrc (100%) rename zshrc => home/zshrc (100%) create mode 100755 local/bin/cleartrash create mode 100755 local/bin/forecast create mode 100755 local/bin/getip create mode 100755 local/bin/trash create mode 100755 local/bin/weather 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