Update docs (#120)

Formatted markdown and lua snippets, removed trailing spaces and made example keybinds compilant with default awesome config

Co-authored-by: Nooo37 <senpai.ackabar@gmail.com>
This commit is contained in:
Bran 2021-10-13 16:26:04 +01:00 committed by GitHub
parent 536009e58e
commit 19fa3a2d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 181 additions and 174 deletions

View File

@ -6,7 +6,7 @@ Everyone of them supports multiple master clients and master width factor making
The mstab layout uses the tab theme from the tabbed module. The mstab layout uses the tab theme from the tabbed module.
```Lua ```lua
bling.layout.mstab bling.layout.mstab
bling.layout.centered bling.layout.centered
bling.layout.vertical bling.layout.vertical
@ -16,36 +16,40 @@ bling.layout.deck
``` ```
### Theme Variables ### Theme Variables
```lua ```lua
-- mstab -- mstab
theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients
theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the
-- currently focused stack window (set it to true if you use -- currently focused stack window (set it to true if you use
-- transparent terminals. False if you use shadows on solid ones -- transparent terminals. False if you use shadows on solid ones
theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar
-- by default it will adjust based on your useless gaps. -- by default it will adjust based on your useless gaps.
-- If you want a custom value. Set it to the number of pixels (int) -- If you want a custom value. Set it to the number of pixels (int)
theme.mstab_border_radius = 0 -- border radius of the tabbar theme.mstab_border_radius = 0 -- border radius of the tabbar
theme.mstab_bar_height = 40 -- height of the tabbar theme.mstab_bar_height = 40 -- height of the tabbar
theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right)
theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern")
-- defaults to the tabbar_style so only change if you want a -- defaults to the tabbar_style so only change if you want a
-- different style for mstab and tabbed -- different style for mstab and tabbed
``` ```
### Previews ### Previews
#### Mstab (dynamic tabbing layout) #### Mstab (dynamic tabbing layout)
![](https://imgur.com/HZRgApE.png) ![](https://imgur.com/HZRgApE.png)
*screenshot by [javacafe](https://github.com/JavaCafe01)* *screenshot by [JavaCafe01](https://github.com/JavaCafe01)*
#### Centered #### Centered
![](https://media.discordapp.net/attachments/769673106842845194/780095998239834142/unknown.png) ![](https://media.discordapp.net/attachments/769673106842845194/780095998239834142/unknown.png)
*screenshot by [branwright](https://github.com/branwright1)* *screenshot by [HeavyRain266](https://github.com/HeavyRain266)*
#### Equal area #### Equal area
![](https://imgur.com/JCFFywv.png) ![](https://imgur.com/JCFFywv.png)
*screenshot by [bysmutheye](https://github.com/bysmutheye)* *screenshot by [bysmutheye](https://github.com/bysmutheye)*
@ -56,4 +60,5 @@ The left area shows the deck layout in action. In this screenshot it is used tog
![](https://cdn.discordapp.com/attachments/635625954219261982/877957824225894430/unknown.png) ![](https://cdn.discordapp.com/attachments/635625954219261982/877957824225894430/unknown.png)
*screenshot by [javacafe](https://github.com/JavaCafe01)* *screenshot by [JavaCafe01](https://github.com/JavaCafe01)*

View File

@ -22,8 +22,8 @@ awful.key({modkey}, "Up",
### Theme Variables ### Theme Variables
```lua ```lua
theme.flash_focus_start_opacity = 0.6 -- the starting opacity theme.flash_focus_start_opacity = 0.6 -- the starting opacity
theme.flash_focus_step = 0.01 -- the step of animation theme.flash_focus_step = 0.01 -- the step of animation
``` ```
### Preview ### Preview

View File

@ -18,7 +18,7 @@ To initalize a scratchpad you can do something like the following:
```lua ```lua
local bling = require("bling") local bling = require("bling")
local rubato = require("rubato") -- Totally optional, only required if you are using animations. local rubato = require("rubato") -- Totally optional, only required if you are using animations.
-- These are example rubato tables. You can use one for just y, just x, or both. -- These are example rubato tables. You can use one for just y, just x, or both.
-- The duration and easing is up to you. Please check out the rubato docs to learn more. -- The duration and easing is up to you. Please check out the rubato docs to learn more.
@ -28,7 +28,7 @@ local anim_y = rubato.timed {
easing = rubato.quadratic, easing = rubato.quadratic,
intro = 0.1, intro = 0.1,
duration = 0.3, duration = 0.3,
awestore_compat = true -- This option must be set to true. awestore_compat = true -- This option must be set to true.
} }
local anim_x = rubato.timed { local anim_x = rubato.timed {
@ -37,7 +37,7 @@ local anim_x = rubato.timed {
easing = rubato.quadratic, easing = rubato.quadratic,
intro = 0.1, intro = 0.1,
duration = 0.3, duration = 0.3,
awestore_compat = true -- This option must be set to true. awestore_compat = true -- This option must be set to true.
} }
local term_scratch = bling.module.scratchpad { local term_scratch = bling.module.scratchpad {
@ -49,7 +49,7 @@ local term_scratch = bling.module.scratchpad {
geometry = {x=360, y=90, height=900, width=1200}, -- The geometry in a floating state geometry = {x=360, y=90, height=900, width=1200}, -- The geometry in a floating state
reapply = true, -- Whether all those properties should be reapplied on every new opening of the scratchpad (MUST BE TRUE FOR ANIMATIONS) reapply = true, -- Whether all those properties should be reapplied on every new opening of the scratchpad (MUST BE TRUE FOR ANIMATIONS)
dont_focus_before_close = false, -- When set to true, the scratchpad will be closed by the toggle function regardless of whether its focused or not. When set to false, the toggle function will first bring the scratchpad into focus and only close it on a second call dont_focus_before_close = false, -- When set to true, the scratchpad will be closed by the toggle function regardless of whether its focused or not. When set to false, the toggle function will first bring the scratchpad into focus and only close it on a second call
rubato = {x = anim_x, y = anim_y} -- Optional. This is how you can pass in the rubato tables for animations. If you don't want animations, you can ignore this option. rubato = {x = anim_x, y = anim_y} -- Optional. This is how you can pass in the rubato tables for animations. If you don't want animations, you can ignore this option.
} }
``` ```

View File

@ -6,15 +6,15 @@ Can your window manager swallow? It probably can...
To activate and deactivate window swallowing here are the following functions. If you want to activate it, just call the `start` function once in your `rc.lua`. To activate and deactivate window swallowing here are the following functions. If you want to activate it, just call the `start` function once in your `rc.lua`.
```lua ```lua
bling.module.window_swallowing.start() -- activates window swallowing bling.module.window_swallowing.start() -- activates window swallowing
bling.module.window_swallowing.stop() -- deactivates window swallowing bling.module.window_swallowing.stop() -- deactivates window swallowing
bling.module.window_swallowing.toggle() -- toggles window swallowing bling.module.window_swallowing.toggle() -- toggles window swallowing
``` ```
### Theme Variables ### Theme Variables
```lua ```lua
theme.dont_swallow_classname_list = {"firefox", "Gimp"} -- list of class names that should not be swallowed theme.dont_swallow_classname_list = {"firefox", "Gimp"} -- list of class names that should not be swallowed
theme.dont_swallow_filter_activated = true -- whether the filter above should be active theme.dont_swallow_filter_activated = true -- whether the filter above should be active
``` ```
### Preview ### Preview

View File

@ -6,10 +6,10 @@ Tabbed implements a tab container. There are also different themes for the tabs.
You should bind these functions to keys in order to use the tabbed module effectively: You should bind these functions to keys in order to use the tabbed module effectively:
```lua ```lua
bling.module.tabbed.pick() -- picks a client with your cursor to add to the tabbing group bling.module.tabbed.pick() -- picks a client with your cursor to add to the tabbing group
bling.module.tabbed.pop() -- removes the focused client from the tabbing group bling.module.tabbed.pop() -- removes the focused client from the tabbing group
bling.module.tabbed.iter() -- iterates through the currently focused tabbing group bling.module.tabbed.iter() -- iterates through the currently focused tabbing group
bling.module.tabbed.pick_with_dmenu() -- picks a client with a dmenu application (defaults to rofi, other options can be set with a string parameter like "dmenu") bling.module.tabbed.pick_with_dmenu() -- picks a client with a dmenu application (defaults to rofi, other options can be set with a string parameter like "dmenu")
bling.module.tabbed.pick_by_direction(dir) -- picks a client based on direction ("up", "down", "left" or "right") bling.module.tabbed.pick_by_direction(dir) -- picks a client based on direction ("up", "down", "left" or "right")
``` ```
@ -17,25 +17,25 @@ bling.module.tabbed.pick_by_direction(dir) -- picks a client based on direction
```lua ```lua
-- For tabbed only -- For tabbed only
theme.tabbed_spawn_in_tab = false -- whether a new client should spawn into the focused tabbing container theme.tabbed_spawn_in_tab = false -- whether a new client should spawn into the focused tabbing container
-- For tabbar in general -- For tabbar in general
theme.tabbar_ontop = false theme.tabbar_ontop = false
theme.tabbar_radius = 0 -- border radius of the tabbar theme.tabbar_radius = 0 -- border radius of the tabbar
theme.tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") theme.tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern")
theme.tabbar_font = "Sans 11" -- font of the tabbar theme.tabbar_font = "Sans 11" -- font of the tabbar
theme.tabbar_size = 40 -- size of the tabbar theme.tabbar_size = 40 -- size of the tabbar
theme.tabbar_position = "top" -- position of the tabbar theme.tabbar_position = "top" -- position of the tabbar
theme.tabbar_bg_normal = "#000000" -- background color of the focused client on the tabbar theme.tabbar_bg_normal = "#000000" -- background color of the focused client on the tabbar
theme.tabbar_fg_normal = "#ffffff" -- foreground color of the focused client on the tabbar theme.tabbar_fg_normal = "#ffffff" -- foreground color of the focused client on the tabbar
theme.tabbar_bg_focus = "#1A2026" -- background color of unfocused clients on the tabbar theme.tabbar_bg_focus = "#1A2026" -- background color of unfocused clients on the tabbar
theme.tabbar_fg_focus = "#ff0000" -- foreground color of unfocused clients on the tabbar theme.tabbar_fg_focus = "#ff0000" -- foreground color of unfocused clients on the tabbar
theme.tabbar_disable = false -- disable the tab bar entirely theme.tabbar_disable = false -- disable the tab bar entirely
-- the following variables are currently only for the "modern" tabbar style -- the following variables are currently only for the "modern" tabbar style
theme.tabbar_color_close = "#f9929b" -- chnges the color of the close button theme.tabbar_color_close = "#f9929b" -- chnges the color of the close button
theme.tabbar_color_min = "#fbdf90" -- chnges the color of the minimize button theme.tabbar_color_min = "#fbdf90" -- chnges the color of the minimize button
theme.tabbar_color_float = "#ccaced" -- chnges the color of the float button theme.tabbar_color_float = "#ccaced" -- chnges the color of the float button
``` ```
### Preview ### Preview
@ -44,19 +44,19 @@ Modern theme:
<img src="https://imgur.com/omowmIQ.png" width="600"/> <img src="https://imgur.com/omowmIQ.png" width="600"/>
*screenshot by [javacafe](https://github.com/JavaCafe01)* *screenshot by [JavaCafe01](https://github.com/JavaCafe01)*
### Signals ### Signals
The tabbed module emits a few signals for the purpose of integration, The tabbed module emits a few signals for the purpose of integration,
```lua ```lua
-- bling::tabbed::update -- triggered whenever a tabbed object is updated -- bling::tabbed::update -- triggered whenever a tabbed object is updated
-- tabobj -- the object that caused the update -- tabobj -- the object that caused the update
-- bling::tabbed::client_added -- triggered whenever a new client is added to a tab group -- bling::tabbed::client_added -- triggered whenever a new client is added to a tab group
-- tabobj -- the object that the client was added to -- tabobj -- the object that the client was added to
-- client -- the client that added -- client -- the client that added
-- bling::tabbed::client_removed -- triggered whenever a client is removed from a tab group -- bling::tabbed::client_removed -- triggered whenever a client is removed from a tab group
-- tabobj -- the object that the client was removed from -- tabobj -- the object that the client was removed from
-- client -- the client that was removed -- client -- the client that was removed
-- bling::tabbed::changed_focus -- triggered whenever a tab group's focus is changed -- bling::tabbed::changed_focus -- triggered whenever a tab group's focus is changed
-- tabobj -- the modified tab group -- tabobj -- the modified tab group
``` ```

View File

@ -4,16 +4,16 @@
The function to set an automatically created tiled wallpaper can be called the following way (you don't need to set every option in the table): The function to set an automatically created tiled wallpaper can be called the following way (you don't need to set every option in the table):
```lua ```lua
awful.screen.connect_for_each_screen(function(s) -- that way the wallpaper is applied to every screen 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) bling.module.tiled_wallpaper("x", s, { -- call the actual function ("x" is the string that will be tiled)
fg = "#ff0000", -- define the foreground color fg = "#ff0000", -- define the foreground color
bg = "#00ffff", -- define the background color bg = "#00ffff", -- define the background color
offset_y = 25, -- set a y offset offset_y = 25, -- set a y offset
offset_x = 25, -- set a x offset offset_x = 25, -- set a x offset
font = "Hack", -- set the font (without the size) font = "Hack", -- set the font (without the size)
font_size = 14, -- set the font size font_size = 14, -- set the font size
padding = 100, -- set padding (default is 100) padding = 100, -- set padding (default is 100)
zickzack = true -- rectangular pattern or criss cross zickzack = true -- rectangular pattern or criss cross
}) })
end) end)
``` ```
@ -23,3 +23,4 @@ end)
![](https://media.discordapp.net/attachments/702548913999314964/773887721294135296/tiled-wallpapers.png?width=1920&height=1080) ![](https://media.discordapp.net/attachments/702548913999314964/773887721294135296/tiled-wallpapers.png?width=1920&height=1080)
*screenshots by [Nooo37](https://github.com/Nooo37)* *screenshots by [Nooo37](https://github.com/Nooo37)*

View File

@ -18,7 +18,7 @@ bling.module.wallpaper.setup {
bling.module.wallpaper.setup { bling.module.wallpaper.setup {
set_function = bling.module.wallpaper.setters.random, set_function = bling.module.wallpaper.setters.random,
wallpaper = {"/path/to/a/folder", "/path/to/another/folder"}, wallpaper = {"/path/to/a/folder", "/path/to/another/folder"},
change_timer = 631, -- prime numbers are better for timers change_timer = 631, -- prime numbers are better for timers
position = "fit", position = "fit",
background = "#424242" background = "#424242"
} }
@ -99,14 +99,14 @@ Here are the defaults:
```lua ```lua
-- Default parameters -- Default parameters
bling.module.wallpaper.setup { bling.module.wallpaper.setup {
screen = nil, -- the screen to apply the wallpaper, as seen in gears.wallpaper functions screen = nil, -- the screen to apply the wallpaper, as seen in gears.wallpaper functions
change_timer = nil, -- the timer in seconds. If set, call the set_function every change_timer seconds change_timer = nil, -- the timer in seconds. If set, call the set_function every change_timer seconds
set_function = nil, -- the setter function set_function = nil, -- the setter function
-- parameters used by bling.module.wallpaper.prepare_list -- parameters used by bling.module.wallpaper.prepare_list
wallpaper = nil, -- the wallpaper object, see simple or simple_schedule documentation wallpaper = nil, -- the wallpaper object, see simple or simple_schedule documentation
image_formats = {"jpg", "jpeg", "png", "bmp"}, -- when searching in folder, consider these files only image_formats = {"jpg", "jpeg", "png", "bmp"}, -- when searching in folder, consider these files only
recursive = true, -- when searching in folder, search also in subfolders recursive = true, -- when searching in folder, search also in subfolders
-- parameters used by bling.module.wallpaper.apply -- parameters used by bling.module.wallpaper.apply
position = nil, -- use a function of gears.wallpaper when applicable ("centered", "fit", "maximized", "tiled") position = nil, -- use a function of gears.wallpaper when applicable ("centered", "fit", "maximized", "tiled")
@ -116,8 +116,8 @@ bling.module.wallpaper.setup {
scale = 1, -- see gears.wallpaper.centered scale = 1, -- see gears.wallpaper.centered
-- parameters that only apply to bling.module.wallpaper.setter.awesome (as a setter or as a wallpaper function) -- parameters that only apply to bling.module.wallpaper.setter.awesome (as a setter or as a wallpaper function)
colors = { -- see beautiful.theme_assets.wallpaper colors = { -- see beautiful.theme_assets.wallpaper
bg = beautiful.bg_color, -- the actual default is this color but darkened or lightned bg = beautiful.bg_color, -- the actual default is this color but darkened or lightned
fg = beautiful.fg_color, fg = beautiful.fg_color,
alt_fg = beautiful.fg_focus alt_fg = beautiful.fg_focus
} }

View File

@ -24,20 +24,20 @@ To disable: `bling.signal.playerctl.disable()`
Here are the signals available: Here are the signals available:
```lua ```lua
-- bling::playerctl::status -- first line is the signal -- bling::playerctl::status -- first line is the signal
-- playing (boolean) -- indented lines are function parameters -- playing (boolean) -- indented lines are function parameters
-- player_name (string) -- player_name (string)
-- bling::playerctl::title_artist_album -- bling::playerctl::title_artist_album
-- title (string) -- title (string)
-- artist (string) -- artist (string)
-- album_path (string) -- album_path (string)
-- player_name (string) -- player_name (string)
-- bling::playerctl::position -- bling::playerctl::position
-- interval_sec (number) -- interval_sec (number)
-- length_sec (number) -- length_sec (number)
-- player_name (string) -- player_name (string)
-- bling::playerctl::no_players -- bling::playerctl::no_players
-- (No parameters) -- (No parameters)
``` ```
### Example Implementation ### Example Implementation
@ -122,8 +122,8 @@ By default, this module will output signals from the most recently active player
These options can be set through a call to `bling.signal.playerctl.enable()` or these theme variables: These options can be set through a call to `bling.signal.playerctl.enable()` or these theme variables:
```lua ```lua
theme.playerctl_backend = "playerctl_cli" theme.playerctl_backend = "playerctl_cli"
theme.playerctl_ignore = {} theme.playerctl_ignore = {}
theme.playerctl_player = {} theme.playerctl_player = {}
theme.playerctl_update_on_activity = true theme.playerctl_update_on_activity = true
theme.playerctl_position_update_interval = 1 theme.playerctl_position_update_interval = 1
``` ```
@ -140,12 +140,12 @@ bling.signal.playerctl.enable {
-- OR in your theme file: -- OR in your theme file:
-- Same config as above but with theme variables -- Same config as above but with theme variables
theme.playerctl_backend = "playerctl_lib" theme.playerctl_backend = "playerctl_lib"
theme.playerctl_ignore = "firefox" theme.playerctl_ignore = "firefox"
theme.playerctl_player = {"ncspot", "%any"} theme.playerctl_player = {"ncspot", "%any"}
-- Prioritize vlc over all other players and deprioritize spotify -- Prioritize vlc over all other players and deprioritize spotify
theme.playerctl_backend = "playerctl_lib" theme.playerctl_backend = "playerctl_lib"
theme.playerctl_player = {"vlc", "%any", "spotify"} theme.playerctl_player = {"vlc", "%any", "spotify"}
-- Disable priority of most recently active players -- Disable priority of most recently active players
theme.playerctl_backend = "playerctl_lib" theme.playerctl_backend = "playerctl_lib"

View File

@ -16,11 +16,11 @@ To use the task list indicator:
```lua ```lua
bling.widget.tabbed_misc.titlebar_indicator(client, { bling.widget.tabbed_misc.titlebar_indicator(client, {
layout_spacing = dpi(5), -- Set spacing in between items layout_spacing = dpi(5), -- Set spacing in between items
icon_size = dpi(24), icon_size = dpi(24), -- Set icon size
icon_margin = 0, icon_margin = 0, -- Set icon margin
bg_color_focus = "#282828", -- Color for the focused items bg_color_focus = "#282828", -- Color for the focused items
bg_color = "#1d2021", -- Color for normal / unfocused items bg_color = "#1d2021", -- Color for normal / unfocused items
icon_shape = gears.shape.circle -- Set icon shape, icon_shape = gears.shape.circle -- Set icon shape,
}) })
``` ```
@ -72,32 +72,32 @@ The module exports a function that can be added to your tasklist as a `update_ca
### Usage ### Usage
```lua ```lua
awful.widget.tasklist({ awful.widget.tasklist({
screen = s, screen = s,
filter = awful.widget.tasklist.filter.currenttags, filter = awful.widget.tasklist.filter.currenttags,
layout = { layout = {
spacing = dpi(10), spacing = dpi(10),
layout = wibox.layout.fixed.vertical, layout = wibox.layout.fixed.vertical,
}, },
style = { style = {
bg_normal = "#00000000", bg_normal = "#00000000",
}, },
widget_template = { widget_template = {
{ {
{ {
widget = wibox.widget.imagebox, widget = wibox.widget.imagebox,
id = "icon_role", id = "icon_role",
align = "center", align = "center",
valign = "center", valign = "center",
}, },
width = dpi(24), width = dpi(24),
height = dpi(24), height = dpi(24),
widget = wibox.container.constraint, widget = wibox.container.constraint,
}, },
widget = wibox.container.background, -- IT MUST BE A CONTAINER WIDGET AS THAT IS WHAT THE FUNCTION EXPECTS widget = wibox.container.background, -- IT MUST BE A CONTAINER WIDGET AS THAT IS WHAT THE FUNCTION EXPECTS
update_callback = require("bling.widget.tabbed_misc").custom_tasklist, update_callback = require("bling.widget.tabbed_misc").custom_tasklist,
id = "background_role", id = "background_role",
}, },
}) })
``` ```
If you need to do something else, it can be used like so If you need to do something else, it can be used like so

View File

@ -24,19 +24,19 @@ bling.widget.tag_preview.enable {
top = 30, top = 30,
left = 30 left = 30
} }
}) })
end end
} }
``` ```
Here are the signals available: Here are the signals available:
```lua ```lua
-- bling::tag_preview::update -- first line is the signal -- bling::tag_preview::update -- first line is the signal
-- t (tag) -- indented lines are function parameters -- t (tag) -- indented lines are function parameters
-- bling::tag_preview::visibility -- bling::tag_preview::visibility
-- s (screen) -- s (screen)
-- v (boolean) -- v (boolean)
``` ```
By default, the widget is not visible. You must implement when it will update and when it will show. By default, the widget is not visible. You must implement when it will update and when it will show.
@ -100,7 +100,7 @@ s.mytaglist = awful.widget.taglist {
create_callback = function(self, c3, index, objects) --luacheck: no unused args create_callback = function(self, c3, index, objects) --luacheck: no unused args
self:get_children_by_id('index_role')[1].markup = '<b> '..index..' </b>' self:get_children_by_id('index_role')[1].markup = '<b> '..index..' </b>'
self:connect_signal('mouse::enter', function() self:connect_signal('mouse::enter', function()
-- BLING: Only show widget when there are clients in the tag -- BLING: Only show widget when there are clients in the tag
if #c3:clients() > 0 then if #c3:clients() > 0 then
-- BLING: Update the widget with the new tag -- BLING: Update the widget with the new tag
@ -118,8 +118,8 @@ s.mytaglist = awful.widget.taglist {
self:connect_signal('mouse::leave', function() self:connect_signal('mouse::leave', function()
-- BLING: Turn the widget off -- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false) awesome.emit_signal("bling::tag_preview::visibility", s, false
if self.has_backup then self.bg = self.backup end if self.has_backup then self.bg = self.backup end
end) end)
end, end,
@ -132,17 +132,18 @@ s.mytaglist = awful.widget.taglist {
``` ```
### Theme Variables ### Theme Variables
```lua ```lua
theme.tag_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) theme.tag_preview_widget_border_radius = 0 -- Border radius of the widget (With AA)
theme.tag_preview_client_border_radius = 0 -- Border radius of each client in the widget (With AA) theme.tag_preview_client_border_radius = 0 -- Border radius of each client in the widget (With AA)
theme.tag_preview_client_opacity = 0.5 -- Opacity of each client theme.tag_preview_client_opacity = 0.5 -- Opacity of each client
theme.tag_preview_client_bg = "#000000" -- The bg color of each client theme.tag_preview_client_bg = "#000000" -- The bg color of each client
theme.tag_preview_client_border_color = "#ffffff" -- The border color of each client theme.tag_preview_client_border_color = "#ffffff" -- The border color of each client
theme.tag_preview_client_border_width = 3 -- The border width of each client theme.tag_preview_client_border_width = 3 -- The border width of each client
theme.tag_preview_widget_bg = "#000000" -- The bg color of the widget theme.tag_preview_widget_bg = "#000000" -- The bg color of the widget
theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget
theme.tag_preview_widget_border_width = 3 -- The border width of the widget theme.tag_preview_widget_border_width = 3 -- The border width of the widget
theme.tag_preview_widget_margin = 0 -- The margin of the widget theme.tag_preview_widget_margin = 0 -- The margin of the widget
``` ```
NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom). NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom).

View File

@ -12,40 +12,40 @@ To enable:
```lua ```lua
bling.widget.task_preview.enable { bling.widget.task_preview.enable {
x = 20, -- The x-coord of the popup x = 20, -- The x-coord of the popup
y = 20, -- The y-coord of the popup y = 20, -- The y-coord of the popup
height = 200, -- The height of the popup height = 200, -- The height of the popup
width = 200, -- The width of the popup width = 200, -- The width of the popup
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
awful.placement.bottom(c, { awful.placement.bottom(c, {
margins = { margins = {
bottom = 30 bottom = 30
} }
}) })
end end
} }
``` ```
To allow for more customization, there is also a `widget_structure` property (as seen in some default awesome widgets) which is optional. An example is as follows - To allow for more customization, there is also a `widget_structure` property (as seen in some default awesome widgets) which is optional. An example is as follows -
```lua ```lua
bling.widget.task_preview.enable { bling.widget.task_preview.enable {
x = 20, -- The x-coord of the popup x = 20, -- The x-coord of the popup
y = 20, -- The y-coord of the popup y = 20, -- The y-coord of the popup
height = 200, -- The height of the popup height = 200, -- The height of the popup
width = 200, -- The width of the popup width = 200, -- The width of the popup
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
awful.placement.bottom(c, { awful.placement.bottom(c, {
margins = { margins = {
bottom = 30 bottom = 30
} }
}) })
end, end,
-- Your widget will automatically conform to the given size due to a constraint container. -- Your widget will automatically conform to the given size due to a constraint container.
widget_structure = { widget_structure = {
{ {
{ {
{ {
id = 'icon_role', id = 'icon_role',
widget = awful.widget.clienticon, -- The client icon widget = awful.widget.clienticon, -- The client icon
}, },
{ {
@ -66,16 +66,16 @@ bling.widget.task_preview.enable {
}, },
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
} }
``` ```
Here are the signals available: Here are the signals available:
```lua ```lua
-- bling::task_preview::visibility -- first line is the signal -- bling::task_preview::visibility -- first line is the signal
-- s (screen) -- indented lines are function parameters -- s (screen) -- indented lines are function parameters
-- v (boolean) -- v (boolean)
-- c (client) -- c (client)
``` ```
By default, the widget is not visible. You must implement when it will update and when it will show. By default, the widget is not visible. You must implement when it will update and when it will show.
@ -124,7 +124,7 @@ s.mytasklist = awful.widget.tasklist {
nil, nil,
create_callback = function(self, c, index, objects) --luacheck: no unused args create_callback = function(self, c, index, objects) --luacheck: no unused args
self:get_children_by_id('clienticon')[1].client = c self:get_children_by_id('clienticon')[1].client = c
-- BLING: Toggle the popup on hover and disable it off hover -- BLING: Toggle the popup on hover and disable it off hover
self:connect_signal('mouse::enter', function() self:connect_signal('mouse::enter', function()
awesome.emit_signal("bling::task_preview::visibility", s, awesome.emit_signal("bling::task_preview::visibility", s,
@ -142,11 +142,11 @@ s.mytasklist = awful.widget.tasklist {
### Theme Variables ### Theme Variables
```lua ```lua
theme.task_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) theme.task_preview_widget_border_radius = 0 -- Border radius of the widget (With AA)
theme.task_preview_widget_bg = "#000000" -- The bg color of the widget theme.task_preview_widget_bg = "#000000" -- The bg color of the widget
theme.task_preview_widget_border_color = "#ffffff" -- The border color of the widget theme.task_preview_widget_border_color = "#ffffff" -- The border color of the widget
theme.task_preview_widget_border_width = 3 -- The border width of the widget theme.task_preview_widget_border_width = 3 -- The border width of the widget
theme.task_preview_widget_margin = 0 -- The margin of the widget theme.task_preview_widget_margin = 0 -- The margin of the widget
``` ```
NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom). NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom).

View File

@ -16,14 +16,14 @@ bling.widget.window_switcher.enable {
-- keybindings (the examples provided are also the default if kept unset) -- keybindings (the examples provided are also the default if kept unset)
hide_window_switcher_key = "Escape", -- The key on which to close the popup hide_window_switcher_key = "Escape", -- The key on which to close the popup
minimize_key = "n", -- The key on which to minimize the selected client minimize_key = "n", -- The key on which to minimize the selected client
unminimize_key = "N", -- The key on which to unminimize all clients unminimize_key = "N", -- The key on which to unminimize all clients
kill_client_key = "q", -- The key on which to close the selected client kill_client_key = "q", -- The key on which to close the selected client
cycle_key = "Tab", -- The key on which to cycle through all clients cycle_key = "Tab", -- The key on which to cycle through all clients
previous_key = "Left", -- The key on which to select the previous client previous_key = "Left", -- The key on which to select the previous client
next_key = "Right", -- The key on which to select the next client next_key = "Right", -- The key on which to select the next client
vim_previous_key = "h", -- Alternative key on which to select the previous client vim_previous_key = "h", -- Alternative key on which to select the previous client
vim_next_key = "l", -- Alternative key on which to select the next client vim_next_key = "l", -- Alternative key on which to select the next client
} }
``` ```
@ -35,7 +35,7 @@ awesome.emit_signal("bling::window_switcher::turn_on")
For example: For example:
```lua ```lua
awful.key({altkey}, "Tab", function() awful.key({Mod1}, "Tab", function()
awesome.emit_signal("bling::window_switcher::turn_on") awesome.emit_signal("bling::window_switcher::turn_on")
end, {description = "Window Switcher", group = "client"}) end, {description = "Window Switcher", group = "bling"})
``` ```