From 0848889c72e894edbefc5f35a91fe940d27980ac Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 30 Aug 2022 15:45:07 +0900 Subject: Switch mouse to left hand --- awesome/.config/awesome/rc.lua | 38 ++++++++++++++++++-------------------- nixos/.xinitrc | 2 +- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 05a87e2..4574167 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -195,10 +195,6 @@ vicious.register(mybattery_text, vicious.widgets.bat, end, 7, "BAT0") local mybattery = wibox.container.background(mybattery_text, beautiful.green) mybattery.fg = beautiful.gray -mybattery:buttons(awful.util.table.join( - awful.button({}, 1, spawner"mate-power-statistics"), - awful.button({}, 3, spawner"mate-power-preferences") -)) -- Create a volume widget local myvolume_text = wibox.widget.textbox() @@ -234,9 +230,9 @@ end local myvolume = wibox.container.background(myvolume_text, beautiful.cyan) myvolume.fg = beautiful.gray myvolume:buttons(awful.util.table.join( - awful.button({}, 1, volume_setter"-5"), + awful.button({}, 1, volume_setter"+5"), awful.button({}, 2, volume_mute), - awful.button({}, 3, volume_setter"+5"), + awful.button({}, 3, volume_setter"-5"), awful.button({}, 4, volume_setter"+1"), awful.button({}, 5, volume_setter"-1") )) @@ -259,9 +255,9 @@ end local myplayer = wibox.container.background(myplayer_text, beautiful.magenta) myplayer.fg = beautiful.gray myplayer:buttons(awful.util.table.join( - awful.button({}, 1, spawner(rewind)), + awful.button({}, 1, spawner(forward)), awful.button({}, 2, spawner(play_pause)), - awful.button({}, 3, spawner(forward)), + awful.button({}, 3, spawner(rewind)), awful.button({}, 4, seeker(1, "+")), awful.button({}, 5, seeker(1, "-")) )) @@ -472,12 +468,12 @@ local globalkeys = awful.util.table.join( awful.key({modkey, "Shift"}, "k", function () awful.client.swap.byidx(-1)end, {description = "swap with previous client by index", group = "client"}), - awful.key({modkey}, "]", - function () awful.screen.focus_relative(-1) end, - {description = "focus the next screen", group = "screen"}), awful.key({modkey}, "[", - function () awful.screen.focus_relative(1) end, + function () awful.screen.focus_relative(-1) end, {description = "focus the previous screen", group = "screen"}), + awful.key({modkey}, "]", + function () awful.screen.focus_relative(1) end, + {description = "focus the next screen", group = "screen"}), awful.key({modkey}, "0", function () for s in screen do @@ -544,15 +540,17 @@ local globalkeys = awful.util.table.join( awful.key({modkey}, "r", spawner(ranger), {description = "open ranger file manager", group = "launcher"}), awful.key({modkey}, "p", spawner(python), - {description = "open Python 3 interpreter", group = "launcher"}), + {description = "open Python interpreter", group = "launcher"}), awful.key({modkey}, "g", spawner(guile), - {description = "open Guile interpreter", group = "launcher"}), + {description = "open Guile REPL", group = "launcher"}), awful.key({modkey}, "s", spawner"slock", {description = "lock screen", group = "launcher"}), awful.key({modkey, "Shift"}, "s", spawner(slock_suspend), {description = "lock screen then suspend", group = "launcher"}), - awful.key({modkey}, "m", spawner"nheko", - {description = "open Nheko", group = "launcher"}), + awful.key({modkey}, "m", spawner"nheko -p halogen", + {description = "open Nheko for Halogen City", group = "launcher"}), + awful.key({modkey, "Shift"}, "m", spawner"nheko -p loang", + {description = "open Nheko for loang network", group = "launcher"}), awful.key({modkey, "Shift"}, "m", spawner"tootle", {description = "open Tootle", group = "launcher"}), awful.key({modkey, "Shift"}, "-", spawner"audacious", @@ -641,12 +639,12 @@ local clientkeys = awful.util.table.join( awful.key({modkey, "Control"}, "space", function (c) c:swap(awful.client.getmaster()) end, {description = "move to master", group = "client"}), - awful.key({modkey, "Shift"}, "]", - function (c) c:move_to_screen(c.screen.index - 1) end, - {description = "move to screen", group = "client"}), awful.key({modkey, "Shift"}, "[", + function (c) c:move_to_screen(c.screen.index - 1) end, + {description = "move to previous screen", group = "client"}), + awful.key({modkey, "Shift"}, "]", function (c) c:move_to_screen(c.screen.index + 1) end, - {description = "move to screen", group = "client"}), + {description = "move to next screen", group = "client"}), awful.key({modkey}, "t", function (c) c.ontop = not c.ontop end, {description = "toggle keep on top", group = "client"}), awful.key({modkey}, "n", diff --git a/nixos/.xinitrc b/nixos/.xinitrc index e230337..f028183 100644 --- a/nixos/.xinitrc +++ b/nixos/.xinitrc @@ -1,9 +1,9 @@ #!/bin/sh -mate-power-manager & ibus-daemon -drx nm-applet & keynav & audacious & thread & autorandr --change +xinput set-button-map 'Logitech USB Optical Mouse' 3 2 1 4 5 exec awesome -- cgit 1.4.1