From 044dd08798d35ba55c823b0cb544743a7c6f32f6 Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 9 Dec 2023 11:13:27 +0100 Subject: Use hexcode to fix non ascii layout --- rc.lua | 183 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 91 insertions(+), 92 deletions(-) (limited to 'rc.lua') diff --git a/rc.lua b/rc.lua index 1e9e012..298afa5 100644 --- a/rc.lua +++ b/rc.lua @@ -392,7 +392,7 @@ function act() textStat = " / " --{{ systemctl status - awful.spawn.easy_async("bash -c \"ps aux | grep [w]pa_supplicant\"", function(out, a, reason, exit_code) + awful.spawn.easy_async("pidof wpa_supplicant", function(out, a, reason, exit_code) textStat = "" if exit_code == 0 then textStat = textStat .. "📡 | " @@ -723,86 +723,84 @@ globalkeys = awful.util.table.join( -awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description="Show help", group="awesome"}), - awful.key({ modkey, }, "Escape", awful.tag.history.restore --[[, {description = "go back", group = "tag"} --]]), +awful.key({ modkey, "Mod1" }, "#43", hotkeys_popup.show_help, {description="Show help", group="awesome"}), + awful.key({ modkey, }, "#9", awful.tag.history.restore --[[, {description = "go back", group = "tag"} --]]), -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + awful.key({ modkey, "Shift" }, "#44", function () awful.client.swap.byidx( 1) end, {description = "Swap with next client by index", group = "client"}), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + awful.key({ modkey, "Shift" }, "#45", function () awful.client.swap.byidx( -1) end, {description = "Swap with previous client by index", group = "client"}), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + awful.key({ modkey, }, "#30", awful.client.urgent.jumpto, {description = "Jump to urgent client", group = "client"}), - - -- Raccourcis perso - awful.key({ }, "XF86AudioRaiseVolume", function () + awful.key({ }, "#123", function () awful.util.spawn("pamixer -i 2") end), - awful.key({ }, "XF86AudioLowerVolume", function () + awful.key({ }, "#122", function () awful.util.spawn("pamixer -d 2") end), - awful.key({ }, "XF86AudioMute", function () + awful.key({ }, "#121", function () awful.util.spawn("pamixer -t") end), - awful.key({ }, "F12", function () + awful.key({ }, "#96", function () awful.util.spawn("pamixer -i 2") end), - awful.key({ }, "F10", function () + awful.key({ }, "#76", function () awful.util.spawn("pamixer -d 2") end), - awful.key({ }, "F11", function () + awful.key({ }, "#95", function () awful.util.spawn("pamixer -t") end), - awful.key({ }, "XF86AudioPlay", function () + awful.key({ }, "#172", function () awful.util.spawn("mpc toggle") end), - awful.key({ }, "XF86AudioNext", function () + awful.key({ }, "#171", function () awful.util.spawn("mpc next") end), - awful.key({ }, "XF86AudioPrev", function () + awful.key({ }, "#173", function () awful.util.spawn("mpc prev") end), - awful.key({ "Control" }, "F11", function () + awful.key({ "Control" }, "#95", function () awful.util.spawn("mpc toggle") end), - awful.key({ "Control" }, "F12", function () + awful.key({ "Control" }, "#96", function () awful.util.spawn("mpc next") end), - awful.key({ "Control" }, "F10", function () + awful.key({ "Control" }, "#76", function () awful.util.spawn("mpc prev") end), - awful.key({ modkey }, "F11", function () + awful.key({ modkey }, "#95", function () awful.util.spawn("pavucontrol") end), - awful.key({ modkey}, "F1", function () + awful.key({ modkey}, "#67", function () awful.util.spawn("kitty -e ncmpcpp") end, {description = "MPD", group = "awesome"}), - awful.key({ modkey, "Mod1" }, "F2", function () + awful.key({ modkey, "Mod1" }, "#68", function () awful.util.spawn("kitty -e mutt") end, {description = "mutt", group = "awesome"}), - awful.key({ modkey, "Control" }, "F3", function () + awful.key({ modkey, "Control" }, "#69", function () naughty.destroy_all_notifications(nil,naughty.notificationClosedReason.dismissedByUser) end), - awful.key({ modkey, "Mod1"}, "f", function () awful.util.spawn("firefox") end, + awful.key({ modkey, "Mod1"}, "#41", function () awful.util.spawn("firefox") end, {description = "Firefox", group = "awesome"}), -- awful.key({ modkey, }, "b", function () awful.util.spawn("vimb -c /usr/share/vimb/.vimbrc") end), - awful.key({ modkey, "Mod1"}, "r", function () awful.util.spawn_with_shell("kitty -e 'ranger'") end, + awful.key({ modkey, "Mod1"}, "#27", function () awful.util.spawn_with_shell("kitty -e 'ranger'") end, {description = "Ranger", group = "awesome"}), - awful.key({ modkey, "Control"}, "r", function () awful.util.spawn("pcmanfm") end), - awful.key({ modkey, }, "s", function () + awful.key({ modkey, "Control"}, "#27", function () awful.util.spawn("pcmanfm") end), + awful.key({ modkey, }, "#39", function () awful.util.spawn("scrot") naughty.notify({ title = 'Scrot', text = 'New screenshot taken', timeout = 3 }) end, {description = "Screenshot", group = "awesome"}), - awful.key({ modkey, "Shift"}, "s", function () + awful.key({ modkey, "Shift"}, "#39", function () awful.util.spawn("scrot -s") naughty.notify({ title = 'Scrot', text = 'New screenshot taken', timeout = 3 }) end, {description = "Screenshot of selectionned area", group = "awesome"}), - awful.key({ modkey, "Control" }, "s", function () + awful.key({ modkey, "Control" }, "#39", function () awful.util.spawn("scrot -u") naughty.notify({ title = 'Scrot', text = 'Screenshot of focused windows', timeout = 2 }) end, {description = "Screenshot of focused windows", group = "awesome"}), - awful.key({ modkey, }, "Left", + awful.key({ modkey, }, "#113", function () local screen = awful.screen.focused() local tag = screen.tags[1] @@ -815,7 +813,7 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description end end, {description = "Previous", group = "tag"}), - awful.key({ modkey, }, "Right", + awful.key({ modkey, }, "#114", function () local screen = awful.screen.focused() local tag = screen.tags[9] @@ -828,79 +826,79 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description end end, {description = "Next", group = "tag"}), - awful.key({ modkey, "Control" }, "Left", function() awful.screen.focus_relative(-1) end, + awful.key({ modkey, "Control" }, "#113", function() awful.screen.focus_relative(-1) end, {description = "Next screen", group = "awesome"}), - awful.key({ modkey, "Control" }, "Right", function() awful.screen.focus_relative( 1) end, + awful.key({ modkey, "Control" }, "#114", function() awful.screen.focus_relative( 1) end, {description = "Previous screen", group = "awesome"}), - awful.key({ modkey, }, "Escape", fuckingAct), - awful.key({ modkey, }, "Tab", + awful.key({ modkey, }, "#9", fuckingAct), + awful.key({ modkey, }, "#23", function () awful.client.focus.byidx( 1) if client.focus then client.focus:raise() end end, {description = "Next client", group = "client"}), - awful.key({ modkey, "Shift" }, "Tab", + awful.key({ modkey, "Shift" }, "#23", function () awful.client.focus.byidx(-1) if client.focus then client.focus:raise() end end,{description = "Previous client", group = "client"}), - awful.key({ modkey, }, "w", function () awful.util.spawn("autoWall") end, + awful.key({ modkey, }, "#52", function () awful.util.spawn("autoWall") end, {description = "Switch wallpaper", group = "awesome"}), - awful.key({ modkey, "Control" }, "w", function () act() end, + awful.key({ modkey, "Control" }, "#52", function () act() end, {description = "Actualise Wibox", group = "awesome"}), - awful.key({ modkey, "Shift" }, "w", function () awful.util.spawn("passmenu --type -matching fuzzy -theme gruvbox-dark-hard") end, + awful.key({ modkey, "Shift" }, "#52", function () awful.util.spawn("passmenu --type -matching fuzzy -theme gruvbox-dark-hard") end, {description = "🔑 Passwd promt", group = "awesome"}), - awful.key({ modkey, "Mod1" }, "w", function () awful.util.spawn("passmenu --type") end, + awful.key({ modkey, "Mod1" }, "#52", function () awful.util.spawn("passmenu --type") end, {description = "🔑 Passwd promt alt", group = "awesome"}), - awful.key({ modkey, "Control" }, "x", function () awful.util.spawn("locker") end, + awful.key({ modkey, "Control" }, "#53", function () awful.util.spawn("locker") end, {description = "Lock screen", group = "awesome"}), -- Layout manipulation - awful.key({ modkey, "Mod1" }, "k", function () awful.util.spawn("xkill") end, + awful.key({ modkey, "Mod1" }, "#45", function () awful.util.spawn("xkill") end, {description = "xkill", group = "awesome"}), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, "Control" }, "#44", function () awful.screen.focus_relative( 1) end), + awful.key({ modkey, "Control" }, "#45", function () awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "#30", awful.client.urgent.jumpto), -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end, + awful.key({ modkey, }, "#36", function () awful.util.spawn(terminal) end, {description = "new term", group = "awesome"}), - awful.key({ modkey, "Shift" }, "r", awesome.restart, {description = "restart", group = "awesome"}), - awful.key({ modkey, "Shift" }, "q", awesome.quit,{description = "quit", group = "awesome"}), - - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, }, "j", function () awful.client.incwfact( 0.05) end), - awful.key({ modkey, }, "k", function () awful.client.incwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(1) + awful.key({ modkey, "Shift" }, "#27", awesome.restart, {description = "restart", group = "awesome"}), + awful.key({ modkey, "Shift" }, "#38", awesome.quit,{description = "quit", group = "awesome"}), + + awful.key({ modkey, }, "#46", function () awful.tag.incmwfact( 0.05) end), + awful.key({ modkey, }, "#43", function () awful.tag.incmwfact(-0.05) end), + awful.key({ modkey, }, "#44", function () awful.client.incwfact( 0.05) end), + awful.key({ modkey, }, "#45", function () awful.client.incwfact(-0.05) end), + awful.key({ modkey, "Shift" }, "#43", function () awful.tag.incnmaster( 1) end), + awful.key({ modkey, "Shift" }, "#46", function () awful.tag.incnmaster(-1) end), + awful.key({ modkey, "Control" }, "#43", function () awful.tag.incncol( 1) end), + awful.key({ modkey, "Control" }, "#46", function () awful.tag.incncol(-1) end), + awful.key({ modkey, }, "#65", function () awful.layout.inc(1) naughty.notify({ title = 'Layout', text = awful.layout.getname(), timeout = 1 }) end, {description = "Next layout", group = "client"}), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) + awful.key({ modkey, "Shift" }, "#65", function () awful.layout.inc(-1) naughty.notify({ title = 'Layout', text = awful.layout.getname(), timeout = 1 }) end, {description = "Previous layout", group = "client"}), -- ## TODO : Add a description for it - awful.key({ modkey, "Mod1" }, "Right", function () awful.tag.incmwfact( 0.01) end), - awful.key({ modkey, "Mod1" }, "Left", function () awful.tag.incmwfact(-0.01) end), - awful.key({ modkey, "Mod1" }, "Down", function () awful.client.incwfact( 0.01) end), - awful.key({ modkey, "Mod1" }, "Up", function () awful.client.incwfact(-0.01) end), + awful.key({ modkey, "Mod1" }, "#114", function () awful.tag.incmwfact( 0.01) end), + awful.key({ modkey, "Mod1" }, "#113", function () awful.tag.incmwfact(-0.01) end), + awful.key({ modkey, "Mod1" }, "#116", function () awful.client.incwfact( 0.01) end), + awful.key({ modkey, "Mod1" }, "#111", function () awful.client.incwfact(-0.01) end), - --~ awful.key({ modkey, "Control" }, "n", awful.client.restore), - awful.key({ modkey, }, "t", showHideWibox, + awful.key({ modkey, "Control" }, "#57", awful.client.restore), + awful.key({ modkey, }, "#28", showHideWibox, {description = "Toogle Wibox", group = "awesome"}), - awful.key({ modkey, "Shift" }, "t", function () blockWibox = not blockWibox end, + awful.key({ modkey, "Shift" }, "#28", function () blockWibox = not blockWibox end, {description = "Lock Wibox", group = "awesome"}), - awful.key({ modkey, "Shift" }, "b", function () + awful.key({ modkey, "Shift" }, "#56", function () notify_bat = not notify_bat naughty.notify({ preset = naughty.config.presets.normal, timeout=1, text = "Notification d'énergie : " .. ( notify_bat and "activée" or "désactivée" )}) end, {description = "Toggle battery warning 🚨", group = "awesome"}), - awful.key({ modkey, "Control" }, "b", function () + awful.key({ modkey, "Control" }, "#56", function () notify_ram = not notify_ram naughty.notify({ preset = naughty.config.presets.normal, timeout=1, text = "Notification de ressource RAM: " .. ( notify_ram and "activée" or "désactivée" )}) @@ -908,20 +906,20 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description end, {description = "Toggle RAM limite warning 🚨", group = "awesome"}), - awful.key({ modkey, "Shift" }, "e", function () + awful.key({ modkey, "Shift" }, "#26", function () notify_email = not notify_email naughty.notify({ preset = naughty.config.presets.normal, timeout=1, text = "Notification d'email : " .. ( notify_email and "activée" or "désactivée" )}) end, {description = "Toggle email warning 🚨", group = "awesome"}), - awful.key({ modkey, "Control" }, "t", showHideWibox), + awful.key({ modkey, "Control" }, "#28", showHideWibox), -- Prompt -- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, -- {description = "run prompt", group = "launcher"}), - awful.key({ modkey }, "x", + awful.key({ modkey }, "#53", function () --[[ awful.prompt.run { @@ -933,7 +931,7 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description ]] awful.util.spawn("rofi -show run -modi run -matching fuzzy") end,{description = "Run rofi prompt", group = "awesome"}), - awful.key({ modkey }, "*", + awful.key({ modkey }, "#51", function () awful.prompt.run { prompt = "Run Lua code: ", @@ -942,23 +940,23 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description history_path = awful.util.get_cache_dir() .. "/history_eval" } end,{description = "Run Lua code", group = "awesome"}), - awful.key({ modkey, "Shift" }, "!", + awful.key({ modkey, "Shift" }, "#61", function () awful.util.spawn("xset s off") awful.util.spawn("xset s 0 0 0") awful.util.spawn("xset -dpms") end,{description = "🔐 lock screen", group = "awesome"}), - awful.key({ modkey }, "!", + awful.key({ modkey }, "#61", function () awful.util.spawn("loginctl lock-session") end,{description = "🔐 lock screen", group = "awesome"}), - awful.key({ modkey }, ":", + awful.key({ modkey }, "#60", function () awful.util.spawn("splatmoji type /home/ache/.config/splatmoji/perso_emoji_list.tsv /home/ache/.config/splatmoji/kaomoji.tsv") end,{description = "emoji picker", group = "awesome"}), -- Menubar - awful.key({ modkey }, "p", function() + awful.key({ modkey }, "#33", function() local list=client.get() for k, c in pairs(list) do -- Without this, the following @@ -981,21 +979,21 @@ awful.key({ modkey, "Mod1" }, "h", hotkeys_popup.show_help, {description mouse.coords({ x=x_co, y=y_co }) end clientkeys = awful.util.table.join( -awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end, +awful.key({ modkey, }, "#41", function (c) c.fullscreen = not c.fullscreen end, {description = "Set active client fullscreen", group = "client"}), -awful.key({ modkey, "Mod1" }, "t", function (c) c.ontop = not c.ontop end, +awful.key({ modkey, "Mod1" }, "#28", function (c) c.ontop = not c.ontop end, {description = "Set active client on top", group = "client"}), - awful.key({ modkey, }, "c", function (c) + awful.key({ modkey, }, "#54", function (c) c:kill() end), - awful.key({ modkey, }, "v", function (c) + awful.key({ modkey, }, "#55", function (c) awful.util.spawn("xdotool click 2") end), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, + awful.key({ modkey, "Control" }, "#65", awful.client.floating.toggle, {description = "Set floating layout", group = "client"}), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), - awful.key({ modkey, }, "o", awful.client.movetoscreen ), - awful.key({ modkey, }, "n", + awful.key({ modkey, "Control" }, "#36", function (c) c:swap(awful.client.getmaster()) end), + awful.key({ modkey, }, "#32", awful.client.movetoscreen ), + awful.key({ modkey, }, "#57", function (c) -- The client currently has the input focus, so it cannot be -- minimized, since minimized clients can't have the focus. @@ -1006,10 +1004,10 @@ awful.key({ modkey, "Mod1" }, "t", function (c) c.ontop = not c.ontop e c.minimized=true mouse.coords({ x=A, y=B }) end, {description = "Set minimized", group = "client"}), - awful.key({ modkey, "Control" }, "p", function () menubar.show() end, + awful.key({ modkey, "Control" }, "#33", function () menubar.show() end, {description = "Maximize all clients", group = "awesome"}), -- all minimized clients are restored - awful.key({ modkey, }, "b", + awful.key({ modkey, }, "#56", function(c) --[[ for c in awful.client.iterate(function (x) x:raise() @@ -1025,18 +1023,18 @@ awful.key({ modkey, "Mod1" }, "t", function (c) c.ontop = not c.ontop e c.minimized=true mouse.coords({ x=A, y=B }) end), - awful.key({ modkey, }, "d", + awful.key({ modkey, }, "#40", function (c) c.floating = not c.floating end, {description = "Set floating", group = "client"}), - awful.key({ modkey, }, "m", + awful.key({ modkey, }, "#47", function (c) c.maximized = not c.maximized -- Alternative : -- c.maximized_horizontal = not c.maximized_horizontal -- c.maximized_vertical = not c.maximized_vertical end, {description = "Set maximized", group = "client"}), - awful.key({ modkey, "Control" }, "m", function (c) + awful.key({ modkey, "Control" }, "#47", function (c) if c == client.focus then c.minimized = true else @@ -1044,7 +1042,8 @@ awful.key({ modkey, "Mod1" }, "t", function (c) c.ontop = not c.ontop e -- :isvisible() makes no sense c.minimized = false end - end), + end) + --[[, awful.key({ modkey, "Control" }, "Menu", function (c) if layoutKbd == 1 then @@ -1064,8 +1063,8 @@ awful.key({ modkey, "Mod1" }, "t", function (c) c.ontop = not c.ontop e awful.util.spawn_with_shell("setxkbmap fr") end end end end,{description = "Switch keboard layout", group = "awesome"}) + --]] - ) -- cgit v1.2.3