From a8eebb5827a1a5bceee7db7b142d436fccd2a250 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Mon, 11 May 2020 10:48:19 +0200 Subject: [PATCH] Clear home dir --- .bash_profile | 1 - .bashrc | 21 --------- .eslintrc => .config/.eslintrc | 0 .Xresources => .config/Xresources | 0 .shellrc => .config/shellrc | 2 +- .config/sxhkd/sxhkdrc | 4 +- .config/user-dirs.dirs | 15 +++++++ .zshrc => .config/zsh/.zshrc | 2 +- .local/bin/scripts/autostart | 45 ------------------- .local/bin/scripts/blaze | 0 .local/bin/scripts/screenshot | 28 ++++++------ .local/bin/scripts/setwall | 8 ++-- {.gnupg => .local/share/gnupg}/gpg-agent.conf | 0 .profile | 17 +++++-- .xinitrc | 15 ++++++- 15 files changed, 65 insertions(+), 93 deletions(-) delete mode 120000 .bash_profile delete mode 100644 .bashrc rename .eslintrc => .config/.eslintrc (100%) rename .Xresources => .config/Xresources (100%) rename .shellrc => .config/shellrc (97%) create mode 100644 .config/user-dirs.dirs rename .zshrc => .config/zsh/.zshrc (99%) delete mode 100755 .local/bin/scripts/autostart mode change 100644 => 100755 .local/bin/scripts/blaze rename {.gnupg => .local/share/gnupg}/gpg-agent.conf (100%) diff --git a/.bash_profile b/.bash_profile deleted file mode 120000 index aa7da3a..0000000 --- a/.bash_profile +++ /dev/null @@ -1 +0,0 @@ -.profile \ No newline at end of file diff --git a/.bashrc b/.bashrc deleted file mode 100644 index b41db1b..0000000 --- a/.bashrc +++ /dev/null @@ -1,21 +0,0 @@ -# -# ██ ██ -# ░██ ░██ -# ░██ ██████ ██████░██ -# ░██████ ░░░░░░██ ██░░░░ ░██████ -# ░██░░░██ ███████ ░░█████ ░██░░░██ -# ░██ ░██ ██░░░░██ ░░░░░██░██ ░██ -# ░██████ ░░████████ ██████ ░██ ░██ -# ░░░░░ ░░░░░░░░ ░░░░░░ ░░ ░░ - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# Vi mode -set -o vi - -# Load global shell config -source $HOME/.shellrc - -# Prompt -export PS1="\033[0;32m\h\033[0m in \033[0;36m\w\033[0m\n{\033[0;31m${?}\033[0m}\033[0;36m> \033[0m" diff --git a/.eslintrc b/.config/.eslintrc similarity index 100% rename from .eslintrc rename to .config/.eslintrc diff --git a/.Xresources b/.config/Xresources similarity index 100% rename from .Xresources rename to .config/Xresources diff --git a/.shellrc b/.config/shellrc similarity index 97% rename from .shellrc rename to .config/shellrc index cff7359..b726bf0 100644 --- a/.shellrc +++ b/.config/shellrc @@ -44,7 +44,7 @@ alias yt-video='youtube-dl -f bestvideo -o "%(title)s.%(ext)s" -4' alias yt-thumbnail='youtube-dl --write-thumbnail --skip-download -o "%(title)s.%(ext)s" -4' # git -alias btw='git --git-dir=$HOME/Develop/biual-dot-conf.git/ --work-tree=$HOME' +alias btw='git --git-dir=$HOME/dev/botfiles/ --work-tree=$HOME' alias ga='git add' alias gc='git commit -S' alias gp='git push' diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index c572c59..d124bca 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -19,7 +19,7 @@ super + b iceweasel # rofi super + d - rofi -show drun + rofi -show run # st super + Return st @@ -52,7 +52,7 @@ super + u updater # rofi-todo super + n - rofi-todo -f $HOME/Notes/notes.json + rofi-todo -f $HOME/doc/notes/notes.json # blaze F11 [ $(pgrep ffmpeg) ] && blaze -s || blaze diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..6703543 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/doc" +XDG_DOWNLOAD_DIR="$HOME/dl" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/pix" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/vid" diff --git a/.zshrc b/.config/zsh/.zshrc similarity index 99% rename from .zshrc rename to .config/zsh/.zshrc index 9d91221..0604fb3 100644 --- a/.zshrc +++ b/.config/zsh/.zshrc @@ -20,7 +20,7 @@ HISTFILE="${ZDIR}/history" # imports source $HOME/.profile -source $HOME/.shellrc +source $HOME/.config/shellrc # error message command_not_found_handler() { diff --git a/.local/bin/scripts/autostart b/.local/bin/scripts/autostart deleted file mode 100755 index 8dd6439..0000000 --- a/.local/bin/scripts/autostart +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# _ _ _ -# __ _ _ _| |_ ___ ___| |_ __ _ _ __| |_ -# / _` | | | | __/ _ \/ __| __/ _` | '__| __| -# | (_| | |_| | || (_) \__ \ || (_| | | | |_ -# \__,_|\__,_|\__\___/|___/\__\__,_|_| \__| - -# Load .Xresources -xrdb ~/.Xresources - -# wallpaper -setwall & - -killall -q sxhkd -while pgrep -u $UID -x sxhkd >/dev/null; do killall -q sxhkd; done -sxhkd & -# Dunst -killall -q dunst -while pgrep -u $UID -x dunst >/dev/null; do killall -q dunst; done -dunst & -# Picom -killall -q picom -while pgrep -u $UID -x picom >/dev/null; do killall -q picom; done -picom & - -# Set keyboard layout & key swaping -setxkbmap -layout 'pl' -option caps:swapescape & -# Cursor -xsetroot -cursor_name left_ptr & # change the cursor shape from "x" to normal - -# dwm bar -dbar & - -# Not reload -[[ -z $(pgrep udiskie) ]] && udiskie & -[[ -z $(pgrep clipmenud) ]] && clipmenud & -[[ -z $(pgrep mpd) ]] && mpd & -[[ -z $(pgrep dunst) ]] && dunst & -[[ -z $(pgrep syncthing) ]] && syncthing -no-browser & -telegram-desktop & - -~/.scripts/dwmbar & - -# Welcome notify -dunstify "Hello ${USER}!" diff --git a/.local/bin/scripts/blaze b/.local/bin/scripts/blaze old mode 100644 new mode 100755 diff --git a/.local/bin/scripts/screenshot b/.local/bin/scripts/screenshot index 207e94d..6bbd3f6 100755 --- a/.local/bin/scripts/screenshot +++ b/.local/bin/scripts/screenshot @@ -2,22 +2,22 @@ m() { rofi -dmenu -i -l "$@"; } -TYPE="$(printf "Screen\nArea\n" | m 2 -p 'What do you want to screenshot?')" -[ ! "$TYPE" ] && exit -SAVE="$(printf "No\nYes" | m 2 -p 'Do you want to copy to clipboard?')" -[ ! "$SAVE" ] && exit -TIME="$(printf "0.7\n5\n10\n15" | m 3 -p 'How many seconds you want to wait?')" -[ ! "$TIME" ] && exit +type="$(printf "Screen\nArea\n" | m 2 -p 'What do you want to screenshot?')" +[ ! "$type" ] && exit +save="$(printf "No\nYes" | m 2 -p 'Do you want to copy to clipboard?')" +[ ! "$save" ] && exit +time="$(printf "0.7\n5\n10\n15" | m 3 -p 'How many seconds you want to wait?')" +[ ! "$time" ] && exit -[ "$TYPE" = "Area" ] && TYPE="-s -u" || TYPE="" +[ "$type" = "Area" ] && type="-s -u" || type="" -mkdir -p ~/Pictures/Screenshots -sleep "$TIME" -SCREEN_PATH=~/Pictures/Screenshots/$(date +%G-%m-%d_%s).png +mkdir -p ~/pix/Screenshots +sleep "$time" +screen_path=~/pix/Screenshots/$(date +%G-%m-%d_%s).png -maim $TYPE "$SCREEN_PATH" && - notify-send -u low -t 1400 -i "$SCREEN_PATH" "Screenshot created!" +maim $type "$screen_path" && + notify-send -u low -t 1400 -i "$screen_path" "Screenshot created!" -[ "$SAVE" = "Yes" ] && +[ "$save" = "Yes" ] && xclip -sel clip /dev/null; sleep 0.5 - xclip -selection clipboard -t image/png "$SCREEN_PATH" || exit + xclip -selection clipboard -t image/png "$screen_path" || exit diff --git a/.local/bin/scripts/setwall b/.local/bin/scripts/setwall index 46ef488..be13d6e 100755 --- a/.local/bin/scripts/setwall +++ b/.local/bin/scripts/setwall @@ -1,10 +1,12 @@ #!/bin/sh -[ "$1" ] && { feh --bg-fill "$1" && exit 1; } +[ "$1" ] && { xwallpaper --maximize "$1" && exit 1; } if [ "$(cat /etc/hostname)" = "pc" ]; then - feh --bg-fill --randomize /home/samedamci/.config/wallpapers/1920x1080/ & + res="1920x1080" elif [ "$(cat /etc/hostname)" = "laptop" ]; then - feh --bg-fill --randomize /home/samedamci/.config/wallpapers/1366x768/ & + res="1366x768" fi +xwallpaper --maximize /home/samedamci/.config/wallpapers/"$res"/wall1.png & + diff --git a/.gnupg/gpg-agent.conf b/.local/share/gnupg/gpg-agent.conf similarity index 100% rename from .gnupg/gpg-agent.conf rename to .local/share/gnupg/gpg-agent.conf diff --git a/.profile b/.profile index d2367e3..6bda595 100644 --- a/.profile +++ b/.profile @@ -16,19 +16,28 @@ export EDITOR="nvim" export BROWSER="iceweasel" export TERMINAL="st" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CONFIG_HOME="$HOME/.config" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export _Z_DATA="$ZDOTDIR/plugs/z/z" +export INPUTRC="$ZDOTDIR/inputrc" +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" +export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export LESSHISTFILE="-" + #~~~~~~ # PATH #~~~~~~ export GOPATH=$HOME/.local/go - export NPM_PACKAGES="$HOME/.yarn/bin/" export PATH="$PATH:$HOME/.local/bin/:$HOME/.local/bin/scripts/:$NPM_PACKAGES:$GOROOT/bin:$GOPATH/bin" -export SCRD=$HOME/.scripts/ - - export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=00;93:do=00;93:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=1;34:st=37;44:ex=01;32:*.tar=01;36:*.tgz=01;36:*.svgz=00;93:*.arj=01;36:*.taz=01;36:*.lzh=01;36:*.lzma=01;36:*.zip=01;36:*.z=01;36:*.Z=01;36:*.dz=01;36:*.gz=01;36:*.bz2=01;36:*.tbz2=01;36:*.bz=01;36:*.tz=01;36:*.deb=01;36:*.rpm=01;36:*.jar=01;36:*.rar=01;36:*.ace=01;36:*.zoo=01;36:*.cpio=01;36:*.7z=01;36:*.rz=01;36:*.jpg=00;93:*.jpeg=00;93:*.gif=00;93:*.bmp=00;93:*.pbm=00;93:*.pgm=00;93:*.ppm=00;93:*.tga=00;93:*.xbm=00;93:*.xpm=00;93:*.tif=00;93:*.tiff=00;93:*.png=00;93:*.mng=00;93:*.pcx=00;93:*.mov=00;93:*.mpg=00;93:*.mpeg=00;93:*.m2v=00;93:*.mkv=00;93:*.ogm=00;93:*.mp4=00;93:*.m4v=00;93:*.mp4v=00;93:*.vob=00;93:*.qt=00;93:*.nuv=00;93:*.wmv=00;93:*.asf=00;93:*.rm=00;93:*.rmvb=00;93:*.flc=00;93:*.avi=00;93:*.fli=00;93:*.gl=00;93:*.dl=00;93:*.xcf=00;93:*.xwd=00;93:*.yuv=00;93:*.svg=00;93:*.aac=00;36:*.au=00;36:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:*.opus=00;35:" export _JAVA_AWT_WM_NONREPARENTING=1 export GPG_TTY=$(tty) + +[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx diff --git a/.xinitrc b/.xinitrc index 4260a9d..b37886c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,3 +1,16 @@ #!/bin/sh -autostart & + +xrdb ~/.config/Xresources & +setwall & +sxhkd & +dunst & +picom & +setxkbmap -layout 'pl' -option caps:swapescape & +xsetroot -cursor_name left_ptr & +dbar & +udiskie & +mpd & +dunst & +syncthing -no-browser & +telegram-desktop & exec dwm