From c96976fc082cf2d004b2e88aed915b84512fdfd6 Mon Sep 17 00:00:00 2001 From: Clay Gomera Date: Sat, 3 Aug 2024 07:27:29 -0400 Subject: [PATCH] Updated --- README.md | 1 + source/dwm/config.h | 1 + source/dwm/dwm.c | 2 +- source/dwm/{ => scripts}/autostart | 1 + source/dwm/scripts/lock | 4 ++++ 5 files changed, 8 insertions(+), 1 deletion(-) rename source/dwm/{ => scripts}/autostart (96%) create mode 100755 source/dwm/scripts/lock diff --git a/README.md b/README.md index 120d43266..30a93526e 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,7 @@ polkit dbus xorg-server xf86-input-libinput +xss-lock pipewire wireplumber alsa-pipewire diff --git a/source/dwm/config.h b/source/dwm/config.h index 253bb540f..30ae97ebf 100644 --- a/source/dwm/config.h +++ b/source/dwm/config.h @@ -19,6 +19,7 @@ static const unsigned int baralpha = 0xd0; static const unsigned int borderalpha = OPAQUE; static const XPoint stickyicon[] = { {0,0}, {4,0}, {4,8}, {2,6}, {0,8}, {0,0} }; /* represents the icon as an array of vertices */ static const XPoint stickyiconbb = {4,8}; /* defines the bottom right corner of the polygon's bounding box (speeds up scaling) */ +static const char start_script[] = "$HOME/.config/suckless/dwm/scripts/autostart"; #define ICONSIZE 16 /* window icon size */ #define ICONSPACING 5 /* space between window icon and title (only when text is truncated) */ diff --git a/source/dwm/dwm.c b/source/dwm/dwm.c index abbb7a5cc..547e96323 100644 --- a/source/dwm/dwm.c +++ b/source/dwm/dwm.c @@ -1890,7 +1890,7 @@ void run(void) { } void runAutostart(void) { - system("$HOME/.config/suckless/dwm/autostart"); + system(start_script); } void scan(void) { diff --git a/source/dwm/autostart b/source/dwm/scripts/autostart similarity index 96% rename from source/dwm/autostart rename to source/dwm/scripts/autostart index ae3baf373..e4833253d 100755 --- a/source/dwm/autostart +++ b/source/dwm/scripts/autostart @@ -12,6 +12,7 @@ pidof dwmblocks || dwmblocks & pidof unclutter || unclutter --hide-on-touch & pidof dunst || dunst --config $HOME/.config/dunst/dunstrc & pidof picom || picom & +pidof xss-lock || xss-lock $HOME/.config/suckless/dwm/scripts/lock & gsettings set org.gnome.desktop.interface cursor-theme 'Simp1e-Gruvbox-Dark' gsettings set org.gnome.desktop.interface cursor-size 16 diff --git a/source/dwm/scripts/lock b/source/dwm/scripts/lock new file mode 100755 index 000000000..f95f5c026 --- /dev/null +++ b/source/dwm/scripts/lock @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +currwall=$(tail --lines=1 "$HOME/.fehbg" | awk '{print $4}' | sed "s/'//g") +slock -b "$currwall"