feat: added rounded_rect for different radius

This commit is contained in:
Klesh Wong 2022-05-21 11:29:48 +08:00
parent b012af0c84
commit e73648904b

View File

@ -58,9 +58,12 @@ end
-- }}} -- }}}
-- Rounded corner -- Rounded corner
local function rrect(cr, w, h) local function rounded_rect(radius)
gears.shape.rounded_rect(cr, w, h, 8) return function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, radius)
end
end end
local rrect = rounded_rect(8)
-- {{{ Variable definitions -- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers. -- Themes define colours, icons, font and wallpapers.
@ -68,7 +71,7 @@ beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
beautiful.useless_gap = 5 beautiful.useless_gap = 5
beautiful.border_width = 3 beautiful.border_width = 3
beautiful.border_focus = "#5b97f7" beautiful.border_focus = "#5b97f7"
beautiful.wallpaper = "" beautiful.wallpaper = nil
beautiful.font_name = "agave Nerd Font Mono" beautiful.font_name = "agave Nerd Font Mono"
beautiful.font = "agave Nerd Font 12" beautiful.font = "agave Nerd Font 12"
beautiful.notification_width = 400 beautiful.notification_width = 400
@ -242,7 +245,8 @@ end)
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) -- 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)
beautiful.tasklist_shape = rrect beautiful.tasklist_shape = rounded_rect(3)
beautiful.taglist_shape = rounded_rect(3)
awful.screen.connect_for_each_screen(function(s) awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
set_wallpaper(s) set_wallpaper(s)
@ -842,7 +846,7 @@ end)
awful.spawn.with_shell("! /bin/pgrep nextcloud && nextcloud") awful.spawn.with_shell("! /bin/pgrep nextcloud && nextcloud")
awful.spawn.with_shell("ibus-daemon -drx") awful.spawn.with_shell("ibus-daemon -drx")
awful.spawn.with_shell("flameshot") awful.spawn.with_shell("flameshot")
awful.spawn.with_shell("blueman-applet") --awful.spawn.with_shell("blueman-applet")
awful.spawn.with_shell("nm-applet") awful.spawn.with_shell("nm-applet")
awful.spawn.with_shell("copyq") awful.spawn.with_shell("copyq")