Compare commits

...

3 commits

Author SHA1 Message Date
7aa9304734
feat: add custom startdwm script to allow restarts
Modified script from the Archwiki which runs DWM in a loop so that we
can restart the window manager we make changes to the binary.
2022-05-22 12:45:44 +01:00
a646ccf48f
feat: manage custom scripts 2022-05-22 12:21:17 +01:00
7920388eb4
build: 'hide' the helpers directory 2022-05-22 11:28:48 +01:00
18 changed files with 52 additions and 12 deletions

View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
SCRIPTS_SOURCE_DIR="${GIT_ROOT_DIR}/scripts"
SCRIPTS_DESTINATION_DIR="${HOME}/.local/scripts"
if ! [ -d ${SCRIPTS_DESTINATION_DIR} ]; then
echo "INFO: Creating directory ${SCRIPTS_DESTINATION_DIR}"
mkdir ${SCRIPTS_DESTINATION_DIR}
fi
rsync -avh ${SCRIPTS_SOURCE_DIR}/ ${SCRIPTS_DESTINATION_DIR}
chmod -R 0700 ${SCRIPTS_DESTINATION_DIR}

View file

@ -1,42 +1,46 @@
check_xdg_settings: check_xdg_settings:
@./helpers/xdg/check-xdg-settings @./.helpers/xdg/check-xdg-settings
.PHONY: scripts
scripts:
@./.helpers/scripts/install-scripts
.PHONY: ansible_configs .PHONY: ansible_configs
ansible_configs: check_xdg_settings ansible_configs: check_xdg_settings
@./helpers/ansible/generate-ansible-config @./.helpers/ansible/generate-ansible-config
.PHONY: bash_configs .PHONY: bash_configs
bash_configs: bash_configs:
@./helpers/bash/generate-bash-config @./.helpers/bash/generate-bash-config
.PHONY: git_configs .PHONY: git_configs
git_configs: check_xdg_settings git_configs: check_xdg_settings
@./helpers/git/generate-git-config @./.helpers/git/generate-git-config
.PHONY: tmux_configs .PHONY: tmux_configs
tmux_configs: check_xdg_settings tmux_configs: check_xdg_settings
@./helpers/tmux/generate-tmux-config @./.helpers/tmux/generate-tmux-config
.PHONY: xdg_configs .PHONY: xdg_configs
xdg_configs: check_xdg_settings xdg_configs: check_xdg_settings
@./helpers/xdg/generate-user-dirs-config @./.helpers/xdg/generate-user-dirs-config
.PHONY: x11_configs .PHONY: x11_configs
x11_configs: check_xdg_settings x11_configs: check_xdg_settings
@./helpers/X11/generate-x11-config @./.helpers/X11/generate-x11-config
.PHONY: lf_configs .PHONY: lf_configs
lf_configs: check_xdg_settings lf_configs: check_xdg_settings
@./helpers/lf/generate-lf-config @./.helpers/lf/generate-lf-config
.PHONY: amfora_configs .PHONY: amfora_configs
amfora_configs: check_xdg_settings amfora_configs: check_xdg_settings
@./helpers/amfora/generate-amfora-config @./.helpers/amfora/generate-amfora-config
.PHONY: dunst_configs .PHONY: dunst_configs
dunst_configs: check_xdg_settings dunst_configs: check_xdg_settings
@./helpers/dunst/generate-dunst-config @./.helpers/dunst/generate-dunst-config
.PHONY: logrotate_configs .PHONY: logrotate_configs
logrotate_configs: check_xdg_settings logrotate_configs: check_xdg_settings
@./helpers/logrotate/generate-logrotate-config @./.helpers/logrotate/generate-logrotate-config

View file

@ -17,4 +17,4 @@ logrotate \
${XDG_CONFIG_HOME}/logrotate/logrotate.conf \ ${XDG_CONFIG_HOME}/logrotate/logrotate.conf \
& &
exec dwm exec startdwm

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
# run_package_updates() ensures all apt packages are updated
# and runs autoremove to remove any unused packages.
sudo apt update
apt list --upgradable
sleep 5
sudo apt dist-upgrade
sudo apt autoremove

10
scripts/startdwm Normal file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
logfile="${LOG_HOME}/dwm.log"
while true; do
# Log stderror to a file
dwm 2> "$logfile"
done