add revelation
This commit is contained in:
65
rc.lua
65
rc.lua
@@ -13,6 +13,8 @@ local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
-- revelation
|
||||
local revelation = require("revelation")
|
||||
local naughty = require("naughty")
|
||||
local lain = require("lain")
|
||||
--local menubar = require("menubar")
|
||||
@@ -98,11 +100,12 @@ local cycle_prev = true -- cycle trough all previous client or just the first --
|
||||
local editor = os.getenv("EDITOR") or "vim"
|
||||
local gui_editor = os.getenv("VISUAL") or "code"
|
||||
local browser = os.getenv("BROWSER") or "firefox"
|
||||
local scrlocker = os.getenv("SCREEN_LOCK") or "i3lock-fancy-rapid 5 5"
|
||||
local scrlocker = os.getenv("SCREEN_LOCK") or "i3lock"
|
||||
local lamp_entity = "light.desk_lamp"
|
||||
|
||||
awful.util.terminal = terminal
|
||||
awful.util.tagnames = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }
|
||||
---awful.util.tagnames = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }
|
||||
awful.util.tagnames = { "A", "W", "E", "S", "O", "M", "E", "W", "M"}
|
||||
awful.layout.layouts = {
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.floating,
|
||||
@@ -221,6 +224,8 @@ end
|
||||
|
||||
-- }}}
|
||||
|
||||
-- revelation
|
||||
revelation.init()
|
||||
-- {{{ Menu
|
||||
local myawesomemenu = {
|
||||
{
|
||||
@@ -290,6 +295,7 @@ root.buttons(my_table.join(awful.button({}, 4, awful.tag.viewnext), awful.button
|
||||
|
||||
-- {{{ Key bindings
|
||||
globalkeys = my_table.join(
|
||||
|
||||
-- Take a screenshot
|
||||
awful.key({}, "Print", function()
|
||||
awful.spawn("flameshot full -p ~/Pictures/Screenshots")
|
||||
@@ -299,22 +305,28 @@ globalkeys = my_table.join(
|
||||
end, { description = "Take a screenshot with GUI", group = "hotkeys" }),
|
||||
|
||||
-- X screen locker
|
||||
awful.key({ altkey, "Control" }, "l", function() awful.spawn(scrlocker) end, { description = "lock screen", group = "hotkeys" }),
|
||||
-- awful.key({ altkey, "Control" }, "l", function() awful.spawn(scrlocker) end, { description = "lock screen", group = "hotkeys" }),
|
||||
awful.key({ altkey, "Control" }, "l", function()
|
||||
awful.spawn("/home/jrouxel/.config/rofi/powermenu/type-2/powermenu.sh")
|
||||
end, { description = "Power Menu", group = "hotkeys" }),
|
||||
|
||||
|
||||
-- Hotkeys
|
||||
awful.key({ modkey }, "F1", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
|
||||
awful.key({ modkey, "Shift" }, ",", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
|
||||
-- Tag browsing
|
||||
awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
|
||||
awful.key({ modkey }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
|
||||
awful.key({ modkey }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }),
|
||||
-- revelation
|
||||
awful.key({ modkey }, "e", revelation),
|
||||
|
||||
-- Non-empty tag browsing
|
||||
awful.key({ altkey }, "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, { description = "view previous nonempty", group = "tag" }),
|
||||
-- --awful.key({ altkey }, "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, { description = "view previous nonempty", group = "tag" }),
|
||||
|
||||
-- Default client focus
|
||||
awful.key({ altkey }, "j", function()
|
||||
@@ -452,9 +464,11 @@ globalkeys = my_table.join(
|
||||
awful.key({ modkey, "Control" }, "l", function()
|
||||
awful.tag.incncol(-1, nil, true)
|
||||
end, { description = "decrease the number of columns", group = "layout" }),
|
||||
awful.key({ modkey }, "space", function()
|
||||
awful.layout.inc(1)
|
||||
end, { description = "select next", group = "layout" }),
|
||||
-- JR BEGIN
|
||||
-- awful.key({ modkey }, "space", function()
|
||||
-- awful.layout.inc(1)
|
||||
-- end, { description = "select next", group = "layout" }),
|
||||
-- JR END
|
||||
awful.key({ modkey, "Shift" }, "space", function()
|
||||
awful.layout.inc(-1)
|
||||
end, { description = "select previous", group = "layout" }),
|
||||
@@ -468,6 +482,8 @@ globalkeys = my_table.join(
|
||||
end
|
||||
end, { description = "restore minimized", group = "client" }),
|
||||
|
||||
|
||||
|
||||
-- Dropdown application
|
||||
awful.key({ modkey }, "z", function()
|
||||
awful.screen.focused().quake:toggle()
|
||||
@@ -585,6 +601,9 @@ globalkeys = my_table.join(
|
||||
-- alternatively use rofi, a dmenu-like application with more features
|
||||
-- check https://github.com/DaveDavenport/rofi for more details
|
||||
-- rofi
|
||||
awful.key({ modkey }, "space", function()
|
||||
awful.spawn("/home/jrouxel/.config/rofi/launchers/type-4/launcher.sh")
|
||||
end, { description = "show rofi", group = "launcher" }),
|
||||
awful.key({ modkey }, "d", function()
|
||||
awful.spawn("rofi -show")
|
||||
end, { description = "show rofi", group = "launcher" }),
|
||||
@@ -739,10 +758,10 @@ awful.rules.rules = {
|
||||
},
|
||||
|
||||
-- Set Firefox to always map on the first tag on screen 1.
|
||||
{
|
||||
rule = { class = "Firefox" },
|
||||
properties = { screen = 1, tag = awful.util.tagnames[1] },
|
||||
},
|
||||
--{
|
||||
-- rule = { class = "Firefox" },
|
||||
-- properties = { screen = 1, tag = awful.util.tagnames[1] },
|
||||
--},
|
||||
|
||||
{
|
||||
rule = { class = "Gimp", role = "gimp-image-window" },
|
||||
@@ -754,14 +773,10 @@ awful.rules.rules = {
|
||||
},
|
||||
properties = { floating = true, placement = awful.placement.centered },
|
||||
},
|
||||
{
|
||||
rule = { class = "league of legends.exe" },
|
||||
properties = { fullscreen = true },
|
||||
},
|
||||
{
|
||||
rule = { class = "Firefox" },
|
||||
except = { instance = "Navigator" },
|
||||
properties = { floating = true },
|
||||
-- except = { instance = "Navigator" },
|
||||
-- properties = { floating = true },
|
||||
},
|
||||
{
|
||||
rule = { instance = "wpg" },
|
||||
@@ -929,8 +944,8 @@ end
|
||||
|
||||
-- Set mouse to center of primary screen
|
||||
mouse.coords({
|
||||
x = screen.primary.geometry.x + screen.primary.geometry.width // 2,
|
||||
y = screen.primary.geometry.y + screen.primary.geometry.height // 2,
|
||||
x = screen.primary.geometry.x + screen.primary.geometry.width / 2,
|
||||
y = screen.primary.geometry.y + screen.primary.geometry.height / 2,
|
||||
}, true)
|
||||
|
||||
-- possible workaround for tag preservation when switching back to default screen:
|
||||
|
||||
Reference in New Issue
Block a user