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