mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 08:48:23 -05:00
156 lines
3.6 KiB
Bash
Executable File
156 lines
3.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# -*-coding:utf-8 -*-
|
|
# Auto updated?
|
|
# Yes
|
|
#File :
|
|
# autostart
|
|
#Author :
|
|
# The-Repo-Club [wayne6324:gmail.com]
|
|
#Github :
|
|
# https://github.com/The-Repo-Club/
|
|
#
|
|
# Created:
|
|
# Mon 22 November 2021, 03:15:54 PM [GMT]
|
|
# Last edited:
|
|
# Thu 20 January 2022, 05:16:18 PM [GMT]
|
|
#
|
|
# Description:
|
|
# <Todo>
|
|
#
|
|
|
|
if command -v /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &> /dev/null; then
|
|
if ! pgrep -f "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" > /dev/null; then
|
|
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
|
else
|
|
echo "polkit-gnome already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v autotiling &> /dev/null; then
|
|
if ! pgrep -f "autotiling" > /dev/null; then
|
|
autotiling &
|
|
else
|
|
echo "autotiling already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v audiolock &> /dev/null; then
|
|
if ! pgrep -f "audiolock" > /dev/null; then
|
|
audiolock &
|
|
else
|
|
echo "audiolock already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v twmn_check-disk &> /dev/null; then
|
|
if ! pgrep -f "twmn_check-disk" > /dev/null; then
|
|
twmn_check-disk &
|
|
else
|
|
echo "twmn_check-disk already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v clipmenu-daemon &> /dev/null; then
|
|
if ! pgrep -f "clipmenu-daemon" > /dev/null; then
|
|
clipmenu-daemon &
|
|
else
|
|
echo "clipmenu-daemon already Running"
|
|
fi
|
|
fi
|
|
|
|
if ! command -v picom &> /dev/null; then
|
|
echo "picom could not be found"
|
|
else
|
|
if ! pgrep -x "picom" > /dev/null; then
|
|
picom -CGb --experimental-backend --config $HOME/.config/i3/picom.conf &
|
|
else
|
|
echo "picom already Running"
|
|
fi
|
|
fi
|
|
|
|
if ! command -v feh &> /dev/null; then
|
|
echo "feh could not be found"
|
|
else
|
|
if ! test -f "$HOME/.fehbg"; then
|
|
echo "$HOME/.fehbg could not be found"
|
|
else
|
|
sh $HOME/.fehbg
|
|
fi
|
|
fi
|
|
|
|
################
|
|
## Tray Icons ##
|
|
################
|
|
|
|
if ! command -v ckb-next &> /dev/null; then
|
|
echo "ckb-next could not be found"
|
|
else
|
|
if ! pgrep -x "ckb-next" > /dev/null; then
|
|
ckb-next --background &
|
|
else
|
|
echo "ckb-next already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v nm-applet &> /dev/null; then
|
|
if ! pgrep -x "nm-applet" > /dev/null; then
|
|
nm-applet &
|
|
else
|
|
echo "nm-applet already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v blueman-applet &> /dev/null; then
|
|
if ! pgrep -x "blueman-applet" > /dev/null; then
|
|
blueman-applet &
|
|
else
|
|
echo "blueman-applet already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v touchpad-indicator &> /dev/null; then
|
|
if ! pgrep -f "touchpad-indicator" > /dev/null; then
|
|
touchpad-indicator &
|
|
else
|
|
echo "touchpad-indicator already Running"
|
|
fi
|
|
fi
|
|
|
|
if command -v numlockx &> /dev/null; then
|
|
numlockx on &
|
|
fi
|
|
|
|
if command -v volumeicon &> /dev/null; then
|
|
if ! pgrep -x "volumeicon" > /dev/null; then
|
|
volumeicon &
|
|
else
|
|
echo "volumeicon already Running"
|
|
fi
|
|
fi
|
|
|
|
###############
|
|
## Auto Lock ##
|
|
###############
|
|
|
|
if command -v xautolock &> /dev/null; then
|
|
if ! pgrep -x "xautolock" > /dev/null; then
|
|
xautolock -time 10 -locker 'multimonitorlock -l -- --time-str="%I:%M:%S %p"' -notify 30 -notifier "notify-send -u critical -- 'LOCKING screen in 30 seconds'" &
|
|
else
|
|
echo "xautolock already Running"
|
|
fi
|
|
|
|
fi
|
|
|
|
################
|
|
## Other Junk ##
|
|
################
|
|
|
|
# see https://unix.stackexchange.com/a/295652/332452
|
|
source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
|
|
|
|
# see https://wiki.archlinux.org/title/GNOME/Keyring#xinitrc
|
|
eval $(/usr/bin/gnome-keyring-daemon --start)
|
|
export SSH_AUTH_SOCK
|
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/14966#issuecomment-520083836
|
|
mkdir -p "$HOME"/.local/share/keyrings |