Updated theme, added screensaver

This commit is contained in:
Mutzi 2023-01-13 14:40:21 +01:00
parent 3985ec2941
commit 00141c46a3
3 changed files with 23 additions and 13 deletions

View File

@ -62,13 +62,13 @@ end
-- {{{ Autostart windowless processes -- {{{ Autostart windowless processes
-- This function will run once every time Awesome is started -- 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 for _, cmd in ipairs(cmd_arr) do
awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
end 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 -- This function implements the XDG autostart specification
--[[ --[[
@ -247,13 +247,13 @@ globalkeys = mytable.join(
-- Destroy all notifications -- Destroy all notifications
awful.key({ "Control", }, "space", function() naughty.destroy_all_notifications() end, awful.key({ "Control", }, "space", function() naughty.destroy_all_notifications() end,
{description = "destroy all notifications", group = "hotkeys"}), {description = "destroy all notifications", group = "hotkeys"}),
-- Take a screenshot -- Take a screenshot
-- https://github.com/lcpz/dots/blob/master/bin/screenshot awful.key({ modkey, altkey }, "p", function() os.execute("flameshot gui") end,
awful.key({ altkey }, "p", function() os.execute("screenshot") end,
{description = "take a screenshot", group = "hotkeys"}), {description = "take a screenshot", group = "hotkeys"}),
-- X screen locker -- 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"}), {description = "lock screen", group = "hotkeys"}),
-- Show help -- Show help
@ -457,6 +457,7 @@ globalkeys = mytable.join(
]]-- ]]--
-- MPD control -- MPD control
--[[
awful.key({ altkey, "Control" }, "Up", awful.key({ altkey, "Control" }, "Up",
function () function ()
os.execute("mpc toggle") os.execute("mpc toggle")
@ -494,6 +495,7 @@ globalkeys = mytable.join(
naughty.notify(common) naughty.notify(common)
end, end,
{description = "mpc on/off", group = "widgets"}), {description = "mpc on/off", group = "widgets"}),
]]--
-- Copy primary to clipboard (terminals to gtk) -- Copy primary to clipboard (terminals to gtk)
awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end, 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 -- alternatively use rofi, a dmenu-like application with more features
-- check https://github.com/DaveDavenport/rofi for more details -- check https://github.com/DaveDavenport/rofi for more details
-- rofi -- rofi
awful.key({ modkey }, "z", function () awful.key({ modkey }, "y", function () os.execute("rofi -show drun -theme fancy") end,
os.execute(string.format("rofi -show %s -theme %s",
'run', 'dmenu'))
end,
{description = "show rofi", group = "launcher"}), {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 -- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}), {description = "run prompt", group = "launcher"}),

View File

@ -0,0 +1,5 @@
#!/bin/sh
export XSECURELOCK_DISCARD_FIRST_KEYPRESS=0
export XSECURELOCK_PASSWORD_PROMPT=asterisks
export XSECURELOCK_SINGLE_AUTH_WINDOW=1
xsecurelock

View File

@ -195,6 +195,7 @@ local memory = lain.widget.mem({
}) })
-- MPD -- MPD
--[[
local mpdicon = wibox.widget.imagebox() local mpdicon = wibox.widget.imagebox()
theme.mpd = lain.widget.mpd({ theme.mpd = lain.widget.mpd({
settings = function() 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)) widget:set_markup(markup.fontfg(theme.font, "#e54c62", artist) .. markup.fontfg(theme.font, "#b2b2b2", title))
end end
}) })
]]--
function theme.at_screen_connect(s) function theme.at_screen_connect(s)
-- Quake application -- Quake application
@ -264,8 +266,8 @@ function theme.at_screen_connect(s)
s.mylayoutbox, s.mylayoutbox,
s.mytaglist, s.mytaglist,
s.mypromptbox, s.mypromptbox,
mpdicon, --mpdicon,
theme.mpd.widget, --theme.mpd.widget,
}, },
--s.mytasklist, -- Middle widget --s.mytasklist, -- Middle widget
nil, nil,