commit e8c89ca43b0625c5876c5192b314ebe0b9bdde0c
parent 3793e38b112f007b16e75de626f19c3a41535c9f
Author: Jake Koroman <jakekoroman@gmail.com>
Date: Wed, 10 Apr 2024 15:44:12 -0400
random changes.
Diffstat:
7 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el
@@ -1,12 +0,0 @@
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(package-selected-packages nil))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
diff --git a/.gitignore b/.gitignore
@@ -9,6 +9,7 @@
.config/emacs/history
.config/emacs/eshell
.config/emacs/auto-save-list/
+.config/emacs/custom.el
dwl/*.o
dwl/dwl
dwlb/*.o
diff --git a/.zprofile b/.zprofile
@@ -27,4 +27,6 @@ export TERM=xterm-256color # some programs don't recognise foot and revert back
export PATH=$HOME/.local/bin:$HOME/scripts:$PATH
+export XDG_CURRENT_DESKTOP=wlroots
+
[ $(tty) = "/dev/tty1" ] && [ -z $DISPLAY ] && dbus-run-session dwl -s dwlb
diff --git a/device-specific/laptop/dwl-hardware.h b/device-specific/laptop/dwl-hardware.h
@@ -17,7 +17,8 @@ static const MonitorRule monrules[] = {
/* Autostart */
static const char *const autostart[] = {
- "sh", "-c", "artix-pipewire-launcher.sh", NULL,
+ "artix-pipewire-launcher.sh", NULL,
+ "swayidle.sh", NULL,
NULL /* terminate */
};
diff --git a/dwlb/config.h b/dwlb/config.h
@@ -24,6 +24,7 @@ static char *fontstr = DEVICE_FONT;
// tag names
static char *tags_names[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+/* NOTE(jake): 16bit colours are the same as 8bit, just need to be doubled */
#define COLOR(r, g, b) { .red = 0x##r##r, .green = 0x##g##g, .blue = 0x##b##b, .alpha = 0xffff }
#define FG COLOR(e4, e4, e4)
diff --git a/scripts/swayidle.sh b/scripts/swayidle.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+exec swayidle -w \
+ timeout 600 'swaylock -f -c 000000' \
+ timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
+ before-sleep 'swaylock -f -c 000000; gpg-connect-agent --no-autostart reloadagent /bye'
diff --git a/scripts/swaymsg_exec.sh b/scripts/swaymsg_exec.sh
@@ -2,11 +2,11 @@
# In cron
# * * * * * $HOME/scripts/swaymsg_exec.sh /bin/notify-send 'hello'
-
+
set -xeu
-
+
uid="$(id -u)"
-
+
for sock in /run/user/"${uid}"/sway-ipc.*.*.sock
do
[ -S "${sock}" ] || continue