stole alphakeks awesome config
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "common/.config/awesome/plugins/nide"]
|
||||
path = common/.config/awesome/plugins/nice/
|
||||
url = https://github.com/AlphaKeks/awesome-wm-nice
|
||||
18
common/.config/awesome/ben/autostart.lua
Normal file
18
common/.config/awesome/ben/autostart.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local awful = require("awful")
|
||||
|
||||
local autostart = {
|
||||
["picom"] = "/usr/bin/picom -b --config /home/alphakeks/.config/picom/picom.conf",
|
||||
--["spectacle"] = "/usr/bin/spectacle -s",
|
||||
--["easyeffects"] = "/usr/bin/easyeffects --gapplication-service",
|
||||
--["signal-desktop"] = "/usr/bin/signal-desktop",
|
||||
--["discord"] = "/usr/bin/flatpak run com.discordapp.Discord",
|
||||
--["steam"] = "/usr/bin/steam -silent",
|
||||
--["nextcloud"] = "/usr/bin/nextcloud",
|
||||
}
|
||||
|
||||
for command_name, command in pairs(autostart) do
|
||||
awful.spawn.with_shell(string.format(
|
||||
"pgrep -u $USER '%s' > /dev/null || (%s)",
|
||||
command_name, command
|
||||
))
|
||||
end
|
||||
51
common/.config/awesome/ben/init.lua
Normal file
51
common/.config/awesome/ben/init.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
Ben = {
|
||||
programs = {
|
||||
editor = "vim",
|
||||
terminal = "wezterm",
|
||||
browser = "google-chrome-unstable",
|
||||
filemanager = "dolphin",
|
||||
launcher = "rofi -show drun",
|
||||
},
|
||||
keys = {
|
||||
mod = "Mod4",
|
||||
shift = "Shift",
|
||||
ctrl = "Control",
|
||||
space = "space",
|
||||
enter = "Return",
|
||||
},
|
||||
colors = {
|
||||
poggers = "#7480C2",
|
||||
rosewater = "#F5E0DC",
|
||||
flamingo = "#F2CDCD",
|
||||
pink = "#F5C2E7",
|
||||
mauve = "#CBA6F7",
|
||||
red = "#F38BA8",
|
||||
maroon = "#EBA0AC",
|
||||
peach = "#FAB387",
|
||||
yellow = "#F9E2AF",
|
||||
green = "#A6E3A1",
|
||||
teal = "#94E2D5",
|
||||
sky = "#89DCEB",
|
||||
sapphire = "#74C7EC",
|
||||
blue = "#89B4FA",
|
||||
lavender = "#B4BEFE",
|
||||
text = "#CDD6F4",
|
||||
subtext1 = "#BAC2DE",
|
||||
subtext0 = "#A6ADC8",
|
||||
overlay2 = "#9399B2",
|
||||
overlay1 = "#7F849C",
|
||||
overlay0 = "#6C7086",
|
||||
surface2 = "#585B70",
|
||||
surface1 = "#45475A",
|
||||
surface0 = "#313244",
|
||||
base = "#1E1E2E",
|
||||
mantle = "#181825",
|
||||
crust = "#11111B",
|
||||
},
|
||||
fonts = {
|
||||
normal = "Quicksand 12",
|
||||
monospace = "SFMono Nerd Font 12",
|
||||
},
|
||||
}
|
||||
|
||||
return Ben
|
||||
290
common/.config/awesome/ben/keymaps.lua
Normal file
290
common/.config/awesome/ben/keymaps.lua
Normal file
@@ -0,0 +1,290 @@
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
local keys = Ben.keys
|
||||
local programs = Ben.programs
|
||||
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ keys.mod, keys.shift }, "r", function()
|
||||
awesome.restart()
|
||||
end),
|
||||
|
||||
--[[ very important applications ]]--
|
||||
|
||||
awful.key({ keys.mod }, keys.enter, function()
|
||||
awesome.spawn(programs.terminal)
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "d", function()
|
||||
awesome.spawn(programs.launcher)
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "b", function()
|
||||
awesome.spawn(programs.browser)
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "e", function()
|
||||
awesome.spawn(programs.filemanager)
|
||||
end),
|
||||
|
||||
--[[awful.key({ keys.mod }, "m", function()]]
|
||||
--[[local rofi_beats = os.getenv("HOME") .. "/.local/bin/scripts/rofi-beats.sh"]]
|
||||
--[[awesome.spawn(rofi_beats)]]
|
||||
--[[end),]]
|
||||
|
||||
--[[ window management ]]--
|
||||
awful.key({ keys.mod }, "h", function()
|
||||
awful.client.focus.global_bydirection("left")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "j", function()
|
||||
awful.client.focus.global_bydirection("down")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "k", function()
|
||||
awful.client.focus.global_bydirection("up")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "l", function()
|
||||
awful.client.focus.global_bydirection("right")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "h", function()
|
||||
awful.client.swap.global_bydirection("left")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "j", function()
|
||||
awful.client.swap.global_bydirection("down")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "k", function()
|
||||
awful.client.swap.global_bydirection("up")
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "l", function()
|
||||
awful.client.swap.global_bydirection("right")
|
||||
end),
|
||||
|
||||
--[[ Switching between tags ]]--
|
||||
|
||||
awful.key({ keys.mod }, "#10", function()
|
||||
local tag = awful.screen.focused().tags[1]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#11", function()
|
||||
local tag = awful.screen.focused().tags[2]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#12", function()
|
||||
local tag = awful.screen.focused().tags[3]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#13", function()
|
||||
local tag = awful.screen.focused().tags[4]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#14", function()
|
||||
local tag = awful.screen.focused().tags[5]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#15", function()
|
||||
local tag = awful.screen.focused().tags[6]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#16", function()
|
||||
local tag = awful.screen.focused().tags[7]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#17", function()
|
||||
local tag = awful.screen.focused().tags[8]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#18", function()
|
||||
local tag = awful.screen.focused().tags[9]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, "#19", function()
|
||||
local tag = awful.screen.focused().tags[10]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#10", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[1]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#11", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[2]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#12", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[3]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#13", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[4]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#14", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[5]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#15", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[6]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#16", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[7]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#17", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[8]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#18", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[9]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "#19", function()
|
||||
if not client.focus then
|
||||
return
|
||||
end
|
||||
|
||||
local tag = client.focus.screen.tags[10]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end),
|
||||
})
|
||||
|
||||
client.connect_signal("request::default_keybindings", function()
|
||||
awful.keyboard.append_client_keybindings({
|
||||
awful.key({ keys.mod }, "q", function(c)
|
||||
c:kill()
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod }, keys.space, function(c)
|
||||
c.floating = !c.floating
|
||||
c:raise()
|
||||
end),
|
||||
|
||||
awful.key({ keys.mod, keys.shift }, "f", function(c)
|
||||
c.fullscreen = not c.fullscreen
|
||||
c:raise()
|
||||
end),
|
||||
})
|
||||
end)
|
||||
|
||||
client.connect_signal("request::default_mousebindings", function()
|
||||
awful.mouse.append_client_mousebindings({
|
||||
awful.button({ }, 1, function(c)
|
||||
c:activate({ context = "mouse_click" })
|
||||
end),
|
||||
|
||||
awful.button({ keys.mod }, 1, function(c)
|
||||
c:activate({
|
||||
context = "mouse_click",
|
||||
action = "mouse_move",
|
||||
})
|
||||
end),
|
||||
|
||||
awful.button({ keys.mod }, 3, function(c)
|
||||
c:activate({
|
||||
context = "mouse_click",
|
||||
action = "mouse_resize",
|
||||
})
|
||||
end),
|
||||
})
|
||||
end)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=2:tabstop=2:softtabstop=2:textwidth=80
|
||||
41
common/.config/awesome/ben/widgets.lua
Normal file
41
common/.config/awesome/ben/widgets.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local widgets = {}
|
||||
|
||||
widgets.menu = awful.menu({
|
||||
items = {
|
||||
{ "Restart", awesome.restart },
|
||||
{
|
||||
"👋",
|
||||
function()
|
||||
awesome.quit()
|
||||
end
|
||||
},
|
||||
{
|
||||
"Shutdown",
|
||||
function()
|
||||
os.execute("shutdown now")
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
widgets.launcher = awful.widget.launcher({
|
||||
image = beautiful.awesome_icon,
|
||||
menu = widgets.menu,
|
||||
})
|
||||
|
||||
widgets.clock = wibox.widget({
|
||||
widget = wibox.widget.textclock,
|
||||
format = " %H:%M %a %d/%m/%Y ",
|
||||
refresh = 1,
|
||||
})
|
||||
|
||||
widgets.separator = wibox.widget.separator()
|
||||
|
||||
widgets.systray = wibox.widget.systray()
|
||||
widgets.systray:set_base_size(16)
|
||||
|
||||
return widgets
|
||||
41
common/.config/awesome/core/bars.lua
Normal file
41
common/.config/awesome/core/bars.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
local create_tags = require("core.tags").create_tags
|
||||
local widgets = require("alphakeks.widgets")
|
||||
|
||||
awful.screen.connect_for_each_screen(function(screen)
|
||||
local tags = create_tags(screen)
|
||||
|
||||
screen.taglist = awful.widget.taglist({
|
||||
screen = screen,
|
||||
filter = awful.widget.taglist.filter.all,
|
||||
buttons = gears.table.join(
|
||||
awful.button({}, 1, function(tag)
|
||||
tag:view_only()
|
||||
end)
|
||||
),
|
||||
})
|
||||
|
||||
screen.wibar = awful.wibar({
|
||||
screen = screen,
|
||||
position = "top",
|
||||
})
|
||||
|
||||
screen.wibar:setup({
|
||||
layout = wibox.layout.align.horizontal,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
widgets.launcher,
|
||||
screen.taglist,
|
||||
},
|
||||
|
||||
widgets.separator,
|
||||
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
widgets.systray,
|
||||
widgets.clock,
|
||||
},
|
||||
})
|
||||
end)
|
||||
30
common/.config/awesome/core/error_report.lua
Normal file
30
common/.config/awesome/core/error_report.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local naughty = require("naughty")
|
||||
local errors = awesome.startup_errors
|
||||
|
||||
if errors then
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.critical,
|
||||
title = "Errors occurred during startup.",
|
||||
text = tostring(errors),
|
||||
})
|
||||
end
|
||||
|
||||
do
|
||||
local in_error = false
|
||||
|
||||
awesome.connect_signal("debug::error", function(err)
|
||||
if in_error then
|
||||
return
|
||||
end
|
||||
|
||||
in_error = true
|
||||
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.critical,
|
||||
title = "Error occurred.",
|
||||
text = tostring(err),
|
||||
})
|
||||
|
||||
in_error = false
|
||||
end)
|
||||
end
|
||||
7
common/.config/awesome/core/layouts.lua
Normal file
7
common/.config/awesome/core/layouts.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local layout = require("awful").layout
|
||||
|
||||
layout.layouts = {
|
||||
layout.suit.tile.left,
|
||||
layout.suit.fair,
|
||||
layout.suit.floating,
|
||||
}
|
||||
17
common/.config/awesome/core/notifications.lua
Normal file
17
common/.config/awesome/core/notifications.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local ruled = require("ruled")
|
||||
local awful = require("awful")
|
||||
local naughty = require("naughty")
|
||||
|
||||
ruled.notification.connect_signal("request::rules", function()
|
||||
ruled.notification.append_rule({
|
||||
rule = {},
|
||||
properties = {
|
||||
screen = awful.screen.preferred,
|
||||
implicit_timeout = 5,
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
naughty.connect_signal("request::display", function(notification)
|
||||
naughty.layout.box({ notification = notification })
|
||||
end)
|
||||
71
common/.config/awesome/core/rules.lua
Normal file
71
common/.config/awesome/core/rules.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
local ruled = require("ruled")
|
||||
local awful = require("awful")
|
||||
|
||||
ruled.client.connect_signal("request::rules", function()
|
||||
ruled.client.append_rule({
|
||||
id = "global",
|
||||
rule = {},
|
||||
properties = {
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
|
||||
},
|
||||
})
|
||||
|
||||
ruled.client.append_rule({
|
||||
id = "titlebars",
|
||||
rule_any = {
|
||||
type = { "normal", "dialog" },
|
||||
},
|
||||
properties = {
|
||||
titlebars_enabled = true,
|
||||
},
|
||||
})
|
||||
|
||||
ruled.client.append_rule({
|
||||
id = "discord",
|
||||
rule = {
|
||||
class = "discord",
|
||||
},
|
||||
properties = {
|
||||
screen = 2,
|
||||
tag = "1",
|
||||
},
|
||||
})
|
||||
|
||||
ruled.client.append_rule({
|
||||
id = "signal",
|
||||
rule = {
|
||||
class = "Signal",
|
||||
},
|
||||
properties = {
|
||||
screen = 2,
|
||||
tag = "2",
|
||||
},
|
||||
})
|
||||
|
||||
ruled.client.append_rule({
|
||||
id = "floating",
|
||||
rule_any = {
|
||||
role = {
|
||||
"pop-up",
|
||||
},
|
||||
},
|
||||
properties = {
|
||||
floating = true
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
c:activate({
|
||||
context = "mouse_enter",
|
||||
raise = false,
|
||||
})
|
||||
end)
|
||||
|
||||
-- Who the fuck minimizes windows?
|
||||
client.connect_signal("property::minimized", function(c)
|
||||
c.minimized = false
|
||||
end)
|
||||
9
common/.config/awesome/core/tags.lua
Normal file
9
common/.config/awesome/core/tags.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local awful = require("awful")
|
||||
|
||||
local function create_tags(screen)
|
||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, screen, awful.layout.layouts[1])
|
||||
end
|
||||
|
||||
return {
|
||||
create_tags = create_tags
|
||||
|
||||
318
common/.config/awesome/core/theme.lua
Normal file
318
common/.config/awesome/core/theme.lua
Normal file
@@ -0,0 +1,318 @@
|
||||
local dpi = require("beautiful.xresources").apply_dpi
|
||||
local colors = Ben.colors
|
||||
local fonts = Ben.fonts
|
||||
|
||||
return {
|
||||
-- The Awesome icon path
|
||||
awesome_icon = "/mnt/mass/pictures/Schnose/schnose.png",
|
||||
-- The default focused element background color
|
||||
bg_focus = colors.base,
|
||||
-- The default minimized element background color
|
||||
bg_minimize = colors.mantle,
|
||||
-- The default background color
|
||||
bg_normal = colors.base,
|
||||
-- The systray background color
|
||||
bg_systray = colors.base,
|
||||
-- The default urgent element background color
|
||||
bg_urgent = colors.red,
|
||||
-- The border color when the client is active
|
||||
border_color_active = colors.base,
|
||||
-- The fallback border color when the client is floating
|
||||
border_color_floating = colors.subtext1,
|
||||
-- The border color when the (floating) client is active
|
||||
border_color_floating_active = colors.text,
|
||||
-- The border color when the (floating) client is not active and new
|
||||
border_color_floating_new = colors.subtext1,
|
||||
-- The border color when the (floating) client is not active
|
||||
border_color_floating_normal = colors.subtext1,
|
||||
-- The border color when the (floating) client has the urgent property set
|
||||
border_color_floating_urgent = colors.red,
|
||||
-- The border color when the (fullscreen) client has the urgent property set
|
||||
border_color_fullscreen_urgent = colors.red,
|
||||
-- The border color when the client is marked
|
||||
border_color_marked = colors.mauve,
|
||||
-- The border color when the client is not active and new
|
||||
border_color_new = colors.base,
|
||||
-- The border color when the client is not active
|
||||
border_color_normal = colors.base,
|
||||
-- The border color when the client has the urgent property set
|
||||
border_color_urgent = colors.red,
|
||||
-- The fallback border width when nothing else is set
|
||||
border_width = 2,
|
||||
-- The client border width for the active client
|
||||
border_width_active = 2,
|
||||
-- The fallback border width when the client is floating
|
||||
border_width_floating = 4,
|
||||
-- The client border width for the active floating client
|
||||
border_width_floating_active = 4,
|
||||
-- The client border width for the new floating clients
|
||||
border_width_floating_new = 4,
|
||||
-- The client border width for the normal floating clients
|
||||
border_width_floating_normal = 4,
|
||||
-- The client border width for the urgent floating clients
|
||||
border_width_floating_urgent = 4,
|
||||
-- The client border width for the fullscreen clients
|
||||
border_width_fullscreen = 0,
|
||||
-- The client border width for the active fullscreen client
|
||||
border_width_fullscreen_active = 0,
|
||||
-- The client border width for the new fullscreen clients
|
||||
border_width_fullscreen_new = 0,
|
||||
-- The client border width for the normal fullscreen clients
|
||||
border_width_fullscreen_normal = 0,
|
||||
-- The client border width for the urgent fullscreen clients
|
||||
border_width_fullscreen_urgent = 2,
|
||||
-- The fallback border width when the client is maximized
|
||||
border_width_maximized = 0,
|
||||
-- The client border width for the active maximized client
|
||||
border_width_maximized_active = 0,
|
||||
-- The client border width for the new maximized clients
|
||||
border_width_maximized_new = 0,
|
||||
-- The client border width for the normal maximized clients
|
||||
border_width_maximized_normal = 0,
|
||||
-- The client border width for the urgent maximized clients
|
||||
border_width_maximized_urgent = 2,
|
||||
-- The client border width for the new clients
|
||||
border_width_new = 2,
|
||||
-- The client border width for the normal clients
|
||||
border_width_normal = 2,
|
||||
-- The client border width for the urgent clients
|
||||
border_width_urgent = 2,
|
||||
-- The calendar font
|
||||
calendar_font = fonts.normal,
|
||||
-- Format the weekdays with three characters instead of two
|
||||
calendar_long_weekdays = true,
|
||||
-- Start the week on Sunday
|
||||
calendar_start_sunday = false,
|
||||
-- Display the calendar week numbers
|
||||
calendar_week_numbers = false,
|
||||
-- The outer (unchecked area) background color, pattern or gradient
|
||||
checkbox_bg = colors.mantle,
|
||||
-- The outer (unchecked area) border color
|
||||
checkbox_border_color = colors.crust,
|
||||
-- The outer (unchecked area) border width
|
||||
checkbox_border_width = 1,
|
||||
-- The checked part border color
|
||||
checkbox_check_border_color = colors.lavender,
|
||||
-- The checked part border width
|
||||
checkbox_check_border_width = 2,
|
||||
-- The checked part filling color
|
||||
checkbox_check_color = colors.subtext0,
|
||||
-- The checked part shape
|
||||
checkbox_check_shape = "rectangle",
|
||||
-- The padding between the outline and the progressbar
|
||||
checkbox_paddings = 2,
|
||||
-- The outer (unchecked area) shape
|
||||
checkbox_shape = "rectangle",
|
||||
-- The default focused element foreground (text) color
|
||||
fg_focus = colors.text,
|
||||
-- The default minimized element foreground (text) color
|
||||
fg_minimize = colors.text,
|
||||
-- The default focused element foreground (text) color
|
||||
fg_normal = colors.text,
|
||||
-- The default urgent element foreground (text) color
|
||||
fg_urgent = colors.red,
|
||||
-- The default font
|
||||
font = fonts.normal,
|
||||
-- Hide the border on fullscreen clients
|
||||
fullscreen_hide_border = true,
|
||||
-- The graph foreground color
|
||||
graph_fg = colors.poggers,
|
||||
-- The icon theme name
|
||||
icon_theme = "Papirus-Colors-Dark",
|
||||
-- The layoutlist font
|
||||
layoutlist_font = fonts.monospace,
|
||||
-- The selected layout title font
|
||||
layoutlist_font_selected = fonts.monospace,
|
||||
-- The default number of master windows
|
||||
master_count = 1,
|
||||
-- Hide the border on maximized clients
|
||||
maximized_hide_border = true,
|
||||
-- Honor the screen padding when maximizing
|
||||
maximized_honor_padding = false,
|
||||
-- The default focused item background color
|
||||
menu_bg_focus = colors.base,
|
||||
-- The default background color
|
||||
menu_bg_normal = colors.base,
|
||||
-- The menu item border color
|
||||
menu_border_color = colors.base,
|
||||
-- The menu item border width
|
||||
menu_border_width = 1,
|
||||
-- The default focused item foreground (text) color
|
||||
menu_fg_focus = colors.text,
|
||||
-- The default foreground (text) color
|
||||
menu_fg_normal = colors.text,
|
||||
-- The menu text font
|
||||
menu_font = fonts.normal,
|
||||
-- Menubar selected item background color
|
||||
menubar_bg_focus = colors.overlay0,
|
||||
-- Menubar normal background color
|
||||
menubar_bg_normal = colors.base,
|
||||
-- Menubar border color
|
||||
menubar_border_color = colors.base,
|
||||
-- Menubar selected item text color
|
||||
menubar_fg_focus = colors.text,
|
||||
-- Menubar normal text color
|
||||
menubar_fg_normal = colors.text,
|
||||
-- Menubar font
|
||||
menubar_font = fonts.normal,
|
||||
-- The background color for normal actions
|
||||
notification_action_bg_normal = colors.base,
|
||||
-- The background color for selected actions
|
||||
notification_action_bg_selected = colors.overlay0,
|
||||
-- The background image for normal actions
|
||||
notification_action_bgimage_normal = colors.mantle,
|
||||
-- The background image for selected actions
|
||||
notification_action_bgimage_selected = colors.overlay0,
|
||||
-- The foreground color for normal actions
|
||||
notification_action_fg_normal = colors.text,
|
||||
-- The foreground color for selected actions
|
||||
notification_action_fg_selected = colors.lavender,
|
||||
-- Notifications background color
|
||||
notification_bg = colors.crust,
|
||||
-- The background color for normal notifications
|
||||
notification_bg_normal = colors.crust,
|
||||
-- The background color for selected notifications
|
||||
notification_bg_selected = colors.surface2,
|
||||
-- Notifications border color
|
||||
notification_border_color = colors.poggers,
|
||||
-- Notifications border width
|
||||
notification_border_width = 2,
|
||||
-- The foreground color for normal notifications
|
||||
notification_fg_normal = colors.overlay0,
|
||||
-- The foreground color for selected notifications
|
||||
notification_fg_selected = colors.overlay2,
|
||||
-- Notifications font
|
||||
notification_font = fonts.normal,
|
||||
-- The maximum notification position
|
||||
notification_position = "bottom_right",
|
||||
-- The client opacity for the normal floating clients
|
||||
opacity_floating_normal = 0.95,
|
||||
-- The progressbar background color
|
||||
progressbar_bg = colors.mantle,
|
||||
-- The progressbar foreground color
|
||||
progressbar_fg = colors.poggers,
|
||||
-- The prompt background color
|
||||
prompt_bg = colors.mantle,
|
||||
-- The prompt cursor background color
|
||||
prompt_bg_cursor = colors.text,
|
||||
-- The prompt foreground color
|
||||
prompt_fg = colors.text,
|
||||
-- The prompt cursor foreground color
|
||||
prompt_fg_cursor = colors.text,
|
||||
-- The prompt text font
|
||||
prompt_font = fonts.monspace,
|
||||
-- The separator's color
|
||||
separator_color = colors.mantle,
|
||||
-- The systray icon spacing
|
||||
systray_icon_spacing = 12,
|
||||
-- The maximum number of rows for systray icons
|
||||
systray_max_rows = 1,
|
||||
-- The tag list empty elements background color
|
||||
taglist_bg_empty = colors.mantle,
|
||||
-- The tag list main background color
|
||||
taglist_bg_focus = colors.mantle,
|
||||
-- The tag list occupied elements background color
|
||||
taglist_bg_occupied = colors.mantle,
|
||||
-- The tag list urgent elements background color
|
||||
taglist_bg_urgent = colors.mantle,
|
||||
-- The tag list volatile elements background color
|
||||
taglist_bg_volatile = colors.mantle,
|
||||
-- Do not display the tag icons, even if they are set
|
||||
taglist_disable_icon = true,
|
||||
-- The tag list empty elements foreground (text) color
|
||||
taglist_fg_empty = colors.mantle,
|
||||
-- The tag list main foreground (text) color
|
||||
taglist_fg_focus = colors.lavender,
|
||||
-- The tag list occupied elements foreground (text) color
|
||||
taglist_fg_occupied = colors.surface1,
|
||||
-- The tag list urgent elements foreground (text) color
|
||||
taglist_fg_urgent = colors.red,
|
||||
-- The tag list volatile elements foreground (text) color
|
||||
taglist_fg_volatile = colors.yellow,
|
||||
-- The taglist font
|
||||
taglist_font = fonts.monospace,
|
||||
-- The elements shape border color
|
||||
taglist_shape_border_color = colors.mantle,
|
||||
-- The empty elements shape border color
|
||||
taglist_shape_border_color_empty = colors.mantle,
|
||||
-- The selected elements shape border color
|
||||
taglist_shape_border_color_focus = colors.mantle,
|
||||
-- The urgents elements shape border color
|
||||
taglist_shape_border_color_urgent = colors.mantle,
|
||||
-- The volatile elements shape border color
|
||||
taglist_shape_border_color_volatile = colors.mantle,
|
||||
-- The shape elements border width
|
||||
taglist_shape_border_width = 0,
|
||||
-- The shape used for the empty elements border width
|
||||
taglist_shape_border_width_empty = 0,
|
||||
-- The shape used for the selected elements border width
|
||||
taglist_shape_border_width_focus = 0,
|
||||
-- The shape used for the urgent elements border width
|
||||
taglist_shape_border_width_urgent = 0,
|
||||
-- The shape used for the volatile elements border width
|
||||
taglist_shape_border_width_volatile = 0,
|
||||
-- The space between the taglist elements
|
||||
taglist_spacing = dpi(1),
|
||||
-- The focused client background color
|
||||
tasklist_bg_focus = colors.mantle,
|
||||
-- The minimized clients background color
|
||||
tasklist_bg_minimize = colors.surface0,
|
||||
-- The default background color
|
||||
tasklist_bg_normal = colors.mantle,
|
||||
-- The urgent clients background color
|
||||
tasklist_bg_urgent = colors.red,
|
||||
-- Disable the tasklist client icons
|
||||
tasklist_disable_icon = colors.red,
|
||||
-- Disable the tasklist client titles
|
||||
tasklist_disable_task_name = false,
|
||||
-- The focused client foreground (text) color
|
||||
tasklist_fg_focus = colors.text,
|
||||
-- The minimized clients foreground (text) color
|
||||
tasklist_fg_minimize = colors.text,
|
||||
-- The default foreground (text) color
|
||||
tasklist_fg_normal = colors.text,
|
||||
-- The urgent clients foreground (text) color
|
||||
tasklist_fg_urgent = colors.text,
|
||||
-- The tasklist font
|
||||
tasklist_font = colors.normal,
|
||||
-- The focused client title alignment
|
||||
tasklist_font_focus = colors.normal,
|
||||
-- The minimized clients font
|
||||
tasklist_font_minimized = colors.normal,
|
||||
-- The urgent clients font
|
||||
tasklist_font_urgent = colors.normal,
|
||||
-- The titlebar background color
|
||||
titlebar_bg = colors.base,
|
||||
-- The focused titlebar background color
|
||||
titlebar_bg_focus = colors.base,
|
||||
-- The titlebar background color
|
||||
titlebar_bg_normal = colors.base,
|
||||
-- The urgent titlebar background color
|
||||
titlebar_bg_urgent = colors.base,
|
||||
-- The titlebar foreground (text) color
|
||||
titlebar_fg = colors.text,
|
||||
-- The focused titlebar foreground (text) color
|
||||
titlebar_fg_focus = colors.text,
|
||||
-- The titlebar foreground (text) color
|
||||
titlebar_fg_normal = colors.text,
|
||||
-- The urgent titlebar foreground (text) color
|
||||
titlebar_fg_urgent = colors.red,
|
||||
-- The default gap
|
||||
useless_gap = dpi(8),
|
||||
-- The default wallpaper background color
|
||||
wallpaper_bg = colors.base,
|
||||
-- The default wallpaper foreground color
|
||||
wallpaper_fg = colors.base,
|
||||
-- The wibar's background color
|
||||
wibar_bg = colors.mantle,
|
||||
-- The wibar border color
|
||||
wibar_border_color = colors.mantle,
|
||||
-- The wibar border width
|
||||
wibar_border_width = 0,
|
||||
-- The wibar's foreground (text) color
|
||||
wibar_fg = colors.text,
|
||||
-- The wibar's height
|
||||
wibar_height = 20,
|
||||
-- If the wibar is to be on top of other windows
|
||||
wibar_ontop = false,
|
||||
}
|
||||
19
common/.config/awesome/core/wallpapers.lua
Normal file
19
common/.config/awesome/core/wallpapers.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local wallpapers = {
|
||||
"/home/benk/pictures/Wallpapers/waves_right_colored.png",
|
||||
}
|
||||
|
||||
for screen, wallpaper in ipairs(wallpapers) do
|
||||
awful.wallpaper({
|
||||
screen = screen,
|
||||
widget = {
|
||||
widget = wibox.container.tile,
|
||||
{
|
||||
widget = wibox.widget.imagebox,
|
||||
image = wallpaper,
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
1
common/.config/awesome/core/xrandr.lua
Normal file
1
common/.config/awesome/core/xrandr.lua
Normal file
@@ -0,0 +1 @@
|
||||
os.execute("autorandr -c")
|
||||
1
common/.config/awesome/plugins/nice
Submodule
1
common/.config/awesome/plugins/nice
Submodule
Submodule common/.config/awesome/plugins/nice added at 34862a301c
@@ -1,560 +1,54 @@
|
||||
-- awesome_mode: api-level=4:screen=on
|
||||
pcall(require, "luarocks.loader")
|
||||
|
||||
-- Standard awesome library
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
-- Widget and layout library
|
||||
local wibox = require("wibox")
|
||||
-- Theme handling library
|
||||
|
||||
-- Report potential errors
|
||||
require("core.error_report")
|
||||
|
||||
-- Setup monitors
|
||||
require("core.xrandr")
|
||||
|
||||
-- Initialize my own global namespace
|
||||
require("ben")
|
||||
|
||||
-- Load keymaps
|
||||
require("ben.keymaps")
|
||||
|
||||
-- layouts (tiling (in a tiling window manager))
|
||||
require("core.layouts")
|
||||
|
||||
-- anime waifus
|
||||
require("core.wallpapers")
|
||||
|
||||
-- theme (catppuccin (the best))
|
||||
local beautiful = require("beautiful")
|
||||
-- Notification library
|
||||
local naughty = require("naughty")
|
||||
-- Declarative object management
|
||||
local ruled = require("ruled")
|
||||
local menubar = require("menubar")
|
||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||
-- Enable hotkeys help widget for VIM and other apps
|
||||
-- when client with a matching name is opened:
|
||||
require("awful.hotkeys_popup.keys")
|
||||
beautiful.init(os.getenv("HOME") .. "/.config/awesome/core/theme.lua")
|
||||
|
||||
-- {{{ Error handling
|
||||
-- Check if awesome encountered an error during startup and fell back to
|
||||
-- another config (This code will only ever execute for the fallback config)
|
||||
naughty.connect_signal("request::display_error", function(message, startup)
|
||||
naughty.notification {
|
||||
urgency = "critical",
|
||||
title = "Oops, an error happened"..(startup and " during startup!" or "!"),
|
||||
message = message
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
-- bars
|
||||
require("core.bars")
|
||||
|
||||
-- {{{ Variable definitions
|
||||
-- Themes define colours, icons, font and wallpapers.
|
||||
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
|
||||
-- window rulez
|
||||
require("core.rules")
|
||||
|
||||
-- This is used later as the default terminal and editor to run.
|
||||
terminal = "wezterm"
|
||||
editor = os.getenv("EDITOR") or "vim"
|
||||
editor_cmd = terminal .. " -e " .. editor
|
||||
-- noties
|
||||
require("core.notifications")
|
||||
|
||||
-- Default modkey.
|
||||
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
||||
-- If you do not like this or do not have such a key,
|
||||
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||
modkey = "Mod4"
|
||||
-- }}}
|
||||
-- autostart
|
||||
require("alphakeks.autostart")
|
||||
|
||||
-- {{{ Menu
|
||||
-- Create a launcher widget and a main menu
|
||||
myawesomemenu = {
|
||||
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
|
||||
{ "manual", terminal .. " -e man awesome" },
|
||||
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||
{ "restart", awesome.restart },
|
||||
{ "quit", function() awesome.quit() end },
|
||||
}
|
||||
|
||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||
{ "open terminal", terminal }
|
||||
}
|
||||
})
|
||||
|
||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||
menu = mymainmenu })
|
||||
|
||||
-- Menubar configuration
|
||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||
-- }}}
|
||||
|
||||
-- {{{ Tag layout
|
||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||
tag.connect_signal("request::default_layouts", function()
|
||||
awful.layout.append_default_layouts({
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.tile.left,
|
||||
awful.layout.suit.tile.bottom,
|
||||
awful.layout.suit.tile.top,
|
||||
awful.layout.suit.fair,
|
||||
awful.layout.suit.fair.horizontal,
|
||||
awful.layout.suit.spiral,
|
||||
awful.layout.suit.spiral.dwindle,
|
||||
awful.layout.suit.max,
|
||||
awful.layout.suit.max.fullscreen,
|
||||
awful.layout.suit.magnifier,
|
||||
awful.layout.suit.corner.nw,
|
||||
})
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Wallpaper
|
||||
screen.connect_signal("request::wallpaper", function(s)
|
||||
awful.wallpaper {
|
||||
screen = s,
|
||||
widget = {
|
||||
{
|
||||
image = beautiful.wallpaper,
|
||||
upscale = true,
|
||||
downscale = true,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = "center",
|
||||
halign = "center",
|
||||
tiled = false,
|
||||
widget = wibox.container.tile,
|
||||
}
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Wibar
|
||||
|
||||
-- Keyboard map indicator and switcher
|
||||
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.textclock()
|
||||
|
||||
screen.connect_signal("request::desktop_decoration", function(s)
|
||||
-- Each screen has its own tag table.
|
||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
|
||||
|
||||
-- Create a promptbox for each screen
|
||||
s.mypromptbox = awful.widget.prompt()
|
||||
|
||||
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||
-- We need one layoutbox per screen.
|
||||
s.mylayoutbox = awful.widget.layoutbox {
|
||||
screen = s,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc( 1) end),
|
||||
}
|
||||
}
|
||||
|
||||
-- Create a taglist widget
|
||||
s.mytaglist = awful.widget.taglist {
|
||||
screen = s,
|
||||
filter = awful.widget.taglist.filter.all,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function(t) t:view_only() end),
|
||||
awful.button({ modkey }, 1, function(t)
|
||||
if client.focus then
|
||||
client.focus:move_to_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||
awful.button({ modkey }, 3, function(t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
|
||||
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
|
||||
}
|
||||
}
|
||||
|
||||
-- Create a tasklist widget
|
||||
s.mytasklist = awful.widget.tasklist {
|
||||
screen = s,
|
||||
filter = awful.widget.tasklist.filter.currenttags,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function (c)
|
||||
c:activate { context = "tasklist", action = "toggle_minimization" }
|
||||
end),
|
||||
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
|
||||
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
|
||||
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
|
||||
}
|
||||
}
|
||||
|
||||
-- Create the wibox
|
||||
s.mywibox = awful.wibar {
|
||||
position = "top",
|
||||
screen = s,
|
||||
widget = {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
{ -- Left widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
mylauncher,
|
||||
s.mytaglist,
|
||||
s.mypromptbox,
|
||||
},
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
mykeyboardlayout,
|
||||
wibox.widget.systray(),
|
||||
mytextclock,
|
||||
s.mylayoutbox,
|
||||
},
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
-- {{{ Mouse bindings
|
||||
awful.mouse.append_global_mousebindings({
|
||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||
awful.button({ }, 4, awful.tag.viewprev),
|
||||
awful.button({ }, 5, awful.tag.viewnext),
|
||||
-- fancy titlebars
|
||||
local nice = require("plugins.nice")
|
||||
nice({
|
||||
titlebar_color = Ben.colors.crust,
|
||||
titlebar_height = 24,
|
||||
button_size = 14,
|
||||
mb_resize = nice.MB_MIDDLE,
|
||||
mb_contextmenu = nice.MB_RIGHT,
|
||||
titlebar_items = {
|
||||
left = {},
|
||||
middle = "title",
|
||||
right = { "maximize", "close" },
|
||||
},
|
||||
maximize_color = Ben.colors.green,
|
||||
close_color = Ben.colors.red,
|
||||
})
|
||||
-- }}}
|
||||
|
||||
-- {{{ Key bindings
|
||||
|
||||
-- General Awesome keys
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||
{description="show help", group="awesome"}),
|
||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||
{description = "show main menu", group = "awesome"}),
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||
{description = "reload awesome", group = "awesome"}),
|
||||
awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||
{description = "quit awesome", group = "awesome"}),
|
||||
awful.key({ modkey }, "x",
|
||||
function ()
|
||||
awful.prompt.run {
|
||||
prompt = "Run Lua code: ",
|
||||
textbox = awful.screen.focused().mypromptbox.widget,
|
||||
exe_callback = awful.util.eval,
|
||||
history_path = awful.util.get_cache_dir() .. "/history_eval"
|
||||
}
|
||||
end,
|
||||
{description = "lua execute prompt", group = "awesome"}),
|
||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||
{description = "open a terminal", group = "launcher"}),
|
||||
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||
{description = "run prompt", group = "launcher"}),
|
||||
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||
{description = "show the menubar", group = "launcher"}),
|
||||
})
|
||||
|
||||
-- Tags related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
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"}),
|
||||
})
|
||||
|
||||
-- Focus related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, }, "j",
|
||||
function ()
|
||||
awful.client.focus.byidx( 1)
|
||||
end,
|
||||
{description = "focus next by index", group = "client"}
|
||||
),
|
||||
awful.key({ modkey, }, "k",
|
||||
function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
end,
|
||||
{description = "focus previous by index", group = "client"}
|
||||
),
|
||||
awful.key({ modkey, }, "Tab",
|
||||
function ()
|
||||
awful.client.focus.history.previous()
|
||||
if client.focus then
|
||||
client.focus:raise()
|
||||
end
|
||||
end,
|
||||
{description = "go back", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||
{description = "focus the next screen", group = "screen"}),
|
||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||
{description = "focus the previous screen", group = "screen"}),
|
||||
awful.key({ modkey, "Control" }, "n",
|
||||
function ()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
c:activate { raise = true, context = "key.unminimize" }
|
||||
end
|
||||
end,
|
||||
{description = "restore minimized", group = "client"}),
|
||||
})
|
||||
|
||||
-- Layout related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||
{description = "swap with next client by index", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||
{description = "swap with previous client by index", group = "client"}),
|
||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||
{description = "jump to urgent client", group = "client"}),
|
||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
|
||||
{description = "increase master width factor", group = "layout"}),
|
||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
|
||||
{description = "decrease master width factor", group = "layout"}),
|
||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||
{description = "increase the number of master clients", group = "layout"}),
|
||||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||
{description = "decrease the number of master clients", group = "layout"}),
|
||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||
{description = "increase the number of columns", group = "layout"}),
|
||||
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"}),
|
||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||
{description = "select previous", group = "layout"}),
|
||||
})
|
||||
|
||||
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key {
|
||||
modifiers = { modkey },
|
||||
keygroup = "numrow",
|
||||
description = "only view tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[index]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Control" },
|
||||
keygroup = "numrow",
|
||||
description = "toggle tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[index]
|
||||
if tag then
|
||||
awful.tag.viewtoggle(tag)
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Shift" },
|
||||
keygroup = "numrow",
|
||||
description = "move focused client to tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[index]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Control", "Shift" },
|
||||
keygroup = "numrow",
|
||||
description = "toggle focused client on tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[index]
|
||||
if tag then
|
||||
client.focus:toggle_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey },
|
||||
keygroup = "numpad",
|
||||
description = "select layout directly",
|
||||
group = "layout",
|
||||
on_press = function (index)
|
||||
local t = awful.screen.focused().selected_tag
|
||||
if t then
|
||||
t.layout = t.layouts[index] or t.layout
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
client.connect_signal("request::default_mousebindings", function()
|
||||
awful.mouse.append_client_mousebindings({
|
||||
awful.button({ }, 1, function (c)
|
||||
c:activate { context = "mouse_click" }
|
||||
end),
|
||||
awful.button({ modkey }, 1, function (c)
|
||||
c:activate { context = "mouse_click", action = "mouse_move" }
|
||||
end),
|
||||
awful.button({ modkey }, 3, function (c)
|
||||
c:activate { context = "mouse_click", action = "mouse_resize"}
|
||||
end),
|
||||
})
|
||||
end)
|
||||
|
||||
client.connect_signal("request::default_keybindings", function()
|
||||
awful.keyboard.append_client_keybindings({
|
||||
awful.key({ modkey, }, "f",
|
||||
function (c)
|
||||
c.fullscreen = not c.fullscreen
|
||||
c:raise()
|
||||
end,
|
||||
{description = "toggle fullscreen", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
|
||||
{description = "close", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||
{description = "toggle floating", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||
{description = "move to master", group = "client"}),
|
||||
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||
{description = "move to screen", group = "client"}),
|
||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||
{description = "toggle keep on top", group = "client"}),
|
||||
awful.key({ modkey, }, "n",
|
||||
function (c)
|
||||
-- The client currently has the input focus, so it cannot be
|
||||
-- minimized, since minimized clients can't have the focus.
|
||||
c.minimized = true
|
||||
end ,
|
||||
{description = "minimize", group = "client"}),
|
||||
awful.key({ modkey, }, "m",
|
||||
function (c)
|
||||
c.maximized = not c.maximized
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "m",
|
||||
function (c)
|
||||
c.maximized_vertical = not c.maximized_vertical
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize vertically", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "m",
|
||||
function (c)
|
||||
c.maximized_horizontal = not c.maximized_horizontal
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize horizontally", group = "client"}),
|
||||
})
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
-- {{{ Rules
|
||||
-- Rules to apply to new clients.
|
||||
ruled.client.connect_signal("request::rules", function()
|
||||
-- All clients will match this rule.
|
||||
ruled.client.append_rule {
|
||||
id = "global",
|
||||
rule = { },
|
||||
properties = {
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
}
|
||||
}
|
||||
|
||||
-- Floating clients.
|
||||
ruled.client.append_rule {
|
||||
id = "floating",
|
||||
rule_any = {
|
||||
instance = { "copyq", "pinentry" },
|
||||
class = {
|
||||
"Arandr", "Blueman-manager", "Gpick", "Kruler", "Sxiv",
|
||||
"Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer"
|
||||
},
|
||||
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
||||
-- and the name shown there might not match defined rules here.
|
||||
name = {
|
||||
"Event Tester", -- xev.
|
||||
},
|
||||
role = {
|
||||
"AlarmWindow", -- Thunderbird's calendar.
|
||||
"ConfigManager", -- Thunderbird's about:config.
|
||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||
}
|
||||
},
|
||||
properties = { floating = true }
|
||||
}
|
||||
|
||||
-- Add titlebars to normal clients and dialogs
|
||||
ruled.client.append_rule {
|
||||
id = "titlebars",
|
||||
rule_any = { type = { "normal", "dialog" } },
|
||||
properties = { titlebars_enabled = true }
|
||||
}
|
||||
|
||||
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||
-- ruled.client.append_rule {
|
||||
-- rule = { class = "Firefox" },
|
||||
-- properties = { screen = 1, tag = "2" }
|
||||
-- }
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Titlebars
|
||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
-- buttons for the titlebar
|
||||
local buttons = {
|
||||
awful.button({ }, 1, function()
|
||||
c:activate { context = "titlebar", action = "mouse_move" }
|
||||
end),
|
||||
awful.button({ }, 3, function()
|
||||
c:activate { context = "titlebar", action = "mouse_resize"}
|
||||
end),
|
||||
}
|
||||
|
||||
awful.titlebar(c).widget = {
|
||||
{ -- Left
|
||||
awful.titlebar.widget.iconwidget(c),
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{ -- Middle
|
||||
{ -- Title
|
||||
halign = "center",
|
||||
widget = awful.titlebar.widget.titlewidget(c)
|
||||
},
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.flex.horizontal
|
||||
},
|
||||
{ -- Right
|
||||
awful.titlebar.widget.floatingbutton (c),
|
||||
awful.titlebar.widget.maximizedbutton(c),
|
||||
awful.titlebar.widget.stickybutton (c),
|
||||
awful.titlebar.widget.ontopbutton (c),
|
||||
awful.titlebar.widget.closebutton (c),
|
||||
layout = wibox.layout.fixed.horizontal()
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Notifications
|
||||
|
||||
ruled.notification.connect_signal('request::rules', function()
|
||||
-- All notifications will match this rule.
|
||||
ruled.notification.append_rule {
|
||||
rule = { },
|
||||
properties = {
|
||||
screen = awful.screen.preferred,
|
||||
implicit_timeout = 5,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
naughty.connect_signal("request::display", function(n)
|
||||
naughty.layout.box { notification = n }
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
-- Enable sloppy focus, so that focus follows mouse.
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
c:activate { context = "mouse_enter", raise = false }
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user