Its just dotfiles...
This commit is contained in:
@@ -47,12 +47,14 @@ function M.setup()
|
||||
-- Per-screen monitor widgets (created here so multi-monitor stays valid)
|
||||
local title = widgets.make_title()
|
||||
local vol = widgets.make_vol()
|
||||
local brightness = widgets.make_brightness()
|
||||
local cpu = widgets.make_cpu()
|
||||
local clock = wibox.widget.textclock("%Y-%m-%d %H:%M")
|
||||
|
||||
local right = wibox.layout.fixed.horizontal()
|
||||
local function push(w) right:add(widgets.padded(w, 4, 4)) end
|
||||
push(wibox.widget.systray()); right:add(widgets.sep())
|
||||
push(brightness);
|
||||
push(vol); right:add(widgets.sep())
|
||||
push(cpu); right:add(widgets.sep())
|
||||
push(clock); right:add(widgets.sep())
|
||||
|
||||
@@ -15,14 +15,14 @@ M.globalkeys = gears.table.join(
|
||||
awful.key({ modkey }, "l", function() awful.client.focus.bydirection("right") end, { description = "focus right", group = "client" }),
|
||||
|
||||
-- Directional move (swap clients in the tiling layout)
|
||||
awful.key({ modkey, "Shift" }, "h", function() awful.client.swap.bydirection("left") end, { description = "move left", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.bydirection("down") end, { description = "move down", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.bydirection("up") end, { description = "move up", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "l", function() awful.client.swap.bydirection("right") end, { description = "move right", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "h", function() awful.client.swap.bydirection("left") end, { description = "move left", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "j", function() awful.client.swap.bydirection("down") end, { description = "move down", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "k", function() awful.client.swap.bydirection("up") end, { description = "move up", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "l", function() awful.client.swap.bydirection("right") end, { description = "move right", group = "client" }),
|
||||
|
||||
-- Resize the master/other split
|
||||
awful.key({ modkey, "Control" }, "h", function() awful.tag.incmwfact(-0.05) end, { description = "shrink master", group = "layout" }),
|
||||
awful.key({ modkey, "Control" }, "l", function() awful.tag.incmwfact( 0.05) end, { description = "grow master", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "h", function() awful.tag.incmwfact(-0.05) end, { description = "shrink master", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "l", function() awful.tag.incmwfact( 0.05) end, { description = "grow master", group = "layout" }),
|
||||
|
||||
-- Launching / layout
|
||||
awful.key({ modkey }, "Return", function() awful.spawn(terminal) end, { description = "open a terminal", group = "launcher" }),
|
||||
@@ -46,8 +46,7 @@ M.globalkeys = gears.table.join(
|
||||
awful.key({ modkey }, "b", function () awful.spawn("/home/jason/.local/bin/bookmarks") end, {description = "bookmarks", group = "internet"}),
|
||||
|
||||
-- Awesome control
|
||||
awful.key({ modkey, "Shift" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" })
|
||||
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" })
|
||||
)
|
||||
|
||||
-- Workspace keys 1..5: Alt+N view, Alt+Shift+N move client to tag
|
||||
@@ -58,7 +57,8 @@ for i = 1, 5 do
|
||||
local tag = screen.tags[i]
|
||||
if tag then tag:view_only() end
|
||||
end, { description = "view tag #" .. i, group = "tag" }),
|
||||
awful.key({ modkey, "Shift" }, "#" .. i + 9, function()
|
||||
|
||||
awful.key({ modkey, "Control" }, "#" .. i + 9, function()
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[i]
|
||||
if tag then client.focus:move_to_tag(tag) end
|
||||
|
||||
@@ -2,7 +2,6 @@ local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local naughty = require("naughty")
|
||||
local colors = require("config.colors")
|
||||
local bling = require("bling")
|
||||
|
||||
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
|
||||
|
||||
@@ -46,9 +45,3 @@ naughty.config.presets.critical = {
|
||||
border_width = 3, font = "JetBrainsMono Nerd Font 11", timeout = 0, -- stays until dismissed
|
||||
}
|
||||
|
||||
-- Wallpaper
|
||||
bling.module.wallpaper.setup {
|
||||
wallpaper = { "/home/jason/Pictures/Wallpapers/farewell.jpg" },
|
||||
position = "fit",
|
||||
background = "#181818",
|
||||
}
|
||||
|
||||
@@ -81,4 +81,38 @@ function M.make_vol()
|
||||
return w
|
||||
end
|
||||
|
||||
-- Brightness: click to toggle between night (default gamma) and day (boosted).
|
||||
function M.make_brightness()
|
||||
local OUTPUT = "HDMI-A-0"
|
||||
local DAY_CMD = "xrandr --output " .. OUTPUT .. " --set CTM \"1.1,0,0,0,1.1,0,0,0,1.1\" --gamma 1.08:1.08:1.08"
|
||||
local NIGHT_CMD = "xrandr --output " .. OUTPUT .. " --set CTM \"1,0,0,0,1,0,0,0,1\" --gamma 1.0:1.0:1.0"
|
||||
|
||||
local w = wibox.widget.textbox()
|
||||
local is_day = true
|
||||
|
||||
local function render()
|
||||
local icon = is_day and " " or " "
|
||||
|
||||
w.markup = string.format(
|
||||
"<span font_family='JetBrainsMono Nerd Font' foreground='%s' font_size='x-large'>%s</span>",
|
||||
colors.accent, icon
|
||||
)
|
||||
end
|
||||
|
||||
local function apply(day)
|
||||
local cmd = day and DAY_CMD or NIGHT_CMD
|
||||
awful.spawn.easy_async_with_shell(cmd, function()
|
||||
is_day = day
|
||||
render()
|
||||
end)
|
||||
end
|
||||
|
||||
w:buttons(gears.table.join(
|
||||
awful.button({ }, 1, function() apply(not is_day) end)
|
||||
))
|
||||
|
||||
apply(true)
|
||||
return w
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -4,6 +4,7 @@ local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
local naughty = require("naughty")
|
||||
local bling = require("bling")
|
||||
|
||||
-- Global config
|
||||
modkey = "Mod1" -- Alt. Use "Mod4" for the Super/Windows key.
|
||||
@@ -43,3 +44,9 @@ root.keys(keys.globalkeys)
|
||||
awful.rules.rules = require("config.rules")
|
||||
require("config.signals")
|
||||
|
||||
-- Wallpaper
|
||||
bling.module.wallpaper.setup {
|
||||
wallpaper = { "/home/jason/Pictures/Wallpapers/farewell.jpg" },
|
||||
position = "fit",
|
||||
background = "#181818",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user