update awesome config.
This commit is contained in:
@@ -13,17 +13,17 @@ end
|
||||
|
||||
pravitekeys = awful.util.table.join(
|
||||
-- if app is running, raise it, otherwise launch it
|
||||
awful.key({ altkey, "Control" }, "a",
|
||||
awful.key({ modkey }, "a",
|
||||
function ()
|
||||
run_or_raise("android-studio", {class = "jetbrains-studio"})
|
||||
end),
|
||||
|
||||
awful.key({ altkey, "Control" }, "f",
|
||||
awful.key({ modkey }, "q",
|
||||
function ()
|
||||
run_or_raise("firefox", {class = "Firefox"})
|
||||
run_or_raise("firefox", {class = "Nightly"})
|
||||
end),
|
||||
|
||||
awful.key({ altkey, "Control" }, "v",
|
||||
awful.key({ modkey, "Shift" }, "v",
|
||||
function ()
|
||||
run_or_raise("VirtualBox", {class = "VirtualBox"})
|
||||
end),
|
||||
@@ -33,12 +33,12 @@ pravitekeys = awful.util.table.join(
|
||||
run_or_raise("urxvtc", {class = "URxvt"})
|
||||
end),
|
||||
|
||||
awful.key({ altkey, "Control" }, "e",
|
||||
awful.key({ modkey }, "e",
|
||||
function ()
|
||||
run_or_raise("emacs", {class = "Emacs"})
|
||||
end),
|
||||
|
||||
awful.key({ altkey, "Shift" }, "e",
|
||||
awful.key({ modkey, "Shift" }, "e",
|
||||
function ()
|
||||
run_or_raise("pcmanfm", {class = "Pcmanfm"})
|
||||
end),
|
||||
@@ -49,7 +49,7 @@ pravitekeys = awful.util.table.join(
|
||||
os.execute(string.format("amixer set %s 1%%+", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ altkey }, "Up",
|
||||
awful.key({ modkey }, "Up",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s 1%%+", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
@@ -59,7 +59,7 @@ pravitekeys = awful.util.table.join(
|
||||
os.execute(string.format("amixer set %s 1%%-", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ altkey }, "Down",
|
||||
awful.key({ modkey }, "Down",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s 1%%-", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
@@ -70,7 +70,7 @@ pravitekeys = awful.util.table.join(
|
||||
or beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ altkey }, "m",
|
||||
awful.key({ modkey, "Shift" }, "m",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s toggle", beautiful.volume.togglechannel
|
||||
or beautiful.volume.channel))
|
||||
|
||||
119
awesome/rc.lua
119
awesome/rc.lua
@@ -212,7 +212,7 @@ root.buttons(awful.util.table.join(
|
||||
globalkeys = awful.util.table.join(
|
||||
-- Take a screenshot
|
||||
-- https://github.com/copycat-killer/dots/blob/master/bin/screenshot
|
||||
awful.key({ altkey }, "p", function() os.execute("screenshot") end),
|
||||
awful.key({ modkey }, "p", function() os.execute("screenshot") end),
|
||||
|
||||
-- Hotkeys
|
||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||
@@ -226,9 +226,9 @@ globalkeys = awful.util.table.join(
|
||||
{description = "go back", group = "tag"}),
|
||||
|
||||
-- Non-empty tag browsing
|
||||
awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end,
|
||||
awful.key({ modkey, "Shift" }, "Left", function () lain.util.tag_view_nonempty(-1) end,
|
||||
{description = "view previous nonempty", group = "tag"}),
|
||||
awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end,
|
||||
awful.key({ modkey, "Shift" }, "Right", function () lain.util.tag_view_nonempty(1) end,
|
||||
{description = "view previous nonempty", group = "tag"}),
|
||||
|
||||
-- Default client focus
|
||||
@@ -300,15 +300,15 @@ globalkeys = awful.util.table.join(
|
||||
end),
|
||||
|
||||
-- On the fly useless gaps change
|
||||
awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
|
||||
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
|
||||
-- awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
|
||||
-- awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
|
||||
|
||||
-- Dynamic tagging
|
||||
awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end),
|
||||
awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end),
|
||||
awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(1) end), -- move to next tag
|
||||
awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(-1) end), -- move to previous tag
|
||||
awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end),
|
||||
-- awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end),
|
||||
-- awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end),
|
||||
-- awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(1) end), -- move to next tag
|
||||
-- awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(-1) end), -- move to previous tag
|
||||
-- awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end),
|
||||
|
||||
-- Standard program
|
||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||
@@ -350,37 +350,37 @@ globalkeys = awful.util.table.join(
|
||||
awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end),
|
||||
|
||||
-- Widgets popups
|
||||
awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end),
|
||||
awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end),
|
||||
awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end),
|
||||
-- awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end),
|
||||
-- awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end),
|
||||
-- awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end),
|
||||
|
||||
-- ALSA volume control
|
||||
awful.key({ }, "XF86AudioRaiseVolume",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s 1%%+", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ }, "XF86AudioLowerVolume",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s 1%%-", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ }, "XF86AudioMute",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
awful.key({ altkey, "Control" }, "m",
|
||||
function ()
|
||||
os.execute(string.format("amixer set %s 100%%", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
-- awful.key({ }, "XF86AudioRaiseVolume",
|
||||
-- function ()
|
||||
-- os.execute(string.format("amixer set %s 1%%+", beautiful.volume.channel))
|
||||
-- beautiful.volume.update()
|
||||
-- end),
|
||||
-- awful.key({ }, "XF86AudioLowerVolume",
|
||||
-- function ()
|
||||
-- os.execute(string.format("amixer set %s 1%%-", beautiful.volume.channel))
|
||||
-- beautiful.volume.update()
|
||||
-- end),
|
||||
-- awful.key({ }, "XF86AudioMute",
|
||||
-- function ()
|
||||
-- os.execute(string.format("amixer set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel))
|
||||
-- beautiful.volume.update()
|
||||
-- end),
|
||||
-- awful.key({ altkey, "Control" }, "m",
|
||||
-- function ()
|
||||
-- os.execute(string.format("amixer set %s 100%%", beautiful.volume.channel))
|
||||
-- beautiful.volume.update()
|
||||
-- end),
|
||||
|
||||
awful.key({ altkey, "Control" }, "0",
|
||||
function ()
|
||||
os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel))
|
||||
beautiful.volume.update()
|
||||
end),
|
||||
-- awful.key({ altkey, "Control" }, "0",
|
||||
-- function ()
|
||||
-- os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel))
|
||||
-- beautiful.volume.update()
|
||||
-- end),
|
||||
|
||||
-- MPD control
|
||||
awful.key({ altkey, "Control" }, "Up",
|
||||
@@ -403,18 +403,18 @@ globalkeys = awful.util.table.join(
|
||||
awful.spawn.with_shell("mpc next")
|
||||
beautiful.mpd.update()
|
||||
end),
|
||||
awful.key({ altkey }, "0",
|
||||
function ()
|
||||
local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
|
||||
if beautiful.mpd.timer.started then
|
||||
beautiful.mpd.timer:stop()
|
||||
common.text = common.text .. lain.util.markup.bold("OFF")
|
||||
else
|
||||
beautiful.mpd.timer:start()
|
||||
common.text = common.text .. lain.util.markup.bold("ON")
|
||||
end
|
||||
naughty.notify(common)
|
||||
end),
|
||||
-- awful.key({ altkey }, "0",
|
||||
-- function ()
|
||||
-- local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
|
||||
-- if beautiful.mpd.timer.started then
|
||||
-- beautiful.mpd.timer:stop()
|
||||
-- common.text = common.text .. lain.util.markup.bold("OFF")
|
||||
-- else
|
||||
-- beautiful.mpd.timer:start()
|
||||
-- common.text = common.text .. lain.util.markup.bold("ON")
|
||||
-- end
|
||||
-- naughty.notify(common)
|
||||
-- end),
|
||||
|
||||
-- Copy primary to clipboard (terminals to gtk)
|
||||
--awful.key({ modkey }, "c", function () awful.spawn("xsel | xsel -i -b") end),
|
||||
@@ -423,14 +423,14 @@ globalkeys = awful.util.table.join(
|
||||
|
||||
-- User programs
|
||||
-- awful.key({ modkey }, "e", function () awful.spawn(gui_editor) end),
|
||||
awful.key({ modkey }, "e", function () awful.spawn("pcmanfm") end),
|
||||
-- awful.key({ modkey }, "e", function () awful.spawn("pcmanfm") end),
|
||||
-- awful.key({ modkey }, "q", function () awful.spawn(browser) end),
|
||||
awful.key({ modkey }, "q", function ()
|
||||
local matcher = function (c)
|
||||
return awful.rules.match(c, {class = "Firefox"})
|
||||
end
|
||||
awful.client.run_or_raise("firefox", matcher)
|
||||
end),
|
||||
-- awful.key({ modkey }, "q", function ()
|
||||
-- local matcher = function (c)
|
||||
-- return awful.rules.match(c, {class = "Firefox"})
|
||||
-- end
|
||||
-- awful.client.run_or_raise("firefox", matcher)
|
||||
-- end),
|
||||
|
||||
-- Default
|
||||
--[[ Menubar
|
||||
@@ -579,9 +579,12 @@ awful.rules.rules = {
|
||||
properties = { titlebars_enabled = false } },
|
||||
|
||||
-- Set Firefox to always map on the second tag on screen 1.
|
||||
{ rule = { class = "Firefox" },
|
||||
{ rule = { class = "Nightly" },
|
||||
properties = { screen = 1, tag = screen[1].tags[2] } },
|
||||
|
||||
{ rule = { class = "mpv"},
|
||||
properties = { screen = 1, tag = screen[1].tags[4], switchtotag = true, fullscreen = true } },
|
||||
|
||||
{ rule = { class = "VirtualBox" },
|
||||
properties = { screen = 1, tag = screen[1].tags[5] } },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user