From 00141c46a3807071bacd40a9a0fc2fac072dd774 Mon Sep 17 00:00:00 2001 From: Mutzi Date: Fri, 13 Jan 2023 14:40:21 +0100 Subject: [PATCH] Updated theme, added screensaver --- .config/awesome/rc.lua | 25 ++++++++++++++----------- .config/awesome/scripts/lock.sh | 5 +++++ .config/awesome/theme.lua | 6 ++++-- 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100755 .config/awesome/scripts/lock.sh diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 3d10395..f7a96d2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -62,13 +62,13 @@ end -- {{{ Autostart windowless processes -- This function will run once every time Awesome is started -local function run_once(cmd_arr) +--[[ local function run_once(cmd_arr) for _, cmd in ipairs(cmd_arr) do awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) end -end +end ]]-- -run_once({ "urxvtd", "unclutter -root" }) -- comma-separated entries +-- run_once({ "urxvtd", "unclutter -root" }) -- comma-separated entries -- This function implements the XDG autostart specification --[[ @@ -247,13 +247,13 @@ globalkeys = mytable.join( -- Destroy all notifications awful.key({ "Control", }, "space", function() naughty.destroy_all_notifications() end, {description = "destroy all notifications", group = "hotkeys"}), + -- Take a screenshot - -- https://github.com/lcpz/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end, + awful.key({ modkey, altkey }, "p", function() os.execute("flameshot gui") end, {description = "take a screenshot", group = "hotkeys"}), -- X screen locker - awful.key({ altkey, "Control" }, "l", function () os.execute(scrlocker) end, + awful.key({ modkey, altkey, "Control" }, "l", function () os.execute(os.getenv("HOME") .. "/.config/awesome/scripts/lock.sh") end, {description = "lock screen", group = "hotkeys"}), -- Show help @@ -457,6 +457,7 @@ globalkeys = mytable.join( ]]-- -- MPD control + --[[ awful.key({ altkey, "Control" }, "Up", function () os.execute("mpc toggle") @@ -494,6 +495,7 @@ globalkeys = mytable.join( naughty.notify(common) end, {description = "mpc on/off", group = "widgets"}), + ]]-- -- Copy primary to clipboard (terminals to gtk) awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end, @@ -521,12 +523,13 @@ globalkeys = mytable.join( -- alternatively use rofi, a dmenu-like application with more features -- check https://github.com/DaveDavenport/rofi for more details -- rofi - awful.key({ modkey }, "z", function () - os.execute(string.format("rofi -show %s -theme %s", - 'run', 'dmenu')) - end, + awful.key({ modkey }, "y", function () os.execute("rofi -show drun -theme fancy") end, {description = "show rofi", group = "launcher"}), - --]] + awful.key({ modkey, "Shift" }, "y", function () os.execute("rofi -show ssh -theme fancy") end, + {description = "show rofi", group = "launcher"}), + awful.key({ modkey, "Control" }, "y", function () os.execute("rofi -show window -theme fancy") end, + {description = "show rofi", group = "launcher"}), + -- Prompt awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, {description = "run prompt", group = "launcher"}), diff --git a/.config/awesome/scripts/lock.sh b/.config/awesome/scripts/lock.sh new file mode 100755 index 0000000..317f996 --- /dev/null +++ b/.config/awesome/scripts/lock.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export XSECURELOCK_DISCARD_FIRST_KEYPRESS=0 +export XSECURELOCK_PASSWORD_PROMPT=asterisks +export XSECURELOCK_SINGLE_AUTH_WINDOW=1 +xsecurelock \ No newline at end of file diff --git a/.config/awesome/theme.lua b/.config/awesome/theme.lua index 11e2556..6e24424 100644 --- a/.config/awesome/theme.lua +++ b/.config/awesome/theme.lua @@ -195,6 +195,7 @@ local memory = lain.widget.mem({ }) -- MPD +--[[ local mpdicon = wibox.widget.imagebox() theme.mpd = lain.widget.mpd({ settings = function() @@ -221,6 +222,7 @@ theme.mpd = lain.widget.mpd({ widget:set_markup(markup.fontfg(theme.font, "#e54c62", artist) .. markup.fontfg(theme.font, "#b2b2b2", title)) end }) +]]-- function theme.at_screen_connect(s) -- Quake application @@ -264,8 +266,8 @@ function theme.at_screen_connect(s) s.mylayoutbox, s.mytaglist, s.mypromptbox, - mpdicon, - theme.mpd.widget, + --mpdicon, + --theme.mpd.widget, }, --s.mytasklist, -- Middle widget nil,