mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Update alacritty, kitty, bspwm, i3wm, vim,tmux configs & sctipts
This commit is contained in:
parent
246dc34d13
commit
c7da10d076
22 changed files with 256 additions and 282 deletions
|
|
@ -2,15 +2,12 @@
|
|||
declare options=("exit
|
||||
i3
|
||||
qtile
|
||||
berry
|
||||
openbox
|
||||
dwm
|
||||
bspwm
|
||||
alacritty
|
||||
kitty
|
||||
picom
|
||||
ranger
|
||||
qutebrowser
|
||||
emacs
|
||||
nvim
|
||||
tmux
|
||||
dunst
|
||||
|
|
@ -18,61 +15,39 @@ castero
|
|||
redshift
|
||||
rofi")
|
||||
|
||||
choice=$(echo -e "${options[@]}"|dmenu -p "Config edit" $@)
|
||||
menucmd="rofi -location 2 -dmenu"
|
||||
choice=$(echo -e "${options[@]}"|${menucmd} -p "Config edit" $@)
|
||||
case "$choice" in
|
||||
exit) exit 0 ;;
|
||||
i3)
|
||||
case "$(echo -e "config\npolybar"|dmenu -p "I3wm" $@)" in
|
||||
case "$(echo -e "config\npolybar"|${menucmd} -p "I3wm" $@)" in
|
||||
config) choice="$HOME/.config/i3/config" ;;
|
||||
polybar) choice="$HOME/.config/polybar/config" ;;
|
||||
esac
|
||||
;;
|
||||
qtile)
|
||||
case "$(echo -e "config\nautostart"|dmenu -p "Qtile" $@)" in
|
||||
case "$(echo -e "config\nautostart"|${menucmd} -p "Qtile" $@)" in
|
||||
config) choice="$HOME/.config/qtile/config.py" ;;
|
||||
autostart) choice="$HOME/.config/qtile/autostart.sh" ;;
|
||||
esac
|
||||
;;
|
||||
berry)
|
||||
case "$(echo -e "config\npolybar\nsxhkd"|dmenu -p "Berry" $@)" in
|
||||
config) choice="$HOME/.config/berry/autostart" ;;
|
||||
polybar) choice="$HOME/.config/berry/polybar/polybar" ;;
|
||||
sxhkd) choice="$HOME/.config/berry/sxhkdrc" ;;
|
||||
bspwm)
|
||||
case "$(echo -e "config\nsxhkd\npolybar"|${menucmd} -p "Bspwm" $@)" in
|
||||
config) choice="$HOME/.config/bspwm/config" ;;
|
||||
sxhkd) choice="$HOME/.config/bspwm/sxhkd" ;;
|
||||
polybar) choice="$HOME/.config/bspwm/polybar" ;;
|
||||
esac
|
||||
;;
|
||||
openbox)
|
||||
case "$(echo -e "config\nautostart\nmenu\ntint2"|dmenu -p "OpenBox" $@)" in
|
||||
config) choice="$HOME/.config/openbox/rc.xml" ;;
|
||||
autostart) choice="$HOME/.config/openbox/autostart" ;;
|
||||
menu) choice="$HOME/.config/openbox/menu.xml" ;;
|
||||
tint2) choice="$HOME/.config/tint2/tint2rc" ;;
|
||||
esac
|
||||
;;
|
||||
dwm)
|
||||
case "$(echo -e "config\nautostart\nbar"|dmenu -p "DWM" $@)" in
|
||||
config) choice="$HOME/.config/dwm/config.def.h " ;;
|
||||
autostart) choice="$HOME/.config/dwm/autostart.sh" ;;
|
||||
bar) choice="$HOME/.script/dwmbar.sh" ;;
|
||||
esac
|
||||
;;
|
||||
alacritty) choice="$hoME/.config/alacritty.yml" ;;
|
||||
alacritty) choice="$HOME/.config/alacritty.yml" ;;
|
||||
kitty) choice="$HOME/.config/kitty/kitty.conf" ;;
|
||||
picom) choice="$HOME/.config/picom.conf" ;;
|
||||
ranger) choice="$HOME/.config/ranger/rc.conf" ;;
|
||||
qutebrowser)
|
||||
case "$(echo -e "config\nquickmarks"|dmenu -p "Qutebrowser" $@)" in
|
||||
case "$(echo -e "config\nquickmarks"|${menucmd} -p "Qutebrowser" $@)" in
|
||||
config) choice="$HOME/.config/qutebrowser/config.py" ;;
|
||||
quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;;
|
||||
esac
|
||||
;;
|
||||
emacs)
|
||||
case "$(echo -e "config\ncustom\ninit\npackages"|dmenu -p "Doom emacs" $@)" in
|
||||
config) choice="$HOME/.doom.d/config.el" ;;
|
||||
init) choice="$HOME/.doom.d/init.el" ;;
|
||||
custom) choice="$HOME/.doom.d/custom.el" ;;
|
||||
packages) choice="$HOME/.doom.d/packages.el" ;;
|
||||
esac
|
||||
;;
|
||||
nvim) choice="$HOME/.config/nvim/init.vim" ;;
|
||||
tmux) choice="$HOME/.tmux.conf" ;;
|
||||
dunst) choice="$HOME/.config/dunst/dunstrc" ;;
|
||||
|
|
@ -80,11 +55,10 @@ case "$choice" in
|
|||
castero) choice="$HOME/.config/castero/castero.conf" ;;
|
||||
redshift) choice="$HOME/.config/redshift.conf" ;;
|
||||
rofi)
|
||||
case "$(echo -e "config\nnten-dmenu"|dmenu -p "Rofi" $@)" in
|
||||
case "$(echo -e "config\nnten-dmenu"|${menucmd} -p "Rofi" $@)" in
|
||||
config) choice="$HOME/.config/rofi/config" ;;
|
||||
nten-dmenu) choice="$HOME/.config/rofi/themes/nten-dmenu.rasi" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
alacritty -e nvim "$choice"
|
||||
# emacsclient -c -a emacs "$choice"
|
||||
|
|
|
|||
17
script/dmenu/dmenu-pass.sh
Executable file
17
script/dmenu/dmenu-pass.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
shopt -s nullglob globstar
|
||||
|
||||
menucmd="rofi -location 2 -dmenu"
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
password=$(printf '%s\n' "${password_files[@]}"|${menucmd} -p "Passwords" "$@")
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
if [[ $typeit -eq 0 ]]; then
|
||||
pass show -c "$password" 2>/dev/null
|
||||
else
|
||||
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
|
||||
xdotool type --clearmodifiers --file -
|
||||
fi
|
||||
|
|
@ -4,23 +4,24 @@ Lock
|
|||
Logout
|
||||
Reboot")
|
||||
|
||||
choice=$(echo -e "${options[@]}"|dmenu -p "Power" $@)
|
||||
menucmd="rofi -location 2 -dmenu"
|
||||
choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@)
|
||||
case "$choice" in
|
||||
"ShutDown")
|
||||
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
|
||||
"Yes") exec systemctl poweroff ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
|
||||
"Logout")
|
||||
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
|
||||
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Reboot")
|
||||
case "$(echo -e "Yes\nNo"|dmenu -p "Reboot" $@)" in
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "Reboot" $@)" in
|
||||
"Yes") exec systemctl reboot ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
getDate() {
|
||||
local date="$(date +%d.%m.%Y)"
|
||||
echo " ${date}"
|
||||
}
|
||||
getTime() {
|
||||
local time="$(date +%H:%M)"
|
||||
echo " ${time}"
|
||||
}
|
||||
getVolume() {
|
||||
local volume="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||
echo " ${volume}"
|
||||
}
|
||||
getKeyLayout() {
|
||||
case "$(xkblayout)" in
|
||||
"Eng") echo " us" ;;
|
||||
"Rus") echo " ru" ;;
|
||||
"Ukr") echo " ua" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
while true; do
|
||||
xsetroot -name " $(getVolume) | $(getKeyLayout) | $(getTime) | $(getDate)"
|
||||
sleep 0
|
||||
done
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ $(pgrep polybar) ]
|
||||
then
|
||||
polybar i3bar >/dev/null
|
||||
# ~/.config/i3/bar.sh
|
||||
else
|
||||
killall -q polybar
|
||||
pkill polybar
|
||||
fi
|
||||
7
script/random-wallpaper.sh
Normal file
7
script/random-wallpaper.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
WALLPATH="~/Pictures/wallp"
|
||||
|
||||
while true; do
|
||||
feh --randomize --bg-scale $WALLPATH
|
||||
sleep 900
|
||||
done
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision
|
||||
do
|
||||
while read snapname revision; do
|
||||
sudo snap remove "$snapname" --revision="$revision"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue