Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nullbyto/textlayout-widget
Text based layout widget for awesome WM
https://github.com/nullbyto/textlayout-widget
awesomewm awesomewm-widgets widget
Last synced: 2 days ago
JSON representation
Text based layout widget for awesome WM
- Host: GitHub
- URL: https://github.com/nullbyto/textlayout-widget
- Owner: nullbyto
- License: mit
- Created: 2023-01-26T20:24:46.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T20:32:29.000Z (almost 2 years ago)
- Last Synced: 2024-12-13T02:29:19.479Z (10 days ago)
- Topics: awesomewm, awesomewm-widgets, widget
- Language: Lua
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# textlayout-widget
A simple text based layout widget for awesome WM.## Example
``` lua
textlayout-widget {
tile = "[]="
}
```![Screenshot](screenshot.png "Screenshot")
The rightmost widget is the **tile** layout symbol (`[]=`) used in DWM.
## Installation
Copy widget file in your config files using:
### Git clone
``` bash
cd ~/.config/awesome
git clone https://github.com/nullbyto/textlayout-widget widgets/textlayout-widget
```### OR
### Download the file only
``` bash
cd ~/.config/awesome
curl https://github.com/nullbyto/textlayout-widget/textlayout-widget.lua --create-dirs -o widgets/textlayout-widget.lua
```## How to use
In your `rc.lua` or where ever your bar configurations are:
``` lua
local textlayout-widget = require("widgets.textlayout-widget")
-- Your widget can now be used
```Add it to your wibox (without customization):
``` lua
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout-widget {},
},
}
```If you want customization, you can just add a specific layout name as argument to the constructor:
``` lua
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout-widget {
tile = "hello",
floating = "i float",
},
},
}
```**alternatively** you can do that in a variable:
``` lua
local textlayout-widget = require("widgets.textlayout-widget")
-- Your widget can now be used
local textlayout = textlayout-widget {
tile = "hello",
floating = "i float",
}
```and then down here, you just pass the variable:
``` lua
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout,
},
}
```### Default layout names set
``` lua
tile = "[]=",
fairv = "==",
max = "[M]",
floating = "><>",
dwindle = "[\\\\]",
spiral = "[@]",
```### List of default layout names to customize
Reference: https://awesomewm.org/doc/api/libraries/awful.layout.html
``` text
cornernw
cornerne
cornersw
cornerse
fairh
fairv
floating
magnifier
max
fullscreen
spiral
dwindle
tile
tiletop
tilebottom
tileleft
```#### Note:
- Any layout not set as default **nor** manually customized by the user will just use the **name** of the layout from the above list.
- Tested only on Awesome 4.3 (probably works on 4.0+)