format everything

This commit is contained in:
Adam 2024-01-09 20:38:24 -05:00
parent ebb48694cf
commit fa63fd37ce
26 changed files with 784 additions and 1116 deletions

View file

@ -0,0 +1,6 @@
column_width = 160
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
call_parentheses = "None"

View file

@ -3,54 +3,34 @@
globalkeys = Gears.table.join(
globalkeys,
Awful.key(
{ Modkey, "Shift" }, "e", awesome.quit,
{
description = "quit awesome",
group = "awesome"
}
),
Awful.key({ Modkey, 'Shift' }, 'e', awesome.quit, {
description = 'quit awesome',
group = 'awesome',
}),
Awful.key(
{ Modkey, "Shift" }, "p",
function()
Awful.spawn.easy_async_with_shell("doorsbg",
function()
Awful.key({ Modkey, 'Shift' }, 'p', function()
Awful.spawn.easy_async_with_shell('doorsbg', function()
awesome.restart()
end)
end,
{
description = "set new random wallpaper/color scheme",
group = "awesome"
}
),
end, {
description = 'set new random wallpaper/color scheme',
group = 'awesome',
}),
Awful.key(
{ Modkey, }, "BackSpace",
awesome.restart,
{
description = "reload awesome",
group = "awesome"
}
),
Awful.key({ Modkey }, 'BackSpace', awesome.restart, {
description = 'reload awesome',
group = 'awesome',
}),
Awful.key(
{ Modkey, }, "F1",
Hotkeys_popup.show_help,
{
description = "show help",
group = "awesome"
}
),
Awful.key({ Modkey }, 'F1', Hotkeys_popup.show_help, {
description = 'show help',
group = 'awesome',
}),
Awful.key(
{}, "Print",
function()
os.execute("maimpick")
end,
{
description = "run screenshot script",
group = "awesome"
}
)
Awful.key({}, 'Print', function()
os.execute 'maimpick'
end, {
description = 'run screenshot script',
group = 'awesome',
})
)

View file

@ -6,218 +6,146 @@ inc = 50
clientkeys = Gears.table.join(
clientkeys,
Awful.key(
{ Modkey, }, "f",
function(c)
Awful.key({ Modkey }, 'f', function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{
description = "toggle fullscreen",
group = "client"
}
),
end, {
description = 'toggle fullscreen',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1" }, "h",
function(c)
Awful.key({ Modkey, 'Mod1' }, 'h', function(c)
c:relative_move(-inc, 0, 0, 0)
end,
{
description = "move floating left",
group = "client"
}
),
end, {
description = 'move floating left',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1", "Shift" }, "h",
function(c)
Awful.key({ Modkey, 'Mod1', 'Shift' }, 'h', function(c)
c:relative_move(-inc, 0, inc, 0)
end,
{
description = "resize floating horizontal +",
group = "client"
}
),
end, {
description = 'resize floating horizontal +',
group = 'client',
}),
Awful.key(
{ Modkey, }, "j",
function()
Awful.key({ Modkey }, 'j', function()
Awful.client.focus.byidx(1)
end,
{
description = "focus next by index",
group = "client"
}
),
end, {
description = 'focus next by index',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1" }, "j",
function(c)
Awful.key({ Modkey, 'Mod1' }, 'j', function(c)
c:relative_move(0, inc, 0, 0)
end,
{
description = "move floating down",
group = "client"
}
),
end, {
description = 'move floating down',
group = 'client',
}),
Awful.key(
{ Modkey, "Shift" }, "j",
function()
Awful.key({ Modkey, 'Shift' }, 'j', function()
Awful.client.swap.byidx(1)
end,
{
description = "swap next by index",
group = "client"
}
),
end, {
description = 'swap next by index',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1", "Shift" }, "j",
function(c)
Awful.key({ Modkey, 'Mod1', 'Shift' }, 'j', function(c)
c:relative_move(0, inc, 0, -inc)
end,
{
description = "resize floating vertical -",
group = "client"
}
),
end, {
description = 'resize floating vertical -',
group = 'client',
}),
Awful.key(
{ Modkey, }, "k",
function()
Awful.key({ Modkey }, 'k', function()
Awful.client.focus.byidx(-1)
end,
{
description = "focus previous by index",
group = "client"
}
),
end, {
description = 'focus previous by index',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1" }, "k",
function(c)
Awful.key({ Modkey, 'Mod1' }, 'k', function(c)
c:relative_move(0, -inc, 0, 0)
end,
{
description = "move floating up",
group = "client"
}
),
end, {
description = 'move floating up',
group = 'client',
}),
Awful.key(
{ Modkey, "Shift" }, "k",
function()
Awful.key({ Modkey, 'Shift' }, 'k', function()
Awful.client.swap.byidx(-1)
end,
{
description = "swap previous by index",
group = "client"
}
),
end, {
description = 'swap previous by index',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1", "Shift" }, "k",
function(c)
Awful.key({ Modkey, 'Mod1', 'Shift' }, 'k', function(c)
c:relative_move(0, -inc, 0, inc)
end,
{
description = "resize floating vertical +",
group = "client"
}
),
end, {
description = 'resize floating vertical +',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1" }, "l",
function(c)
Awful.key({ Modkey, 'Mod1' }, 'l', function(c)
c:relative_move(inc, 0, 0, 0)
end,
{
description = "move floating right",
group = "client"
}
),
end, {
description = 'move floating right',
group = 'client',
}),
Awful.key(
{ Modkey, "Mod1", "Shift" }, "l",
function(c)
Awful.key({ Modkey, 'Mod1', 'Shift' }, 'l', function(c)
c:relative_move(inc, 0, -inc, 0)
end,
{
description = "resize floating horizontal -",
group = "client"
}
),
end, {
description = 'resize floating horizontal -',
group = 'client',
}),
Awful.key(
{ Modkey, "Shift" }, "n",
function(c)
Awful.key({ Modkey, 'Shift' }, 'n', function(c)
c.maximized = not c.maximized
c:raise()
end,
{
description = "(un)maximize",
group = "client"
}
),
end, {
description = '(un)maximize',
group = 'client',
}),
Awful.key(
{ Modkey, }, "o",
function(c) c:move_to_screen() end,
{
description = "move focused to next screen",
group = "client"
}
),
Awful.key({ Modkey }, 'o', function(c)
c:move_to_screen()
end, {
description = 'move focused to next screen',
group = 'client',
}),
Awful.key(
{ Modkey, }, "q",
function(c) c:kill() end,
{
description = "close",
group = "client"
}
),
Awful.key({ Modkey }, 'q', function(c)
c:kill()
end, {
description = 'close',
group = 'client',
}),
Awful.key(
{ Modkey, }, "t",
function(c) c.ontop = not c.ontop end,
{
description = "toggle keep on top",
group = "client"
}
),
Awful.key({ Modkey }, 't', function(c)
c.ontop = not c.ontop
end, {
description = 'toggle keep on top',
group = 'client',
}),
Awful.key(
{ Modkey, "Shift" }, "Return",
function(c)
Awful.key({ Modkey, 'Shift' }, 'Return', function(c)
c:swap(Awful.client.getmaster())
end,
{
description = "move focused to master",
group = "client"
}
),
end, {
description = 'move focused to master',
group = 'client',
}),
Awful.key(
{ Modkey, }, "space",
Awful.client.floating.toggle,
{
description = "toggle floating",
group = "client"
}
),
Awful.key({ Modkey }, 'space', Awful.client.floating.toggle, {
description = 'toggle floating',
group = 'client',
}),
Awful.key(
{ Modkey, }, "Tab",
function()
Awful.key({ Modkey }, 'Tab', function()
Awful.client.focus.history.previous()
if client.focus then client.focus:raise() end
end,
{
description = "focus previous",
group = "client"
}
)
if client.focus then
client.focus:raise()
end
end, {
description = 'focus previous',
group = 'client',
})
)

View file

@ -1,12 +1,12 @@
-- Group by appearance in help menu (Modkey + F1)
require('binds.awesome')
require('binds.client')
require('binds.launcher')
require('binds.layout')
require('binds.media')
require('binds.mouse')
require('binds.screen')
require('binds.tag')
require 'binds.awesome'
require 'binds.client'
require 'binds.launcher'
require 'binds.layout'
require 'binds.media'
require 'binds.mouse'
require 'binds.screen'
require 'binds.tag'
-- Apply all above
root.keys(globalkeys)

View file

@ -3,128 +3,101 @@
globalkeys = Gears.table.join(
globalkeys,
Awful.key(
{ Modkey, }, "c",
function() Awful.spawn("caprine") end,
{
description = "open caprine",
group = "launcher"
}
),
Awful.key({ Modkey }, 'c', function()
Awful.spawn 'caprine'
end, {
description = 'open caprine',
group = 'launcher',
}),
Awful.key(
{ Modkey, "Shift" }, "c",
function() Awful.spawn("telegram-desktop") end,
{
description = "open telegram-desktop",
group = "launcher"
}
),
Awful.key({ Modkey, 'Shift' }, 'c', function()
Awful.spawn 'telegram-desktop'
end, {
description = 'open telegram-desktop',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "d",
function() Awful.spawn("discord") end,
{
description = "open discord",
group = "launcher"
}
),
Awful.key({ Modkey }, 'd', function()
Awful.spawn 'discord'
end, {
description = 'open discord',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "e",
function() Awful.spawn(Email) end,
{
description = "open editor",
group = "launcher"
}
),
Awful.key({ Modkey }, 'e', function()
Awful.spawn(Email)
end, {
description = 'open editor',
group = 'launcher',
}),
Awful.key(
{ Modkey, "Shift" }, "e",
function() Awful.spawn("thunderbird") end,
{
description = "open thunderbird",
group = "launcher"
}
),
Awful.key({ Modkey, 'Shift' }, 'e', function()
Awful.spawn 'thunderbird'
end, {
description = 'open thunderbird',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "g",
function() Awful.spawn("steam-native") end,
{
description = "open steam",
group = "launcher"
}
),
Awful.key({ Modkey }, 'g', function()
Awful.spawn 'steam-native'
end, {
description = 'open steam',
group = 'launcher',
}),
Awful.key(
{ Modkey, "Shift" }, "g",
function() Awful.spawn("lutris") end,
{
description = "open lutris",
group = "launcher"
}
),
Awful.key({ Modkey, 'Shift' }, 'g', function()
Awful.spawn 'lutris'
end, {
description = 'open lutris',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "i",
function() Awful.spawn("gimp") end,
{
description = "open gimp",
group = "launcher"
}
),
Awful.key({ Modkey }, 'i', function()
Awful.spawn 'gimp'
end, {
description = 'open gimp',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "m",
function() Awful.spawn(Music) end,
{
description = "open spotify",
group = "launcher"
}
),
Awful.key({ Modkey }, 'm', function()
Awful.spawn(Music)
end, {
description = 'open spotify',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "r",
function() Awful.screen.focused().mypromptbox:run() end,
{
description = "run prompt",
group = "launcher"
}
),
Awful.key({ Modkey }, 'r', function()
Awful.screen.focused().mypromptbox:run()
end, {
description = 'run prompt',
group = 'launcher',
}),
Awful.key({ Modkey, }, "v",
function() Awful.spawn("virt-manager") end,
{
description = "open virt-manager",
group = "launcher"
}
),
Awful.key({ Modkey }, 'v', function()
Awful.spawn 'virt-manager'
end, {
description = 'open virt-manager',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "w",
function() Awful.spawn(Browser) end,
{
description = "open browser",
group = "launcher"
}
),
Awful.key({ Modkey }, 'w', function()
Awful.spawn(Browser)
end, {
description = 'open browser',
group = 'launcher',
}),
Awful.key(
{ Modkey, "Shift" }, "w",
function() Awful.spawn(Browser2) end,
{
description = "open browser2",
group = "launcher"
}
),
Awful.key({ Modkey, 'Shift' }, 'w', function()
Awful.spawn(Browser2)
end, {
description = 'open browser2',
group = 'launcher',
}),
Awful.key(
{ Modkey, }, "Return",
function() Awful.spawn(Terminal) end,
{
description = "open a terminal",
group = "launcher"
}
)
Awful.key({ Modkey }, 'Return', function()
Awful.spawn(Terminal)
end, {
description = 'open a terminal',
group = 'launcher',
})
)

View file

@ -3,39 +3,31 @@
globalkeys = Gears.table.join(
globalkeys,
Awful.key(
{ Modkey, "Shift" }, "h",
function() Awful.tag.incmwfact(-0.05) end,
{
description = "resize split -",
group = "layout"
}
),
Awful.key({ Modkey, 'Shift' }, 'h', function()
Awful.tag.incmwfact(-0.05)
end, {
description = 'resize split -',
group = 'layout',
}),
Awful.key(
{ Modkey, "Shift" }, "l",
function() Awful.tag.incmwfact(0.05) end,
{
description = "resize split +",
group = "layout"
}
),
Awful.key({ Modkey, 'Shift' }, 'l', function()
Awful.tag.incmwfact(0.05)
end, {
description = 'resize split +',
group = 'layout',
}),
Awful.key(
{ Modkey, }, "[",
function() Awful.layout.inc(1) end,
{
description = "select next",
group = "layout"
}
),
Awful.key({ Modkey }, '[', function()
Awful.layout.inc(1)
end, {
description = 'select next',
group = 'layout',
}),
Awful.key(
{ Modkey, }, "]",
function() Awful.layout.inc(-1) end,
{
description = "select previous",
group = "layout"
}
)
Awful.key({ Modkey }, ']', function()
Awful.layout.inc(-1)
end, {
description = 'select previous',
group = 'layout',
})
)

View file

@ -4,91 +4,59 @@ globalkeys = Gears.table.join(
globalkeys,
-- Media
Awful.key(
{}, "XF86AudioLowerVolume",
function()
os.execute("pamixer -d 3")
end,
{
description = "lower volume",
group = "media"
}
),
Awful.key({}, 'XF86AudioLowerVolume', function()
os.execute 'pamixer -d 3'
end, {
description = 'lower volume',
group = 'media',
}),
Awful.key(
{}, "XF86AudioMicMute",
function()
os.execute("pactl set-source-mute @DEFAULT_SOURCE@ toggle")
end,
{
description = "mute mic",
group = "media"
}
),
Awful.key({}, 'XF86AudioMicMute', function()
os.execute 'pactl set-source-mute @DEFAULT_SOURCE@ toggle'
end, {
description = 'mute mic',
group = 'media',
}),
Awful.key(
{}, "XF86AudioMute",
function()
os.execute("pamixer -t")
end,
{
description = "mute audio",
group = "media"
}
),
Awful.key({}, 'XF86AudioMute', function()
os.execute 'pamixer -t'
end, {
description = 'mute audio',
group = 'media',
}),
Awful.key(
{}, "XF86AudioNext",
function()
os.execute("playerctl next")
end,
{
description = "next",
group = "media"
}
),
Awful.key({}, 'XF86AudioNext', function()
os.execute 'playerctl next'
end, {
description = 'next',
group = 'media',
}),
Awful.key(
{}, "XF86AudioPlay",
function()
os.execute("playerctl play-pause")
end,
{
description = "play/pause",
group = "media"
}
),
Awful.key({}, 'XF86AudioPlay', function()
os.execute 'playerctl play-pause'
end, {
description = 'play/pause',
group = 'media',
}),
Awful.key(
{}, "XF86AudioPrev",
function()
os.execute("playerctl previous")
end,
{
description = "previous",
group = "media"
}
),
Awful.key({}, 'XF86AudioPrev', function()
os.execute 'playerctl previous'
end, {
description = 'previous',
group = 'media',
}),
Awful.key(
{}, "XF86AudioRaiseVolume",
function()
os.execute("pamixer -i 3")
end,
{
description = "raise volume",
group = "media"
}
),
Awful.key({}, 'XF86AudioRaiseVolume', function()
os.execute 'pamixer -i 3'
end, {
description = 'raise volume',
group = 'media',
}),
Awful.key(
{}, "XF86AudioStop",
function()
os.execute("playerctl stop")
end,
{
description = "stop",
group = "media"
}
)
Awful.key({}, 'XF86AudioStop', function()
os.execute 'playerctl stop'
end, {
description = 'stop',
group = 'media',
})
)

View file

@ -1,51 +1,17 @@
-- Binds related to the mouse
-- root.buttons(
-- Gears.table.join(
-- Awful.button(
-- {}, 4,
-- Awful.tag.viewnext
-- ),
-- Awful.button(
-- {}, 5,
-- Awful.tag.viewprev
-- )
-- )
-- )
clientbuttons = Gears.table.join(
Awful.button(
{}, 1,
function(c)
c:emit_signal(
"request::activate",
"mouse_click",
{ raise = true }
)
end
),
Awful.button({}, 1, function(c)
c:emit_signal('request::activate', 'mouse_click', { raise = true })
end),
Awful.button(
{ Modkey }, 1,
function(c)
c:emit_signal(
"request::activate",
"mouse_click",
{ raise = true }
)
Awful.button({ Modkey }, 1, function(c)
c:emit_signal('request::activate', 'mouse_click', { raise = true })
Awful.mouse.client.move(c)
end
),
end),
Awful.button(
{ Modkey }, 3,
function(c)
c:emit_signal(
"request::activate",
"mouse_click",
{ raise = true }
)
Awful.button({ Modkey }, 3, function(c)
c:emit_signal('request::activate', 'mouse_click', { raise = true })
Awful.mouse.client.resize(c)
end
)
end)
)

View file

@ -3,21 +3,17 @@
globalkeys = Gears.table.join(
globalkeys,
Awful.key(
{ Modkey, }, "h",
function() Awful.screen.focus_relative(-1) end,
{
description = "focus previous screen",
group = "screen"
}
),
Awful.key({ Modkey }, 'h', function()
Awful.screen.focus_relative(-1)
end, {
description = 'focus previous screen',
group = 'screen',
}),
Awful.key(
{ Modkey, }, "l",
function() Awful.screen.focus_relative(1) end,
{
description = "focus next screen",
group = "screen"
}
)
Awful.key({ Modkey }, 'l', function()
Awful.screen.focus_relative(1)
end, {
description = 'focus next screen',
group = 'screen',
})
)

View file

@ -7,72 +7,53 @@ for i = 1, 9 do
globalkeys,
-- View tag only.
Awful.key(
{ Modkey }, "#" .. i + 9,
function()
Awful.key({ Modkey }, '#' .. i + 9, function()
local screen = Awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{
description = "view tag #" .. i,
group = "tag"
}
),
end, {
description = 'view tag #' .. i,
group = 'tag',
}),
-- Toggle tag display.
Awful.key(
{ Modkey, "Control" }, "#" .. i + 9,
function()
Awful.key({ Modkey, 'Control' }, '#' .. i + 9, function()
local screen = Awful.screen.focused()
local tag = screen.tags[i]
if tag then
Awful.tag.viewtoggle(tag)
end
end,
{
description = "toggle tag #" .. i,
group = "tag"
}
),
end, {
description = 'toggle tag #' .. i,
group = 'tag',
}),
-- Move client to tag.
Awful.key(
{ Modkey, "Shift" }, "#" .. i + 9,
function()
Awful.key({ Modkey, 'Shift' }, '#' .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{
description = "move focused client to tag #" .. i,
group = "tag"
}
),
end, {
description = 'move focused client to tag #' .. i,
group = 'tag',
}),
-- Toggle tag on focused client.
Awful.key(
{ Modkey, "Control", "Shift" }, "#" .. i + 9,
function()
Awful.key({ Modkey, 'Control', 'Shift' }, '#' .. i + 9, function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
{
description = "toggle focused client on tag #" .. i,
group = "tag"
}
)
end, {
description = 'toggle focused client on tag #' .. i,
group = 'tag',
})
)
end

View file

@ -1,21 +1,17 @@
-- Handle startup errors
if awesome.startup_errors then
Naughty.notify(
{
Naughty.notify {
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors
title = 'Oops, there were errors during startup!',
text = awesome.startup_errors,
}
)
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal(
"debug::error",
function(err)
awesome.connect_signal('debug::error', function(err)
-- Make sure we don't go into an endless error loop
if in_error then
return
@ -23,25 +19,22 @@ do
in_error = true
Naughty.notify(
{
Naughty.notify {
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err)
title = 'Oops, an error happened!',
text = tostring(err),
}
)
in_error = false
end
)
end)
end
require("awful.autofocus")
require("awful.hotkeys_popup.keys")
require 'awful.autofocus'
require 'awful.hotkeys_popup.keys'
Awful = require("awful")
Beautiful = require("beautiful")
Gears = require("gears")
Hotkeys_popup = require("awful.hotkeys_popup")
Menubar = require("menubar")
Naughty = require("naughty")
Wibox = require("wibox")
Awful = require 'awful'
Beautiful = require 'beautiful'
Gears = require 'gears'
Hotkeys_popup = require 'awful.hotkeys_popup'
Menubar = require 'menubar'
Naughty = require 'naughty'
Wibox = require 'wibox'

View file

@ -1,17 +1,17 @@
require('core')
require 'core'
-- Set up key remaps
os.execute('setxkbmap -option "caps:escape,altwin:menu_win,altwin:meta_win"')
os.execute 'setxkbmap -option "caps:escape,altwin:menu_win,altwin:meta_win"'
-- Some defaults
Browser = "firefox-developer-edition"
Browser2 = "chromium"
Editor = "nvim"
Email = "thunderbird"
Modkey = "Mod4"
Music = "spotify-launcher"
Terminal = "alacritty"
Beautiful.init(".config/awesome/theme.lua")
Browser = 'firefox-developer-edition'
Browser2 = 'chromium'
Editor = 'nvim'
Email = 'thunderbird'
Modkey = 'Mod4'
Music = 'spotify-launcher'
Terminal = 'alacritty'
Beautiful.init '.config/awesome/theme.lua'
-- Define layouts
Awful.layout.layouts = {
@ -25,16 +25,13 @@ Awful.layout.layouts = {
Menubar.utils.terminal = Terminal
-- Split up the rest for readability
require('binds') -- keyboard/mouse
require('rules') -- client specific rules
require('signals') -- client signals
require('wibar') -- bar/screen/wallpaper stuff
require 'binds' -- keyboard/mouse
require 'rules' -- client specific rules
require 'signals' -- client signals
require 'wibar' -- bar/screen/wallpaper stuff
-- Collect garbage to prevent memory leaks from widgets
Gears.timer.start_new(
10,
function()
collectgarbage("step", 20000)
Gears.timer.start_new(10, function()
collectgarbage('step', 20000)
return true
end
)
end)

View file

@ -10,48 +10,48 @@ Awful.rules.rules = {
keys = clientkeys,
buttons = clientbuttons,
screen = Awful.screen.preferred,
placement = Awful.placement.no_overlap + Awful.placement.no_offscreen
}
placement = Awful.placement.no_overlap + Awful.placement.no_offscreen,
},
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
'DTA', -- Firefox addon DownThemAll.
'copyq', -- Includes session name in class.
'pinentry',
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer" },
'Arandr',
'Blueman-manager',
'Gpick',
'Kruler',
'MessageWin', -- kalarm.
'Sxiv',
'Tor Browser', -- Needs a fixed window size to avoid fingerprinting by screen size.
'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.
'Event Tester', -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
'AlarmWindow', -- Thunderbird's calendar.
'ConfigManager', -- Thunderbird's about:config.
'pop-up', -- e.g. Google Chrome's (detached) Developer Tools.
},
properties = { floating = true }
},
properties = { floating = true },
},
-- Add titlebars to normal clients and dialogs
{
rule_any = { type = { "normal", "dialog" }
},
properties = { titlebars_enabled = false }
rule_any = { type = { 'normal', 'dialog' } },
properties = { titlebars_enabled = false },
},
}

View file

@ -1,60 +1,41 @@
client.connect_signal(
"manage",
function(c)
client.connect_signal('manage', function(c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
Awful.placement.no_offscreen(c)
end
end
)
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal(
"request::titlebars",
function(c)
client.connect_signal('request::titlebars', function(c)
-- buttons for the titlebar
local buttons = Gears.table.join(
Awful.button(
{}, 1,
function()
c:emit_signal(
"request::activate", "titlebar",
{ raise = true }
)
Awful.button({}, 1, function()
c:emit_signal('request::activate', 'titlebar', { raise = true })
Awful.mouse.client.move(c)
end
),
Awful.button(
{}, 3,
function()
c:emit_signal(
"request::activate", "titlebar",
{ raise = true }
)
end),
Awful.button({}, 3, function()
c:emit_signal('request::activate', 'titlebar', { raise = true })
Awful.mouse.client.resize(c)
end
)
end)
)
Awful.titlebar(c):setup {
{ -- Left
Awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = Wibox.layout.fixed.horizontal
layout = Wibox.layout.fixed.horizontal,
},
{ -- Middle
{ -- Title
align = "center",
widget = Awful.titlebar.widget.titlewidget(c)
align = 'center',
widget = Awful.titlebar.widget.titlewidget(c),
},
buttons = buttons,
layout = Wibox.layout.flex.horizontal
layout = Wibox.layout.flex.horizontal,
},
{ -- Right
Awful.titlebar.widget.floatingbutton(c),
@ -62,41 +43,21 @@ client.connect_signal(
Awful.titlebar.widget.stickybutton(c),
Awful.titlebar.widget.ontopbutton(c),
Awful.titlebar.widget.closebutton(c),
layout = Wibox.layout.fixed.horizontal()
layout = Wibox.layout.fixed.horizontal(),
},
layout = Wibox.layout.align.horizontal
layout = Wibox.layout.align.horizontal,
}
end
)
end)
-- Enable sloppy focus, so that focus follows mouse.
-- client.connect_signal(
-- "mouse::enter",
-- function(c)
-- c:emit_signal(
-- "request::activate", "mouse_enter",
-- { raise = false }
-- )
-- end
-- )
client.connect_signal(
"focus",
function(c)
client.connect_signal('focus', function(c)
c.border_color = Beautiful.border_focus
end
)
end)
client.connect_signal(
"unfocus",
function(c)
client.connect_signal('unfocus', function(c)
c.border_color = Beautiful.border_normal
end
)
end)
awesome.connect_signal(
'exit',
function(reason_restart)
awesome.connect_signal('exit', function(reason_restart)
if not reason_restart then
return
end
@ -108,12 +69,9 @@ awesome.connect_signal(
end
file:close()
end
)
end)
awesome.connect_signal(
'startup',
function()
awesome.connect_signal('startup', function()
local file = io.open('/tmp/awesomewm-last-selected-tags', 'r')
if not file then
return
@ -132,5 +90,4 @@ awesome.connect_signal(
end
file:close()
end
)
end)

View file

@ -1,13 +1,13 @@
local xresources = require("beautiful.xresources")
local xresources = require 'beautiful.xresources'
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local gfs = require 'gears.filesystem'
local theme = {}
local theme_assets = require("beautiful.theme_assets")
local theme_assets = require 'beautiful.theme_assets'
local themes_path = gfs.get_themes_dir()
local xrdb = xresources.get_current_theme()
theme.font = "monospace 11"
theme.font = 'monospace 11'
theme.wallpaper = '.cache/wal/bg'
theme.useless_gap = dpi(8)
theme.border_width = dpi(1)
@ -33,38 +33,30 @@ theme.fg_urgent = xrdb.foreground
-- Generate taglist squares:
local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size,
theme.fg_normal
)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.fg_normal)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size,
theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.fg_normal)
-- You can use your own layout icons like this:
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_cornerne = themes_path .. 'default/layouts/cornernew.png'
theme.layout_cornernw = themes_path .. 'default/layouts/cornernww.png'
theme.layout_cornerse = themes_path .. 'default/layouts/cornersew.png'
theme.layout_cornersw = themes_path .. 'default/layouts/cornersww.png'
theme.layout_dwindle = themes_path .. 'default/layouts/dwindlew.png'
theme.layout_fairh = themes_path .. 'default/layouts/fairhw.png'
theme.layout_fairv = themes_path .. 'default/layouts/fairvw.png'
theme.layout_floating = themes_path .. 'default/layouts/floatingw.png'
theme.layout_fullscreen = themes_path .. 'default/layouts/fullscreenw.png'
theme.layout_magnifier = themes_path .. 'default/layouts/magnifierw.png'
theme.layout_max = themes_path .. 'default/layouts/maxw.png'
theme.layout_spiral = themes_path .. 'default/layouts/spiralw.png'
theme.layout_tile = themes_path .. 'default/layouts/tilew.png'
theme.layout_tilebottom = themes_path .. 'default/layouts/tilebottomw.png'
theme.layout_tileleft = themes_path .. 'default/layouts/tileleftw.png'
theme.layout_tiletop = themes_path .. 'default/layouts/tiletopw.png'
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = nil
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View file

@ -1,13 +1,13 @@
require('wibar.widgets')
require('wibar.taglist')
require('wibar.tasklist')
require 'wibar.widgets'
require 'wibar.taglist'
require 'wibar.tasklist'
local function set_wallpaper(s)
-- Wallpaper
if Beautiful.wallpaper then
local wallpaper = Beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
if type(wallpaper) == 'function' then
wallpaper = wallpaper(s)
end
Gears.wallpaper.maximized(wallpaper, s, true)
@ -15,19 +15,11 @@ local function set_wallpaper(s)
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal(
"property::geometry",
set_wallpaper
)
screen.connect_signal('property::geometry', set_wallpaper)
Awful.screen.connect_for_each_screen(
function(s)
Awful.screen.connect_for_each_screen(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]
)
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()
@ -36,52 +28,39 @@ Awful.screen.connect_for_each_screen(
-- We need one layoutbox per screen.
s.mylayoutbox = Awful.widget.layoutbox(s)
s.mylayoutbox:buttons(
Gears.table.join(
Awful.button(
{}, 3,
function()
s.mylayoutbox:buttons(Gears.table.join(
Awful.button({}, 3, function()
Awful.layout.inc(-1)
end
),
end),
Awful.button(
{}, 4,
function()
Awful.button({}, 4, function()
Awful.layout.inc(1)
end
),
end),
Awful.button(
{}, 5,
function()
Awful.button({}, 5, function()
Awful.layout.inc(-1)
end
)
)
)
end)
))
-- Create a taglist widget
s.mytaglist = Awful.widget.taglist {
screen = s,
filter = Awful.widget.taglist.filter.all,
buttons = Taglist_buttons
buttons = Taglist_buttons,
}
-- Create a tasklist widget
s.mytasklist = Awful.widget.tasklist {
screen = s,
filter = Awful.widget.tasklist.filter.currenttags,
buttons = Tasklist_buttons
buttons = Tasklist_buttons,
}
-- Create the Wibox
s.myWibox = Awful.wibar(
{
position = "top",
screen = s
s.myWibox = Awful.wibar {
position = 'top',
screen = s,
}
)
-- Add widgets to the Wibox
s.myWibox:setup {
@ -102,16 +81,13 @@ Awful.screen.connect_for_each_screen(
layout = Wibox.layout.fixed.horizontal,
Cpu_widget(),
Ram_widget(),
Batteryarc_widget(
{ enable_battery_warning = false }
),
Batteryarc_widget { enable_battery_warning = false },
Wibox.widget.systray(),
Mytextclock,
s.mylayoutbox,
},
}
end
)
end)
--os.execute('nitrogen --set-zoom-fill $(awk {print} ~/.cache/wal/wal)')
os.execute('wal -Rsq')
os.execute 'wal -Rsq'

View file

@ -1,44 +1,27 @@
Taglist_buttons = Gears.table.join(
Awful.button(
{}, 1,
function(t)
Awful.button({}, 1, function(t)
t:view_only()
end
),
end),
Awful.button(
{ Modkey }, 1,
function(t)
Awful.button({ Modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end
),
end),
Awful.button(
{}, 3,
Awful.tag.viewtoggle
),
Awful.button({}, 3, Awful.tag.viewtoggle),
Awful.button(
{ Modkey }, 3,
function(t)
Awful.button({ Modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end
),
end),
Awful.button({}, 4,
function(t)
Awful.button({}, 4, function(t)
Awful.tag.viewnext(t.screen)
end
),
end),
Awful.button(
{}, 5,
function(t)
Awful.button({}, 5, function(t)
Awful.tag.viewprev(t.screen)
end
)
end)
)

View file

@ -1,37 +1,19 @@
Tasklist_buttons = Gears.table.join(
Awful.button(
{}, 1,
function(c)
Awful.button({}, 1, function(c)
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{ raise = true }
)
c:emit_signal('request::activate', 'tasklist', { raise = true })
end
end
),
end),
Awful.button(
{}, 3,
function()
Awful.menu.client_list(
{ theme = { width = 250 } }
)
end
),
Awful.button(
{}, 4,
function()
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()
end),
Awful.button({}, 5, function()
Awful.client.focus.byidx(-1)
end
)
end)
)

View file

@ -1,28 +1,22 @@
Calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")
Cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
Ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
Batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
Calendar_widget = require 'awesome-wm-widgets.calendar-widget.calendar'
Cpu_widget = require 'awesome-wm-widgets.cpu-widget.cpu-widget'
Ram_widget = require 'awesome-wm-widgets.ram-widget.ram-widget'
Batteryarc_widget = require 'awesome-wm-widgets.batteryarc-widget.batteryarc'
Mytextclock = Wibox.widget {
format = ' %a %b %d, %I:%M%P ',
widget = Wibox.widget.textclock
widget = Wibox.widget.textclock,
}
local cw = Calendar_widget(
{
local cw = Calendar_widget {
placement = 'top_right',
start_sunday = 'true',
previous_month_button = 4,
next_month_button = 5,
}
)
Mytextclock:connect_signal(
"button::press",
function(_, _, _, button)
Mytextclock:connect_signal('button::press', function(_, _, _, button)
if button == 1 then
cw.toggle()
end
end
)
end)

View file

@ -9,8 +9,8 @@ fi
# Tint screen at night
redshift -l \
$(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" \
| sed 's/.*"lat": \(-\?[0-9.]*\).*"lng": \(-\?[0-9.]*\).*/\1:\2/') &
"$(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" \
| sed 's/.*"lat": \(-\?[0-9.]*\).*"lng": \(-\?[0-9.]*\).*/\1:\2/')" &
# Password prompt popup
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

View file

@ -42,6 +42,7 @@ The meat and potatoes
AwesomeWM starter kit
Base:
- [acpi](https://wiki.archlinux.org/title/ACPI_modules) - For battery widget
- [alacritty](https://github.com/alacritty/alacritty) - Terminal emulator
- [arandr](https://christian.amsuess.com/tools/arandr) - To configure screens
@ -78,15 +79,15 @@ Eye candy, bloat, stuff that won't install on ARM devices
- [thunderbird](https://www.thunderbird.net) - Email client
- [wal-telegram-git](https://github.com/guillaumeboehm/wal-telegram) - Generate telegram-desktop theme
## Install
The install script clones this repo, installs a few dependencies and copies my configs to `~/.config/`. It then links `~/.xinitrc` and `~/.zprofile` to the ones copied from the repo, all while creating a **SINGLE** backup for any files that already exist. **NOTE:** Only **ONE** backup per file is saved to prevent piling up backups. It's only meant to catch small oversights and is very verbose. In other words, if you run the installer twice **IT WILL OVERWRITE THE BACKUP!**
The install script is only for Arch right now but I plan to include any distro with this software in their repos. At least the popular ones
1. Create a new user or backup your home directory if you're unsure about anything. If you have nothing to lose then go ahead and YOLO it. Just don't complain if something gets overwritten
1. ```sh <(curl -s https://doors.doordesk.net/setup)```
1. `sh <(curl -s https://doors.doordesk.net/setup)`
1. Choose your adventure
1. Log out and log back in
@ -100,11 +101,14 @@ Just run `startx` or start awesome from your display manager if you have one
## Post Install
### Colors
Some manual setup is required for theming if you want eye candy. My scripts should handle everything else
- Install [pywalfox](https://addons.mozilla.org/en-US/firefox/addon/pywalfox/) for firefox, then open it and click the "Fetch Pywal colors" button. You shouldn't have to touch it ever again
- Point telegram to [wal-telegram](https://github.com/guillaumeboehm/wal-telegram#set-the-color-palette)'s generated theme. It should handle itself from here
## Future:
- Polish nvim
- nnn setup
- posix compliance

View file

@ -3,23 +3,23 @@
set -e
# Copy configs and make a backup if it already exists
echo -e "\nInstalling Configs..."
printf "\nInstalling Configs..."
for file in configs/*
do
echo -e "\n$file..."
cp -rbv $file $HOME/.config/
printf "\n%s..." "$file"
cp -rbv "$file" "$HOME"/.config/
done
# Copy scripts and make a backup if it already exists
echo -e "\nInstalling Scripts..."
printf "\nInstalling Scripts..."
if [ ! -d "$HOME/.local/bin" ]; then
mkdir "$HOME/.local/bin"
fi
cp -rbv bin $HOME/.local
cp -rbv bin "$HOME"/.local
# Link shell files and make a backup if it already exists
echo -e "\nLinking shell..."
cp -sbv $HOME/.config/shell/profile ~/.zprofile
cp -sbv $HOME/.config/x11/xinitrc ~/.xinitrc
printf "\nLinking shell..."
cp -sbv "$HOME"/.config/shell/profile ~/.zprofile
cp -sbv "$HOME"/.config/x11/xinitrc ~/.xinitrc

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Minimal setup for Fedora
@ -28,4 +28,4 @@ if ! test -d .config/zsh/ohmyzsh; then
fi
# Set shell
sudo usermod -s /bin/zsh $USER
sudo usermod -s /bin/zsh "$USER"

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Minimal setup for Ubuntu
@ -37,4 +37,4 @@ if ! test -d .config/zsh/ohmyzsh; then
fi
# Set shell
sudo chsh -s /bin/zsh $USER
sudo chsh -s /bin/zsh "$USER"

View file

@ -1,4 +1,4 @@
#!/bin/sh
rm -rf $HOME/.local/share/nvim
rm -rf $HOME/.config/nvim
rm -rf "$HOME"/.local/share/nvim
rm -rf "$HOME"/.config/nvim