Compare commits

...

2 Commits

Author SHA1 Message Date
Julien Rouxel
27fa51810e dark is dark 2023-11-28 09:18:17 +01:00
Julien Rouxel
d845066e86 add revelation 2023-11-08 10:27:44 +01:00
3 changed files with 57 additions and 31 deletions

71
rc.lua
View File

@@ -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")
@@ -61,6 +63,8 @@ local function run_once(cmd_arr)
end
--run_once({ "picom -f -c", "unclutter -root" }) -- entries must be separated by commas
run_once({ "nm-applet"}) -- entries must be separated by commas
awful.spawn.easy_async(os.getenv("HOME") .. "/.fehbg")
-- This function implements the XDG autostart specification
@@ -98,11 +102,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 +226,8 @@ end
-- }}}
-- revelation
revelation.init()
-- {{{ Menu
local myawesomemenu = {
{
@@ -290,31 +297,38 @@ 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")
awful.spawn("flameshot full -p ~/Images/Screenshots")
end, { description = "Take a screenshot of all monitors", group = "hotkeys" }),
awful.key({ modkey }, "Print", function()
awful.spawn("flameshot gui -p ~/Pictures/Screenshots")
awful.spawn("flameshot gui -p ~/Images/Screenshots")
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 +466,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 +484,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 +603,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 +760,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 +775,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 +946,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:

1
revelation Submodule

Submodule revelation added at dd1d087840

View File

@@ -19,12 +19,12 @@ local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
local theme = {}
theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-dark"
theme.wallpaper = os.getenv("HOME") .. "/Pictures/Wallpapers/forest.jpg"
theme.wallpaper = os.getenv("HOME") .. "/Images/wp10300105.jpg"
theme.font = (xrdb.font_family or "JetBrainsMono Nerd Font") .. " " .. (xrdb.font_size or "10")
theme.fg_normal = xrdb.foreground or "#DDDDFF"
theme.fg_focus = xrdb.color4 or "#9A9FF1"
theme.fg_urgent = xrdb.background or "#011626"
theme.bg_normal = xrdb.background or "#011626"
--theme.fg_urgent = xrdb.background or "#000000"
theme.bg_normal = "#000000"
theme.bg_focus = xrdb.color0 or "#213646"
theme.bg_widget = theme.bg_normal
theme.bg_widget_alt = theme.bg_focus
@@ -36,6 +36,13 @@ theme.border_normal = theme.bg_normal
theme.border_focus = theme.fg_normal
theme.border_marked = xrdb.color5 or "#CC9393"
theme.notification_icon_size = dpi(128)
-- theme.jules
theme.taglist_fg_focus = "#3992af"
theme.taglist_fg_occupied = "#164b5d"
theme.taglist_fg_urgent = "#ED7572"
theme.taglist_fg_empty = "#828282"
theme.taglist_spacing = 2
theme.taglist_font = "awesomewm-font 11"
-- theme.border_radius = dpi(10)
theme.fg_warning = xrdb.color3 or "#E3D18A"
@@ -454,7 +461,8 @@ function theme.at_screen_connect(s)
})
-- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(26, s), bg = "alpha", fg = theme.fg_normal })
-- s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(26, s), bg = "alpha", fg = theme.fg_normal })
s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(26, s), bg = "#000000", fg = theme.fg_normal })
-- Add widgets to the wibox
s.mywibox:setup({