mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2026-03-23 05:55:12 +00:00
add sticky shortcut
This commit is contained in:
parent
60aa37fc76
commit
ed41889d27
7
.luarc.json
Normal file
7
.luarc.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
|
||||||
|
"workspace.library": [
|
||||||
|
"./lain",
|
||||||
|
"./awesome-wm-widgets"
|
||||||
|
]
|
||||||
|
}
|
||||||
36
rc.lua
36
rc.lua
|
|
@ -23,6 +23,11 @@ require "awful.hotkeys_popup.keys"
|
||||||
local mytable = awful.util.table or gears.table -- 4.{0,1} compatibility
|
local mytable = awful.util.table or gears.table -- 4.{0,1} compatibility
|
||||||
local volume_widget = require "awesome-wm-widgets.volume-widget.volume"
|
local volume_widget = require "awesome-wm-widgets.volume-widget.volume"
|
||||||
|
|
||||||
|
-- }}}
|
||||||
|
-- {{{ Notification
|
||||||
|
naughty.config.defaults.position = "top_middle"
|
||||||
|
naughty.config.defaults.border_width = 2
|
||||||
|
naughty.config.defaults.timeout = 10
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
|
|
@ -328,7 +333,7 @@ globalkeys = mytable.join(
|
||||||
end, { description = "clipboard", group = "hotkeys" }),
|
end, { description = "clipboard", group = "hotkeys" }),
|
||||||
|
|
||||||
-- Show help
|
-- Show help
|
||||||
awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
|
awful.key({ modkey }, "/", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
|
||||||
|
|
||||||
-- Tag browsing
|
-- Tag browsing
|
||||||
awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
|
awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
|
||||||
|
|
@ -602,19 +607,14 @@ globalkeys = mytable.join(
|
||||||
|
|
||||||
clientkeys = mytable.join(
|
clientkeys = mytable.join(
|
||||||
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client, { description = "magnify client", group = "client" }),
|
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client, { description = "magnify client", group = "client" }),
|
||||||
awful.key({ modkey }, "f", function(c)
|
-- awful.key({ modkey }, "f", function(c)
|
||||||
c.fullscreen = not c.fullscreen
|
-- c.fullscreen = not c.fullscreen
|
||||||
c:raise()
|
-- c:raise()
|
||||||
end, { description = "toggle fullscreen", group = "client" }),
|
-- end, { description = "toggle fullscreen", group = "client" }),
|
||||||
awful.key({ modkey }, "q", function(c)
|
awful.key({ modkey }, "q", function(c)
|
||||||
c:kill()
|
c:kill()
|
||||||
end, { description = "close", group = "client" }),
|
end, { description = "close", group = "client" }),
|
||||||
awful.key(
|
awful.key({ modkey }, "f", awful.client.floating.toggle, { description = "toggle floating", group = "client" }),
|
||||||
{ modkey, "Control" },
|
|
||||||
"space",
|
|
||||||
awful.client.floating.toggle,
|
|
||||||
{ description = "toggle floating", group = "client" }
|
|
||||||
),
|
|
||||||
awful.key({ modkey, "Shift" }, "Return", function(c)
|
awful.key({ modkey, "Shift" }, "Return", function(c)
|
||||||
c:swap(awful.client.getmaster())
|
c:swap(awful.client.getmaster())
|
||||||
end, { description = "move to master", group = "client" }),
|
end, { description = "move to master", group = "client" }),
|
||||||
|
|
@ -624,6 +624,10 @@ clientkeys = mytable.join(
|
||||||
awful.key({ modkey }, "t", function(c)
|
awful.key({ modkey }, "t", function(c)
|
||||||
c.ontop = not c.ontop
|
c.ontop = not c.ontop
|
||||||
end, { description = "toggle keep on top", group = "client" }),
|
end, { description = "toggle keep on top", group = "client" }),
|
||||||
|
awful.key({ modkey }, "s", function(c)
|
||||||
|
-- sticky
|
||||||
|
c.sticky = not c.sticky
|
||||||
|
end, { description = "toggle keep on top", group = "client" }),
|
||||||
awful.key({ modkey }, "n", function(c)
|
awful.key({ modkey }, "n", function(c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- The client currently has the input focus, so it cannot be
|
||||||
-- minimized, since minimized clients can't have the focus.
|
-- minimized, since minimized clients can't have the focus.
|
||||||
|
|
@ -756,6 +760,7 @@ awful.rules.rules = {
|
||||||
"xtightvncviewer",
|
"xtightvncviewer",
|
||||||
"Clash for Windows",
|
"Clash for Windows",
|
||||||
"eudic",
|
"eudic",
|
||||||
|
"flameshot",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
||||||
|
|
@ -804,11 +809,10 @@ client.connect_signal("manage", function(c)
|
||||||
if is_floating_layout() then
|
if is_floating_layout() then
|
||||||
c.floating = true
|
c.floating = true
|
||||||
end
|
end
|
||||||
if c.floating then
|
-- if c.floating then
|
||||||
-- awful.placement.centered(c)
|
-- awful.placement.centered(c)
|
||||||
awful.placement.bottom_right(c)
|
-- awful.placement.bottom_right(c)
|
||||||
|
-- end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,17 @@ theme.left_panel_width = dpi(55)
|
||||||
theme.top_panel_height = dpi(26)
|
theme.top_panel_height = dpi(26)
|
||||||
|
|
||||||
-- Notification Sizing
|
-- Notification Sizing
|
||||||
-- theme.notification_max_width = dpi(350)
|
theme.notification_width = dpi(500)
|
||||||
|
theme.notification_height = dpi(125)
|
||||||
|
theme.notification_icon_size = dpi(125)
|
||||||
|
-- round corners
|
||||||
|
theme.notification_shape = function(cr, width, height)
|
||||||
|
gears.shape.rounded_rect(cr, width, height, dpi(10))
|
||||||
|
end
|
||||||
|
-- opacity
|
||||||
|
theme.notification_opacity = 0.9
|
||||||
|
theme.notification_border_color = theme.border_marked
|
||||||
|
|
||||||
|
|
||||||
-- System Tray
|
-- System Tray
|
||||||
theme.bg_systray = theme.bg_normal
|
theme.bg_systray = theme.bg_normal
|
||||||
|
|
@ -126,7 +136,7 @@ local markup = lain.util.markup
|
||||||
|
|
||||||
-- Textclock
|
-- Textclock
|
||||||
os.setlocale(os.getenv "LANG") -- to localize the clock
|
os.setlocale(os.getenv "LANG") -- to localize the clock
|
||||||
local mytextclock = wibox.widget.textclock(markup("#a7aaff", "%A %d %B ") .. markup("#de6eae", "%H:%M "))
|
local mytextclock = wibox.widget.textclock(markup("#a7aaff", "%Y-%m-%d ") .. markup(focus_fg, "%H:%M "))
|
||||||
mytextclock.font = theme.font
|
mytextclock.font = theme.font
|
||||||
|
|
||||||
-- Calendar
|
-- Calendar
|
||||||
|
|
@ -228,7 +238,7 @@ function theme.at_screen_connect(s)
|
||||||
awful.spawn.with_shell "slock"
|
awful.spawn.with_shell "slock"
|
||||||
end,
|
end,
|
||||||
onsuspend = function()
|
onsuspend = function()
|
||||||
awful.spawn.with_shell "slock systemctl suspend"
|
awful.spawn.with_shell "systemctl suspend"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue