bling/README.md

122 lines
4.3 KiB
Markdown
Raw Normal View History

2020-10-25 00:17:55 +02:00
# Bling - Utilities for the AwesomeWM
2020-10-27 21:46:29 +01:00
## Installation and configuration
2020-10-25 20:52:46 +01:00
- `git clone` this repo into your `~/.config/awesome` folder
- Put ``local bling = require("bling")`` somewhere in your ``rc.lua`` (remember to put it under ``beautiful.init...``)
2020-10-27 21:46:29 +01:00
### Available layouts and modules
##### Layouts
Choose layouts from the list below and add them to to your `awful.layouts` list in your `rc.lua`.
Everyone of them supports multiple master clients and master width factor making them as easyily useable as the default layouts.
2020-10-25 20:52:46 +01:00
```Lua
2020-10-27 21:46:29 +01:00
bling.layout.mstab
bling.layout.centered
bling.layout.vertical
bling.layout.horizontal
```
##### Window swallowing
To activate and deactivate window swallowing there are the following functions (deactivated on default):
```lua
bling.module.window_swallowing.start() -- activates window swallowing
bling.module.window_swallowing.stop() -- deactivates window swallowing
bling.module.window_swallowing.toggle() -- toggles window swallowing
2020-10-25 20:52:46 +01:00
```
2020-10-25 00:17:55 +02:00
2020-10-27 21:46:29 +01:00
##### Tiled Wallpaper
The function to set a tiled wallpaper can be called the follwing way (you don't need to set every option in the table of the last argument since there are reasonable defaults):
```lua
awful.screen.connect_for_each_screen(function(s) -- that way the wallpaper is applied to every screen
bling.module.tiled_wallpaper("x", s, { -- call the actual function ("x" is the string that will be tiled)
fg = "#ff0000", -- define the foreground color
bg = "#00ffff", -- define the background color
offset_y = 25, -- set a y offset
offset_x = 25, -- set a x offset
font = "Hack", -- set the font (without the size)
font_size = 14, -- set the font size
padding = 100, -- set padding (default is 100)
zickzack = true -- rectangular pattern or criss cross
})
end)
2020-10-25 20:52:46 +01:00
```
2020-10-27 21:46:29 +01:00
2020-10-28 23:56:01 +01:00
##### Flash Focus
There are two ways you can use this module. You can just enable it by calling the `enable()` function:
```lua
bling.module.flash_focus.enable()
```
This connects to the focus signal of a client, which means that the flash focus will activate however you focus the client.
The other way is to call the function itself like this: `bling.module.flash_focus.flashfocus(someclient)`. This allows you to just activate on certain keybinds:
```lua
awful.key({modkey}, "Up",
function()
awful.client.focus.bydirection("up")
bling.module.flash_focus.flashfocus(client.focus)
end, {description = "focus up", group = "client"})
```
2020-10-27 21:46:29 +01:00
### Theme variables
Put those variables in your ``theme.lua`` if you want to edit appearance
For the mstab layout:
```lua
mstab_tabbar_orientation -- set to "bottom" for tabbar at button
mstab_bar_height -- height of the tabbar
mstab_border_radius -- corners radius of the tabbar
mstab_font -- font of the tabbar
mstab_bg_focus -- background color of the focused client on the tabbar
mstab_fg_focus -- background color of the focused client on the tabbar
mstab_bg_normal -- foreground color of unfocused clients on the tabbar
mstab_fg_normal -- foreground color of unfocused clients on the tabbar
2020-10-25 20:52:46 +01:00
```
2020-10-25 00:17:55 +02:00
2020-10-27 21:46:29 +01:00
For window swallowing:
```lua
dont_swallow_classname_list -- list of client classnames that shouldn't be swallowed
-- default is {"firefox", "Gimp"}
dont_swallow_filter_activated -- whether the filter is activated or not
-- default is false.
-- Set it to true if you want to filter clients that should be swallowed
```
2020-10-28 23:56:01 +01:00
For flash focus:
```lua
flash_focus_start_opacity -- the starting opacity (default 0.6)
flash_focus_step -- the step of the animation (default 0.01)
```
2020-10-27 21:46:29 +01:00
## Preview
2020-10-25 00:17:55 +02:00
2020-10-25 20:52:46 +01:00
### Mstab (tabbed)
2020-10-27 21:46:29 +01:00
![](https://media.discordapp.net/attachments/716379882363551804/769870675250249808/shot_1025032923.png)
2020-10-25 20:52:46 +01:00
2020-10-27 21:46:29 +01:00
screenshot by [javacafe](https://github.com/JavaCafe01)
2020-10-25 20:52:46 +01:00
### Centered
2020-10-27 21:46:29 +01:00
![](https://media.discordapp.net/attachments/635625917623828520/768947400554446868/centered.png)
screenshot by [branwright](https://github.com/branwright1)
### Window swallowing
![](https://media.discordapp.net/attachments/635625813143978012/769180910683684864/20-10-23-14-40-32.gif)
2020-10-25 20:52:46 +01:00
2020-10-27 21:46:29 +01:00
gif by me :)
2020-10-25 20:52:46 +01:00
2020-10-27 21:46:29 +01:00
### Tiled Wallpaper
2020-10-28 23:56:01 +01:00
(not yet)
### Flash Focus
![](https://imgur.com/5txYrlV.gif)
2020-10-25 20:52:46 +01:00
2020-10-28 23:56:01 +01:00
gif by [javacafe](https://github.com/JavaCafe01)
2020-10-25 00:17:55 +02:00