diff --git a/rc.lua b/rc.lua index 9a0e22b..ba5e6e2 100644 --- a/rc.lua +++ b/rc.lua @@ -67,7 +67,6 @@ loadrc("debug") -- debugging primitive `dbg()` loadrc("start") -- programs to run on start loadrc("bindings") -- keybindings -loadrc("keyboard") -- keyboard configuration loadrc("wallpaper") -- wallpaper settings loadrc("tags") -- tags handling loadrc("widgets") -- widgets configuration diff --git a/rc/keyboard.lua b/rc/keyboard.lua deleted file mode 100644 index 64ea2f6..0000000 --- a/rc/keyboard.lua +++ /dev/null @@ -1,38 +0,0 @@ --- Keyboard configuration with kbdd - -local icons = loadrc("icons", "vbe/icons") - -local qdbus = { - check = "qdbus ru.gentoo.KbddService /ru/gentoo/KbddService", - next = "qdbus ru.gentoo.KbddService /ru/gentoo/KbddService ru.gentoo.kbdd.next_layout" -} - --- Display a notification if the layout changed -local nid = nil -dbus.request_name("session", "ru.gentoo.kbdd") -dbus.add_match("session", "interface='ru.gentoo.kbdd',member='layoutNameChanged'") -dbus.add_signal("ru.gentoo.kbdd", - function(...) - local data = {...} - local layout = data[2] - local screen = mouse.screen - if client.focus then screen = client.focus.screen end - nid = naughty.notify({ title = "Keyboard layout changed", - text = "New layout is " .. layout .. "", - replaces_id = nid, - icon = icons.lookup({ name = "keyboard", - type = "devices" }), - screen = screen }).id - end) - -config.keys.global = awful.util.table.join( - config.keys.global, - awful.key({ modkey }, "=", - function() - os.execute(qdbus.next) - end, "Change keyboard layout")) - --- Run kbdd if not running -if os.execute(qdbus.check .. " 2> /dev/null > /dev/null") ~= 0 then - awful.util.spawn("kbdd") -end diff --git a/rc/start.lua b/rc/start.lua index c72622a..4c7ae54 100644 --- a/rc/start.lua +++ b/rc/start.lua @@ -23,12 +23,13 @@ local execute = { "xrdb -merge " .. awful.util.getdir("config") .. "/Xresources", } +-- Keyboard/Mouse configuration if config.hostname == "naruto" then execute = awful.util.table.join( execute, { -- Keyboard and mouse "xset m 4 3", -- Mouse acceleration - "setxkbmap us,fr '' compose:rwin ctrl:nocaps", + "setxkbmap us,fr '' compose:rwin ctrl:nocaps grp:rctrl_rshift_toggle", "xmodmap -e 'keysym Pause = XF86ScreenSaver'", }) elseif config.hostname == "neo" then @@ -36,14 +37,14 @@ elseif config.hostname == "neo" then execute, { -- Keyboard and mouse "xset m 3 3", -- Mouse acceleration - "setxkbmap us,fr '' compose:rwin ctrl:nocaps", + "setxkbmap us,fr '' compose:rwin ctrl:nocaps grp:rctrl_rshift_toggle", "xmodmap -e 'keysym Pause = XF86ScreenSaver'", }) elseif config.hostname == "guybrush" then execute = awful.util.table.join( execute, { -- Keyboard and mouse - "setxkbmap us,fr '' compose:rctrl ctrl:nocaps", + "setxkbmap us,fr '' compose:ralt ctrl:nocaps grp:rctrl_rshift_toggle", "xmodmap -e 'keysym XF86AudioPlay = XF86ScreenSaver'", -- Wheel emulation "xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 8 1",