mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
🎨 Update
This commit is contained in:
parent
07805d44aa
commit
0d2b7d6ba3
28 changed files with 668 additions and 225 deletions
12
script/change-shell.sh
Executable file
12
script/change-shell.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
"help"|"--help")
|
||||
echo "bash Change default shell to bash"
|
||||
echo "zsh Change default shell to zsh"
|
||||
echo "fish Change default shell to fish"
|
||||
;;
|
||||
bash) chsh -s $(whitch bash) ;;
|
||||
zsh) chsh -s $(whitch zsh) ;;
|
||||
fish) chsh -s $(whitch fish) ;;
|
||||
esac
|
||||
46
script/dmenu/dmenu-config-edit.sh
Executable file
46
script/dmenu/dmenu-config-edit.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
declare options=("i3
|
||||
berry
|
||||
qtile
|
||||
polybar
|
||||
picom
|
||||
dunst
|
||||
qutebrowser
|
||||
quickmarks
|
||||
vim
|
||||
neovim
|
||||
kitty
|
||||
taskwarrior
|
||||
fish
|
||||
zsh")
|
||||
|
||||
choice=$(echo -e "${options[@]}" | dmenu -h 24 -p 'Edit config file: ')
|
||||
|
||||
case "$choice" in
|
||||
i3) choice="$HOME/.config/i3/config" ;;
|
||||
qtile) choice="$HOME/.config/qtile/config.py" ;;
|
||||
berry)
|
||||
declare opt=("berry\npolybar\nsxhkd")
|
||||
why=$(echo -e "${opt}" | dmenu -h 24 -p 'Berry')
|
||||
case "$why" in
|
||||
"berry") choice="$HOME/.config/berry/autostart" ;;
|
||||
"polybar") choice="$HOME/.config/berry/polybar/polybar" ;;
|
||||
"sxhkd") choice="$HOME/.config/berry/sxhkdrc" ;;
|
||||
esac
|
||||
;;
|
||||
picom) choice="$HOME/.config/picom.conf" ;;
|
||||
polybar) choice="$HOME/.config/polybar/config" ;;
|
||||
quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;;
|
||||
qutebrowser) choice="$HOME/.config/qutebrowser/config.py" ;;
|
||||
vim) choice="$HOME/.vimrc" ;;
|
||||
nvim) choice="$HOME/.config/nvim/init.vim" ;;
|
||||
dunst) choice="$HOME/.config/dunst/dunstrc" ;;
|
||||
zsh) choice="$HOME/.zshrc" ;;
|
||||
taskwarior) choice="$HOME/.taskrc" ;;
|
||||
fish) choice="$HOME/.config/fish/config.fish" ;;
|
||||
kitty) choice="$HOME/.config/kitty/kitty.conf" ;;
|
||||
quit) echo "Program terminated." && exit 1 ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
kitty -e nvim "$choice"
|
||||
45
script/dmenu/dmenu-power.sh
Executable file
45
script/dmenu/dmenu-power.sh
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
declare options=("Shut Down
|
||||
Reboot
|
||||
Logout
|
||||
Suspend
|
||||
Lock Screen")
|
||||
|
||||
choice=$(echo -e "${options[@]}" | dmenu -h 24 -p 'Power')
|
||||
|
||||
case "$choice" in
|
||||
"Shut Down")
|
||||
declare opt=("Yes\nNo")
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -h 24 -p 'Power')
|
||||
case "$yesno" in
|
||||
"Yes") exec systemctl poweroff ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Reboot")
|
||||
declare opt=("Yes\nNo")
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -h 24 -p 'Power')
|
||||
case "$yesno" in
|
||||
"Yes") exec systemctl reboot ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Logout")
|
||||
declare opt=("Yes\nNo")
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -h 24 -p 'Power')
|
||||
case "$yesno" in
|
||||
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Lock Screen")
|
||||
declare opt=("Yes\nNo")
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -h 24 -p 'Power')
|
||||
case "$yesno" in
|
||||
"Yes") exec loginctl lock-session $XDG_SESSION_ID ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
15
script/dmenu/dmenu-sysmon.sh
Executable file
15
script/dmenu/dmenu-sysmon.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
declare options=("htop
|
||||
bashtop
|
||||
gtop")
|
||||
|
||||
choice=$(echo -e "${options[@]}" | dmenu -h 24 -p 'System monitor ')
|
||||
|
||||
case "$choice" in
|
||||
htop) choice="htop" ;;
|
||||
bashtop) choice="bashtop" ;;
|
||||
gtop) choice="gtop" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
kitty -e "$choice"
|
||||
35
script/manjaro-fetch.sh
Executable file
35
script/manjaro-fetch.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
host="$(hostname)"
|
||||
os='Manjaro'
|
||||
kernel="$(uname -r)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(pacman -Q | wc -l)"
|
||||
shell="$(basename "$SHELL")"
|
||||
ui="$(basename ${XDG_CURRENT_DESKTOP})"
|
||||
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold)"
|
||||
black="$(tput setaf 0)"
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
yellow="$(tput setaf 3)"
|
||||
blue="$(tput setaf 4)"
|
||||
magenta="$(tput setaf 5)"
|
||||
cyan="$(tput setaf 6)"
|
||||
white="$(tput setaf 7)"
|
||||
reset="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
lc="${reset}${bold}${green}"
|
||||
nc="${reset}${bold}${green}"
|
||||
ic="${reset}"
|
||||
c0="${reset}${green}"
|
||||
|
||||
cat <<EOF
|
||||
${c0} ||||||||| |||| ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||
${c0} ||||||||| |||| ${lc}OS: ${ic}${os}${reset}
|
||||
${c0} |||| |||| ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||
${c0} |||| |||| |||| ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||
${c0} |||| |||| |||| ${lc}SHELL: ${ic}${shell}${reset}
|
||||
${c0} |||| |||| |||| ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||
${c0} |||| |||| |||| ${lc}DE/WM: ${ic}${ui}${reset}
|
||||
EOF
|
||||
5
script/snap-remove-old-pkg.sh
Executable file
5
script/snap-remove-old-pkg.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
|
||||
while read snapname revision; do
|
||||
sudo snap remove "$snapname" --revision="$revision"
|
||||
done
|
||||
9
script/walpapper-changer.sh
Executable file
9
script/walpapper-changer.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
WALLPAPERS=/home/sasha/Изображения/Walpapper
|
||||
SLEEP_TIME=3
|
||||
|
||||
while true; do
|
||||
feh --randomize --bg-scale $WALLPAPERS/*
|
||||
sleep $SLEEP_TIME;
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue