From 5382be2aa701358aa70b444f19e7e8c4c5c4eb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Czy=C5=BC?= Date: Tue, 28 Feb 2023 15:52:26 +0100 Subject: [PATCH] screen locker --- dwm/.dwm/bar.sh | 4 ++-- dwm/.dwm/config.def.h | 3 ++- dwm/.xinitrc | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dwm/.dwm/bar.sh b/dwm/.dwm/bar.sh index 8396af9..dc1af6e 100755 --- a/dwm/.dwm/bar.sh +++ b/dwm/.dwm/bar.sh @@ -110,6 +110,6 @@ while true; do # sleep 1 && xsetroot -name "$updates $(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)" # sleep 1 && xsetroot -name "$(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)" - sleep 1 && xsetroot -name "^c$text^^b$surface0^ $(brightness) ^b$base^ $(battery) $(net)^c$text^^b$base^ $(today) ^b$surface0^ $(clock) ^b$surface1^ $(pulse) " - # sleep 1 && xsetroot -name "^c$text^$(net)^c$text^^b$base^ $(today) ^b$surface0^ $(clock) ^b$surface1^ $(pulse) " + # sleep 1 && xsetroot -name "^c$text^^b$surface0^ $(brightness) ^b$base^ $(battery) $(net)^c$text^^b$base^ $(today) ^b$surface0^ $(clock) ^b$surface1^ $(pulse) " + sleep 1 && xsetroot -name "^c$text^$(net)^c$text^^b$base^ $(today) ^b$surface0^ $(clock) ^b$surface1^ $(pulse) " done diff --git a/dwm/.dwm/config.def.h b/dwm/.dwm/config.def.h index 50a1ce9..a8ee407 100644 --- a/dwm/.dwm/config.def.h +++ b/dwm/.dwm/config.def.h @@ -216,6 +216,7 @@ static const char *tools[] = {"lxappearance"}; static const char *search[] = {"rofi", "-show", "drun", NULL}; // static const char *launcha[] = {alttabstart}; static const char *explorer[] = {"nemo", NULL}; +static const char *locksession[] = {"loginctl", "lock-session", NULL}; #if RENAMED_SCRATCHPADS_PATCH static char scratchselfgcolor[] = "#FFF7D4"; @@ -919,7 +920,7 @@ static const Key keys[] = { {0, XF86XK_Search, spawn, {.v = search}}, {0, XF86XK_LaunchA, alttabstart, {0}}, {0, XF86XK_Explorer, spawn, {.v = explorer}}, - + { MODKEY|ShiftMask, XK_l, spawn, {.v = locksession} }, #if KEYMODES_PATCH { MODKEY, XK_Escape, setkeymode, {.ui = COMMANDMODE} }, #endif // KEYMODES_PATCH diff --git a/dwm/.xinitrc b/dwm/.xinitrc index 09858a6..77ce25e 100644 --- a/dwm/.xinitrc +++ b/dwm/.xinitrc @@ -58,13 +58,13 @@ xset s 900 & gnome-keyring-daemon & ## Map super key to trigger rofi when used alone -xcape -e 'Super_L=Super_L|Shift_L|space' & +# xcape -e 'Super_L=Super_L|Shift_L|space' & # wallpapers nitrogen --restore & ## Set screen locker -xss-lock -v -- betterlockscreen -l & +xss-lock -v -- betterlockscreen -l --time-format '%I:%M %p' & ## Desktop portal /usr/lib/xdg-desktop-portal-gtk &