Added for_each_screen module value

master
Mark 2022-11-05 08:08:15 -07:00
parent 765c4232a8
commit b70603504e
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
3 changed files with 29 additions and 31 deletions

View File

@ -1,16 +1,22 @@
# Awesome Window Manager config scripts # Mark's Awesomewm Config
## Setup
Copy config.lua.template into config.lua before using. Copy config.lua.template into config.lua before using.
## Modules
See the [modules](./modules/README.md) README.
## Dependencies ## Dependencies
Some features require extra tools. Tools each module requires are listed below. If a module is disabled, its tool is not needed. Applications required by `core` MUST be installed.
- Core: `fish`
- Backlight: `xbacklight`
- Battery: `upower`
- Ibus: `ibus`
- Launcher: `rofi`
- Lock: `i3lock, imagemagick, scrot` or `lightdm` (For `dm-tool`), depending on configuration.
- MPC: `mpc`
- Picom: `picom`
- Screenshot: `flameshot`, `tesseract (and data)`, `xclip`, `lpr`
- Volume: `pamixer`
- rofi
- fish
- upower, xbacklight
- flameshot, xclip, tesseract
- pamixer
- sox
- ibus
- redshift
- mpc

View File

@ -92,9 +92,15 @@ local function start()
-- Prepare screens -- Prepare screens
awful.screen.connect_for_each_screen( awful.screen.connect_for_each_screen(
function(s) function(s)
-- s: the screen this function is being called for
-- Create tag table
-- Run module screen initialization methods
for _, mod in pairs(modules) do
if (mod["for_each_screen"] ~= nil) then
mod["for_each_screen"](s)
end
end
-- Create tag table
s.tagger = tagger:new(s) s.tagger = tagger:new(s)

View File

@ -1,20 +1,3 @@
# Mark's Awesomewm Config
## Dependencies
Some features require extra tools. Tools each module requires are listed below. If a module is disabled, its tool is not needed. Applications required by `core` MUST be installed.
- Core: `fish`
- Backlight: `xbacklight`
- Battery: `upower`
- Ibus: `ibus`
- Launcher: `rofi`
- Lock: `i3lock, imagemagick, scrot` or `lightdm` (For `dm-tool`), depending on configuration.
- MPC: `mpc`
- Picom: `picom`
- Screenshot: `flameshot`, `tesseract (and data)`, `xclip`, `lpr`
- Volume: `pamixer`
## Modules ## Modules
Modules are parts of this configuration that can be disabled. Nearly all features in this config are defined by a module. Modules are parts of this configuration that can be disabled. Nearly all features in this config are defined by a module.
@ -29,8 +12,11 @@ Every directory in `modules/` is a module. Modules cannot be in subdirectories.
Each module directory MUST have an ``init.lua``, which returns a table. That table can contain anything, but a few keys are special: Each module directory MUST have an ``init.lua``, which returns a table. That table can contain anything, but a few keys are special:
``keybinds`` \ ``keybinds`` \
Defines keybinds the module provides. It is audomatically loaded *if* the module is enabled. \ Defines keybinds the module provides. It is automatically loaded *if* the module is enabled. \
This MUST be a table formed by ``awful.key()``. See `ibus` or `screenshot` for examples. This MUST be a table formed by ``awful.key()``. See `ibus` or `screenshot` for examples.
``init`` \ ``init`` \
Defines an init method. This is called once when awesome starts. Called once when awesome starts if defined. Takes no arguments.
``for_each_screen(s)`` \
Called for each screen at start if defined. Takes one argument, `s`, the screen.