refactor: extract autostart to a independent script
This commit is contained in:
parent
1e9ce5a365
commit
5f3e3c1456
|
@ -66,5 +66,6 @@ EOT
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
lnsf "$DIR/awesome/rc.lua" "$XDG_CONFIG_HOME/awesome/rc.lua"
|
lnsf "$DIR/awesome/rc.lua" "$XDG_CONFIG_HOME/awesome/rc.lua"
|
||||||
|
lnsf "$DIR/awesome/autostart" "$XDG_CONFIG_HOME/awesome/autostart"
|
||||||
lnsf "$DIR/rofi/config.rasi" "$XDG_CONFIG_HOME/rofi/config.rasi"
|
lnsf "$DIR/rofi/config.rasi" "$XDG_CONFIG_HOME/rofi/config.rasi"
|
||||||
lnsf "$DIR/rofi/catppuccin.rasi" "$XDG_CONFIG_HOME/rofi/catppuccin.rasi"
|
lnsf "$DIR/rofi/catppuccin.rasi" "$XDG_CONFIG_HOME/rofi/catppuccin.rasi"
|
||||||
|
|
30
gui/awesome/autostart
Executable file
30
gui/awesome/autostart
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# startup apps
|
||||||
|
! /bin/pgrep nextcloud && nextcloud &
|
||||||
|
! /bin/pgrep flameshot && flameshot &
|
||||||
|
! /bin/pgrep nm-applet && nm-applet &
|
||||||
|
! /bin/pgrep copyq && copyq &
|
||||||
|
! /bin/pgrep -f "lua virtcam.lua" && cd ~/dotfiles/gui/virtcam && lua virtcam.lua &
|
||||||
|
|
||||||
|
# input method
|
||||||
|
ibus-daemon -drx
|
||||||
|
|
||||||
|
# turn bluetooth power on
|
||||||
|
bluetoothctl power on
|
||||||
|
|
||||||
|
# export X variable for cronjob to send notification
|
||||||
|
echo DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS > ~/.cron.env
|
||||||
|
echo DISPLAY=$DISPLAY >> ~/.cron.env
|
||||||
|
|
||||||
|
# adjust brightness in battery mode
|
||||||
|
grep -F 0 /sys/class/power_supply/ACAD/online && sudo light -S 30
|
||||||
|
|
||||||
|
# prioritize hdmi output
|
||||||
|
HDMI_SINK=$(pactl list short sinks | awk '{print $2}' | grep hdmi)
|
||||||
|
if [ -n "$HDMI_SINK" ]; then
|
||||||
|
pactl set-default-sink "$HDMI_SINK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fix pulseaudio echo-cancel side effect
|
||||||
|
pactl set-source-volume @DEFAULT_SOURCE@ 100%
|
|
@ -872,17 +872,4 @@ client.connect_signal("unfocus", function(c)
|
||||||
--c.border_width = 0
|
--c.border_width = 0
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Autostart
|
awful.spawn.with_shell("~/.config/awesome/autostart")
|
||||||
awful.spawn.with_shell("! /bin/pgrep nextcloud && nextcloud")
|
|
||||||
awful.spawn.with_shell("ibus-daemon -drx")
|
|
||||||
awful.spawn.with_shell("flameshot")
|
|
||||||
--awful.spawn.with_shell("blueman-applet")
|
|
||||||
awful.spawn.with_shell("nm-applet")
|
|
||||||
awful.spawn.with_shell("copyq")
|
|
||||||
awful.spawn.with_shell("bluetoothctl power on")
|
|
||||||
-- store session variables for crontab
|
|
||||||
awful.spawn.with_shell("echo DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS > ~/.cron.env")
|
|
||||||
awful.spawn.with_shell("echo DISPLAY=$DISPLAY >> ~/.cron.env")
|
|
||||||
awful.spawn.with_shell("grep -F 0 /sys/class/power_supply/ACAD/online && sudo light -S 30")
|
|
||||||
awful.spawn.with_shell("cd ~/dotfiles/gui/virtcam && lua virtcam.lua")
|
|
||||||
-- }}}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user