diff options
author | Mike Crute <mike@crute.us> | 2022-03-07 22:42:15 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2022-03-07 22:43:18 -0800 |
commit | 0c1f3b8d9c15b2a636fb5dd859997696aba4e195 (patch) | |
tree | 7b3f2b44f299862600b74e83f3c287fae8f9666b | |
parent | 9af6080667c694c1db44c41c6776eae3ca25c8f9 (diff) | |
download | dotfiles-0c1f3b8d9c15b2a636fb5dd859997696aba4e195.tar.bz2 dotfiles-0c1f3b8d9c15b2a636fb5dd859997696aba4e195.tar.xz dotfiles-0c1f3b8d9c15b2a636fb5dd859997696aba4e195.zip |
Awesome supports emoji picker
-rw-r--r-- | .config/awesome/mcrute.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.config/awesome/mcrute.lua b/.config/awesome/mcrute.lua index a3e9c9a..5ff3fd4 100644 --- a/.config/awesome/mcrute.lua +++ b/.config/awesome/mcrute.lua | |||
@@ -21,6 +21,10 @@ local gears = require("gears") | |||
21 | local naughty = require("naughty") | 21 | local naughty = require("naughty") |
22 | local wibox = require("wibox") | 22 | local wibox = require("wibox") |
23 | local pomodoro = require("pomodoro") | 23 | local pomodoro = require("pomodoro") |
24 | local capi = | ||
25 | { | ||
26 | mouse = mouse, | ||
27 | } | ||
24 | 28 | ||
25 | -- Require this here because we customize it here but also so rc.lua can use it | 29 | -- Require this here because we customize it here but also so rc.lua can use it |
26 | -- transitively through this module. It makes our local customizations to | 30 | -- transitively through this module. It makes our local customizations to |
@@ -307,6 +311,10 @@ function connect_signals() | |||
307 | else | 311 | else |
308 | awful.titlebar.hide(c) | 312 | awful.titlebar.hide(c) |
309 | end | 313 | end |
314 | |||
315 | if c.requests_no_titlebar then | ||
316 | awful.titlebar.hide(c) | ||
317 | end | ||
310 | end) | 318 | end) |
311 | 319 | ||
312 | awesome.connect_signal("startup", function() | 320 | awesome.connect_signal("startup", function() |
@@ -338,6 +346,21 @@ function add_window_rules() | |||
338 | properties = { | 346 | properties = { |
339 | floating = true, | 347 | floating = true, |
340 | placement = awful.placement.centered} | 348 | placement = awful.placement.centered} |
349 | }, | ||
350 | -- TODO: why does this not work with awful.spawn? | ||
351 | { rule_any = { | ||
352 | class = { | ||
353 | "emoji-picker"}, | ||
354 | }, | ||
355 | properties = { | ||
356 | floating = true, | ||
357 | requests_no_titlebar = true, | ||
358 | skip_taskbar = true, | ||
359 | placement = function(d, _) | ||
360 | local coords = capi.mouse.coords() | ||
361 | d.x = coords.x | ||
362 | d.y = coords.y | ||
363 | end}, | ||
341 | } | 364 | } |
342 | }) | 365 | }) |
343 | end | 366 | end |
@@ -460,6 +483,8 @@ function add_global_keys(globalkeys) | |||
460 | awful.key({ modkey }, "=", zoom_screen_reset), | 483 | awful.key({ modkey }, "=", zoom_screen_reset), |
461 | 484 | ||
462 | -- Other useful commands | 485 | -- Other useful commands |
486 | -- https://github.com/GaZaTu/x11-emoji-picker (see rules above for floating) | ||
487 | awful.key({ modkey }, "e", make_spawn("/home/mcrute/repos/third_party/x11-emoji-picker/build/emoji-picker")), | ||
463 | awful.key({ modkey, "Shift" }, "p", move_mouse_top_right), | 488 | awful.key({ modkey, "Shift" }, "p", move_mouse_top_right), |
464 | awful.key({ "Control", "Shift" }, "`", make_spawn("xscreensaver-command -lock")) | 489 | awful.key({ "Control", "Shift" }, "`", make_spawn("xscreensaver-command -lock")) |
465 | ) | 490 | ) |