diff --git a/.gitmodules b/.gitmodules index 2bbf97a..26b7ff8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,12 @@ [submodule "awesome/src/lib/rubato"] path = awesome/src/lib/rubato url = https://github.com/andOrlando/rubato -[submodule "awesome/src/lib/awesome/src/lib/color"] - path = awesome/src/lib/awesome/src/lib/color - url = https://github.com/andOrlando/color [submodule "awesome/src/lib/color"] path = awesome/src/lib/color url = https://github.com/andOrlando/color [submodule "awesome/src/lib/nice"] path = awesome/src/lib/nice - url = https://github.com/Crylia/awesome-wm-nice + url = git@github.com:Crylia/awesome-wm-nice.git [submodule "awesome/src/lib/dbus_proxy"] path = awesome/src/lib/dbus_proxy url = git@github.com:Crylia/lua-dbus_proxy.git diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 39bc7da..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "Lua.diagnostics.globals": [ - "user_vars", - "modkey", - "root", - "awesome", - "client", - "screen", - "mouse", - "double_click_timer", - "vim", - "lspSymbol" - ] -} diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml new file mode 100644 index 0000000..47af465 --- /dev/null +++ b/alacritty/alacritty.yml @@ -0,0 +1,109 @@ +################################################ +# ██████╗██████╗ ██╗ ██╗██╗ ██╗ █████╗ # +# ██╔════╝██╔══██╗╚██╗ ██╔╝██║ ██║██╔══██╗ # +# ██║ ██████╔╝ ╚████╔╝ ██║ ██║███████║ # +# ██║ ██╔══██╗ ╚██╔╝ ██║ ██║██╔══██║ # +# ╚██████╗██║ ██║ ██║ ███████╗██║██║ ██║ # +# ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝╚═╝ ╚═╝ # +################################################ + +# Set the window Width and Height in console columns. +# The window size will change if the font size changes. +window: + padding: + x: 24 + y: 24 + dimensions: + columns: 110 + lines: 30 + decorations: full + startup_mode: Windowed + title: "Alacritty Terminal" + dynamic_title: true +# Scrolling history and multiplier +scrolling: + history: 10000 + multiplier: 3 +# Font family and style +font: + normal: + family: "JetBrains Mono Nerd Font" + style: Regular + bold: + family: "JetBrains Mono Nerd Font" + style: Bold + italic: + family: "JetBrains Mono Nerd Font" + style: italic + bold_italic: + family: "JetBrains Mono Nerd Font" + style: Bold Italic + size: 13.0 + offset: + y: 0 + glyph_offset: + y: 0 +# Background opacity from 0.0 transparent, 1.0 Opaque +window: + opacity: 0.4 +# Terminal colors +colors: + primary: + background: '0x131621' + foreground: '0xa6accd' + cursor: + text: CellBackground + cursor: CellForeground + search: + matches: + foreground: '0x1b1e28' + background: '0xadd7ff' + focus_match: + foreground: '0x1b1e28' + background: '0xadd7ff' + selection: + text: CellForeground + background: '0x303340' + normal: + black: '0x1b1e28' + red: '0xd0679d' + green: '0x5de4c7' + yellow: '0xfffac2' + blue: '#435c89' + magenta: '0xfcc5e9' + cyan: '0xadd7ff' + white: '0xffffff' + bright: + black: '0xa6accd' + red: '0xd0679d' + green: '0x5de4c7' + yellow: '0xfffac2' + blue: '0xadd7ff' + magenta: '0xfae4fc' + cyan: '0x89ddff' + white: '0xffffff' +# Cursor styling +cursor: + style: Beam + thickness: 0.2 + unfocused_hollow: false + blink_interval: 750 + +################################################################################ +# ███████╗██╗ ██╗ ██████╗ ██████╗ ████████╗ ██████╗██╗ ██╗████████╗███████╗ # +# ██╔════╝██║ ██║██╔═══██╗██╔══██╗╚══██╔══╝██╔════╝██║ ██║╚══██╔══╝██╔════╝ # +# ███████╗███████║██║ ██║██████╔╝ ██║ ██║ ██║ ██║ ██║ ███████╗ # +# ╚════██║██╔══██║██║ ██║██╔══██╗ ██║ ██║ ██║ ██║ ██║ ╚════██║ # +# ███████║██║ ██║╚██████╔╝██║ ██║ ██║ ╚██████╗╚██████╔╝ ██║ ███████║ # +# ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝ # +################################################################################ + +# Mouse +mouse_bindings: + - { mouse: Right, action: Paste } + +# Keyboard +key_bindings: + - { key: C, mods: Control|Shift, action: Copy } + - { key: V, mods: Control|Shift, action: Paste } + - { key: C, mods: Control, mode: Vi, action: ClearSelection } diff --git a/assets/DeviceChooser.png b/assets/DeviceChooser.png deleted file mode 100644 index 913df96..0000000 Binary files a/assets/DeviceChooser.png and /dev/null differ diff --git a/assets/EntireScreen_VolumeOSD.png b/assets/EntireScreen_VolumeOSD.png deleted file mode 100644 index 8d5ebc0..0000000 Binary files a/assets/EntireScreen_VolumeOSD.png and /dev/null differ diff --git a/assets/Notification1.png b/assets/Notification1.png deleted file mode 100644 index 0492472..0000000 Binary files a/assets/Notification1.png and /dev/null differ diff --git a/assets/TopCenter.png b/assets/TopCenter.png deleted file mode 100644 index ffd15c0..0000000 Binary files a/assets/TopCenter.png and /dev/null differ diff --git a/assets/TopLeftBar.png b/assets/TopLeftBar.png deleted file mode 100644 index 75778fb..0000000 Binary files a/assets/TopLeftBar.png and /dev/null differ diff --git a/assets/TopRight.png b/assets/TopRight.png deleted file mode 100644 index de9bdd5..0000000 Binary files a/assets/TopRight.png and /dev/null differ diff --git a/assets/desktop.png b/assets/desktop.png deleted file mode 100644 index 81a3999..0000000 Binary files a/assets/desktop.png and /dev/null differ diff --git a/assets/dock.png b/assets/dock.png deleted file mode 100644 index ed3c8cf..0000000 Binary files a/assets/dock.png and /dev/null differ diff --git a/assets/lockscreen.png b/assets/lockscreen.png deleted file mode 100644 index d810b47..0000000 Binary files a/assets/lockscreen.png and /dev/null differ diff --git a/assets/neofetch.png b/assets/neofetch.png deleted file mode 100644 index d0222eb..0000000 Binary files a/assets/neofetch.png and /dev/null differ diff --git a/awesome/rc.lua b/awesome/rc.lua index 5256619..38ad7da 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -34,4 +34,4 @@ require("src.bindings.bind_to_tags") require("src.modules.init") require("src.tools.auto_starter")(User_config.autostart) ---require("src.config.setup")() +require("src.config.setup")() diff --git a/awesome/src/core/setup.lua b/awesome/src/core/setup.lua new file mode 100644 index 0000000..3d7d24f --- /dev/null +++ b/awesome/src/core/setup.lua @@ -0,0 +1,1761 @@ +--- A module to manage the first installation and setup the config without having to edit +--- the config files manually. + +--Awesome Libs +local abutton = require("awful.button") +local aplacement = require("awful.placement") +local apopup = require("awful.popup") +local aspawn = require("awful.spawn") +local atooltip = require("awful.tooltip") +local awidget = require("awful.widget") +local dpi = require("beautiful").xresources.apply_dpi +local gcolor = require("gears.color") +local gtable = require("gears.table") +local wibox = require("wibox") + +--Own Libs +local toggle_button = require("awful.widget.toggle_widget") + +local capi = { + screen = screen, +} + +local assets_dir = os.getenv("HOME") .. "/.config/awesome/src/assets/" +local font_dir = os.getenv("HOME") .. "/.config/awesome/src/assets/fonts/" +local icon_dir = os.getenv("HOME") .. "/.config/awesome/src/assets/icons/setup/" + +local setup = { mt = {} } + +local widget_list = { + "Audio", + "Battery", + "Bluetooth", + "Clock", + "Cpu Frequency", + "Cpu Temperature", + "Cpu Usage", + "Date", + "Gpu Temperature", + "Gpu Usage", + "Keyboard Layout", + "Tiling Layout", + "Network", + "Power Button", + "Ram Usage", + "Systray", + "Taglist", + "Tasklist", +} + +local statusbar_list = { + "Battery", + "Backlight", + "CPU Temp", + "CPU Usage", + "GPU Temp", + "GPU Usage", + "Microphone", + "RAM", + "Volume" +} + +--[[ + Creates the pages for the setup module + 1. Welcome, short explanation and thanking for downloading + 2. Selecting the wallpaper + 3. Selecting the bar and widgets + 4. Selecting the Notification Center widgets and weather + 5. Choose/change default programs + 6. Setup tiling layouts + 7. Titlebar settings + 8. Font and Icon theme + 9. Final page, with a button to restart awesome +]] +local function create_pages() + local pages = {} + table.insert(pages, setup:welcome_page()) + table.insert(pages, setup:wallpaper_page()) + table.insert(pages, setup:bar_page()) + table.insert(pages, setup:notification_page()) + table.insert(pages, setup:programs_page()) + table.insert(pages, setup:layouts_page()) + table.insert(pages, setup:titlebar_page()) + table.insert(pages, setup:font_page()) + table.insert(pages, setup:final_page()) + return pages +end + +--- The first page, with a short explanation and thanking for downloading +function setup:welcome_page() + return wibox.widget { + { + { -- Left side with text etc + { + { + { + { + widget = wibox.widget.textbox, + markup = "Welcome to Crylia-Theme", + font = "Raleway Bold 36", + halign = "left", + valign = "center" + }, + { + widget = wibox.widget.textbox, + markup = "Thank you for downloading Crylia-Theme, a beautiful and customizable config for AwesomeWM", + font = "Comforta Regular 28", + halign = "left", + valign = "center" + }, + spacing = dpi(40), + layout = wibox.layout.fixed.vertical + }, + widget = wibox.container.margin, + left = dpi(50), + }, + widget = wibox.container.place, + valign = "center" + }, + widget = wibox.container.constraint, + width = dpi((capi.screen.primary.geometry.width * 0.6) / 2), + strategy = "exact", + }, + { -- Right side with image + { + { + widget = wibox.widget.imagebox, + image = "/home/crylia/Bilder/57384097.jpg", + resize = true, + valign = "center", + halign = "center" + }, + widget = wibox.container.constraint, + width = dpi((capi.screen.primary.geometry.width * 0.6) / 8), + strategy = "exact", + }, + forced_width = dpi((capi.screen.primary.geometry.width * 0.6) / 2), + widget = wibox.container.place + }, + layout = wibox.layout.fixed.horizontal, + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } +end + +--- The second page, with a list of wallpapers to choose from +function setup:wallpaper_page() + + local path_promt = awidget.inputbox { + hint_text = "Path to image...", + halign = "left", + valign = "center", + font = "JetBrainsMono Regular 12", + } + + local widget = wibox.widget { + { + { + { -- Image + { + widget = wibox.widget.imagebox, + resize = true, + image = assets_dir .. "space.jpg", + valign = "center", + halign = "center", + clip_shape = Theme_config.setup.wallpaper.clip_shape, + id = "wallpaper" + }, + widget = wibox.container.constraint, + width = dpi(600), + height = dpi(600 * 9 / 16), + strategy = "exact", + }, + { -- Button + { + { + { + { + { + { + widget = wibox.widget.imagebox, + image = icon_dir .. "choose.svg", + valign = "center", + halign = "center", + resize = true + }, + widget = wibox.container.constraint, + width = dpi(36), + height = dpi(36), + strategy = "exact" + }, + widget = wibox.container.margin, + left = dpi(10), + }, + { + widget = wibox.widget.textbox, + markup = "Choose Wallpaper", + halign = "center", + valign = "center" + }, + spacing = dpi(20), + layout = wibox.layout.fixed.horizontal + }, + widget = wibox.container.background, + bg = Theme_config.setup.wallpaper.button_bg, + fg = Theme_config.setup.wallpaper.button_fg, + shape = Theme_config.setup.wallpaper.button_shape, + id = "choose_image" + }, + widget = wibox.container.constraint, + width = dpi(300), + height = dpi(60), + strategy = "exact" + }, + valign = "center", + halign = "center", + widget = wibox.container.place + }, + { -- Path + { + { + nil, + { -- Text + { + path_promt, + widget = wibox.container.constraint, + width = dpi(600), + height = dpi(50), + strategy = "exact" + }, + widget = wibox.container.place, + halign = "center", + valign = "center", + }, + { -- Button + { + widget = wibox.widget.imagebox, + image = icon_dir .. "close.svg", + rezise = true, + id = "close" + }, + widget = wibox.container.background, + bg = gcolor.transparent, + fg = Theme_config.setup.wallpaper.close_fg, + }, + layout = wibox.layout.align.horizontal + }, + widget = wibox.container.background, + bg = Theme_config.setup.wallpaper.path_bg, + fg = Theme_config.setup.wallpaper.path_fg, + shape = Theme_config.setup.wallpaper.path_shape, + }, + widget = wibox.container.constraint, + width = dpi(600), + height = dpi(50), + strategy = "exact" + }, + spacing = dpi(28), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + halign = "center", + valign = "center", + }, + widget = wibox.container.constraint, + width = (capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + --Wallpaper + local wallpaper = widget:get_children_by_id("wallpaper")[1] + + --Choose Image button + local choose_image_button = widget:get_children_by_id("choose_image")[1] + + --Close button + local close_button = widget:get_children_by_id("close")[1] + + choose_image_button:buttons(gtable.join( + abutton({}, 1, function() + aspawn.easy_async_with_shell( + "zenity --file-selection --title='Select an Image File' --file-filter='Image File | *.jpg *.png'", + function(stdout) + stdout = stdout:gsub("\n", "") + if stdout ~= "" then + wallpaper:set_image(stdout) + path_promt:set_text(stdout) + self.wallpaper = stdout + end + end) + end) + )) + + close_button:buttons(gtable.join( + abutton({}, 1, function() + path_promt:set_text("") + wallpaper:set_image(nil) + end) + )) + + Hover_signal(choose_image_button) + + return widget +end + +-- Get a list of widgets from a verbal list +local function get_widgets() + local widgets = {} + + for _, widget in pairs(widget_list) do + local tb = toggle_button { + size = dpi(30), + color = Theme_config.setup.bar.widget_toggle_color, + } + + local w = wibox.widget { + nil, + { + { + { + widget = wibox.widget.textbox, + text = widget, + halign = "left", + valign = "center", + font = User_config.font.specify .. " Regular, 10" + }, + widget = wibox.container.margin, + margins = dpi(5), + }, + widget = wibox.widget.background, + bg = Theme_config.setup.bar.widget_bg, + fg = Theme_config.setup.bar.widget_fg, + shape = Theme_config.setup.bar.widget_shape, + border_color = Theme_config.setup.bar.widget_border_color, + border_width = Theme_config.setup.bar.widget_border_width + }, + { + tb, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "toggle_button", + layout = wibox.layout.align.horizontal + } + + table.insert(widgets, w) + end + + return widgets +end + +--- The third page, to customize the bar +function setup:bar_page() + local widget = wibox.widget { + { -- Top bar + { + { -- Title + { + widget = wibox.widget.textbox, + text = "Top Bar", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + margins = dpi(10) + }, + { -- Bar preview + { + { + { + { + widget = wibox.widget.checkbox, + checked = true, + id = "topbar_checkbox", + shape = Theme_config.setup.bar.shape, + color = Theme_config.setup.bar.color, + padding = Theme_config.setup.bar.padding, + }, + widget = wibox.container.constraint, + width = 30, + height = 30, + strategy = "exact" + }, + widget = wibox.container.place, + halign = "right", + valign = "center" + }, + { + { + widget = wibox.widget.imagebox, + image = "/home/crylia/Downloads/2022-12-08_23-19.png", --icon_dir .. "topbar.svg", + resize = true, + clip_shape = Theme_config.setup.bar.bar_image_shape, + halign = "center", + valign = "center" + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact" + }, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal + }, + widget = wibox.container.margin, + left = dpi(70), + right = dpi(70), + }, + { + { + { -- Widget selector + { + { + { + { + widget = wibox.widget.textbox, + text = "Left Widgets", + halign = "center", + valign = "center", + }, + { + layout = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "left_top_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + { + { + { + { + widget = wibox.widget.textbox, + text = "Center Widgets", + halign = "center", + valign = "center", + }, + { + layout = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "center_top_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + { + { + { + { + widget = wibox.widget.textbox, + text = "Right Widgets", + halign = "center", + valign = "center", + }, + { + layout = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "right_top_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + expand = "none", + forced_width = dpi(capi.screen.primary.geometry.width * 0.6) * 0.4, + layout = wibox.layout.align.horizontal + }, + widget = wibox.container.constraint, + height = dpi(capi.screen.primary.geometry.width * 0.6 * 9 / 16) * 0.3, + strategy = "exact", + }, + widget = wibox.container.margin, + left = dpi(140), + right = dpi(140), + }, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical + }, + { + widget = wibox.container.background, + bg = gcolor.transparent, + id = "top_overlay" + }, + layout = wibox.layout.stack + }, + { + { -- Bottom bar + { -- Widget selector + { + { + { + { + { + { + widget = wibox.widget.textbox, + text = "Left Widgets", + halign = "center", + valign = "center", + }, + { + widget = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "left_bottom_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + { + { + { + { + widget = wibox.widget.textbox, + text = "Center Widgets", + halign = "center", + valign = "center", + }, + { + widget = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "center_bottom_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + { + { + { + { + widget = wibox.widget.textbox, + text = "Right Widgets", + halign = "center", + valign = "center", + }, + { + widget = require("src.lib.overflow_widget.overflow").vertical, + spacing = dpi(10), + step = dpi(50), + scrollbar_width = 0, + id = "right_bottom_widget_selector", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + widget = wibox.container.background, + border_color = Theme_config.setup.bar.border_color, + border_width = Theme_config.setup.bar.border_width, + shape = Theme_config.setup.bar.bar_shape, + }, + expand = "none", + forced_width = dpi(capi.screen.primary.geometry.width * 0.6) * 0.4, + layout = wibox.layout.align.horizontal + }, + widget = wibox.container.constraint, + height = dpi(capi.screen.primary.geometry.width * 0.6 * 9 / 16) * 0.3, + strategy = "exact", + }, + widget = wibox.container.margin, + left = dpi(140), + right = dpi(140), + }, + { -- Bar preview + { + { + { + { + widget = wibox.widget.checkbox, + checked = false, + id = "bottombar_checkbox", + shape = Theme_config.setup.bar.shape, + color = Theme_config.setup.bar.color, + padding = Theme_config.setup.bar.padding, + }, + widget = wibox.container.constraint, + width = 30, + height = 30, + strategy = "exact" + }, + widget = wibox.container.place, + halign = "right", + valign = "center" + }, + { + { + widget = wibox.widget.imagebox, + image = "/home/crylia/Downloads/2022-12-08_23-19.png", --icon_dir .. "topbar.svg", + resize = true, + clip_shape = Theme_config.setup.bar.bar_image_shape, + halign = "center", + valign = "center" + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact" + }, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal + }, + widget = wibox.container.margin, + left = dpi(70), + right = dpi(70), + }, + { -- Title + { + widget = wibox.widget.textbox, + text = "Bottom Bar", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + margins = dpi(10) + }, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical + }, + { + widget = wibox.container.background, + bg = gcolor("#212121BB"), + id = "bottom_overlay" + }, + layout = wibox.layout.stack + }, + spacing_widget = wibox.widget.separator, + spacing = dpi(5), + forced_width = dpi(capi.screen.primary.geometry.width * 0.6), + layout = wibox.layout.flex.vertical + } + + local top_checkbox, bottom_checkbox = widget:get_children_by_id("topbar_checkbox")[1], + widget:get_children_by_id("bottombar_checkbox")[1] + + local top_overlay, bottom_overlay = widget:get_children_by_id("top_overlay")[1], + widget:get_children_by_id("bottom_overlay")[1] + + top_checkbox:buttons(gtable.join( + abutton({}, 1, nil, function() + top_checkbox.checked = not top_checkbox.checked + bottom_checkbox.checked = not top_checkbox.checked + if top_checkbox.checked then + top_overlay.bg = gcolor.transparent + bottom_overlay.bg = gcolor("#212121BB") + else + top_overlay.bg = gcolor("#212121BB") + bottom_overlay.bg = gcolor.transparent + end + end + ) + )) + + bottom_checkbox:buttons(gtable.join( + abutton({}, 1, nil, function() + bottom_checkbox.checked = not bottom_checkbox.checked + top_checkbox.checked = not bottom_checkbox.checked + if bottom_checkbox.checked then + top_overlay.bg = gcolor("#212121BB") + bottom_overlay.bg = gcolor.transparent + else + top_overlay.bg = gcolor.transparent + bottom_overlay.bg = gcolor("#212121BB") + end + end + ) + )) + + widget:get_children_by_id("left_top_widget_selector")[1].children = get_widgets() + widget:get_children_by_id("center_top_widget_selector")[1].children = get_widgets() + widget:get_children_by_id("right_top_widget_selector")[1].children = get_widgets() + widget:get_children_by_id("left_bottom_widget_selector")[1].children = get_widgets() + widget:get_children_by_id("center_bottom_widget_selector")[1].children = get_widgets() + widget:get_children_by_id("right_bottom_widget_selector")[1].children = get_widgets() + + + return widget +end + +local function get_status_bars() + local widgets = wibox.widget { + layout = wibox.layout.flex.horizontal, + spacing = dpi(100), + { layout = wibox.layout.fixed.vertical, id = "left", spacing = dpi(10) }, + { layout = wibox.layout.fixed.vertical, id = "right", spacing = dpi(10) } + } + + for i, widget in pairs(statusbar_list) do + local tb = toggle_button { + size = dpi(30), + color = Theme_config.setup.bar.widget_toggle_color, + } + + local w = wibox.widget { + nil, + { + { + widget = wibox.widget.textbox, + text = widget, + halign = "left", + valign = "center", + font = User_config.font.specify .. " Regular, 14" + }, + widget = wibox.container.margin, + margins = dpi(5), + }, + { + tb, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "toggle_button", + layout = wibox.layout.align.horizontal + } + if i <= math.ceil(#statusbar_list / 2) then + widgets:get_children_by_id("left")[1]:add(w) + else + widgets:get_children_by_id("right")[1]:add(w) + end + end + + return widgets +end + +--- The fourth page, to customize the notification center +function setup:notification_page() + local secrets = { + api_key = awidget.inputbox { + hint_text = "API Key...", + valign = "center", + halign = "left" + }, + city_id = awidget.inputbox { + hint_text = "City ID...", + valign = "center", + halign = "left" + } + } + + local widget = wibox.widget { + { + { + { + widget = wibox.widget.textbox, + text = "Notification Center Setup", + font = User_config.font.specify .. " Regular, 24", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + margins = dpi(10) + }, + { + { -- Status bars + { -- Title + { + widget = wibox.widget.textbox, + text = "Status bars", + font = User_config.font.specify .. " Regular, 16", + halign = "center", + }, + widget = wibox.container.margin, + top = dpi(5), + bottom = dpi(100) + }, + { + { -- Icon + widget = wibox.widget.imagebox, + image = icon_dir .. "status_bars.png", + resize = false, + forced_width = dpi(250), + halign = "center", + id = "sb_icon" + }, + { + get_status_bars(), + widget = wibox.container.margin, + left = dpi(100), + right = dpi(100) + }, + expand = "none", + layout = wibox.layout.flex.vertical + }, + nil, + layout = wibox.layout.align.vertical + }, + { -- OpenWeatherMap API + { -- Title + { + widget = wibox.widget.textbox, + text = "OpenWeatherMap API", + font = User_config.font.specify .. " Regular, 16", + halign = "center", + }, + widget = wibox.container.margin, + top = dpi(5), + }, + { + { + { -- Icon + { + widget = wibox.widget.imagebox, + image = icon_dir .. "openweathermap.png", + resize = true, + halign = "center", + id = "opw_icon" + }, + widget = wibox.container.constraint, + width = dpi(250), + strategy = "exact" + }, + { -- Secrets + { -- API Key + { + { + widget = wibox.widget.textbox, + text = "API Key", + font = User_config.font.specify .. " Regular, 16", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + { + { + secrets.api_key, + widget = wibox.container.margin, + left = dpi(10) + }, + id = "api_key_input", + forced_height = dpi(50), + forced_width = dpi(400), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + layout = wibox.layout.align.horizontal + }, + { -- City ID + { + { + widget = wibox.widget.textbox, + text = "City ID", + font = User_config.font.specify .. " Regular, 16", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + { + { + secrets.city_id, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "city_id_input", + forced_height = dpi(50), + forced_width = dpi(400), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + layout = wibox.layout.align.horizontal + }, + spacing = dpi(40), + layout = wibox.layout.flex.vertical, + }, + { -- Unit selection + { -- Celsius + { + { + { + widget = wibox.widget.checkbox, + checked = true, + color = Theme_config.setup.notification.checkbox_color, + paddings = Theme_config.setup.notification.checkbox_paddings, + shape = Theme_config.setup.notification.checkbox_shape, + id = "celsius_selector", + }, + widget = wibox.container.constraint, + width = dpi(24), + height = dpi(24), + }, + widget = wibox.container.place, + halign = "center", + valign = "center", + }, + { + widget = wibox.widget.textbox, + text = "Celsius °C", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + { -- Fahrenheit + { + { + { + widget = wibox.widget.checkbox, + checked = false, + color = Theme_config.setup.notification.checkbox_color, + paddings = Theme_config.setup.notification.checkbox_paddings, + shape = Theme_config.setup.notification.checkbox_shape, + id = "Fahrenheit_selector", + }, + widget = wibox.container.constraint, + width = dpi(24), + height = dpi(24) + }, + widget = wibox.container.place, + halign = "center", + valign = "center", + }, + { + widget = wibox.widget.textbox, + text = "Fahrenheit °F", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + layout = wibox.layout.flex.horizontal + }, + spacing = dpi(100), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + halign = "center", + valign = "center" + }, + nil, + layout = wibox.layout.align.vertical, + }, + spacing_widget = wibox.widget.separator { + color = Theme_config.setup.notification.separator_color, + }, + spacing = dpi(5), + layout = wibox.layout.flex.horizontal, + }, + nil, + layout = wibox.layout.align.vertical + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + -- Toggle both checkboxes so they act as radio buttons + local celsius_selector = widget:get_children_by_id("celsius_selector")[1] + local fahrenheit_selector = widget:get_children_by_id("Fahrenheit_selector")[1] + celsius_selector:buttons(gtable.join( + abutton({}, 1, nil, function() + celsius_selector.checked = true + fahrenheit_selector.checked = false + end) + )) + fahrenheit_selector:buttons(gtable.join( + abutton({}, 1, nil, function() + celsius_selector.checked = false + fahrenheit_selector.checked = true + end) + )) + + local opw_icon = widget:get_children_by_id("opw_icon")[1] + opw_icon:buttons(gtable.join( + abutton({}, 1, nil, function() + aspawn.with_shell("xdg-open https://openweathermap.org/") + end) + )) + + local api_key_input = widget:get_children_by_id("api_key_input")[1] + local city_id_input = widget:get_children_by_id("city_id_input")[1] + api_key_input:buttons(gtable.join( + abutton({}, 1, nil, function() + secrets.api_key:focus() + end) + )) + + city_id_input:buttons(gtable.join( + abutton({}, 1, nil, function() + secrets.city_id:focus() + end) + )) + + --#region Mouse changes + local old_mouse, old_wibox + local function mouse_enter(icon) + local wb = mouse.current_wibox + if wb then + old_mouse, old_wibox = wb.cursor, wb + wb.cursor = icon + end + end + + local function mouse_leave() + if old_wibox then + old_wibox.cursor = old_mouse + old_wibox = nil + end + end + + api_key_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + api_key_input:connect_signal("mouse::leave", mouse_leave) + city_id_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + city_id_input:connect_signal("mouse::leave", mouse_leave) + opw_icon:connect_signal("mouse::enter", function() mouse_enter("hand1") end) + opw_icon:connect_signal("mouse::leave", mouse_leave) + celsius_selector:connect_signal("mouse::enter", function() mouse_enter("hand1") end) + celsius_selector:connect_signal("mouse::leave", mouse_leave) + fahrenheit_selector:connect_signal("mouse::enter", function() mouse_enter("hand1") end) + fahrenheit_selector:connect_signal("mouse::leave", mouse_leave) + + --#endregion + + return widget +end + +--- The fifth page, to customize the default programs +function setup:programs_page() + local applications = { + power_manager = awidget.inputbox { hint_text = "e.g. xfce4-power-manager-settings" }, + web_browser = awidget.inputbox { hint_text = "e.g. firefox" }, + terminal = awidget.inputbox { hint_text = "e.g. kitty" }, + text_editor = awidget.inputbox { hint_text = "e.g. code" }, + music_player = awidget.inputbox { hint_text = "e.g. flatpak run com.spotify.Client" }, + gtk_settings = awidget.inputbox { hint_text = "e.g. lxappearance" }, + file_manager = awidget.inputbox { hint_text = "e.g. nautilus" }, + screen_manager = awidget.inputbox { hint_text = "e.g. arandr" } + } + + local widget = wibox.widget { + { + { -- Title + { + widget = wibox.widget.textbox, + text = "Default Applications", + font = User_config.font.specify .. " Regular, 24", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + margins = dpi(10) + }, + { + { -- Left side Applications + { + { -- power_manager + { + { + widget = wibox.widget.textbox, + text = "Power Manager", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.power_manager, + widget = wibox.container.margin, + left = dpi(10) + }, + id = "power_manager_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- web_browser + { + { + widget = wibox.widget.textbox, + text = "Web Browser", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.web_browser, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "web_browser_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- terminal + { + { + widget = wibox.widget.textbox, + text = "Terminal", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.terminal, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "terminal_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- text_editor + { + { + widget = wibox.widget.textbox, + text = "Text Editor", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.text_editor, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "text_editor_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + spacing = dpi(40), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + valign = "center", + halign = "center", + }, + { -- Right side Applications + { + { -- music_player + { + { + widget = wibox.widget.textbox, + text = "Music Player", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.music_player, + widget = wibox.container.margin, + left = dpi(10) + }, + id = "music_player_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- gtk settings + { + { + widget = wibox.widget.textbox, + text = "GTK Settings", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.gtk_settings, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "gtk_settings_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- file manager + { + { + widget = wibox.widget.textbox, + text = "File Manager", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.file_manager, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "file_manager_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + { -- Screen Manager + { + { + widget = wibox.widget.textbox, + text = "Screen Manager", + font = User_config.font.specify .. " Regular, 14", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + right = dpi(20), + }, + nil, + { + { + applications.screen_manager, + widget = wibox.container.margin, + left = dpi(10), + }, + id = "screen_manager_input", + forced_height = dpi(50), + forced_width = dpi(350), + widget = wibox.container.background, + border_color = Theme_config.setup.notification.border_color, + border_width = Theme_config.setup.notification.border_width, + shape = Theme_config.setup.notification.shape, + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + spacing = dpi(40), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + valign = "center", + halign = "center", + }, + layout = wibox.layout.flex.horizontal + }, + nil, + layout = wibox.layout.align.vertical + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + local power_manager_input = widget:get_children_by_id("power_manager_input")[1] + local web_browser_input = widget:get_children_by_id("web_browser_input")[1] + local terminal_input = widget:get_children_by_id("terminal_input")[1] + local text_editor_input = widget:get_children_by_id("text_editor_input")[1] + local music_player_input = widget:get_children_by_id("music_player_input")[1] + local gtk_settings_input = widget:get_children_by_id("gtk_settings_input")[1] + local file_manager_input = widget:get_children_by_id("file_manager_input")[1] + local screen_manager_input = widget:get_children_by_id("screen_manager_input")[1] + + applications.power_manager:buttons(gtable.join { + abutton({}, 1, function() + applications.power_manager:focus() + end) + }) + applications.web_browser:buttons(gtable.join { + abutton({}, 1, function() + applications.web_browser:focus() + end) + }) + applications.terminal:buttons(gtable.join { + abutton({}, 1, function() + applications.terminal:focus() + end) + }) + applications.text_editor:buttons(gtable.join { + abutton({}, 1, function() + applications.text_editor:focus() + end) + }) + applications.music_player:buttons(gtable.join { + abutton({}, 1, function() + applications.music_player:focus() + end) + }) + applications.gtk_settings:buttons(gtable.join { + abutton({}, 1, function() + applications.gtk_settings:focus() + end) + }) + applications.file_manager:buttons(gtable.join { + abutton({}, 1, function() + applications.file_manager:focus() + end) + }) + applications.screen_manager:buttons(gtable.join { + abutton({}, 1, function() + applications.screen_manager:focus() + end) + }) + + --#region Mouse changes + local old_mouse, old_wibox + local function mouse_enter(icon) + local wb = mouse.current_wibox + if wb then + old_mouse, old_wibox = wb.cursor, wb + wb.cursor = icon + end + end + + local function mouse_leave() + if old_wibox then + old_wibox.cursor = old_mouse + old_wibox = nil + end + end + + power_manager_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + power_manager_input:connect_signal("mouse::leave", mouse_leave) + web_browser_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + web_browser_input:connect_signal("mouse::leave", mouse_leave) + terminal_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + terminal_input:connect_signal("mouse::leave", mouse_leave) + text_editor_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + text_editor_input:connect_signal("mouse::leave", mouse_leave) + music_player_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + music_player_input:connect_signal("mouse::leave", mouse_leave) + gtk_settings_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + gtk_settings_input:connect_signal("mouse::leave", mouse_leave) + file_manager_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + file_manager_input:connect_signal("mouse::leave", mouse_leave) + screen_manager_input:connect_signal("mouse::enter", function() mouse_enter("xterm") end) + screen_manager_input:connect_signal("mouse::leave", mouse_leave) + + --#endregion + + return widget +end + +local function get_layouts() + local layouts = { + ["cornerne"] = Theme.layout_cornerne, + ["cornernw"] = Theme.layout_cornernw, + ["cornerse"] = Theme.layout_cornerse, + ["cornersw"] = Theme.layout_cornersw, + ["dwindle"] = Theme.layout_dwindle, + ["fairh"] = Theme.layout_fairh, + ["fairv"] = Theme.layout_fairv, + ["floating"] = Theme.layout_floating, + ["fullscreen"] = Theme.layout_fullscreen, + ["magnifier"] = Theme.layout_magnifier, + ["max"] = Theme.layout_max, + ["spiral"] = Theme.layout_spiral, + ["tile bottom"] = Theme.layout_cornerse, + ["tile left"] = Theme.layout_cornernw, + ["tile top"] = Theme.layout_cornersw, + ["tile"] = Theme.layout_cornerne, + } + + local list = {} + + for layout, icon in pairs(layouts) do + local w = wibox.widget { + { + { + { + { + { + image = icon, + resize = true, + widget = wibox.widget.imagebox, + }, + widget = wibox.container.constraint, + width = dpi(64), + height = dpi(64) + }, + margins = dpi(10), + widget = wibox.container.margin + }, + bg = Theme_config.setup.layout.bg, + shape = Theme_config.setup.layout.shape, + widget = wibox.container.background + }, + margins = dpi(10), + widget = wibox.container.margin + }, + widget = wibox.container.background, + border_color = Theme_config.setup.layout.border_color, + border_width = Theme_config.setup.layout.border_width, + shape = Theme_config.setup.layout.shape, + selected = false + } + + w:buttons(gtable.join { + abutton({}, 1, function() + if w.selected then + w.border_color = Theme_config.setup.layout.border_color + w.selected = false + else + w.border_color = Theme_config.setup.layout.border_color_selected + w.selected = true + end + end) + }) + + atooltip { + objects = { w }, + mode = "inside", + align = "bottom", + timeout = 0.5, + text = layout, + preferred_positions = { "right", "left", "top", "bottom" }, + margin_leftright = dpi(8), + margin_topbottom = dpi(8), + } + + table.insert(list, w) + end + + return list +end + +--- The sixth page, to choose the layouts +function setup:layouts_page() + local layouts = get_layouts() + + local widget = wibox.widget { + { + { -- Title + { + widget = wibox.widget.textbox, + text = "Layouts", + font = User_config.font.specify .. " Regular, 24", + halign = "center", + valign = "center", + }, + widget = wibox.container.margin, + margins = dpi(10) + }, + { + { + spacing = dpi(20), + forced_num_cols = 4, + forced_num_rows = 4, + horizontal_homogeneous = true, + vertical_homogeneous = true, + layout = wibox.layout.grid, + id = "layout_grid" + }, + widget = wibox.container.place, + halign = "center", + valign = "center" + }, + nil, + layout = wibox.layout.align.vertical + }, + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + local layout_grid = widget:get_children_by_id("layout_grid")[1] + + for _, layout in ipairs(layouts) do + layout_grid:add(layout) + end + + return widget +end + +--- The seventh page, to customize the titlebar +function setup:titlebar_page() + local widget = wibox.widget { + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + return widget +end + +--- The eighth page, to chose the font and icon theme +function setup:font_page() + local widget = wibox.widget { + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + return widget +end + +--- The ninth page, finish page, restart awesome +function setup:final_page() + local widget = wibox.widget { + widget = wibox.container.constraint, + width = dpi(capi.screen.primary.geometry.width * 0.6), + strategy = "exact", + } + + return widget +end + +--- Show the next page +function setup:next() + self.main_content:scroll(capi.screen.primary.geometry.width * 0.6) +end + +--- Show the previous page +function setup:prev() + self.main_content:scroll(-capi.screen.primary.geometry.width * 0.6) +end + +function setup.new(args) + args = args or {} + + -- Always display on the main screen + local screen = capi.screen.primary + + local self = apopup { + widget = { + { + nil, + { + { -- Main content + widget = require("src.lib.overflow_widget.overflow").horizontal, + scrollbar_width = 0, + step = 1.08, + id = "main_content" + }, + { -- Left button + { + { + { + widget = wibox.widget.imagebox, + image = icon_dir .. "left.svg", + rezise = true + }, + widget = wibox.container.background, + id = "page_left", + bg = Theme_config.setup.bg .. "88", + }, + widget = wibox.container.constraint, + width = dpi(64), + height = dpi(64), + strategy = "exact" + }, + valign = "center", + halign = "left", + widget = wibox.container.place + }, + { -- Right button + { + { + { + widget = wibox.widget.imagebox, + image = icon_dir .. "right.svg", + rezise = true + }, + widget = wibox.container.background, + id = "page_right", + bg = Theme_config.setup.bg .. "88", + }, + widget = wibox.container.constraint, + width = dpi(64), + height = dpi(64), + strategy = "exact" + }, + valign = "center", + halign = "right", + widget = wibox.container.place + }, + + layout = wibox.layout.stack + }, + { + { -- Current Page + widget = wibox.widget.textbox, + halign = "center", + valign = "center", + id = "current_page" + }, + widget = wibox.container.margin, + margins = dpi(10), + }, + layout = wibox.layout.align.vertical + }, + widget = wibox.container.constraint, + width = dpi(screen.geometry.width * 0.6), + height = dpi(screen.geometry.width * 0.6 * 9 / 16), + strategy = "exact" + }, + screen = screen, + bg = Theme_config.setup.bg, + border_color = Theme_config.setup.border_color, + border_width = Theme_config.setup.border_width, + placement = aplacement.centered, + ontop = false, -- !CHANGE THIS TO TRUE WHEN DONE TESTING! + visible = true, + } + + gtable.crush(self, setup, true) + + self.main_content = self.widget:get_children_by_id("main_content")[1] + + self.main_content.children = create_pages() + + self.page = 1 + + -- Current page + local current_page = self.widget:get_children_by_id("current_page")[1] + + current_page:set_text(self.page .. " / " .. #self.main_content.children) + + -- Left button + local page_left = self.widget:get_children_by_id("page_left")[1] + page_left:buttons(gtable.join( + abutton({}, 1, function() + if self.page == 1 then return end + self:prev() + self.page = self.page - 1 + current_page:set_text(self.page .. " / " .. #self.main_content.children) + end) + )) + + -- Right button + local page_right = self.widget:get_children_by_id("page_right")[1] + page_right:buttons(gtable.join( + abutton({}, 1, function() + if self.page == #self.main_content.children then return end + self:next() + self.page = self.page + 1 + current_page:set_text(self.page .. " / " .. #self.main_content.children) + end) + )) + +end + +function setup.mt:__call(...) + return setup.new(...) +end + +return setmetatable(setup, setup.mt) diff --git a/awesome/src/core/signals.lua b/awesome/src/core/signals.lua index c74c238..8971e4d 100644 --- a/awesome/src/core/signals.lua +++ b/awesome/src/core/signals.lua @@ -92,17 +92,17 @@ function Hover_signal(widget, bg_override, fg_override, border_override, icon_ov local _, rf, gf, bf = widget.fg:get_rgba() local rbo, gbo, bbo = color.utils.hex_to_rgba(widget.border_color) - local r_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(rb * 255) } - local g_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(gb * 255) } - local b_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(bb * 255) } + local r_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(rb * 255), rate = 24 } + local g_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(gb * 255), rate = 24 } + local b_timed_bg = rubato.timed { duration = 0.3, pos = math.floor(bb * 255), rate = 24 } - local r_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(rf * 255) } - local g_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(gf * 255) } - local b_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(bf * 255) } + local r_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(rf * 255), rate = 24 } + local g_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(gf * 255), rate = 24 } + local b_timed_fg = rubato.timed { duration = 0.3, pos = math.floor(bf * 255), rate = 24 } - local r_timed_border = rubato.timed { duration = 0.3, pos = math.floor(rbo) } - local g_timed_border = rubato.timed { duration = 0.3, pos = math.floor(gbo) } - local b_timed_border = rubato.timed { duration = 0.3, pos = math.floor(bbo) } + local r_timed_border = rubato.timed { duration = 0.3, pos = math.floor(rbo), rate = 24 } + local g_timed_border = rubato.timed { duration = 0.3, pos = math.floor(gbo), rate = 24 } + local b_timed_border = rubato.timed { duration = 0.3, pos = math.floor(bbo), rate = 24 } local function update_bg() widget:set_bg("#" .. diff --git a/awesome/src/lib/nice b/awesome/src/lib/nice index 8ee083f..32d082e 160000 --- a/awesome/src/lib/nice +++ b/awesome/src/lib/nice @@ -1 +1 @@ -Subproject commit 8ee083f18caaebeba50ba03def840a73673caee6 +Subproject commit 32d082e19ab68eb35ec7384467e90eaf72c5d124 diff --git a/neofetch/config.conf b/neofetch/config.conf deleted file mode 100644 index 21d735b..0000000 --- a/neofetch/config.conf +++ /dev/null @@ -1,855 +0,0 @@ -# See this wiki page for more info: -# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info -print_info() { - info title - info underline - - info " ​ ​  " distro - info " ​ ​  " kernel - info " ​ ​  " packages - info " ​ ​  " shell - info " ​ ​ ﬓ " de - info " ​ ​  " cpu - info " ​ ​ ﬙ " gpu - info " ​ ​ 塞" memory - - # info "GPU Driver" gpu_driver # Linux/macOS only - # info "CPU Usage" cpu_usage - # info "Disk" disk - # info "Battery" battery - # info "Font" font - # info "Song" song - # [[ "$player" ]] && prin "Music Player" "$player" - # info "Local IP" local_ip - # info "Public IP" public_ip - # info "Users" users - # info "Locale" locale # This only works on glibc systems. - - info cols -} - -# Title - - -# Hide/Show Fully qualified domain name. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --title_fqdn -title_fqdn="off" - - -# Kernel - - -# Shorten the output of the kernel function. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --kernel_shorthand -# Supports: Everything except *BSDs (except PacBSD and PC-BSD) -# -# Example: -# on: '4.8.9-1-ARCH' -# off: 'Linux 4.8.9-1-ARCH' -kernel_shorthand="on" - - -# Distro - - -# Shorten the output of the distro function -# -# Default: 'off' -# Values: 'on', 'tiny', 'off' -# Flag: --distro_shorthand -# Supports: Everything except Windows and Haiku -distro_shorthand="off" - -# Show/Hide OS Architecture. -# Show 'x86_64', 'x86' and etc in 'Distro:' output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --os_arch -# -# Example: -# on: 'Arch Linux x86_64' -# off: 'Arch Linux' -os_arch="off" - - -# Uptime - - -# Shorten the output of the uptime function -# -# Default: 'on' -# Values: 'on', 'tiny', 'off' -# Flag: --uptime_shorthand -# -# Example: -# on: '2 days, 10 hours, 3 mins' -# tiny: '2d 10h 3m' -# off: '2 days, 10 hours, 3 minutes' -uptime_shorthand="on" - - -# Memory - - -# Show memory pecentage in output. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --memory_percent -# -# Example: -# on: '1801MiB / 7881MiB (22%)' -# off: '1801MiB / 7881MiB' -memory_percent="on" - -# Change memory output unit. -# -# Default: 'mib' -# Values: 'kib', 'mib', 'gib' -# Flag: --memory_unit -# -# Example: -# kib '1020928KiB / 7117824KiB' -# mib '1042MiB / 6951MiB' -# gib: ' 0.98GiB / 6.79GiB' -memory_unit="mib" - - -# Packages - - -# Show/Hide Package Manager names. -# -# Default: 'tiny' -# Values: 'on', 'tiny' 'off' -# Flag: --package_managers -# -# Example: -# on: '998 (pacman), 8 (flatpak), 4 (snap)' -# tiny: '908 (pacman, flatpak, snap)' -# off: '908' -package_managers="on" - - -# Shell - - -# Show the path to $SHELL -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --shell_path -# -# Example: -# on: '/bin/bash' -# off: 'bash' -shell_path="off" - -# Show $SHELL version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --shell_version -# -# Example: -# on: 'bash 4.4.5' -# off: 'bash' -shell_version="on" - - -# CPU - - -# CPU speed type -# -# Default: 'bios_limit' -# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. -# Flag: --speed_type -# Supports: Linux with 'cpufreq' -# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. -speed_type="bios_limit" - -# CPU speed shorthand -# -# Default: 'off' -# Values: 'on', 'off'. -# Flag: --speed_shorthand -# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz -# -# Example: -# on: 'i7-6500U (4) @ 3.1GHz' -# off: 'i7-6500U (4) @ 3.100GHz' -speed_shorthand="on" - -# Enable/Disable CPU brand in output. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_brand -# -# Example: -# on: 'Intel i7-6500U' -# off: 'i7-6500U (4)' -cpu_brand="off" - -# CPU Speed -# Hide/Show CPU speed. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --cpu_speed -# -# Example: -# on: 'Intel i7-6500U (4) @ 3.1GHz' -# off: 'Intel i7-6500U (4)' -cpu_speed="on" - -# CPU Cores -# Display CPU cores in output -# -# Default: 'logical' -# Values: 'logical', 'physical', 'off' -# Flag: --cpu_cores -# Support: 'physical' doesn't work on BSD. -# -# Example: -# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) -# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) -# off: 'Intel i7-6500U @ 3.1GHz' -cpu_cores="off" - -# CPU Temperature -# Hide/Show CPU temperature. -# Note the temperature is added to the regular CPU function. -# -# Default: 'off' -# Values: 'C', 'F', 'off' -# Flag: --cpu_temp -# Supports: Linux, BSD -# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable -# coretemp kernel module. This only supports newer Intel processors. -# -# Example: -# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' -# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' -# off: 'Intel i7-6500U (4) @ 3.1GHz' -cpu_temp="off" - - -# GPU - - -# Enable/Disable GPU Brand -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gpu_brand -# -# Example: -# on: 'AMD HD 7950' -# off: 'HD 7950' -gpu_brand="off" - -# Which GPU to display -# -# Default: 'all' -# Values: 'all', 'dedicated', 'integrated' -# Flag: --gpu_type -# Supports: Linux -# -# Example: -# all: -# GPU1: AMD HD 7950 -# GPU2: Intel Integrated Graphics -# -# dedicated: -# GPU1: AMD HD 7950 -# -# integrated: -# GPU1: Intel Integrated Graphics -gpu_type="all" - - -# Resolution - - -# Display refresh rate next to each monitor -# Default: 'off' -# Values: 'on', 'off' -# Flag: --refresh_rate -# Supports: Doesn't work on Windows. -# -# Example: -# on: '1920x1080 @ 60Hz' -# off: '1920x1080' -refresh_rate="off" - - -# Gtk Theme / Icons / Font - - -# Shorten output of GTK Theme / Icons / Font -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --gtk_shorthand -# -# Example: -# on: 'Numix, Adwaita' -# off: 'Numix [GTK2], Adwaita [GTK3]' -gtk_shorthand="off" - - -# Enable/Disable gtk2 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk2 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Adwaita [GTK3]' -gtk2="on" - -# Enable/Disable gtk3 Theme / Icons / Font -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --gtk3 -# -# Example: -# on: 'Numix [GTK2], Adwaita [GTK3]' -# off: 'Numix [GTK2]' -gtk3="on" - - -# IP Address - - -# Website to ping for the public IP -# -# Default: 'http://ident.me' -# Values: 'url' -# Flag: --ip_host -public_ip_host="http://ident.me" - -# Public IP timeout. -# -# Default: '2' -# Values: 'int' -# Flag: --ip_timeout -public_ip_timeout=2 - - -# Desktop Environment - - -# Show Desktop Environment version -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --de_version -de_version="on" - - -# Disk - - -# Which disks to display. -# The values can be any /dev/sdXX, mount point or directory. -# NOTE: By default we only show the disk info for '/'. -# -# Default: '/' -# Values: '/', '/dev/sdXX', '/path/to/drive'. -# Flag: --disk_show -# -# Example: -# disk_show=('/' '/dev/sdb1'): -# 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 823G / 893G (93%)' -# -# disk_show=('/'): -# 'Disk (/): 74G / 118G (66%)' -# -disk_show=('/') - -# Disk subtitle. -# What to append to the Disk subtitle. -# -# Default: 'mount' -# Values: 'mount', 'name', 'dir', 'none' -# Flag: --disk_subtitle -# -# Example: -# name: 'Disk (/dev/sda1): 74G / 118G (66%)' -# 'Disk (/dev/sdb2): 74G / 118G (66%)' -# -# mount: 'Disk (/): 74G / 118G (66%)' -# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' -# 'Disk (/mnt/Videos): 74G / 118G (66%)' -# -# dir: 'Disk (/): 74G / 118G (66%)' -# 'Disk (Local Disk): 74G / 118G (66%)' -# 'Disk (Videos): 74G / 118G (66%)' -# -# none: 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -# 'Disk: 74G / 118G (66%)' -disk_subtitle="mount" - -# Disk percent. -# Show/Hide disk percent. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --disk_percent -# -# Example: -# on: 'Disk (/): 74G / 118G (66%)' -# off: 'Disk (/): 74G / 118G' -disk_percent="on" - - -# Song - - -# Manually specify a music player. -# -# Default: 'auto' -# Values: 'auto', 'player-name' -# Flag: --music_player -# -# Available values for 'player-name': -# -# amarok -# audacious -# banshee -# bluemindo -# clementine -# cmus -# deadbeef -# deepin-music -# dragon -# elisa -# exaile -# gnome-music -# gmusicbrowser -# gogglesmm -# guayadeque -# io.elementary.music -# iTunes -# juk -# lollypop -# mocp -# mopidy -# mpd -# muine -# netease-cloud-music -# olivia -# playerctl -# pogo -# pragha -# qmmp -# quodlibet -# rhythmbox -# sayonara -# smplayer -# spotify -# strawberry -# tauonmb -# tomahawk -# vlc -# xmms2d -# xnoise -# yarock -music_player="auto" - -# Format to display song information. -# -# Default: '%artist% - %album% - %title%' -# Values: '%artist%', '%album%', '%title%' -# Flag: --song_format -# -# Example: -# default: 'Song: Jet - Get Born - Sgt Major' -song_format="%artist% - %album% - %title%" - -# Print the Artist, Album and Title on separate lines -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --song_shorthand -# -# Example: -# on: 'Artist: The Fratellis' -# 'Album: Costello Music' -# 'Song: Chelsea Dagger' -# -# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' -song_shorthand="off" - -# 'mpc' arguments (specify a host, password etc). -# -# Default: '' -# Example: mpc_args=(-h HOST -P PASSWORD) -mpc_args=() - - -# Text Colors - - -# Text Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --colors -# -# Each number represents a different part of the text in -# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' -# -# Example: -# colors=(distro) - Text is colored based on Distro colors. -# colors=(4 6 1 8 8 6) - Text is colored in the order above. -colors=(4 4 3 1 1 6) - - -# Text Options - - -# Toggle bold text -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bold -bold="on" - -# Enable/Disable Underline -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --underline -underline_enabled="on" - -# Underline character -# -# Default: '-' -# Values: 'string' -# Flag: --underline_char -underline_char="-" - - -# Info Separator -# Replace the default separator with the specified string. -# -# Default: ':' -# Flag: --separator -# -# Example: -# separator="->": 'Shell-> bash' -# separator=" =": 'WM = dwm' -separator=":" - - -# Color Blocks - - -# Color block range -# The range of colors to print. -# -# Default: '0', '15' -# Values: 'num' -# Flag: --block_range -# -# Example: -# -# Display colors 0-7 in the blocks. (8 colors) -# neofetch --block_range 0 7 -# -# Display colors 0-15 in the blocks. (16 colors) -# neofetch --block_range 0 15 -block_range=(0 7) - -# Toggle color blocks -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --color_blocks -color_blocks="on" - -# Color block width in spaces -# -# Default: '3' -# Values: 'num' -# Flag: --block_width -block_width=3 - -# Color block height in lines -# -# Default: '1' -# Values: 'num' -# Flag: --block_height -block_height=1 - -# Color Alignment -# -# Default: 'auto' -# Values: 'auto', 'num' -# Flag: --col_offset -# -# Number specifies how far from the left side of the terminal (in spaces) to -# begin printing the columns, in case you want to e.g. center them under your -# text. -# Example: -# col_offset="auto" - Default behavior of neofetch -# col_offset=7 - Leave 7 spaces then print the colors -col_offset="auto" - -# Progress Bars - - -# Bar characters -# -# Default: '-', '=' -# Values: 'string', 'string' -# Flag: --bar_char -# -# Example: -# neofetch --bar_char 'elapsed' 'total' -# neofetch --bar_char '-' '=' -bar_char_elapsed="-" -bar_char_total="=" - -# Toggle Bar border -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --bar_border -bar_border="on" - -# Progress bar length in spaces -# Number of chars long to make the progress bars. -# -# Default: '15' -# Values: 'num' -# Flag: --bar_length -bar_length=15 - -# Progress bar colors -# When set to distro, uses your distro's logo colors. -# -# Default: 'distro', 'distro' -# Values: 'distro', 'num' -# Flag: --bar_colors -# -# Example: -# neofetch --bar_colors 3 4 -# neofetch --bar_colors distro 5 -bar_color_elapsed="distro" -bar_color_total="distro" - - -# Info display -# Display a bar with the info. -# -# Default: 'off' -# Values: 'bar', 'infobar', 'barinfo', 'off' -# Flags: --cpu_display -# --memory_display -# --battery_display -# --disk_display -# -# Example: -# bar: '[---=======]' -# infobar: 'info [---=======]' -# barinfo: '[---=======] info' -# off: 'info' -cpu_display="off" -memory_display="off" -battery_display="off" -disk_display="off" - - -# Backend Settings - - -# Image backend. -# -# Default: 'ascii' -# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', -# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' -# Flag: --backend -image_backend="ascii" - -# Image Source -# -# Which image or ascii file to display. -# -# Default: 'auto' -# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' -# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' -# Flag: --source -# -# NOTE: 'auto' will pick the best image source for whatever image backend is used. -# In ascii mode, distro ascii art will be used and in an image mode, your -# wallpaper will be used. -image_source="$HOME/.logo" - - -# Ascii Options - - -# Ascii distro -# Which distro's ascii art to display. -# -# Default: 'auto' -# Values: 'auto', 'distro_name' -# Flag: --ascii_distro -# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS", -# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs, -# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, -# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, -# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, -# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, -# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, -# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary, -# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, -# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, -# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, -# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, -# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, -# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, -# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, -# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, -# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, -# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, -# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, -# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, -# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, -# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, -# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, -# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, -# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, -# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, -# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin, -# and IRIX have ascii logos -# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. -# Use '{distro name}_old' to use the old logos. -# NOTE: Ubuntu has flavor variants. -# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, -# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. -# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, -# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, -# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, -# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, -# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, -# postmarketOS, and Void have a smaller logo variant. -# Use '{distro name}_small' to use the small variants. -ascii_distro="auto" - -# Ascii Colors -# -# Default: 'distro' -# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' -# Flag: --ascii_colors -# -# Example: -# ascii_colors=(distro) - Ascii is colored based on Distro colors. -# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. -ascii_colors=(distro) - -# Bold ascii logo -# Whether or not to bold the ascii logo. -# -# Default: 'on' -# Values: 'on', 'off' -# Flag: --ascii_bold -ascii_bold="off" - - -# Image Options - - -# Image loop -# Setting this to on will make neofetch redraw the image constantly until -# Ctrl+C is pressed. This fixes display issues in some terminal emulators. -# -# Default: 'off' -# Values: 'on', 'off' -# Flag: --loop -image_loop="off" - -# Thumbnail directory -# -# Default: '~/.cache/thumbnails/neofetch' -# Values: 'dir' -thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" - -# Crop mode -# -# Default: 'normal' -# Values: 'normal', 'fit', 'fill' -# Flag: --crop_mode -# -# See this wiki page to learn about the fit and fill options. -# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F -crop_mode="fill" - -# Crop offset -# Note: Only affects 'normal' crop mode. -# -# Default: 'center' -# Values: 'northwest', 'north', 'northeast', 'west', 'center' -# 'east', 'southwest', 'south', 'southeast' -# Flag: --crop_offset -crop_offset="center" - -# Image size -# The image is half the terminal width by default. -# -# Default: 'auto' -# Values: 'auto', '00px', '00%', 'none' -# Flags: --image_size -# --size -image_size="auto" - -# Gap between image and text -# -# Default: '3' -# Values: 'num', '-num' -# Flag: --gap -gap=5 - -# Image offsets -# Only works with the w3m backend. -# -# Default: '0' -# Values: 'px' -# Flags: --xoffset -# --yoffset -yoffset=0 -xoffset=0 - -# Image background color -# Only works with the w3m backend. -# -# Default: '' -# Values: 'color', 'blue' -# Flag: --bg_color -background_color= - - -# Misc Options - -# Stdout mode -# Turn off all colors and disables image backend (ASCII/Image). -# Useful for piping into another command. -# Default: 'off' -# Values: 'on', 'off' -stdout="off" diff --git a/picom.conf b/picom.conf index fb52f10..9ef5c62 100644 --- a/picom.conf +++ b/picom.conf @@ -12,18 +12,21 @@ shadow = true; # The blur radius for shadows, in pixels. (defaults to 12) # shadow-radius = 12 -shadow-radius = 12; +shadow-radius = 40; # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) # shadow-opacity = .75 +shadow-opacity = .55 # The left offset for shadows, in pixels. (defaults to -15) # shadow-offset-x = -15 -shadow-offset-x = -7; +shadow-offset-x = -40; # The top offset for shadows, in pixels. (defaults to -15) -# shadow-offset-y = -15 -shadow-offset-y = -7; +# shadow-offset-y = +15 +shadow-offset-y = -20; + +shadow-ignore-shaped = false # Red color value of shadow (0.0 - 1.0, defaults to 0). # shadow-red = 0 @@ -84,7 +87,7 @@ fade-in-step = 0.03; fade-out-step = 0.03; # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) - fade-delta = 6 + fade-delta = 10 # Specify a list of conditions of windows that should not be faded. # fade-exclude = [] @@ -95,6 +98,15 @@ fade-out-step = 0.03; # Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. # no-fading-destroyed-argb = false +# Animations +animations = true; +animation-stiffness = 300.0; +animation-dampening = 22.0; +animation-clamping = true; +animation-mass = 0.1; +animation-for-open-window = "zoom"; +animation-for-menu-window = "slide-down"; +animation-for-transient-window = "slide-down"; ################################# # Transparency / Opacity # @@ -143,14 +155,10 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # Sets the radius of rounded window corners. When > 0, the compositor will # round the corners of windows. Does not interact well with # `transparent-clipping`. -#corner-radius = 10 # Exclude conditions for rounded corners. -rounded-corners-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'" -]; +corner-radius = 12 ################################# # Background-Blurring # @@ -163,7 +171,7 @@ blur-size = 12 # # blur-deviation = false # -blur-strength = 5 +blur-strength = 8 # Blur background of semi-transparent / ARGB windows. # Bad in performance, with driver-dependent behavior. @@ -187,7 +195,7 @@ blur-background-fixed = true # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; # # blur-kern = "" -blur-kern = "11x11gaussian"; +#blur-kern = "11x11gaussian"; # Exclude conditions for background blur. @@ -343,7 +351,7 @@ use-damage = true; # Make transparent windows clip other windows like non-transparent windows do, # instead of blending on top of them. # -# transparent-clipping = false +transparent-clipping = false # Set the log level. Possible values are: # "trace", "debug", "info", "warn", "error" @@ -404,9 +412,11 @@ log-level = "warn"; # wintypes: { - tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; - dock = { shadow = true; clip-shadow-above = false; } + tooltip = { fade = true; shadow = true; focus = true; full-shadow = true; }; + dock = { shadow = true; clip-shadow-above = false; full-shadow = true; } dnd = { shadow = false; } - popup_menu = { opacity = 0.8; } - dropdown_menu = { opacity = 0.8; } + popup_menu = { opacity = 1; } + dropdown_menu = { opacity = 1; } + desktop = {full-shadow = false;} + normal = {full-shadow = false;} }; diff --git a/picom_nier.conf b/picom_nier.conf new file mode 100644 index 0000000..672d5ad --- /dev/null +++ b/picom_nier.conf @@ -0,0 +1,414 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +#shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 12; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +shadow-color = "#000000" + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c", + "name = 'Awesome drawin'" +]; + +# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. +# clip-shadow-above = [] + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) + fade-delta = 6 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 1; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 1; + +# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +#corner-radius = 0 + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +blur-method = "dual_kawase" +blur-size = 12 +# +# blur-deviation = false +# +blur-strength = 5 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +blur-background-frame = false + +# Use fixed blur strength rather than adjusting according to window opacity. +blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = "" +blur-kern = "11x11gaussian"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c", + "name *= 'Awesome drawin'" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx" +backend = "glx"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. This usually means windows from the same application +# will be considered focused or unfocused at the same time. +# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. +# +# detect-client-leader = false + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls wether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = true; clip-shadow-above = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +};