diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-12-11 16:31:26 +0100 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-12-11 16:31:26 +0100 |
commit | d4696cbf3476a473421b536a1d4cb63a5ce48eef (patch) | |
tree | ddfb029bfe6f9a6b8fc9cd3e3c6c3e2015d3771d /platforms | |
parent | bb668c1bdfb2937e2ca987426aac6cfe1b544fc9 (diff) | |
download | dots-d4696cbf3476a473421b536a1d4cb63a5ce48eef.tar.gz dots-d4696cbf3476a473421b536a1d4cb63a5ce48eef.zip |
Update slock
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/linux/configuration.nix | 8 | ||||
-rw-r--r-- | platforms/linux/xorg/config.h | 2 | ||||
-rw-r--r-- | platforms/linux/xorg/slock/slock-dpms-1.4.diff | 10 |
3 files changed, 14 insertions, 6 deletions
diff --git a/platforms/linux/configuration.nix b/platforms/linux/configuration.nix index f65f430..1a23c55 100644 --- a/platforms/linux/configuration.nix +++ b/platforms/linux/configuration.nix @@ -66,6 +66,8 @@ in options v4l2loopback exclusive_caps=1 video_nr=9 card_label="obs" ''; + boot.cleanTmpDir = true; + fileSystems = { "/home" = { device = "/dev/disk/by-label/home"; @@ -269,6 +271,12 @@ in services.xserver.displayManager.startx.enable = true; services.xserver.layout = "pl"; # services.xserver.xkbOptions = "eurosign:e"; + services.xserver.deviceSection = '' + Option "TearFree" "true" + ''; + services.xserver.wacom = { + enable = true; + }; # Enable touchpad support. services.xserver.libinput = { diff --git a/platforms/linux/xorg/config.h b/platforms/linux/xorg/config.h index 5807cdf..96c64b6 100644 --- a/platforms/linux/xorg/config.h +++ b/platforms/linux/xorg/config.h @@ -191,7 +191,7 @@ static Key keys[] = { { MODKEY, XK_x, incrgaps, {.i = -3 } }, /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */ { MODKEY, XK_c, spawn, SHCMD("Discord") }, - /* { MODKEY|ShiftMask, XK_c, spawn, SHCMD("") }, */ + { MODKEY|ShiftMask, XK_c, spawn, SHCMD("caffeine") }, /* V is automatically bound above in STACKKEYS */ { MODKEY, XK_b, togglebar, {0} }, { MODKEY|ShiftMask, XK_b, spawn, SHCMD("y2mpv") }, diff --git a/platforms/linux/xorg/slock/slock-dpms-1.4.diff b/platforms/linux/xorg/slock/slock-dpms-1.4.diff index 027bbf7..a3548ff 100644 --- a/platforms/linux/xorg/slock/slock-dpms-1.4.diff +++ b/platforms/linux/xorg/slock/slock-dpms-1.4.diff @@ -3,12 +3,12 @@ index 9855e21..d01bd38 100644 --- a/config.def.h +++ b/config.def.h @@ -10,3 +10,6 @@ static const char *colorname[NUMCOLS] = { - + /* treat a cleared input like a wrong password (color) */ static const int failonclear = 1; + +/* time in seconds before the monitor shuts down */ -+static const int monitortime = 5; ++static const int monitortime = 20; diff --git a/slock.c b/slock.c index d2f0886..f65a43b 100644 --- a/slock.c @@ -26,13 +26,13 @@ index d2f0886..f65a43b 100644 Display *dpy; int s, nlocks, nscreens; + CARD16 standby, suspend, off; - + ARGBEGIN { case 'v': @@ -366,6 +368,20 @@ main(int argc, char **argv) { if (nlocks != nscreens) return 1; - + + /* DPMS magic to disable the monitor */ + if (!DPMSCapable(dpy)) + die("slock: DPMSCapable failed\n"); @@ -53,7 +53,7 @@ index d2f0886..f65a43b 100644 @@ -383,5 +399,9 @@ main(int argc, char **argv) { /* everything is now blank. Wait for the correct password */ readpw(dpy, &rr, locks, nscreens, hash); - + + /* reset DPMS values to inital ones */ + DPMSSetTimeouts(dpy, standby, suspend, off); + XSync(dpy, 0); |