From faeb16feac6c62885dc7a6c3273c74ca05a93dd5 Mon Sep 17 00:00:00 2001 From: yctct Date: Thu, 6 Nov 2025 11:33:40 +0100 Subject: Add the patch and the readme --- README.txt | 34 ++++++++++++++++++++++++++++++++++ printscreen.patch | 15 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 README.txt create mode 100644 printscreen.patch diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..219c9c3 --- /dev/null +++ b/README.txt @@ -0,0 +1,34 @@ +This is a patch to tell awesome window manager to run the script capscr[1] when +the user press the key PrtSc. + +Patch rc.lua +------------ + +Download the patch in the directory ~/.config/awesome + + $ sudo apt install wget # install wget first + $ wget https://git.yctct.com/printscreen.patch + +Apply the patch to your rc.lua config file: + + $ patch -i printscreen.patch + +The patch should be applied; if you use git you can run $ git diff to see. + +When the rc.lua file is patched you can delete the file containing the patch: + + $ rm -i printscreen.patch + +If you use git: + + $ git add rc.lua + $ git commit -m "Apply printscreen patch" + +You can remove the patch by deleting the commit. + +More +---- + +Here is a guide showing how to do the whole set up with capscr: htpps://yctct.com/awesome-prtsc + +[1] https://git.yctct.com/small/tree/capscr diff --git a/printscreen.patch b/printscreen.patch new file mode 100644 index 0000000..6537278 --- /dev/null +++ b/printscreen.patch @@ -0,0 +1,15 @@ +diff --git a/rc.lua b/rc.lua +index e655d9a..c530f26 100644 +--- a/rc.lua ++++ b/rc.lua +@@ -344,7 +344,9 @@ globalkeys = gears.table.join( + {description = "lua execute prompt", group = "awesome"}), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end, +- {description = "show the menubar", group = "launcher"}) ++ {description = "show the menubar", group = "launcher"}), ++ -- Bind PrintScrn to capture a screen ++ awful.key({ }, "Print", function () awful.util.spawn("capscr") end) + ) + + clientkeys = gears.table.join( -- cgit v1.2.3