Improve wayland configs
This commit is contained in:
parent
35f4e0c88f
commit
ceea1c316a
18 changed files with 549 additions and 41 deletions
|
@ -5,7 +5,7 @@ _systemctl () {
|
|||
}
|
||||
|
||||
_dasel () {
|
||||
dasel -f "$HOME/.config/autostart.toml" -r toml "${@}"
|
||||
dasel -f "$HOME/.config/autostart.toml" -r toml -w plain "${@}"
|
||||
}
|
||||
|
||||
_list () {
|
||||
|
@ -45,6 +45,10 @@ _autostart_manage_info () {
|
|||
_echo_table "${autostart_units[@]}" | column -t -s$'\t' --table-columns 'Unit,Enabled?,Active?'
|
||||
}
|
||||
|
||||
_autostart_manage_log () {
|
||||
journalctl --user -fu "autostart@$1.service"
|
||||
}
|
||||
|
||||
_autostart_manage_enable_all () {
|
||||
autostart_units=()
|
||||
while IFS='' read -r line
|
||||
|
@ -82,6 +86,29 @@ _autostart_manage_exec () {
|
|||
bash -c "$cmd"
|
||||
}
|
||||
|
||||
_autostart_run_graphical () {
|
||||
start-audio pipewire
|
||||
wait-for-service "network-online.target"
|
||||
|
||||
if ! pgrep -x keepassxc
|
||||
then
|
||||
if pass
|
||||
then
|
||||
(pass keepass | head -n 1 | keepassxc --pw-stdin ~/sync/passwords.kdbx) &
|
||||
fi
|
||||
fi
|
||||
|
||||
autoinstall graphical
|
||||
autostart-manage run
|
||||
|
||||
}
|
||||
|
||||
_autostart_run_wayland () {
|
||||
_autostart_run_graphical
|
||||
|
||||
killall -SIGUSR2 waybar
|
||||
}
|
||||
|
||||
_autostart_run_xorg () {
|
||||
|
||||
feh --bg-fill "$XDG_PICTURES_DIR/wallpaper/active_wallpaper"
|
||||
|
@ -93,38 +120,23 @@ _autostart_run_xorg () {
|
|||
xsetroot -cursor_name left_ptr
|
||||
xrdb "$HOME/.Xresources"
|
||||
|
||||
#pkill sxhkd; sxhkd &
|
||||
#pgrep -x xcompmgr > /dev/null || xcompmgr -cnfFn -D3 &
|
||||
|
||||
|
||||
start-audio pipewire
|
||||
wait-for-service "network-online.target"
|
||||
|
||||
if ! pgrep -x keepassxc
|
||||
then
|
||||
pass x
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
(pass keepass | head -n 1 | keepassxc --pw-stdin ~/sync/passwords.kdbx) &
|
||||
fi
|
||||
fi
|
||||
|
||||
autoinstall graphical
|
||||
autostart-manage run
|
||||
_autostart_run_graphical
|
||||
}
|
||||
|
||||
case $1 in
|
||||
list) _autostart_manage_list ;;
|
||||
info) _autostart_manage_info ;;
|
||||
enable-all) _autostart_manage_enable_all "$2" ;;
|
||||
enable) _systemctl "$2" add-wants autostart.target ;;
|
||||
disable) _systemctl "$2" disable ;;
|
||||
restart) _systemctl "${2:-*}" restart;;
|
||||
start) _systemctl "${2:-*}" start;;
|
||||
status) _systemctl "${2:-*}" status ;;
|
||||
stop) _systemctl "${2:-*}" stop ;;
|
||||
run) systemctl --user start autostart.target ;;
|
||||
run-xorg) _autostart_run_xorg ;;
|
||||
exec) _autostart_manage_exec "$2" ;;
|
||||
*) echo "'$1' is not valid" ;;
|
||||
list) _autostart_manage_list ;;
|
||||
info) _autostart_manage_info ;;
|
||||
enable-all) _autostart_manage_enable_all "$2" ;;
|
||||
enable) _systemctl "$2" add-wants autostart.target ;;
|
||||
disable) _systemctl "$2" disable ;;
|
||||
restart) _systemctl "${2:-*}" restart;;
|
||||
log) _autostart_manage_log "$2";;
|
||||
start) _systemctl "${2:-*}" start;;
|
||||
status) _systemctl "${2:-*}" status ;;
|
||||
stop) _systemctl "${2:-*}" stop ;;
|
||||
run) systemctl --user start autostart.target ;;
|
||||
run-xorg) _autostart_run_xorg ;;
|
||||
run-wayland) _autostart_run_wayland ;;
|
||||
exec) _autostart_manage_exec "$2" ;;
|
||||
*) echo "'$1' is not valid" ;;
|
||||
esac
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
edit_dir_base="$HOME/.cache/edit/"
|
||||
edit_dir_base="$XDG_RUNTIME_DIR/edit/"
|
||||
|
||||
_pre_checks() {
|
||||
if [ -z "$EDITOR" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue