commit 18373323b068b079b12d7fc308871e1a2ca5be14 Author: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun Apr 14 18:41:15 2024 -0700 ✨ feat: Migrate to Chezmoi diff --git a/.chezmoiexternals/awesomewm.toml b/.chezmoiexternals/awesomewm.toml new file mode 100644 index 0000000..1734502 --- /dev/null +++ b/.chezmoiexternals/awesomewm.toml @@ -0,0 +1,19 @@ +[".config/awesome/lib/bling"] +type = "git-repo" +url = "https://github.com/BlingCorp/bling.git" +refreshPeriod = "672h" + +[".config/awesome/lib/catppuccin"] +type = "git-repo" +url = "https://github.com/catppuccin/lua.git" +refreshPeriod = "672h" + +[".config/awesome/lib/layout-machi"] +type = "git-repo" +url = "https://github.com/xinhaoyuan/layout-machi.git" +refreshPeriod = "672h" + +[".config/awesome/lib/rubato"] +type = "git-repo" +url = "https://github.com/andOrlando/rubato.git" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/bat.toml b/.chezmoiexternals/bat.toml new file mode 100644 index 0000000..cd7a84d --- /dev/null +++ b/.chezmoiexternals/bat.toml @@ -0,0 +1,19 @@ +[".config/bat/themes/Catppuccin-latte.tmTheme"] +type = "file" +url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme" +refreshPeriod = "672h" + +[".config/bat/themes/Catppuccin-frappe.tmTheme"] +type = "file" +url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme" +refreshPeriod = "672h" + +[".config/bat/themes/Catppuccin-macchiato.tmTheme"] +type = "file" +url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme" +refreshPeriod = "672h" + +[".config/bat/themes/Catppuccin-mocha.tmTheme"] +type = "file" +url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/btop.toml b/.chezmoiexternals/btop.toml new file mode 100644 index 0000000..1923de8 --- /dev/null +++ b/.chezmoiexternals/btop.toml @@ -0,0 +1,19 @@ +[".config/btop/themes/catppuccin_frappe.theme"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_frappe.theme" +refreshPeriod = "672h" + +[".config/btop/themes/catppuccin_latte.theme"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_latte.theme" +refreshPeriod = "672h" + +[".config/btop/themes/catppuccin_macchiato.theme"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_macchiato.theme" +refreshPeriod = "672h" + +[".config/btop/themes/catppuccin_mocha.theme"] +type = "file" +url = "https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/glow.toml b/.chezmoiexternals/glow.toml new file mode 100644 index 0000000..4b04fc7 --- /dev/null +++ b/.chezmoiexternals/glow.toml @@ -0,0 +1,19 @@ +[".config/glow/catppuccin/frappe.json"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/glamour/main/themes/catppuccin-frappe.json" +refreshPeriod = "672h" + +[".config/glow/catppuccin/latte.json"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/glamour/main/themes/catppuccin-latte.json" +refreshPeriod = "672h" + +[".config/glow/catppuccin/macchiato.json"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/glamour/main/themes/catppuccin-macchiato.json" +refreshPeriod = "672h" + +[".config/glow/catppuccin/mocha.json"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/glamour/main/themes/catppuccin-mocha.json" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/lazygit.toml b/.chezmoiexternals/lazygit.toml new file mode 100644 index 0000000..ef9617c --- /dev/null +++ b/.chezmoiexternals/lazygit.toml @@ -0,0 +1,19 @@ +[".config/lazygit/catppuccin/frappe.yml"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/lazygit/main/themes-mergable/frappe/pink.yml" +refreshPeriod = "672h" + +[".config/lazygit/catppuccin/latte.yml"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/lazygit/main/themes-mergable/latte/pink.yml" +refreshPeriod = "672h" + +[".config/lazygit/catppuccin/macchiato.yml"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/lazygit/main/themes-mergable/macchiato/pink.yml" +refreshPeriod = "672h" + +[".config/lazygit/catppuccin/mocha.yml"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/lazygit/main/themes-mergable/mocha/pink.yml" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/rofi.toml b/.chezmoiexternals/rofi.toml new file mode 100644 index 0000000..f5bd8f4 --- /dev/null +++ b/.chezmoiexternals/rofi.toml @@ -0,0 +1,19 @@ +[".local/share/rofi/themes/catppuccin-frappe.rasi"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/rofi/main/basic/.local/share/rofi/themes/catppuccin-frappe.rasi" +refreshPeriod = "672h" + +[".local/share/rofi/themes/catppuccin-latte.rasi"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/rofi/main/basic/.local/share/rofi/themes/catppuccin-latte.rasi" +refreshPeriod = "672h" + +[".local/share/rofi/themes/catppuccin-macchiato.rasi"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/rofi/main/basic/.local/share/rofi/themes/catppuccin-macchiato.rasi" +refreshPeriod = "672h" + +[".local/share/rofi/themes/catppuccin-mocha.rasi"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/rofi/main/basic/.local/share/rofi/themes/catppuccin-mocha.rasi" +refreshPeriod = "672h" diff --git a/.chezmoiexternals/zathura.toml b/.chezmoiexternals/zathura.toml new file mode 100644 index 0000000..8109143 --- /dev/null +++ b/.chezmoiexternals/zathura.toml @@ -0,0 +1,19 @@ +[".config/zathura/catppuccin-frappe"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-frappe" +refreshPeriod = "672h" + +[".config/zathura/catppuccin-latte"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-latte" +refreshPeriod = "672h" + +[".config/zathura/catppuccin-macchiato"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-macchiato" +refreshPeriod = "672h" + +[".config/zathura/catppuccin-mocha"] +type = "file" +url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha" +refreshPeriod = "672h" diff --git a/dot_Xresources b/dot_Xresources new file mode 100644 index 0000000..85e866c --- /dev/null +++ b/dot_Xresources @@ -0,0 +1,38 @@ +*background: #24273A +*foreground: #CAD3F5 + +! black +*color0: #494D64 +*color8: #5B6078 + +! red +*color1: #ED8796 +*color9: #ED8796 + +! green +*color2: #A6DA95 +*color10: #A6DA95 + +! yellow +*color3: #EED49F +*color11: #EED49F + +! blue +*color4: #8AADF4 +*color12: #8AADF4 + +! magenta +*color5: #F5BDE6 +*color13: #F5BDE6 + +! cyan +*color6: #8BD5CA +*color14: #8BD5CA + +! white +*color7: #B8C0E0 +*color15: #A5ADCB + +! Make Rofi use fish shell +rofi.run-command: fish -c '{cmd}' +rofi.run-list-command: 'fish -c functions' diff --git a/dot_bash_logout b/dot_bash_logout new file mode 100644 index 0000000..0e4e4f1 --- /dev/null +++ b/dot_bash_logout @@ -0,0 +1,3 @@ +# +# ~/.bash_logout +# diff --git a/dot_bash_profile b/dot_bash_profile new file mode 100644 index 0000000..5545f00 --- /dev/null +++ b/dot_bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..38c1b3e --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,13 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +PS1='[\u@\h \W]\$ ' + +export EDITOR='nvim' +export VISUAL="$EDITOR" diff --git a/dot_config/awesome/config.lua b/dot_config/awesome/config.lua new file mode 100644 index 0000000..d054a6e --- /dev/null +++ b/dot_config/awesome/config.lua @@ -0,0 +1,102 @@ +local config_dir = require("gears.filesystem").get_configuration_dir() + +local M = {} + +M.keys = { + mod = "Mod4", + alt = "Mod1", +} + +M.apps = { + terminal = "wezterm", + launcher = "rofi -show drun", + browser = "firefox", + file_manager = "thunar", + editor = os.getenv("EDITOR") or "nvim", +} + +M.apps.start_editor = M.apps.terminal .. "-e" .. M.apps.editor +M.apps.music_player = M.apps.terminal .. "--class music -e ncmpcpp" + +M.theme = { + flavor = "macchiato", + accent1 = "pink", + accent2 = "rosewater", + -- wallpaper = config_dir .. "themes/catppuccin/buttons.png", + wallpaper = "~/data/photos/wallpaper/city.png", + pfp = config_dir .. "themes/catppuccin/assets/pfp.jpg", + icon_theme = "Papirus", + font = { + family = "FairiesevkaSans Nerd Font Propo", + size = "10", + }, +} + +M.icons = { + menu = "󰜬", + power = "", + restart = "", + sleep = "", + exit = "󰗼", + lock = "", + music = { + next = "󰒭", + prev = "󰒮", + pause = "󰏤", + play = "󰐊", + }, + tags = { + general = " ", + files = " ", + media = " ", + terminal = " ", + coding = " ", + misc = "󰍹 ", + }, + cal = "", + clock = "", + arr = { + r = "»", + l = "«", + }, + vol = { + on = "󰕾", + off = "󰖁", + low = "󰕿", + med = "󰖀", + high = "󰕾", + }, + mem = "󰍛", + cpu = "", + disk = "", +} + +M.widget = {} + +M.widget.clock = { + format = "%I:%M %p", +} + +M.widget.date = { + format = "%a %b %d", +} + +M.widget.weather = { + api_key = "e894c3e6c1a9d2217eee94791e845c96", + coordinates = { lat = "47.773140", lon = "-122.303660" }, + units = "imperial", +} + +M.widget.github = { + username = "punkfairie", +} + +M.widget.mic = { + name = "", +} + +M.widget.disk = { + name = "/dev/sdb3", +} + +return M diff --git a/dot_config/awesome/helpers/init.lua b/dot_config/awesome/helpers/init.lua new file mode 100644 index 0000000..35cc365 --- /dev/null +++ b/dot_config/awesome/helpers/init.lua @@ -0,0 +1,3 @@ +return { + ui = require("helpers.ui"), +} diff --git a/dot_config/awesome/helpers/ui.lua b/dot_config/awesome/helpers/ui.lua new file mode 100644 index 0000000..be852bf --- /dev/null +++ b/dot_config/awesome/helpers/ui.lua @@ -0,0 +1,188 @@ +local awful = require("awful") +local wibox = require("wibox") +local gshape = require("gears.shape") +local gmatrix = require("gears.matrix") +local beautiful = require("beautiful") + +local capi = { mouse = mouse } +local theme = beautiful.get() + +local ui = {} + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +---Set text color +---@param text string +---@param color string +---@return string +function ui.colorize_text(text, color) + return "" .. text .. "" +end + +---Change a font attribute +---@param attr string attribute(s) to add, e.g. "Bold 16" +---@param font? string base font to use, for use in the theme file itself +---@return string +function ui.set_font(attr, font) + font = font or theme.font + + return beautiful.get_merged_font(font, attr):to_string() +end + +---Create an icon widget +---@param i string the icon +---@param c string the icon's color +---@return table widget the widget +function ui.create_icon(i, c) + local widget = { + { + font = ui.set_font("12.5"), + text = " " .. i, + widget = wibox.widget.textbox, + }, + fg = c, + widget = wibox.container.background, + } + return widget +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +---Change cursor on hovering +---@param w any widget to change cursor on +---@param hover_cursor string cursor to change to +function ui.add_hover_cursor(w, hover_cursor) + local original_cursor = "left_ptr" + + w:connect_signal("mouse::enter", function() + local widget = capi.mouse.current_wibox + if widget then + widget.cursor = hover_cursor + end + end) + + w:connect_signal("mouse::leave", function() + local widget = capi.mouse.current_wibox + if widget then + widget.cursor = original_cursor + end + end) +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.vertical_pad(height) + return wibox.widget({ + forced_height = height, + layout = wibox.layout.fixed.vertical, + }) +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.horizontal_pad(width) + return wibox.widget({ + forced_width = width, + layout = wibox.layout.fixed.horizontal, + }) +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.rrect(radius) + return function(cr, width, height) + gshape.rounded_rect(cr, width, height, radius) + end +end + +function ui.pie(width, height, start_angle, end_angle, radius) + return function(cr) + gshape.pie(cr, width, height, start_angle, end_angle, radius) + end +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.prgram(height, base) + return function(cr, width) + gshape.parallelogram(cr, width, height, base) + end +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.prrect(radius, tl, tr, br, bl) + return function(cr, width, height) + gshape.partially_rounded_rect(cr, width, height, tl, tr, br, bl, radius) + end +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.custom_shape(cr, width, height) + cr:move_to(0, height / 25) + cr:line_to(height / 25, 0) + cr:line_to(width, 0) + cr:line_to(width, height - height / 25) + cr:line_to(width - height / 25, height) + cr:line_to(0, height) + cr:close_path() +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +local function _get_widget_geometry(_hierarchy, widget) + local width, height = _hierarchy:get_size() + if _hierarchy:get_widget() == widget then + -- Get the extents of this widget in the device space + local x, y, w, h = gmatrix.transform_rectangle(_hierarchy:get_matrix_to_device(), 0, 0, width, height) + return { x = x, y = y, width = w, height = h, hierarchy = _hierarchy } + end + + for _, child in ipairs(_hierarchy:get_children()) do + local ret = _get_widget_geometry(child, widget) + if ret then + return ret + end + end +end + +function ui.get_widget_geometry(_wibox, widget) + return _get_widget_geometry(_wibox._drawable._widget_hierarchy, widget) +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.screen_mask(s, bg) + local mask = wibox({ + visible = false, + ontop = true, + type = "splash", + screen = s, + }) + awful.placement.maximize(mask) + mask.bg = bg + return mask +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +function ui.grouping_widget(w1, w2, dpi1) + local container = wibox.widget({ + w1, + { + nil, + w2, + expand = "none", + layout = wibox.layout.flex.vertical, + }, + spacing = dpi1, + layout = wibox.layout.fixed.horizontal, + }) + + return container +end + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +return ui diff --git a/dot_config/awesome/lib/animation/init.lua b/dot_config/awesome/lib/animation/init.lua new file mode 100644 index 0000000..fd1500a --- /dev/null +++ b/dot_config/awesome/lib/animation/init.lua @@ -0,0 +1,225 @@ +------------------------------------------- +-- @author https://github.com/Kasper24 +-- @copyright 2021-2022 Kasper24 +------------------------------------------- + +local GLib = require("lgi").GLib +local gobject = require("gears.object") +local gtable = require("gears.table") +local subscribable = require("lib.animation.subscribable") +local tween = require("lib.animation.tween") +local ipairs = ipairs +local table = table +local pairs = pairs + +local animation_manager = {} +animation_manager.easing = { + linear = "linear", + inQuad = "inQuad", + outQuad = "outQuad", + inOutQuad = "inOutQuad", + outInQuad = "outInQuad", + inCubic = "inCubic", + outCubic = "outCubic", + inOutCubic = "inOutCubic", + outInCubic = "outInCubic", + inQuart = "inQuart", + outQuart = "outQuart", + inOutQuart = "inOutQuart", + outInQuart = "outInQuart", + inQuint = "inQuint", + outQuint = "outQuint", + inOutQuint = "inOutQuint", + outInQuint = "outInQuint", + inSine = "inSine", + outSine = "outSine", + inOutSine = "inOutSine", + outInSine = "outInSine", + inExpo = "inExpo", + outExpo = "outExpo", + inOutExpo = "inOutExpo", + outInExpo = "outInExpo", + inCirc = "inCirc", + outCirc = "outCirc", + inOutCirc = "inOutCirc", + outInCirc = "outInCirc", + inElastic = "inElastic", + outElastic = "outElastic", + inOutElastic = "inOutElastic", + outInElastic = "outInElastic", + inBack = "inBack", + outBack = "outBack", + inOutBack = "inOutBack", + outInBack = "outInBack", + inBounce = "inBounce", + outBounce = "outBounce", + inOutBounce = "inOutBounce", + outInBounce = "outInBounce", +} + +local animation = {} + +local instance = nil + +local ANIMATION_FRAME_DELAY = 5 + +local function second_to_micro(sec) + return sec * 1000000 +end + +function animation:start(args) + args = args or {} + + -- Awestoer/Rubbto compatibility + -- I'd rather this always be a table, but Awestoer/Rubbto + -- except the :set() method to have 1 number value parameter + -- used to set the target + local is_table = type(args) == "table" + local initial = is_table and (args.pos or self.pos) or self.pos + local subject = is_table and (args.subject or self.subject) or self.subject + local target = is_table and (args.target or self.target) or args + local duration = is_table and (args.duration or self.duration) or self.duration + local easing = is_table and (args.easing or self.easing) or self.easing + + duration = self._private.anim_manager._private.instant == true and 0.01 or duration + + if self.tween == nil or self.reset_on_stop == true then + self.tween = tween.new({ + initial = initial, + subject = subject, + target = target, + duration = second_to_micro(duration), + easing = easing, + }) + end + + if self._private.anim_manager._private.animations[self.index] == nil then + table.insert(self._private.anim_manager._private.animations, self) + end + + self.state = true + self.last_elapsed = GLib.get_monotonic_time() + + self.started:fire() + self:emit_signal("started") +end + +function animation:set(args) + self:start(args) + self:emit_signal("set") +end + +function animation:stop() + self.state = false + self:emit_signal("stopped") +end + +function animation:abort() + animation:stop() + self:emit_signal("aborted") +end + +function animation:initial() + return self._private.initial +end + +function animation_manager:set_instant(value) + self._private.instant = value +end + +function animation_manager:new(args) + args = args or {} + + args.pos = args.pos or 0 + args.subject = args.subject or nil + args.target = args.target or nil + args.duration = args.duration or 0 + args.easing = args.easing or nil + args.loop = args.loop or false + args.signals = args.signals or {} + args.update = args.update or nil + args.reset_on_stop = args.reset_on_stop == nil and true or args.reset_on_stop + + -- Awestoer/Rubbto compatibility + args.subscribed = args.subscribed or nil + local ret = subscribable() + ret.started = subscribable() + ret.ended = subscribable() + if args.subscribed ~= nil then + ret:subscribe(args.subscribed) + end + + for sig, sigfun in pairs(args.signals) do + ret:connect_signal(sig, sigfun) + end + if args.update ~= nil then + ret:connect_signal("update", args.update) + end + + gtable.crush(ret, args, true) + gtable.crush(ret, animation, true) + + ret._private = {} + ret._private.anim_manager = self + ret._private.initial = args.pos + + return ret +end + +local function new() + local ret = gobject({}) + gtable.crush(ret, animation_manager, true) + + ret._private = {} + ret._private.animations = {} + ret._private.instant = false + + GLib.timeout_add(GLib.PRIORITY_DEFAULT, ANIMATION_FRAME_DELAY, function() + ---@diagnostic disable-next-line: redefined-local + for index, animation in ipairs(ret._private.animations) do + if animation.state == true then + -- compute delta time + local time = GLib.get_monotonic_time() + local delta = time - animation.last_elapsed + animation.last_elapsed = time + + -- If pos is true, the animation has ended + local pos = animation.tween:update(delta) + if pos == true then + -- Loop the animation, don't end it. + -- Useful for widgets like the spinning cicle + if animation.loop == true then + animation.tween:reset() + else + -- Snap to end + animation.pos = animation.tween.target + animation:fire(animation.pos) + animation:emit_signal("update", animation.pos) + + animation.state = false + animation.ended:fire(pos) + table.remove(ret._private.animations, index) + animation:emit_signal("ended", animation.pos) + end + -- Animation in process, keep updating + else + animation.pos = pos + animation:fire(animation.pos) + animation:emit_signal("update", animation.pos) + end + else + table.remove(ret._private.animations, index) + end + end + + -- call again the function after cooldown + return true + end) + + return ret +end + +if not instance then + instance = new() +end +return instance diff --git a/dot_config/awesome/lib/animation/subscribable.lua b/dot_config/awesome/lib/animation/subscribable.lua new file mode 100644 index 0000000..f8cf1a0 --- /dev/null +++ b/dot_config/awesome/lib/animation/subscribable.lua @@ -0,0 +1,47 @@ +------------------------------------------- +-- @author https://github.com/Kasper24 +-- @copyright 2021-2022 Kasper24 +------------------------------------------- + +local gobject = require("gears.object") + +-- Kidna copying awesotre's stores on a surface level for added compatibility +local function subscribable() + local ret = gobject({}) + local subscribed = {} + + -- Subscrubes a function to the object so that it's called when `fire` is + -- Calls subscribe_callback if it exists as well + function ret:subscribe(func) + local id = tostring(func):gsub("function: ", "") + subscribed[id] = func + + if self.subscribe_callback then + self.subscribe_callback(func) + end + end + + -- Unsubscribes a function and calls unsubscribe_callback if it exists + function ret:unsubscribe(func) + if not func then + subscribed = {} + else + local id = tostring(func):gsub("function: ", "") + subscribed[id] = nil + end + + if self.unsubscribe_callback then + self.unsubscribe_callback(func) + end + end + + function ret:fire(...) + for _, func in pairs(subscribed) do + func(...) + end + end + + return ret +end + +return subscribable diff --git a/dot_config/awesome/lib/animation/tween.lua b/dot_config/awesome/lib/animation/tween.lua new file mode 100644 index 0000000..aa9a564 --- /dev/null +++ b/dot_config/awesome/lib/animation/tween.lua @@ -0,0 +1,533 @@ +------------------------------------------- +-- @author https://github.com/Kasper24 +-- @copyright 2021-2022 Kasper24 +------------------------------------------- + +-- easing + +-- Adapted from https://github.com/EmmanuelOga/easing. See LICENSE.txt for credits. +-- For all easing functions: +-- t = time == how much time has to pass for the tweening to complete +-- b = begin == starting property value +-- c = change == ending - beginning +-- d = duration == running time. How much time has passed *right now* + +local gobject = require("gears.object") +local gtable = require("gears.table") + +local tween = { + _VERSION = "tween 2.1.1", + _DESCRIPTION = "tweening for lua", + _URL = "https://github.com/kikito/tween.lua", + _LICENSE = [[ + MIT LICENSE + Copyright (c) 2014 Enrique García Cota, Yuichi Tateno, Emmanuel Oga + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ]], +} + +local sin, cos, pi, sqrt, abs, asin = math.sin, math.cos, math.pi, math.sqrt, math.abs, math.asin + +-- linear +local function linear(t, b, c, d) + return c * t / d + b +end + +-- quad +local function inQuad(t, b, c, d) + return c * ((t / d) ^ 2) + b +end +local function outQuad(t, b, c, d) + t = t / d + return -c * t * (t - 2) + b +end +local function inOutQuad(t, b, c, d) + t = t / d * 2 + if t < 1 then + return c / 2 * (t ^ 2) + b + end + return -c / 2 * ((t - 1) * (t - 3) - 1) + b +end +local function outInQuad(t, b, c, d) + if t < d / 2 then + return outQuad(t * 2, b, c / 2, d) + end + return inQuad((t * 2) - d, b + c / 2, c / 2, d) +end + +-- cubic +local function inCubic(t, b, c, d) + return c * ((t / d) ^ 3) + b +end +local function outCubic(t, b, c, d) + return c * (((t / d - 1) ^ 3) + 1) + b +end +local function inOutCubic(t, b, c, d) + t = t / d * 2 + if t < 1 then + return c / 2 * t * t * t + b + end + t = t - 2 + return c / 2 * (t * t * t + 2) + b +end +local function outInCubic(t, b, c, d) + if t < d / 2 then + return outCubic(t * 2, b, c / 2, d) + end + return inCubic((t * 2) - d, b + c / 2, c / 2, d) +end + +-- quart +local function inQuart(t, b, c, d) + return c * ((t / d) ^ 4) + b +end +local function outQuart(t, b, c, d) + return -c * (((t / d - 1) ^ 4) - 1) + b +end +local function inOutQuart(t, b, c, d) + t = t / d * 2 + if t < 1 then + return c / 2 * (t ^ 4) + b + end + return -c / 2 * (((t - 2) ^ 4) - 2) + b +end +local function outInQuart(t, b, c, d) + if t < d / 2 then + return outQuart(t * 2, b, c / 2, d) + end + return inQuart((t * 2) - d, b + c / 2, c / 2, d) +end + +-- quint +local function inQuint(t, b, c, d) + return c * ((t / d) ^ 5) + b +end +local function outQuint(t, b, c, d) + return c * (((t / d - 1) ^ 5) + 1) + b +end +local function inOutQuint(t, b, c, d) + t = t / d * 2 + if t < 1 then + return c / 2 * (t ^ 5) + b + end + return c / 2 * (((t - 2) ^ 5) + 2) + b +end +local function outInQuint(t, b, c, d) + if t < d / 2 then + return outQuint(t * 2, b, c / 2, d) + end + return inQuint((t * 2) - d, b + c / 2, c / 2, d) +end + +-- sine +local function inSine(t, b, c, d) + return -c * cos(t / d * (pi / 2)) + c + b +end +local function outSine(t, b, c, d) + return c * sin(t / d * (pi / 2)) + b +end +local function inOutSine(t, b, c, d) + return -c / 2 * (cos(pi * t / d) - 1) + b +end +local function outInSine(t, b, c, d) + if t < d / 2 then + return outSine(t * 2, b, c / 2, d) + end + return inSine((t * 2) - d, b + c / 2, c / 2, d) +end + +-- expo +local function inExpo(t, b, c, d) + if t == 0 then + return b + end + return c * (2 ^ (10 * (t / d - 1))) + b - c * 0.001 +end +local function outExpo(t, b, c, d) + if t == d then + return b + c + end + return c * 1.001 * (-(2 ^ (-10 * t / d)) + 1) + b +end +local function inOutExpo(t, b, c, d) + if t == 0 then + return b + end + if t == d then + return b + c + end + t = t / d * 2 + if t < 1 then + return c / 2 * (2 ^ (10 * (t - 1))) + b - c * 0.0005 + end + return c / 2 * 1.0005 * (-(2 ^ (-10 * (t - 1))) + 2) + b +end +local function outInExpo(t, b, c, d) + if t < d / 2 then + return outExpo(t * 2, b, c / 2, d) + end + return inExpo((t * 2) - d, b + c / 2, c / 2, d) +end + +-- circ +local function inCirc(t, b, c, d) + return (-c * (sqrt(1 - ((t / d) ^ 2)) - 1) + b) +end +local function outCirc(t, b, c, d) + return (c * sqrt(1 - ((t / d - 1) ^ 2)) + b) +end +local function inOutCirc(t, b, c, d) + t = t / d * 2 + if t < 1 then + return -c / 2 * (sqrt(1 - t * t) - 1) + b + end + t = t - 2 + return c / 2 * (sqrt(1 - t * t) + 1) + b +end +local function outInCirc(t, b, c, d) + if t < d / 2 then + return outCirc(t * 2, b, c / 2, d) + end + return inCirc((t * 2) - d, b + c / 2, c / 2, d) +end + +-- elastic +local function calculatePAS(p, a, c, d) + p, a = p or d * 0.3, a or 0 + if a < abs(c) then + return p, c, p / 4 + end -- p, a, s + return p, a, p / (2 * pi) * asin(c / a) -- p,a,s +end +local function inElastic(t, b, c, d, a, p) + local s + if t == 0 then + return b + end + t = t / d + if t == 1 then + return b + c + end + p, a, s = calculatePAS(p, a, c, d) + t = t - 1 + return -(a * (2 ^ (10 * t)) * sin((t * d - s) * (2 * pi) / p)) + b +end +local function outElastic(t, b, c, d, a, p) + local s + if t == 0 then + return b + end + t = t / d + if t == 1 then + return b + c + end + p, a, s = calculatePAS(p, a, c, d) + return a * (2 ^ (-10 * t)) * sin((t * d - s) * (2 * pi) / p) + c + b +end +local function inOutElastic(t, b, c, d, a, p) + local s + if t == 0 then + return b + end + t = t / d * 2 + if t == 2 then + return b + c + end + p, a, s = calculatePAS(p, a, c, d) + t = t - 1 + if t < 0 then + return -0.5 * (a * (2 ^ (10 * t)) * sin((t * d - s) * (2 * pi) / p)) + b + end + return a * (2 ^ (-10 * t)) * sin((t * d - s) * (2 * pi) / p) * 0.5 + c + b +end +local function outInElastic(t, b, c, d, a, p) + if t < d / 2 then + return outElastic(t * 2, b, c / 2, d, a, p) + end + return inElastic((t * 2) - d, b + c / 2, c / 2, d, a, p) +end + +-- back +local function inBack(t, b, c, d, s) + s = s or 1.70158 + t = t / d + return c * t * t * ((s + 1) * t - s) + b +end +local function outBack(t, b, c, d, s) + s = s or 1.70158 + t = t / d - 1 + return c * (t * t * ((s + 1) * t + s) + 1) + b +end +local function inOutBack(t, b, c, d, s) + s = (s or 1.70158) * 1.525 + t = t / d * 2 + if t < 1 then + return c / 2 * (t * t * ((s + 1) * t - s)) + b + end + t = t - 2 + return c / 2 * (t * t * ((s + 1) * t + s) + 2) + b +end +local function outInBack(t, b, c, d, s) + if t < d / 2 then + return outBack(t * 2, b, c / 2, d, s) + end + return inBack((t * 2) - d, b + c / 2, c / 2, d, s) +end + +-- bounce +local function outBounce(t, b, c, d) + t = t / d + if t < 1 / 2.75 then + return c * (7.5625 * t * t) + b + end + if t < 2 / 2.75 then + t = t - (1.5 / 2.75) + return c * (7.5625 * t * t + 0.75) + b + elseif t < 2.5 / 2.75 then + t = t - (2.25 / 2.75) + return c * (7.5625 * t * t + 0.9375) + b + end + t = t - (2.625 / 2.75) + return c * (7.5625 * t * t + 0.984375) + b +end +local function inBounce(t, b, c, d) + return c - outBounce(d - t, 0, c, d) + b +end +local function inOutBounce(t, b, c, d) + if t < d / 2 then + return inBounce(t * 2, 0, c, d) * 0.5 + b + end + return outBounce(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b +end +local function outInBounce(t, b, c, d) + if t < d / 2 then + return outBounce(t * 2, b, c / 2, d) + end + return inBounce((t * 2) - d, b + c / 2, c / 2, d) +end + +tween.easing = { + linear = linear, + inQuad = inQuad, + outQuad = outQuad, + inOutQuad = inOutQuad, + outInQuad = outInQuad, + inCubic = inCubic, + outCubic = outCubic, + inOutCubic = inOutCubic, + outInCubic = outInCubic, + inQuart = inQuart, + outQuart = outQuart, + inOutQuart = inOutQuart, + outInQuart = outInQuart, + inQuint = inQuint, + outQuint = outQuint, + inOutQuint = inOutQuint, + outInQuint = outInQuint, + inSine = inSine, + outSine = outSine, + inOutSine = inOutSine, + outInSine = outInSine, + inExpo = inExpo, + outExpo = outExpo, + inOutExpo = inOutExpo, + outInExpo = outInExpo, + inCirc = inCirc, + outCirc = outCirc, + inOutCirc = inOutCirc, + outInCirc = outInCirc, + inElastic = inElastic, + outElastic = outElastic, + inOutElastic = inOutElastic, + outInElastic = outInElastic, + inBack = inBack, + outBack = outBack, + inOutBack = inOutBack, + outInBack = outInBack, + inBounce = inBounce, + outBounce = outBounce, + inOutBounce = inOutBounce, + outInBounce = outInBounce, +} + +-- Private interface +local function copyTables(destination, keysTable, valuesTable) + valuesTable = valuesTable or keysTable + local mt = getmetatable(keysTable) + if mt and getmetatable(destination) == nil then + setmetatable(destination, mt) + end + + for k, v in pairs(keysTable) do + if type(v) == "table" then + destination[k] = copyTables({}, v, valuesTable[k]) + else + destination[k] = valuesTable[k] + end + end + return destination +end + +local function checkSubjectAndTargetRecursively(subject, target, path) + path = path or {} + local targetType, newPath + for k, targetValue in pairs(target) do + targetType, newPath = type(targetValue), copyTables({}, path) + table.insert(newPath, tostring(k)) + if targetType == "number" then + assert( + type(subject[k]) == "number", + "Parameter '" .. table.concat(newPath, "/") .. "' is missing from subject or isn't a number" + ) + elseif targetType == "table" then + checkSubjectAndTargetRecursively(subject[k], targetValue, newPath) + else + assert( + targetType == "number", + "Parameter '" .. table.concat(newPath, "/") .. "' must be a number or table of numbers" + ) + end + end +end + +local function checkNewParams(_, _, subject, target, easing) + -- assert(type(initial) == 'number' and duration > 0, "duration must be a positive number. Was " .. tostring(duration)) + -- assert(type(duration) == 'number' and duration > 0, "duration must be a positive number. Was " .. tostring(duration)) + assert(type(easing) == "function", "easing must be a function. Was " .. tostring(easing)) + + if subject and target then + local tsubject = type(subject) + assert( + tsubject == "table" or tsubject == "userdata", + "subject must be a table or userdata. Was " .. tostring(subject) + ) + assert(type(target) == "table", "target must be a table. Was " .. tostring(target)) + checkSubjectAndTargetRecursively(subject, target) + end +end + +local function getEasingFunction(easing) + easing = easing or "linear" + if type(easing) == "string" then + local name = easing + easing = tween.easing[name] + if type(easing) ~= "function" then + error("The easing function name '" .. name .. "' is invalid") + end + end + return easing +end + +local function performEasingOnSubject(subject, target, initial, clock, duration, easing) + local t, b, c, d + for k, v in pairs(target) do + if type(v) == "table" then + performEasingOnSubject(subject[k], v, initial[k], clock, duration, easing) + else + t, b, c, d = clock, initial[k], v - initial[k], duration + subject[k] = easing(t, b, c, d) + end + end +end + +local function performEasing(table, initial, target, clock, duration, easing) + if type(target) == "table" then + local t, b, c, d + for k, v in pairs(target) do + if type(v) == "table" then + table[k] = {} + performEasing(table[k], initial[k], v, clock, duration, easing) + else + t, b, c, d = clock, initial[k], v - initial[k], duration + table[k] = easing(t, b, c, d) + end + end + + return table + else + local t, b, c, d = clock, initial, target - initial, duration + return easing(t, b, c, d) + end +end + +-- Public interface +local Tween = {} + +function Tween:set(clock) + assert(type(clock) == "number", "clock must be a positive number or 0") + + if self.subject and self.initial == 0 then + self.initial = copyTables({}, self.target, self.subject) + end + + self.clock = clock + + if self.clock <= 0 then + self.clock = 0 + if self.subject then + copyTables(self.subject, self.initial) + end + elseif self.clock >= self.duration then -- the tween has expired + self.clock = self.duration + + if self.subject then + copyTables(self.subject, self.target) + end + else + if self.subject then + performEasingOnSubject(self.subject, self.target, self.initial, self.clock, self.duration, self.easing) + else + local pos = {} + return performEasing(pos, self.initial, self.target, self.clock, self.duration, self.easing) + end + end + + return self.clock >= self.duration +end + +function Tween:update(dt) + assert(type(dt) == "number", "dt must be a number") + return self:set(self.clock + dt) +end + +function Tween:reset() + return self:set(0) +end + +function tween.new(args) + args = args or {} + + args.initial = args.initial or 0 + args.subject = args.subject or nil + args.target = args.target or nil + args.duration = args.duration or 0 + args.easing = args.easing or nil + + args.easing = getEasingFunction(args.easing) + checkNewParams(args.initial, args.duration, args.subject, args.target, args.easing) + + local ret = gobject({}) + ret.clock = 0 + + gtable.crush(ret, args, true) + gtable.crush(ret, Tween, true) + + return ret +end + +return tween diff --git a/dot_config/awesome/lib/better-resize.lua b/dot_config/awesome/lib/better-resize.lua new file mode 100644 index 0000000..b3ac9ad --- /dev/null +++ b/dot_config/awesome/lib/better-resize.lua @@ -0,0 +1,138 @@ +local capi = { + client = client, + mouse = mouse, + screen = screen, + mousegrabber = mousegrabber, +} +local awful = require("awful") + +local function mouse_resize_handler(m, c) + awful.client.incwfact(0, c) -- needed to fix normalization at start + local start = m(capi.mouse.coords()) + local x, y = start.x, start.y + local wa = m(c.screen.workarea) + local idx = awful.client.idx(c) + local c_above + local idx_above, idx_below + local wfact_above, wfact_below + local jump_to = { x = x, y = y } + local move_mwfact = false + + do + local g = m(c:geometry()) + + local v_border = 0.2 * g.height + + if idx and idx.idx > 1 and y >= g.y and y <= g.y + v_border then + -- we are near the top edge of the window + c_above = awful.client.next(-1, c) + C_BELOW = c + jump_to.y = g.y + idx_above = idx.idx - 1 + idx_below = idx.idx + elseif idx and idx.idx < idx.num and y >= g.y + g.height - v_border then + -- we are near the bottom edge of the window + c_above = c + C_BELOW = awful.client.next(1, c) + idx_above = idx.idx + idx_below = idx.idx + 1 + jump_to.y = g.y + g.height + end + + local mw_split = wa.x + wa.width * c.screen.selected_tag.master_width_factor + + if math.abs(mw_split - x) > wa.width / 6 then + move_mwfact = false + else + move_mwfact = true + jump_to.x = mw_split + end + end + + if idx and idx_above then + local t = c.screen.selected_tag + local data = t.windowfact or {} + local colfact = data[idx.col] or {} + wfact_above = colfact[idx_above] or 1 + wfact_below = colfact[idx_below] or 1 + end + + if idx_above and move_mwfact then + CURSOR = "cross" + elseif idx_above then + CURSOR = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).y + elseif move_mwfact then + CURSOR = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).x + else + return false + end + + capi.mouse.coords(m(jump_to)) + + capi.mousegrabber.run(function(_mouse) + if not c.valid then + return false + end + + local pressed = false + for _, v in ipairs(_mouse.buttons) do + if v then + pressed = true + break + end + end + + _mouse = m(_mouse) + + if pressed then + if move_mwfact then + c.screen.selected_tag.master_width_factor = math.min(math.max((_mouse.x - wa.x) / wa.width, 0.01), 0.99) + end + + if idx and idx_above then + local factor_delta = (_mouse.y - jump_to.y) / wa.height + + if factor_delta < 0 then + factor_delta = math.max(factor_delta, -(wfact_above - 0.05)) + else + factor_delta = math.min(factor_delta, wfact_below - 0.05) + end + + local t = c.screen.selected_tag + local data = t.windowfact or {} + local colfact = data[idx.col] or {} + colfact[idx_above] = wfact_above + factor_delta + colfact[idx_below] = wfact_below - factor_delta + awful.client.incwfact(0, c_above) -- just in case + end + return true + else + return false + end + end, CURSOR) + + return true +end + +awful.layout.suit.tile.mouse_resize_handler = function(c) + return mouse_resize_handler(function(x) + return x + end, c) +end +---@diagnostic disable-next-line: duplicate-set-field +awful.layout.suit.tile.bottom.mouse_resize_handler = function(c) + return mouse_resize_handler(function(q) + return { x = q.y, y = q.x, width = q.height, height = q.width } + end, c) +end + +-- local old_coords = mouse.coords + +-- mouse.coords = function(...) +-- if select(1, ...) and not(select(1, ...).blah) then +-- print("set mouse!!!") +-- print(debug.traceback()) + +-- end +-- return old_coords(...) +-- end diff --git a/dot_config/awesome/lib/exit-screen.lua b/dot_config/awesome/lib/exit-screen.lua new file mode 100644 index 0000000..429d793 --- /dev/null +++ b/dot_config/awesome/lib/exit-screen.lua @@ -0,0 +1,186 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") +local config = require("config") + +local dpi = beautiful.xresources.apply_dpi +local theme = beautiful.get() + +--- Minimalist Exit Screen +--- ~~~~~~~~~~~~~~~~~~~~~~ + +--- Icons +local icon_font = helpers.ui.set_font("bold 45") +local poweroff_text_icon = config.icons.power +local reboot_text_icon = config.icons.restart +local suspend_text_icon = config.icons.sleep +local exit_text_icon = config.icons.exit +local lock_text_icon = config.icons.lock + +local button_bg = theme.color.base +local button_size = dpi(120) + +--- Commands +local poweroff_command = function() + awful.spawn.with_shell("systemctl poweroff") + awesome.emit_signal("module::exit_screen:hide") +end + +local reboot_command = function() + awful.spawn.with_shell("systemctl reboot") + awesome.emit_signal("module::exit_screen:hide") +end + +local suspend_command = function() + awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("systemctl suspend") +end + +local exit_command = function() + awesome.quit() +end + +local lock_command = function() + awesome.emit_signal("module::exit_screen:hide") +end + +local create_button = function(symbol, hover_color, _, command) + local icon = wibox.widget({ + forced_height = button_size, + forced_width = button_size, + halign = "center", + valign = "center", + font = icon_font, + markup = helpers.ui.colorize_text(symbol, theme.color.surface0), + widget = wibox.widget.textbox(), + }) + + local button = wibox.widget({ + { + nil, + icon, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + forced_height = button_size, + forced_width = button_size, + border_width = dpi(8), + border_color = theme.color.surface0, + shape = helpers.ui.rrect(theme.border_width * 2), + bg = button_bg, + widget = wibox.container.background, + }) + + button:buttons(gears.table.join(awful.button({}, 1, function() + command() + end))) + + button:connect_signal("mouse::enter", function() + icon.markup = helpers.ui.colorize_text(icon.text, hover_color) + button.border_color = hover_color + end) + button:connect_signal("mouse::leave", function() + icon.markup = helpers.ui.colorize_text(icon.text, theme.color.surface0) + button.border_color = theme.color.surface0 + end) + + helpers.ui.add_hover_cursor(button, "hand1") + + return button +end + +--- Create the buttons +local poweroff = create_button(poweroff_text_icon, theme.color.red, "Poweroff", poweroff_command) +local reboot = create_button(reboot_text_icon, theme.color.green, "Reboot", reboot_command) +local suspend = create_button(suspend_text_icon, theme.color.peach, "Suspend", suspend_command) +local exit = create_button(exit_text_icon, theme.color.blue, "Exit", exit_command) +local lock = create_button(lock_text_icon, theme.color.pink, "Lock", lock_command) + +local create_exit_screen = function(s) + s.exit_screen = wibox({ + screen = s, + type = "splash", + visible = false, + ontop = true, + bg = theme.color.transparent, + fg = theme.fg_normal, + height = s.geometry.height, + width = s.geometry.width, + x = s.geometry.x, + y = s.geometry.y, + }) + + s.exit_screen:buttons(gears.table.join( + awful.button({}, 2, function() + awesome.emit_signal("module::exit_screen:hide") + end), + awful.button({}, 3, function() + awesome.emit_signal("module::exit_screen:hide") + end) + )) + + s.exit_screen:setup({ + nil, + { + nil, + { + poweroff, + reboot, + suspend, + exit, + lock, + spacing = dpi(50), + layout = wibox.layout.fixed.horizontal, + }, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }) +end + +screen.connect_signal("request::desktop_decoration", function(s) + create_exit_screen(s) +end) + +screen.connect_signal("removed", function(s) + create_exit_screen(s) +end) + +local exit_screen_grabber = awful.keygrabber({ + auto_start = true, + stop_event = "release", + keypressed_callback = function(_, _, key, _) + if key == "s" then + suspend_command() + elseif key == "e" then + exit_command() + elseif key == "l" then + lock_command() + elseif key == "p" then + poweroff_command() + elseif key == "r" then + reboot_command() + elseif key == "Escape" or key == "q" or key == "x" then + awesome.emit_signal("module::exit_screen:hide") + end + end, +}) + +awesome.connect_signal("module::exit_screen:show", function() + for s in screen do + s.exit_screen.visible = false + end + awful.screen.focused().exit_screen.visible = true + exit_screen_grabber:start() +end) + +awesome.connect_signal("module::exit_screen:hide", function() + exit_screen_grabber:stop() + for s in screen do + s.exit_screen.visible = false + end +end) diff --git a/dot_config/awesome/lib/init.lua b/dot_config/awesome/lib/init.lua new file mode 100644 index 0000000..d4efccb --- /dev/null +++ b/dot_config/awesome/lib/init.lua @@ -0,0 +1,9 @@ +local req = { + "better-resize", + "savefloats", + "exit-screen", +} + +for _, x in pairs(req) do + require(... .. "." .. x) +end diff --git a/dot_config/awesome/lib/json.lua b/dot_config/awesome/lib/json.lua new file mode 100644 index 0000000..f64bdc4 --- /dev/null +++ b/dot_config/awesome/lib/json.lua @@ -0,0 +1,372 @@ +-- +-- json.lua +-- +-- Copyright (c) 2020 rxi +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of +-- this software and associated documentation files (the "Software"), to deal in +-- the Software without restriction, including without limitation the rights to +-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. +-- + +local json = { _version = "0.1.2" } + +------------------------------------------------------------------------------- +-- Encode +------------------------------------------------------------------------------- + +local encode + +local escape_char_map = { + ["\\"] = "\\", + ['"'] = '"', + ["\b"] = "b", + ["\f"] = "f", + ["\n"] = "n", + ["\r"] = "r", + ["\t"] = "t", +} + +local escape_char_map_inv = { ["/"] = "/" } +for k, v in pairs(escape_char_map) do + escape_char_map_inv[v] = k +end + +local function escape_char(c) + return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) +end + +local function encode_nil(_) + return "null" +end + +local function encode_table(val, stack) + local res = {} + stack = stack or {} + + -- Circular reference? + if stack[val] then + error("circular reference") + end + + stack[val] = true + + if rawget(val, 1) ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= "number" then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then + error("invalid table: sparse array") + end + -- Encode + for _, v in ipairs(val) do + table.insert(res, encode(v, stack)) + end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= "string" then + error("invalid table: mixed or invalid key types") + end + table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end +end + +local function encode_string(val) + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' +end + +local function encode_number(val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) +end + +local type_func_map = { + ["nil"] = encode_nil, + ["table"] = encode_table, + ["string"] = encode_string, + ["number"] = encode_number, + ["boolean"] = tostring, +} + +encode = function(val, stack) + local t = type(val) + local f = type_func_map[t] + if f then + return f(val, stack) + end + error("unexpected type '" .. t .. "'") +end + +function json.encode(val) + return (encode(val)) +end + +------------------------------------------------------------------------------- +-- Decode +------------------------------------------------------------------------------- + +local parse + +local function create_set(...) + local res = {} + for i = 1, select("#", ...) do + res[select(i, ...)] = true + end + return res +end + +local space_chars = create_set(" ", "\t", "\r", "\n") +local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") +local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") +local literals = create_set("true", "false", "null") + +local literal_map = { + ["true"] = true, + ["false"] = false, + ["null"] = nil, +} + +local function next_char(str, idx, set, negate) + for i = idx, #str do + if set[str:sub(i, i)] ~= negate then + return i + end + end + return #str + 1 +end + +local function decode_error(str, idx, msg) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error(string.format("%s at line %d col %d", msg, line_count, col_count)) +end + +local function codepoint_to_utf8(n) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = math.floor + if n <= 0x7f then + return string.char(n) + elseif n <= 0x7ff then + return string.char(f(n / 64) + 192, n % 64 + 128) + elseif n <= 0xffff then + return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, f(n % 4096 / 64) + 128, n % 64 + 128) + end + error(string.format("invalid unicode codepoint '%x'", n)) +end + +local function parse_unicode_escape(s) + local n1 = tonumber(s:sub(1, 4), 16) + local n2 = tonumber(s:sub(7, 10), 16) + -- Surrogate pair? + if n2 then + return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end +end + +local function parse_string(str, i) + local res = "" + local j = i + 1 + local k = j + + while j <= #str do + local x = str:byte(j) + + if x < 32 then + decode_error(str, j, "control character in string") + elseif x == 92 then -- `\`: Escape + res = res .. str:sub(k, j - 1) + j = j + 1 + local c = str:sub(j, j) + if c == "u" then + local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) + or str:match("^%x%x%x%x", j + 1) + or decode_error(str, j - 1, "invalid unicode escape in string") + res = res .. parse_unicode_escape(hex) + j = j + #hex + else + if not escape_chars[c] then + decode_error(str, j - 1, "invalid escape char '" .. c .. "' in string") + end + res = res .. escape_char_map_inv[c] + end + k = j + 1 + elseif x == 34 then -- `"`: End of string + res = res .. str:sub(k, j - 1) + return res, j + 1 + end + + j = j + 1 + end + + decode_error(str, i, "expected closing quote for string") +end + +local function parse_number(str, i) + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then + decode_error(str, i, "invalid number '" .. s .. "'") + end + return n, x +end + +local function parse_literal(str, i) + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x +end + +local function parse_array(str, i) + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then + break + end + if chr ~= "," then + decode_error(str, i, "expected ']' or ','") + end + end + return res, i +end + +local function parse_object(str, i) + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then + break + end + if chr ~= "," then + decode_error(str, i, "expected '}' or ','") + end + end + return res, i +end + +local char_func_map = { + ['"'] = parse_string, + ["0"] = parse_number, + ["1"] = parse_number, + ["2"] = parse_number, + ["3"] = parse_number, + ["4"] = parse_number, + ["5"] = parse_number, + ["6"] = parse_number, + ["7"] = parse_number, + ["8"] = parse_number, + ["9"] = parse_number, + ["-"] = parse_number, + ["t"] = parse_literal, + ["f"] = parse_literal, + ["n"] = parse_literal, + ["["] = parse_array, + ["{"] = parse_object, +} + +parse = function(str, idx) + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then + return f(str, idx) + end + decode_error(str, idx, "unexpected character '" .. chr .. "'") +end + +function json.decode(str) + if type(str) ~= "string" then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then + decode_error(str, idx, "trailing garbage") + end + return res +end + +return json diff --git a/dot_config/awesome/lib/savefloats.lua b/dot_config/awesome/lib/savefloats.lua new file mode 100644 index 0000000..6fec1ba --- /dev/null +++ b/dot_config/awesome/lib/savefloats.lua @@ -0,0 +1,58 @@ +local awful = require("awful") + +local function rel(screen, win) + return { + x = (win.x - screen.x) / screen.width, + y = (win.y - screen.y) / screen.height, + width = win.width / screen.width, + aspect = win.height / win.width, + } +end + +local function unrel(s, _rel) + return _rel + and { + x = s.x + s.width * _rel.x, + y = s.y + s.height * _rel.y, + width = s.width * _rel.width, + height = _rel.aspect * s.width * _rel.width, + } +end + +local stored = {} + +local function forget(c) + stored[c] = nil +end + +local floating = awful.layout.suit.floating + +function Remember(c) + if floating == awful.layout.get(c.screen) or c.floating then + stored[c.window] = rel(c.screen.geometry, c:geometry()) + end +end + +function Restore(c) + local s = stored[c.window] + if s then + c:geometry(unrel(c.screen.geometry, stored[c.window])) + return true + else + return false + end +end + +client.connect_signal("manage", Remember) +client.connect_signal("property::geometry", Remember) +client.connect_signal("unmanage", forget) + +tag.connect_signal("property::layout", function(t) + if floating == awful.layout.get(t.screen) then + for _, c in ipairs(t:clients()) do + c:geometry(unrel(t.screen.geometry, stored[c.window])) + end + end +end) + +return Restore diff --git a/dot_config/awesome/main/bindings.lua b/dot_config/awesome/main/bindings.lua new file mode 100644 index 0000000..d61a828 --- /dev/null +++ b/dot_config/awesome/main/bindings.lua @@ -0,0 +1,286 @@ +local awful = require("awful") +local hotkeys_popup = require("awful.hotkeys_popup") +local menubar = require("menubar") +local machi = require("lib.layout-machi") +local menu = require("main.menu") + +local config = require("config") +local apps = config.apps +local keys = config.keys + +-- General awesome keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ keys.mod, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }), + + awful.key({ keys.mod, "Shift" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }), + + awful.key({ keys.mod, "Control", "Shift" }, "x", function() + awful.prompt.run({ + prompt = "Run Lua code: ", + textbox = awful.screen.focused().promptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval", + }) + end, { description = "lua execute prompt", group = "awesome" }), + + awful.key({ keys.mod }, "Return", function() + awful.spawn(apps.terminal) + end, { description = "open a terminal", group = "launcher" }), + + awful.key({ keys.mod, "Shift" }, "c", function() + menu.mainmenu:show() + end, { description = "show main menu", group = "awesome" }), + + awful.key({ keys.mod }, "p", function() + menubar.show() + end, { description = "show the menubar", group = "launcher" }), +}) + +-- Tag bindings +awful.keyboard.append_global_keybindings({ + awful.key({ keys.mod, "Control" }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }), + + awful.key({ keys.mod }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }), + + awful.key({ keys.mod }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }), + + awful.key({ keys.mod }, "Tab", awful.tag.history.restore, { description = "go back", group = "tag" }), +}) + +awful.keyboard.append_global_keybindings({ + awful.key({ + modifiers = { keys.mod }, + keygroup = "numrow", + description = "only view tag", + group = "tag", + on_press = function(index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + tag:view_only() + end + end, + }), + + awful.key({ + modifiers = { keys.mod, "Control" }, + keygroup = "numrow", + description = "toggle tag", + group = "tag", + on_press = function(index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + awful.tag.viewtoggle(tag) + end + end, + }), + + awful.key({ + modifiers = { keys.mod, "Shift" }, + keygroup = "numrow", + description = "move focused client to tag", + group = "tag", + on_press = function(index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + }), + + awful.key({ + modifiers = { keys.mod, "Control", "Shift" }, + keygroup = "numrow", + description = "toggle focused client on tag", + group = "tag", + on_press = function(index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + }), + + awful.key({ + modifiers = { keys.mod }, + keygroup = "numpad", + description = "select layout directly", + group = "layout", + on_press = function(index) + local t = awful.screen.focused().selected_tag + if t then + t.layout = t.layouts[index] or t.layout + end + end, + }), +}) + +-- Focus bindings +awful.keyboard.append_global_keybindings({ + awful.key({ keys.mod }, "c", function() + awful.client.focus.byidx(1) + end, { description = "focus next by index", group = "client" }), + + awful.key({ keys.mod }, "x", function() + awful.client.focus.byidx(-1) + end, { description = "focus previous by index", group = "client" }), + + awful.key({ keys.mod }, "Escape", function() + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, { description = "go back", group = "client" }), + + awful.key({ keys.mod, "Control" }, "j", function() + awful.screen.focus_relative(1) + end, { description = "focus the next screen", group = "screen" }), + + awful.key({ keys.mod, "Control" }, "k", function() + awful.screen.focus_relative(-1) + end, { description = "focus the previous screen", group = "screen" }), + + awful.key({ keys.mod, "Control" }, "n", function() + local c = awful.client.restore() + -- Focus restored client + if c then + c:activate({ raise = true, context = "key.unminimize" }) + end + end, { description = "restore minimized", group = "client" }), +}) + +-- Layout bindings +awful.keyboard.append_global_keybindings({ + awful.key({ keys.mod, "Shift" }, "j", function() + awful.client.swap.byidx(1) + end, { description = "swap with next client by index", group = "client" }), + + awful.key({ keys.mod, "Shift" }, "k", function() + awful.client.swap.byidx(-1) + end, { description = "swap with previous client by index", group = "client" }), + + awful.key( + { keys.mod }, + "u", + awful.client.urgent.jumpto, + { description = "jump to urgent client", group = "client" } + ), + + awful.key({ keys.mod }, "l", function() + awful.tag.incmwfact(0.05) + end, { description = "increase master width factor", group = "layout" }), + + awful.key({ keys.mod }, "h", function() + awful.tag.incmwfact(-0.05) + end, { description = "decrease master width factor", group = "layout" }), + + awful.key({ keys.mod, "Shift" }, "h", function() + awful.tag.incnmaster(1, nil, true) + end, { description = "increase the number of master clients", group = "layout" }), + + awful.key({ keys.mod, "Shift" }, "l", function() + awful.tag.incnmaster(-1, nil, true) + end, { description = "decrease the number of master clients", group = "layout" }), + + awful.key({ keys.mod, "Control" }, "h", function() + awful.tag.incncol(1, nil, true) + end, { description = "increase the number of columns", group = "layout" }), + + awful.key({ keys.mod, "Control" }, "l", function() + awful.tag.incncol(-1, nil, true) + end, { description = "decrease the number of columns", group = "layout" }), + + awful.key({ keys.mod }, "-", function() + machi.default_editor.start_interactive() + end, { description = "edit the current layout if it is a machi layout", group = "layout" }), + + awful.key({ keys.mod }, ".", function() + machi.switcher.start(client.focus) + end, { description = "switch between windows for a machi layout", group = "layout" }), +}) + +-- Client bindings +client.connect_signal("request::default_keybindings", function() + awful.keyboard.append_client_keybindings({ + awful.key({ keys.mod }, "f", function(c) + c.fullscreen = not c.fullscreen + c:raise() + end, { description = "toggle fullscreen", group = "client" }), + + awful.key({ keys.mod }, "w", function(c) + c:kill() + end, { description = "close", group = "client" }), + + awful.key( + { keys.mod, "Control" }, + "space", + awful.client.floating.toggle, + { description = "toggle floating", group = "client" } + ), + + awful.key({ keys.mod, "Control" }, "Return", function(c) + c:swap(awful.client.getmaster()) + end, { description = "move to master", group = "client" }), + + awful.key({ keys.mod }, "o", function(c) + c:move_to_screen() + end, { description = "move to screen", group = "client" }), + + awful.key({ keys.mod }, "t", function(c) + c.ontop = not c.ontop + end, { description = "toggle keep on top", group = "client" }), + + awful.key({ keys.mod }, "n", function(c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end, { description = "minimize", group = "client" }), + + awful.key({ keys.mod }, "m", function(c) + c.maximized = not c.maximized + c:raise() + end, { description = "(un)maximize", group = "client" }), + + awful.key({ keys.mod, "Control" }, "m", function(c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end, { description = "(un)maximize vertically", group = "client" }), + + awful.key({ keys.mod, "Shift" }, "m", function(c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end, { description = "(un)maximize horizontally", group = "client" }), + }) +end) + +-- Mouse bindings +awful.mouse.append_global_mousebindings({ + awful.button({}, 3, function() + menu.mainmenu:toggle() + end), + + awful.button({}, 4, awful.tag.viewprev), + + awful.button({}, 5, awful.tag.viewnext), +}) + +client.connect_signal("request::default_mousebindings", function() + awful.mouse.append_client_mousebindings({ + awful.button({}, 1, function(c) + c:activate({ context = "mouse_click" }) + end), + + awful.button({ keys.mod }, 1, function(c) + c:activate({ context = "mouse_click", action = "mouse_move" }) + end), + + awful.button({ keys.mod }, 3, function(c) + c:activate({ context = "mouse_click", action = "mouse_resize" }) + end), + }) +end) diff --git a/dot_config/awesome/main/custom_bindings.lua b/dot_config/awesome/main/custom_bindings.lua new file mode 100644 index 0000000..f373c44 --- /dev/null +++ b/dot_config/awesome/main/custom_bindings.lua @@ -0,0 +1,63 @@ +local awful = require("awful") +local volume = require("ui.popups.volume") +local filesystem = require("gears.filesystem") +local config = require("config") + +local keys = config.keys + +local config_dir = filesystem.get_configuration_dir() +local utils_dir = config_dir .. "utilities/" + +local screenshot_area = utils_dir .. "screensht area" +local screenshot_full = utils_dir .. "screensht full" + +awful.keyboard.append_global_keybindings({ + awful.key({ keys.mod }, "r", function() + awful.spawn(config.apps.launcher) + end, { description = "show rofi", group = "launcher" }), + + awful.key({ keys.mod }, "Print", function() + awful.spawn.easy_async_with_shell(screenshot_area, function() end) + end, { description = "take a area screenshot", group = "Utils" }), + + awful.key({}, "Print", function() + awful.spawn.easy_async_with_shell(screenshot_full, function() end) + end, { description = "take a full screenshot", group = "Utils" }), + + awful.key({ keys.mod }, "q", function() + awesome.emit_signal("module::exit_screen:show") + end, { description = "show Exit Screen", group = "Utils" }), + + awful.key({ keys.mod }, "s", function() + awesome.emit_signal("scratchpad::toggle") + end, { description = "show Scratchpad", group = "Utils" }), + + awful.key({ keys.mod }, "b", function() + awful.spawn.easy_async_with_shell("headsetcontrol -l 0", function() end) + end, { description = "headsetcontrol", group = "Utils" }), + + awful.key({ keys.mod }, "t", function() + awful.titlebar.toggle(client.focus) + end, { description = "toggle titlebar for active client", group = "Utils" }), -- Toggle titlebar +}) + +-- Volume +awful.keyboard.append_global_keybindings({ + awful.key({}, "XF86AudioRaiseVolume", function() + volume.increase() + awesome.emit_signal("widget::update_vol") + awesome.emit_signal("module::volume_osd:show", true) + end), + + awful.key({}, "XF86AudioLowerVolume", function() + volume.decrease() + awesome.emit_signal("widget::update_vol") + awesome.emit_signal("module::volume_osd:show", true) + end), + + awful.key({}, "XF86AudioMute", function() + volume.mute() + awesome.emit_signal("widget::update_vol") + awesome.emit_signal("module::volume_osd:show", true) + end), +}) diff --git a/dot_config/awesome/main/error_handling.lua b/dot_config/awesome/main/error_handling.lua new file mode 100644 index 0000000..eb3bfb0 --- /dev/null +++ b/dot_config/awesome/main/error_handling.lua @@ -0,0 +1,31 @@ +local naughty = require("naughty") + +-- Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ + preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors, + }) +end + +-- Handle runtime errors after startup +do + local in_error = false + awesome.connect_signal("debug::error", function(err) + -- Make sure we don't go into an endless error loop + if in_error then + return + end + in_error = true + + naughty.notify({ + preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err), + }) + in_error = false + end) +end diff --git a/dot_config/awesome/main/init.lua b/dot_config/awesome/main/init.lua new file mode 100644 index 0000000..23cfb09 --- /dev/null +++ b/dot_config/awesome/main/init.lua @@ -0,0 +1,14 @@ +local req = { + "error_handling", + "layout", + "menu", + "wallpaper", + "bindings", + "custom_bindings", + "rules", + "tags", +} + +for _, x in pairs(req) do + require(... .. "." .. x) +end diff --git a/dot_config/awesome/main/layout.lua b/dot_config/awesome/main/layout.lua new file mode 100644 index 0000000..b989b09 --- /dev/null +++ b/dot_config/awesome/main/layout.lua @@ -0,0 +1,36 @@ +local awful = require("awful") +local bling = require("lib.bling") +local machi = require("lib.layout-machi") + +-- Custom Layouts +local mstab = bling.layout.mstab +local centered = bling.layout.centered +local equal = bling.layout.equalarea +local deck = bling.layout.deck + +machi.editor.nested_layouts = { + ["0"] = deck, + ["1"] = mstab, + ["2"] = awful.layout.suit.spiral, + ["3"] = awful.layout.suit.fair, + ["4"] = awful.layout.suit.fair.horizontal, +} + +-- Table of layouts to cover with awful.layout.inc, order matters. +awful.layout.append_default_layouts({ + awful.layout.suit.tile, + awful.layout.suit.spiral.dwindle, + awful.layout.suit.floating, + awful.layout.suit.max, + centered, + mstab, + equal, + machi.default_layout, +}) + +client.connect_signal("manage", function(c) + if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) diff --git a/dot_config/awesome/main/menu.lua b/dot_config/awesome/main/menu.lua new file mode 100644 index 0000000..52dbb13 --- /dev/null +++ b/dot_config/awesome/main/menu.lua @@ -0,0 +1,107 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local helpers = require("helpers") +local hotkeys_popup = require("awful.hotkeys_popup") + +local theme = require("beautiful").get() +local apps = require("config").apps + +local menu = {} + +local rofi = {} +rofi.timer = gears.timer({ + autostart = false, + timeout = 0.1, + single_shot = true, + callback = function() + awful.spawn(apps.launcher) + end, +}) + +menu.awesome = { + { + "Hotkeys", + function() + hotkeys_popup.show_help(nil, awful.screen.focused()) + end, + }, + { "Manual", apps.terminal .. " -e man awesome" }, + { "Edit Config", apps.start_editor .. " " .. awesome.conffile }, + { "Restart", awesome.restart }, + { + "Quit", + function() + awesome.quit() + end, + }, +} + +menu.mainmenu = awful.menu({ + items = { + { + "Applications", + function() + menu.mainmenu:hide() + rofi.timer:start() + end, + }, + { "Terminal", apps.terminal }, + { "Web Browser", apps.browser }, + { "File Manager", apps.file_manager }, + { "Text Editor", apps.code_editor }, + { "Music Player", apps.music_player }, + { + "Info Panel", + function() + awesome.emit_signal("sidebar::toggle") + end, + }, + { + "Notifications", + function() + awesome.emit_signal("action::toggle") + end, + }, + { + "Exit", + function() + awesome.emit_signal("module::exit_screen:show") + end, + }, + { "AwesomeWM", menu.awesome }, + }, +}) + +-- apply rounded corners to menus when picom isn't available, thanks to u/signalsourcesexy +-- also applies antialiasing! - By me. +menu.mainmenu.wibox.shape = helpers.ui.rrect(10) +menu.mainmenu.wibox.bg = theme.bg_normal .. "00" +menu.mainmenu.wibox:set_widget(wibox.widget({ + menu.mainmenu.wibox.widget, + bg = theme.bg_normal, + shape = helpers.ui.rrect(0), + widget = wibox.container.background, +})) + +-- apply rounded corners to submenus, thanks to u/signalsourcesexy +-- also applies antialiasing! - By me. +awful.menu.original_new = awful.menu.new + +---@diagnostic disable-next-line: duplicate-set-field +function awful.menu.new(...) + local ret = awful.menu.original_new(...) + + ret.wibox.shape = helpers.ui.rrect(10) + ret.wibox.bg = theme.bg_normal .. "00" + ret.wibox:set_widget(wibox.widget({ + ret.wibox.widget, + widget = wibox.container.background, + bg = theme.color.base, + shape = helpers.ui.rrect(0), + })) + + return ret +end + +return menu diff --git a/dot_config/awesome/main/rules.lua b/dot_config/awesome/main/rules.lua new file mode 100644 index 0000000..9749b2e --- /dev/null +++ b/dot_config/awesome/main/rules.lua @@ -0,0 +1,78 @@ +local awful = require("awful") +local ruled = require("ruled") +local dpi = require("beautiful.xresources").apply_dpi +local helpers = require("helpers") +local config = require("config") + +ruled.client.connect_signal("request::rules", function() + ruled.client.append_rule({ + id = "global", + rule = {}, + properties = { + focus = awful.client.focus.filter, + raise = true, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap + awful.placement.no_offscreen, + }, + }) + + ruled.client.append_rule({ + id = "titlebars", + rule_any = { + type = { "normal", "dialog" }, + }, + properties = { + titlebars_enabled = false, + }, + }) + + ruled.client.append_rule({ + rule = { class = config.apps.launcher }, + properties = { + titlebars_enabled = false, + }, + }) + + ruled.client.append_rule({ + rule = { instance = "origin.exe" }, + properties = { + floating = true, + titlebars_enabled = false, + shape = helpers.ui.rrect(0), + border_width = dpi(0), + }, + }) + + ruled.client.append_rule({ + rule = { instance = "bf1.exe" }, + properties = { shape = helpers.ui.rrect(0), fullscreen = true, tag = "󰍹", switchtotag = true }, + }) + ruled.client.append_rule({ + rule = { instance = "wine" }, + properties = { shape = helpers.ui.rrect(0), titlebars_enabled = false }, + }) + + ruled.client.append_rule({ + rule_any = { + floating = true, + }, + properties = { + placement = awful.placement.centered, + ontop = true, + }, + }) + + ruled.client.append_rule({ + rule_any = { + class = { + "xfce", + }, + instance = { + "xfce", + }, + }, + properties = { + floating = true, + }, + }) +end) diff --git a/dot_config/awesome/main/tags.lua b/dot_config/awesome/main/tags.lua new file mode 100644 index 0000000..fbd5106 --- /dev/null +++ b/dot_config/awesome/main/tags.lua @@ -0,0 +1,10 @@ +local awful = require("awful") +local icons = require("config").icons.tags + +screen.connect_signal("request::desktop_decoration", function(s) + awful.tag( + { icons.general, icons.files, icons.media, icons.terminal, icons.coding, icons.misc }, + s, + awful.layout.layouts[1] + ) +end) diff --git a/dot_config/awesome/main/wallpaper.lua b/dot_config/awesome/main/wallpaper.lua new file mode 100644 index 0000000..c7dff3f --- /dev/null +++ b/dot_config/awesome/main/wallpaper.lua @@ -0,0 +1,26 @@ +local awful = require("awful") +local wibox = require("wibox") + +local image = require("config").theme.wallpaper + +local function set_wall(s) + awful.wallpaper({ + screen = s, + widget = { + { + image = image, + upscale = true, + downscale = true, + widget = wibox.widget.imagebox, + }, + valign = "center", + halign = "center", + tiled = true, + widget = wibox.container.tile, + }, + }) +end + +screen.connect_signal("request::wallpaper", function(s) + set_wall(s) +end) diff --git a/dot_config/awesome/rc.lua b/dot_config/awesome/rc.lua new file mode 100644 index 0000000..33251d6 --- /dev/null +++ b/dot_config/awesome/rc.lua @@ -0,0 +1,26 @@ +pcall(require, "luarocks.loader") + +local gears = require("gears") +local beautiful = require("beautiful") +local awful = require("awful") + +require("awful.autofocus") + +-- Theme -- +beautiful.init(gears.filesystem.get_configuration_dir() .. "themes/catppuccin/theme.lua") + +-- Main/Configuration -- +require("main") + +-- Libraries/Modules -- +require("lib") + +-- Signals/Monitoring -- +require("signals") + +-- Ui/Panels -- +require("ui") + +-- Autostart -- +awful.spawn.with_shell("picom") +awful.spawn.with_shell("~/.config/.fehbg") diff --git a/dot_config/awesome/signals/cpu.lua b/dot_config/awesome/signals/cpu.lua new file mode 100644 index 0000000..43cd9ad --- /dev/null +++ b/dot_config/awesome/signals/cpu.lua @@ -0,0 +1,20 @@ +local awful = require("awful") +local gears = require("gears") + +local function get_cpu() + local script = "echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')]" + + awful.spawn.easy_async_with_shell(script, function(cpu_perc) + cpu_perc = cpu_perc:match("%d+") + awesome.emit_signal("signal::cpu", cpu_perc) + end) +end + +gears.timer({ + timeout = 1, + call_now = true, + autostart = true, + callback = function() + get_cpu() + end, +}) diff --git a/dot_config/awesome/signals/disk.lua b/dot_config/awesome/signals/disk.lua new file mode 100644 index 0000000..c89bae4 --- /dev/null +++ b/dot_config/awesome/signals/disk.lua @@ -0,0 +1,23 @@ +local awful = require("awful") +local gears = require("gears") + +local config = require("config") +local disk = config.widget.disk.name + +local function get_disk() + local script = "df -kH -B 1MB" .. disk .. "| tail -1 | awk '{printf $5}'" + + awful.spawn.easy_async_with_shell(script, function(disk_perc) + disk_perc = disk_perc:match("%d+") + awesome.emit_signal("signal::disk", disk_perc) + end) +end + +gears.timer({ + timeout = 2000, + call_now = true, + autostart = true, + callback = function() + get_disk() + end, +}) diff --git a/dot_config/awesome/signals/init.lua b/dot_config/awesome/signals/init.lua new file mode 100644 index 0000000..e5c1910 --- /dev/null +++ b/dot_config/awesome/signals/init.lua @@ -0,0 +1,14 @@ +local req = { + "volume", + "mic", + "cpu", + "mem", + "player", + "disk", + "uptime", + "playerctl", +} + +for _, x in pairs(req) do + require("signals." .. x) +end diff --git a/dot_config/awesome/signals/mem.lua b/dot_config/awesome/signals/mem.lua new file mode 100644 index 0000000..368d052 --- /dev/null +++ b/dot_config/awesome/signals/mem.lua @@ -0,0 +1,22 @@ +local awful = require("awful") +local gears = require("gears") + +local function get_mem() + local script = [[ + free | grep Mem | awk '{print $3/$2 * 100.0}' | cut -f 1 -d "." + ]] + + awful.spawn.easy_async_with_shell(script, function(mem_perc) + mem_perc = mem_perc:match("%d+") + awesome.emit_signal("signal::mem", mem_perc) + end) +end + +gears.timer({ + timeout = 4, + call_now = true, + autostart = true, + callback = function() + get_mem() + end, +}) diff --git a/dot_config/awesome/signals/mic.lua b/dot_config/awesome/signals/mic.lua new file mode 100644 index 0000000..963a526 --- /dev/null +++ b/dot_config/awesome/signals/mic.lua @@ -0,0 +1,29 @@ +local awful = require("awful") + +local config = require("config") +local microphone = config.widget.mic.name + +local vol_sc = "pamixer --source " .. microphone .. " --get-volume" +local mute_sc = "pamixer --source " .. microphone .. " --get-mute" + +local function get_vol() + awful.spawn.easy_async_with_shell(vol_sc, function(vol) + awful.spawn.easy_async_with_shell(mute_sc, function(mute) + local muted + + if mute:match("false") then + muted = false + else + muted = true + end + + awesome.emit_signal("signal::mic", vol, muted) + end) + end) +end + +awesome.connect_signal("widget::update_mic", function() -- Needs to be Updated if muted! For Mute in Sidebar Widget + get_vol() +end) + +get_vol() diff --git a/dot_config/awesome/signals/player.lua b/dot_config/awesome/signals/player.lua new file mode 100644 index 0000000..a710827 --- /dev/null +++ b/dot_config/awesome/signals/player.lua @@ -0,0 +1,31 @@ +local awful = require("awful") + +-- Script +local title_sc = "mpc -f %title% | head -1" +local artist_sc = "mpc -f %artist% | head -1" +local length_sc = "mpc | awk '{print $3}' | awk 'NR==2'" +local status_sc = "mpc | awk '{print $1}' | awk 'NR==2' | sed 's/[[]*//g' | sed 's/[]]*//g'" + +-- function +local function get_player() + awful.spawn.easy_async_with_shell(title_sc, function(title) + awful.spawn.easy_async_with_shell(artist_sc, function(artist) + awful.spawn.easy_async_with_shell(length_sc, function(length) + awful.spawn.easy_async_with_shell(status_sc, function(status) + title = string.gsub(title, "\n", "") + artist = string.gsub(artist, "\n", "") + length = string.gsub(length, "\n", "") + status = string.gsub(status, "\n", "") + + awesome.emit_signal("signal::player", title, artist, length, status) + end) + end) + end) + end) +end + +awesome.connect_signal("widget::update_player", function() + get_player() +end) + +get_player() diff --git a/dot_config/awesome/signals/playerctl.lua b/dot_config/awesome/signals/playerctl.lua new file mode 100644 index 0000000..dc29d93 --- /dev/null +++ b/dot_config/awesome/signals/playerctl.lua @@ -0,0 +1,17 @@ +local bling = require("lib.bling") + +local instance = nil + +local function new() + return bling.signal.playerctl.lib({ + update_on_activity = true, + player = { "mopidy", "spotify", "%any" }, + debounce_delay = 1, + }) +end + +if not instance then + instance = new() +end + +return instance diff --git a/dot_config/awesome/signals/uptime.lua b/dot_config/awesome/signals/uptime.lua new file mode 100644 index 0000000..f839401 --- /dev/null +++ b/dot_config/awesome/signals/uptime.lua @@ -0,0 +1,16 @@ +local awful = require("awful") + +local function get_uptime() + local script = [[ + uptime -p | sed 's/up\s*//g' | sed 's/\s*days*/d/g' | sed 's/\s*hours*/h/g' | sed 's/\s*minutes*/m/g' + ]] + + awful.spawn.easy_async_with_shell(script, function(uptime) + uptime = string.gsub(uptime, "\n", "") + awesome.emit_signal("signal::uptime", uptime) + end) +end +awesome.connect_signal("widget::update_uptime", function() + get_uptime() +end) +get_uptime() diff --git a/dot_config/awesome/signals/volume.lua b/dot_config/awesome/signals/volume.lua new file mode 100644 index 0000000..c004aa5 --- /dev/null +++ b/dot_config/awesome/signals/volume.lua @@ -0,0 +1,26 @@ +local awful = require("awful") + +local vol_sc = "pamixer --get-volume" +local mute_sc = "pamixer --get-mute" + +local function get_vol() + awful.spawn.easy_async_with_shell(vol_sc, function(vol) + awful.spawn.easy_async_with_shell(mute_sc, function(mute) + local muted + + if mute:match("false") then + muted = false + else + muted = true + end + + awesome.emit_signal("signal::volume", vol, muted) + end) + end) +end + +awesome.connect_signal("widget::update_vol", function() -- Needs to be Updated if muted! For Pulseaudio Widget + get_vol() +end) + +get_vol() diff --git a/dot_config/awesome/themes/catppuccin/assets/music.png b/dot_config/awesome/themes/catppuccin/assets/music.png new file mode 100644 index 0000000..aae8c49 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/assets/music.png differ diff --git a/dot_config/awesome/themes/catppuccin/assets/pfp.jpg b/dot_config/awesome/themes/catppuccin/assets/pfp.jpg new file mode 100644 index 0000000..8d4863a Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/assets/pfp.jpg differ diff --git a/dot_config/awesome/themes/catppuccin/assets/volume-off.png b/dot_config/awesome/themes/catppuccin/assets/volume-off.png new file mode 100644 index 0000000..842d7de Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/assets/volume-off.png differ diff --git a/dot_config/awesome/themes/catppuccin/assets/volume-on.png b/dot_config/awesome/themes/catppuccin/assets/volume-on.png new file mode 100644 index 0000000..81124d7 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/assets/volume-on.png differ diff --git a/dot_config/awesome/themes/catppuccin/assets/volume.svg b/dot_config/awesome/themes/catppuccin/assets/volume.svg new file mode 100644 index 0000000..7a59aa1 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/assets/volume.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/dot_config/awesome/themes/catppuccin/buttons.png b/dot_config/awesome/themes/catppuccin/buttons.png new file mode 100644 index 0000000..de4cce8 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/buttons.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/centered.png b/dot_config/awesome/themes/catppuccin/layouts/centered.png new file mode 100644 index 0000000..180f6de Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/centered.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/dwindle.png b/dot_config/awesome/themes/catppuccin/layouts/dwindle.png new file mode 100644 index 0000000..318db09 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/dwindle.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/equalarea.png b/dot_config/awesome/themes/catppuccin/layouts/equalarea.png new file mode 100644 index 0000000..89280ab Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/equalarea.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/floating.png b/dot_config/awesome/themes/catppuccin/layouts/floating.png new file mode 100644 index 0000000..501cb4e Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/floating.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/machi.png b/dot_config/awesome/themes/catppuccin/layouts/machi.png new file mode 100644 index 0000000..fa158b5 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/machi.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/max.png b/dot_config/awesome/themes/catppuccin/layouts/max.png new file mode 100644 index 0000000..fcbad9a Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/max.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/mstab.png b/dot_config/awesome/themes/catppuccin/layouts/mstab.png new file mode 100644 index 0000000..874c6a5 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/mstab.png differ diff --git a/dot_config/awesome/themes/catppuccin/layouts/tile.png b/dot_config/awesome/themes/catppuccin/layouts/tile.png new file mode 100644 index 0000000..960158b Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/layouts/tile.png differ diff --git a/dot_config/awesome/themes/catppuccin/submenu.png b/dot_config/awesome/themes/catppuccin/submenu.png new file mode 100644 index 0000000..b2778e2 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/submenu.png differ diff --git a/dot_config/awesome/themes/catppuccin/taglist/squarefw.png b/dot_config/awesome/themes/catppuccin/taglist/squarefw.png new file mode 100644 index 0000000..2a86430 Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/taglist/squarefw.png differ diff --git a/dot_config/awesome/themes/catppuccin/taglist/squarew.png b/dot_config/awesome/themes/catppuccin/taglist/squarew.png new file mode 100644 index 0000000..913f2ca Binary files /dev/null and b/dot_config/awesome/themes/catppuccin/taglist/squarew.png differ diff --git a/dot_config/awesome/themes/catppuccin/theme.lua b/dot_config/awesome/themes/catppuccin/theme.lua new file mode 100644 index 0000000..39a362e --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/theme.lua @@ -0,0 +1,202 @@ +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") +local config = require("config") +local helpers = require("helpers") + +local palette = require("lib.catppuccin.catppuccin." .. config.theme.flavor) + +local theme_assets = beautiful.theme_assets +local dpi = beautiful.xresources.apply_dpi + +local theme_path = gfs.get_configuration_dir() .. "themes/catppuccin/" + +local theme = {} + +theme.color = {} + +-- Transparent Color -- +theme.color.transparent = "#00000000" + +-- Base -- +theme.color.crust = palette.crust.hex +theme.color.mantle = palette.mantle.hex +theme.color.base = palette.base.hex + +-- Surface -- +theme.color.surface0 = palette.surface0.hex +theme.color.surface1 = palette.surface1.hex +theme.color.surface2 = palette.surface2.hex + +-- Overlay -- +theme.color.overlay0 = palette.overlay0.hex +theme.color.overlay1 = palette.overlay1.hex +theme.color.overlay2 = palette.overlay2.hex + +-- Text -- +theme.color.text = palette.text.hex +theme.color.subtext0 = palette.subtext0.hex +theme.color.subtext1 = palette.subtext1.hex + +theme.color.lavender = palette.lavender.hex +theme.color.blue = palette.blue.hex +theme.color.sapphire = palette.sapphire.hex +theme.color.sky = palette.sky.hex +theme.color.teal = palette.teal.hex +theme.color.green = palette.green.hex +theme.color.yellow = palette.yellow.hex +theme.color.peach = palette.peach.hex +theme.color.maroon = palette.maroon.hex +theme.color.red = palette.red.hex +theme.color.mauve = palette.mauve.hex +theme.color.pink = palette.pink.hex +theme.color.flamingo = palette.flamingo.hex +theme.color.rosewater = palette.rosewater.hex + +theme.color.accent1 = theme.color[config.theme.accent1] +theme.color.accent2 = theme.color[config.theme.accent2] + +theme.music = theme_path .. "assets/music.png" +theme.volume_on = theme_path .. "assets/volume-on.png" +theme.volume_off = theme_path .. "assets/volume-off.png" +theme.pfp = config.theme.pfp +theme.wallpaper = config.theme.wallpaper +theme.font = config.theme.font.family .. " " .. config.theme.font.size + +theme.titlebar_bg_focus = theme.color.base +theme.titlebar_bg = theme.color.base +theme.bg_normal = theme.color.base +theme.bg_focus = theme.color.surface0 +theme.bg_urgent = theme.color.red +theme.bg_minimize = theme.color.surface1 +theme.bg_systray = theme.bg_normal + +theme.fg_normal = theme.color.subtext1 -- text color +theme.fg_focus = theme.color.accent1 +theme.fg_urgent = theme.color.text +theme.fg_minimize = theme.color.text + +theme.useless_gap = dpi(10) +theme.border_width = dpi(1) +theme.border_normal = theme.color.surface0 +theme.border_focus = theme.color.accent1 +theme.border_marked = theme.color.maroon + +theme.menu_font = helpers.ui.set_font("12", theme.font) +theme.menu_bg_focus = theme.color.base +theme.menu_fg_focus = theme.color.accent2 +theme.menu_border_width = dpi(2) +theme.menu_border_color = theme.color.surface0 +theme.submenu = config.icons.arr.r .. " " +theme.menu_height = dpi(37) +theme.menu_width = dpi(194) + +theme.tasklist_bg_focus = theme.color.base +theme.tasklist_fg_focus = theme.color.lavender +theme.tasklist_disable_icon = true +theme.tasklist_font = helpers.ui.set_font("11", theme.font) + +theme.taglist_spacing = dpi(2) +theme.taglist_bg_focus = theme.color.base +theme.taglist_disable_icon = true +theme.taglist_font = helpers.ui.set_font("11", theme.font) +theme.taglist_fg_focus = theme.color.accent2 +theme.taglist_fg_empty = theme.color.surface2 +theme.taglist_fg_occupied = theme.color.sky + +-- Generate taglist squares: +local taglist_square_size = dpi(0) +theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.color.accent2) +theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.taglist_fg_occupied) + +-- Edge Snap +theme.snap_bg = theme.color.accent1 +theme.snap_border_width = dpi(5) +theme.snap_shape = helpers.ui.rrect(0) + +-- Hotkey Popup +theme.hotkeys_shape = helpers.ui.rrect(12) +theme.hotkeys_border_color = theme.color.accent1 +theme.hotkeys_modifiers_fg = theme.color.overlay2 +theme.hotkeys_font = helpers.ui.set_font("10", theme.font) +theme.hotkeys_description_font = helpers.ui.set_font("10", theme.font) + +-- Layoutlist +theme.layoutlist_shape_selected = helpers.ui.rrect(7) + +-- Tabs +theme.mstab_bar_height = dpi(1) +theme.mstab_dont_resize_slaves = true +theme.mstab_bar_padding = dpi(10) +theme.mstab_border_radius = dpi(6) +theme.mstab_bar_ontop = false +theme.mstab_tabbar_position = "top" +theme.mstab_tabbar_style = "default" +theme.mstab_bar_disable = true + +-- Layout Machi +theme.machi_switcher_border_color = theme.color.surface0 +theme.machi_switcher_border_opacity = 0.4 +theme.machi_editor_border_color = theme.color.surface1 +theme.machi_editor_border_opacity = 0.4 +theme.machi_editor_active_opacity = 0.4 + +-- Bling +theme.tag_preview_widget_border_radius = dpi(6) +theme.tag_preview_client_border_radius = dpi(6) +theme.tag_preview_client_opacity = 1 +theme.tag_preview_client_bg = theme.color.base +theme.tag_preview_client_border_color = theme.color.surface0 +theme.tag_preview_client_border_width = dpi(2) +theme.tag_preview_widget_border_color = theme.color.accent1 +theme.tag_preview_widget_border_width = dpi(2) +theme.tag_preview_widget_margin = 4 + +-- Notifications +theme.notification_spacing = dpi(4) +theme.notification_bg = theme.color.base + +-- Titlebar icons +theme.titlebar_close_button_normal = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_close_button_focus = theme_path .. "titlebar/close.svg" +theme.titlebar_close_button_normal_hover = theme_path .. "titlebar/close_hover.svg" +theme.titlebar_close_button_focus_hover = theme_path .. "titlebar/close_hover.svg" + +theme.titlebar_minimize_button_normal = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_minimize_button_focus = theme_path .. "titlebar/minimize.svg" +theme.titlebar_minimize_button_normal_hover = theme_path .. "titlebar/minimize_hover.svg" +theme.titlebar_minimize_button_focus_hover = theme_path .. "titlebar/minimize_hover.svg" + +theme.titlebar_ontop_button_normal_inactive = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_ontop_button_focus_inactive = theme_path .. "titlebar/ontop.svg" + +theme.titlebar_ontop_button_normal_active = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_ontop_button_focus_active = theme_path .. "titlebar/ontop.svg" + +theme.titlebar_maximized_button_normal_active = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_maximized_button_focus_active = theme_path .. "titlebar/maximize.svg" +theme.titlebar_maximized_button_normal_active_hover = theme_path .. "titlebar/maximize_hover.svg" +theme.titlebar_maximized_button_focus_active_hover = theme_path .. "titlebar/maximize_hover.svg" + +theme.titlebar_maximized_button_normal_inactive = theme_path .. "titlebar/unfocus.svg" +theme.titlebar_maximized_button_focus_inactive = theme_path .. "titlebar/maximize.svg" +theme.titlebar_maximized_button_normal_inactive_hover = theme_path .. "titlebar/maximize_hover.svg" +theme.titlebar_maximized_button_focus_inactive_hover = theme_path .. "titlebar/maximize_hover.svg" + +-- Layout icons +theme.layout_floating = theme_path .. "layouts/floating.png" +theme.layout_max = theme_path .. "layouts/max.png" +theme.layout_tile = theme_path .. "layouts/tile.png" +theme.layout_dwindle = theme_path .. "layouts/dwindle.png" +theme.layout_centered = theme_path .. "layouts/centered.png" +theme.layout_mstab = theme_path .. "layouts/mstab.png" +theme.layout_equalarea = theme_path .. "layouts/equalarea.png" +theme.layout_machi = theme_path .. "layouts/machi.png" + +-- Generate Awesome icon: +theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus, theme.fg_focus) + +-- Define the icon theme for application icons. If not set then the icons +-- from /usr/share/icons and /usr/share/icons/hicolor will be used. +theme.icon_theme = config.theme.icon_theme + +return theme diff --git a/dot_config/awesome/themes/catppuccin/titlebar/close.svg b/dot_config/awesome/themes/catppuccin/titlebar/close.svg new file mode 100644 index 0000000..e322f94 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/themes/catppuccin/titlebar/close_hover.svg b/dot_config/awesome/themes/catppuccin/titlebar/close_hover.svg new file mode 100644 index 0000000..ce5e14d --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/close_hover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/themes/catppuccin/titlebar/maximize.svg b/dot_config/awesome/themes/catppuccin/titlebar/maximize.svg new file mode 100644 index 0000000..6e2c884 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/maximize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/themes/catppuccin/titlebar/maximize_hover.svg b/dot_config/awesome/themes/catppuccin/titlebar/maximize_hover.svg new file mode 100644 index 0000000..ec5e48a --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/maximize_hover.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dot_config/awesome/themes/catppuccin/titlebar/minimize.svg b/dot_config/awesome/themes/catppuccin/titlebar/minimize.svg new file mode 100644 index 0000000..3c233b7 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/minimize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/themes/catppuccin/titlebar/minimize_hover.svg b/dot_config/awesome/themes/catppuccin/titlebar/minimize_hover.svg new file mode 100644 index 0000000..bfb63e6 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/minimize_hover.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dot_config/awesome/themes/catppuccin/titlebar/ontop.svg b/dot_config/awesome/themes/catppuccin/titlebar/ontop.svg new file mode 100644 index 0000000..901dd95 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/ontop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/themes/catppuccin/titlebar/unfocus.svg b/dot_config/awesome/themes/catppuccin/titlebar/unfocus.svg new file mode 100644 index 0000000..14ba0b1 --- /dev/null +++ b/dot_config/awesome/themes/catppuccin/titlebar/unfocus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dot_config/awesome/ui/info-panel/calendar.lua b/dot_config/awesome/ui/info-panel/calendar.lua new file mode 100644 index 0000000..143dffb --- /dev/null +++ b/dot_config/awesome/ui/info-panel/calendar.lua @@ -0,0 +1,85 @@ +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") + +local dpi = beautiful.xresources.apply_dpi +local theme = beautiful.get() + +-- Creating Calendar +---------------------- + +-- copied from awesome doc and adjusted a bit +local styles = {} + +styles.month = { bg_color = theme.color.surface0 } +styles.normal = { + bg_color = theme.color.surface0, + padding = dpi(6), + fg_color = theme.color.subtext1, +} +styles.focus = { + fg_color = theme.color.yellow, + padding = dpi(6), + markup = function(t) + return "" .. t .. "" + end, +} +styles.header = { + fg_color = theme.color.blue, + markup = function(t) + return "" .. t .. "" + end, +} +styles.weekday = { + fg_color = theme.color.subtext1, + markup = function(t) + local f = helpers.ui.set_font("16") + return '' .. t .. "" + end, +} + +-- The Function +local function decorate_cell(widget, flag) + if flag == "monthheader" and not styles.monthheader then + flag = "header" + end + + local props = styles[flag] or {} + + if props.markup and widget.get_text and widget.set_markup then + widget:set_markup(props.markup(widget:get_text())) + end + + -- Change bg color for weekends + local ret = wibox.widget({ + { + widget, + margins = props.padding, + widget = wibox.container.margin, + }, + fg = props.fg_color, + bg = props.bg_color, + widget = wibox.container.background, + }) + + return ret +end + +local calendar = wibox.widget({ + date = os.date("*t"), + font = helpers.ui.set_font("14"), + fn_embed = decorate_cell, + widget = wibox.widget.calendar.month, +}) + +return wibox.widget({ + nil, + { + nil, + calendar, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + expand = "none", + layout = wibox.layout.align.vertical, +}) diff --git a/dot_config/awesome/ui/info-panel/init.lua b/dot_config/awesome/ui/info-panel/init.lua new file mode 100644 index 0000000..5720f45 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/init.lua @@ -0,0 +1,121 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local rubato = require("lib.rubato") + +local dpi = beautiful.xresources.apply_dpi +local theme = beautiful.get() + +-- Var +local width = dpi(410) +local height = awful.screen.focused().geometry.height - dpi(100) + +-- Helper +----------- + +local function round_widget(radius) + return function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, radius) + end +end + +local function box_widget(widgets, _width, _height) + return wibox.widget({ + { + { + widgets, + margins = dpi(16), + widget = wibox.container.margin, + }, + forced_width = dpi(_width), + forced_height = dpi(_height), + shape = round_widget(8), + bg = theme.bg_focus, --for widget Rounded and Border + widget = wibox.container.background, + }, + margins = { left = dpi(20), right = dpi(20) }, + widget = wibox.container.margin, + }) +end + +-- Get widgets +local weather_widget = require("ui.info-panel.weather") +local profile_widget = require("ui.info-panel.profile") + +local calendar_widget = require("ui.info-panel.calendar") +local music_widget = require("ui.info-panel.music-player") + +-- Combine some widgets +local weather = box_widget(weather_widget, 380, 180) +local profile = box_widget(profile_widget, 380, 210) +local calendar = box_widget(calendar_widget, 380, 340) + +-- Sidebar +local sidebar = wibox({ + visible = false, + ontop = true, + width = width, + height = height, + y = dpi(60), + bg = theme.bg_normal, + border_width = theme.border_width * 2, + border_color = theme.border_normal, +}) + +-- Sidebar widget setup +sidebar:setup({ + { + profile, + music_widget, + weather, + calendar, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical, + }, + margins = { top = dpi(20), bottom = dpi(20) }, + widget = wibox.container.margin, +}) + +-- Slide animation +local slide = rubato.timed({ + pos = awful.screen.focused().geometry.x - sidebar.width, + rate = 60, + intro = 0.2, + duration = 0.4, + subscribed = function(pos) + sidebar.x = awful.screen.focused().geometry.x + pos + end, +}) + +-- Timer of sidebar's death +sidebar.timer = gears.timer({ + timeout = 0.5, + single_shot = true, + callback = function() + sidebar.visible = not sidebar.visible + end, +}) + +sidebar.shape = function(cr, w, h) --Rounded Corners + gears.shape.rounded_rect(cr, w, h, 14) +end + +-- Toggle function +sidebar.toggle = function() + if sidebar.visible then + slide.target = awful.screen.focused().geometry.x - sidebar.width + sidebar.timer:start() + else + awesome.emit_signal("widget::update_uptime") + slide.target = awful.screen.focused().geometry.x + dpi(20) + sidebar.visible = not sidebar.visible + end +end + +-- Get signal to execute the function (if that makes sense) +awesome.connect_signal("sidebar::toggle", function() + sidebar.toggle() +end) + +return sidebar diff --git a/dot_config/awesome/ui/info-panel/music-player.lua b/dot_config/awesome/ui/info-panel/music-player.lua new file mode 100644 index 0000000..5e1b270 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/music-player.lua @@ -0,0 +1,256 @@ +local awful = require("awful") +local gears = require("gears") +local beautiful = require("beautiful") +local wibox = require("wibox") +local helpers = require("helpers") +local playerctl_daemon = require("signals.playerctl") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +---- Music Player +---- ~~~~~~~~~~~~ + +local music_text = wibox.widget({ + font = helpers.ui.set_font("Medium 10"), + valign = "center", + widget = wibox.widget.textbox, +}) + +local music_art = wibox.widget({ + image = theme.music, + resize = true, + widget = wibox.widget.imagebox, +}) + +local music_art_container = wibox.widget({ + music_art, + forced_height = dpi(200), + forced_width = dpi(200), + widget = wibox.container.background, +}) + +local filter_color = { + type = "linear", + from = { 0, 0 }, + to = { 0, 160 }, + stops = { { 0, theme.color.surface0 .. "cc" }, { 1, theme.color.surface0 } }, +} + +local music_art_filter = wibox.widget({ + { + bg = filter_color, + forced_height = dpi(120), + forced_width = dpi(120), + widget = wibox.container.background, + }, + direction = "east", + widget = wibox.container.rotate, +}) + +local music_title = wibox.widget({ + font = helpers.ui.set_font("Regular 13"), + valign = "center", + widget = wibox.widget.textbox, +}) + +local music_artist = wibox.widget({ + font = helpers.ui.set_font("Bold 16"), + valign = "center", + widget = wibox.widget.textbox, +}) + +--- Volume Control +local function volume_control() + local volume_bar = wibox.widget({ + max_value = 100, + value = 100, + bar_height = dpi(12), + bar_width = dpi(4), + shape = helpers.ui.rrect(6), + bar_shape = helpers.ui.rrect(6), + color = theme.color.blue, + background_color = theme.color.surface0, + border_width = 0, + widget = wibox.widget.progressbar, + }) + + -- Update bar + local function set_slider_value(_, volume) + volume_bar.value = volume * 100 + end + + playerctl_daemon:connect_signal("volume", set_slider_value) + + volume_bar:connect_signal("button::press", function() + playerctl_daemon:disconnect_signal("volume", set_slider_value) + end) + + volume_bar:connect_signal("button::release", function() + playerctl_daemon:connect_signal("volume", set_slider_value) + end) + + local volume = wibox.widget({ + volume_bar, + direction = "east", + widget = wibox.container.rotate, + }) + + volume:buttons(gears.table.join( + -- Scroll - Increase or decrease volume + awful.button({}, 4, function() + awful.spawn.with_shell("playerctl volume 0.05+") + end), + + awful.button({}, 5, function() + awful.spawn.with_shell("playerctl volume 0.05-") + end) + )) + + return volume +end + +-- Player's Button +local toggle = wibox.widget.textbox() +toggle.font = helpers.ui.set_font("26") + +toggle:buttons(gears.table.join(awful.button({}, 1, function() + playerctl_daemon:play_pause() +end))) + +local next = wibox.widget.textbox() +next.font = helpers.ui.set_font("26") +next.markup = config.icons.music.next + +next:buttons(gears.table.join(awful.button({}, 1, function() + playerctl_daemon:next() +end))) + +local back = wibox.widget.textbox() +back.font = helpers.ui.set_font("26") +back.markup = config.icons.music.prev + +back:buttons(gears.table.join(awful.button({}, 1, function() + playerctl_daemon:previous() +end))) + +local function music() + return wibox.widget({ + { + { + music_art_container, + music_art_filter, + layout = wibox.layout.stack, + }, + { + { + { + music_text, + helpers.ui.vertical_pad(dpi(15)), + { + + { + widget = wibox.container.scroll.horizontal, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + fps = 60, + speed = 75, + music_artist, + }, + { + widget = wibox.container.scroll.horizontal, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + fps = 60, + speed = 75, + music_title, + }, + forced_width = dpi(170), + layout = wibox.layout.fixed.vertical, + }, + layout = wibox.layout.fixed.vertical, + }, + nil, + { + { + back, + toggle, + next, + spacing = dpi(25), + layout = wibox.layout.fixed.horizontal, + }, + forced_height = dpi(70), + top = dpi(10), + bottom = dpi(10), + right = dpi(10), + left = dpi(115), + widget = wibox.container.margin, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }, + top = dpi(9), + bottom = dpi(9), + left = dpi(10), + right = dpi(10), + widget = wibox.container.margin, + }, + layout = wibox.layout.stack, + }, + forced_width = dpi(350), + shape = helpers.ui.prrect(8, false, true, true, false), + bg = theme.color.surface0, + widget = wibox.container.background, + }) +end + +local music_widget = wibox.widget({ + { + { + music(), + { + volume_control(), + margins = { top = dpi(0), bottom = dpi(0), left = dpi(10), right = dpi(10) }, + widget = wibox.container.margin, + }, + layout = wibox.layout.align.horizontal, + }, + forced_height = dpi(150), + bg = theme.color.base, + shape = helpers.ui.rrect(8), + widget = wibox.container.background, + }, + left = dpi(20), + right = dpi(10), + color = "#FF000000", + widget = wibox.container.margin, +}) + +--- playerctl +--- ------------- +playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, _, _, _) + if title == "" then + title = "Nothing Playing" + end + if artist == "" then + artist = "Nothing Playing" + end + if album_path == "" then + album_path = theme.music + end + + music_art:set_image(gears.surface.load_uncached(album_path)) + music_title:set_markup_silently(helpers.ui.colorize_text(title, theme.color.subtext1)) + music_artist:set_markup_silently(helpers.ui.colorize_text(artist, theme.color.blue)) +end) + +playerctl_daemon:connect_signal("playback_status", function(_, playing, _) + if playing then + music_text:set_markup_silently(helpers.ui.colorize_text("Now Playing", theme.color.overlay0)) + toggle.markup = helpers.ui.colorize_text(config.icons.music.pause, theme.color.blue) + else + music_text:set_markup_silently(helpers.ui.colorize_text("Music", theme.color.overlay0)) + toggle.markup = helpers.ui.colorize_text(config.icons.music.play, theme.color.blue) + end +end) + +return music_widget diff --git a/dot_config/awesome/ui/info-panel/player.lua b/dot_config/awesome/ui/info-panel/player.lua new file mode 100644 index 0000000..b2b1e0e --- /dev/null +++ b/dot_config/awesome/ui/info-panel/player.lua @@ -0,0 +1,116 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") +local config = require("config") + +local dpi = beautiful.xresources.apply_dpi + +-- Make Widgets +----------------- + +-- Song's Title +local title = wibox.widget.textbox() +title.font = helpers.ui.set_font("Medium 16") +title.halign = "left" +title.valign = "bottom" + +-- Song's Artist +local artist = wibox.widget.textbox() +artist.font = helpers.ui.set_font("Regular 16") +artist.halign = "left" +artist.valign = "bottom" + +-- Song's Length +local length = wibox.widget.textbox() +length.font = helpers.ui.set_font("Regular 14") +length.halign = "center" +length.valign = "center" + +-- Player's Button +local toggle = wibox.widget.textbox() +toggle.font = helpers.ui.set_font("26") + +toggle:buttons(gears.table.join(awful.button({}, 1, function() + awful.spawn("mpc toggle", false) + + if toggle.markup:match("󰏤") then + toggle.markup = config.icons.music.play + else + toggle.markup = config.icons.music.pause + end +end))) + +local next = wibox.widget.textbox() +next.font = helpers.ui.set_font("26") +next.markup = config.icons.music.next + +next:buttons(gears.table.join(awful.button({}, 1, function() + awful.spawn("mpc next", false) +end))) + +local back = wibox.widget.textbox() +back.font = helpers.ui.set_font("26") +back.markup = config.icons.music.prev + +back:buttons(gears.table.join(awful.button({}, 1, function() + awful.spawn("mpc prev", false) +end))) + +-- Get data +awesome.connect_signal("signal::player", function(t, a, l, s) + if not s:match("playing") then + toggle.markup = config.icons.music.play + else + toggle.markup = config.icons.music.pause + end + + title.markup = t + artist.markup = a + length.markup = l +end) + +-- Grouping Widgets +--------------------- + +local buttons = wibox.widget({ + back, + toggle, + next, + spacing = dpi(11), + layout = wibox.layout.fixed.horizontal, +}) + +return wibox.widget({ + { + nil, + { + title, + artist, + spacing = dpi(12), + layout = wibox.layout.fixed.vertical, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }, + { + nil, + nil, + { + length, + { + nil, + buttons, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + spacing = dpi(6), + layout = wibox.layout.fixed.vertical, + }, + top = dpi(30), + bottom = 0, + layout = wibox.container.margin, + }, + layout = wibox.layout.flex.horizontal, +}) diff --git a/dot_config/awesome/ui/info-panel/profile.lua b/dot_config/awesome/ui/info-panel/profile.lua new file mode 100644 index 0000000..f516f81 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/profile.lua @@ -0,0 +1,179 @@ +local awful = require("awful") +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") +local helpers = require("helpers") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local os_user = os.getenv("USER") + +if not os_user then + os_user = "user" +end + +-- Create Widgets +------------------- + +-- Pfp +local pfp = wibox.widget.imagebox() +pfp.image = require("config").theme.pfp +pfp.clip_shape = gears.shape.circle +pfp.forced_width = dpi(130) +pfp.forced_height = dpi(130) + +-- User +local user = wibox.widget.textbox() +user.font = helpers.ui.set_font("SemiBold 18") +user.halign = "left" +user.markup = helpers.ui.colorize_text(os_user, theme.fg_normal) + +-- Hostname +local hostname = wibox.widget.textbox() +hostname.font = helpers.ui.set_font("Regular 14") +hostname.halign = "left" + +awful.spawn.easy_async_with_shell("hostnamectl --static", function(stdout) + hostname.markup = helpers.ui.colorize_text("@" .. tostring(stdout), theme.color.lavender) +end) + +-- Battery +local uptimeosd = wibox.widget.textbox() +uptimeosd.font = helpers.ui.set_font("12") +uptimeosd.halign = "center" + +-- Get data 4 widgets! +awesome.connect_signal("signal::uptime", function(uptime) + uptimeosd.markup = helpers.ui.colorize_text("up " .. uptime, theme.fg_normal) +end) + +-- Spacing horizontally +local shutdown = wibox.widget({ + { + { + font = helpers.ui.set_font("30"), + markup = helpers.ui.colorize_text(config.icons.power, theme.color.red), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + top = dpi(9), + bottom = dpi(9), + left = dpi(11), + right = dpi(11), + widget = wibox.container.margin, + }, + bg = theme.color.surface1, + shape = helpers.ui.rrect(8), + widget = wibox.container.background, +}) + +local reboot = wibox.widget({ + { + { + font = helpers.ui.set_font("30"), + markup = helpers.ui.colorize_text(config.icons.restart, theme.color.blue), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + top = dpi(9), + bottom = dpi(9), + left = dpi(11), + right = dpi(11), + widget = wibox.container.margin, + }, + bg = theme.color.surface1, + shape = helpers.ui.rrect(8), + widget = wibox.container.background, +}) +shutdown:connect_signal("mouse::enter", function() + shutdown.bg = theme.color.surface2 +end) + +shutdown:connect_signal("mouse::leave", function() + shutdown.bg = theme.color.surface1 +end) + +reboot:connect_signal("mouse::enter", function() + reboot.bg = theme.color.surface2 +end) + +reboot:connect_signal("mouse::leave", function() + reboot.bg = theme.color.surface1 +end) + +shutdown:buttons(gears.table.join(awful.button({}, 1, function() + awesome.emit_signal("module::exit_screen:show") +end))) + +reboot:buttons(gears.table.join(awful.button({}, 1, function() + awful.spawn.with_shell("loginctl reboot") +end))) + +-- Grouping widgets +--------------------- +local buttons = wibox.widget({ + { + reboot, + shutdown, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + top = dpi(10), + left = dpi(57), + widget = wibox.container.margin, +}) + +local name = wibox.widget({ + { + user, + hostname, + spacing = dpi(4), + layout = wibox.layout.fixed.vertical, + }, + left = 0, + widget = wibox.container.margin, +}) + +local uptimebox = wibox.widget({ + { + { + uptimeosd, + spacing = dpi(2), + layout = wibox.layout.fixed.vertical, + }, + top = dpi(3), + bottom = dpi(3), + widget = wibox.container.margin, + }, + bg = theme.color.surface0, + shape = helpers.ui.rrect(7), + widget = wibox.container.background, +}) + +-- The Profile Widget +return wibox.widget({ + { + { + pfp, + uptimebox, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical, + }, + layout = wibox.layout.fixed.vertical, + }, + { + { + name, + buttons, + layout = wibox.layout.fixed.vertical, + }, + top = dpi(30), + layout = wibox.container.margin, + }, + spacing = dpi(30), + layout = wibox.layout.fixed.horizontal, +}) diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-night.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-night.svg new file mode 100644 index 0000000..ecf451a --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-night.svg @@ -0,0 +1,3 @@ + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-sky.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-sky.svg new file mode 100644 index 0000000..e84065c --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-clear-sky.svg @@ -0,0 +1,3 @@ + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds-night.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds-night.svg new file mode 100644 index 0000000..1a00dff --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds-night.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds.svg new file mode 100644 index 0000000..d709745 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-clouds.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds-night.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds-night.svg new file mode 100644 index 0000000..e8243ae --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds-night.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds.svg new file mode 100644 index 0000000..7279f9f --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-few-clouds.svg @@ -0,0 +1,3 @@ + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-fog.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-fog.svg new file mode 100644 index 0000000..81d0a39 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-fog.svg @@ -0,0 +1,3 @@ + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-freezing-rain.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-freezing-rain.svg new file mode 100644 index 0000000..d83c93a --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-freezing-rain.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast-symbolic.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast-symbolic.svg new file mode 100644 index 0000000..79a543f --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast.svg new file mode 100644 index 0000000..e85bb96 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-overcast.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-severe-alert.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-severe-alert.svg new file mode 100644 index 0000000..3a512f7 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-severe-alert.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-showers-scattered.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-showers-scattered.svg new file mode 100644 index 0000000..7749e85 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-showers-scattered.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-showers.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-showers.svg new file mode 100644 index 0000000..b0f387f --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-showers.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-rain.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-rain.svg new file mode 100644 index 0000000..391fac5 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-rain.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-scattered.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-scattered.svg new file mode 100644 index 0000000..9be2009 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow-scattered.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-snow.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow.svg new file mode 100644 index 0000000..d1f7d1c --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-snow.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-storm.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-storm.svg new file mode 100644 index 0000000..cb2cba6 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-storm.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/dot_config/awesome/ui/info-panel/weather/icons/weather-windy.svg b/dot_config/awesome/ui/info-panel/weather/icons/weather-windy.svg new file mode 100644 index 0000000..65bec4f --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/icons/weather-windy.svg @@ -0,0 +1,3 @@ + + + diff --git a/dot_config/awesome/ui/info-panel/weather/init.lua b/dot_config/awesome/ui/info-panel/weather/init.lua new file mode 100644 index 0000000..b9437e2 --- /dev/null +++ b/dot_config/awesome/ui/info-panel/weather/init.lua @@ -0,0 +1,229 @@ +local awful = require("awful") +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") +local json = require("lib.json") +local helpers = require("helpers") + +local config = require("config").widget.weather + +local dpi = beautiful.xresources.apply_dpi +local icon_dir = gears.filesystem.get_configuration_dir() .. "ui/info-panel/weather/icons/" + +--- Weather Widget +--- ~~~~~~~~~~~~~~ + +local GET_FORECAST_CMD = [[bash -c "curl -s --show-error -X GET '%s'"]] + +local icon_map = { + ["01d"] = "weather-clear-sky", + ["02d"] = "weather-few-clouds", + ["03d"] = "weather-clouds", + ["04d"] = "weather-few-clouds", + ["09d"] = "weather-showers-scattered", + ["10d"] = "weather-showers", + ["11d"] = "weather-strom", + ["13d"] = "weather-snow", + ["50d"] = "weather-fog", + ["01n"] = "weather-clear-night", + ["02n"] = "weather-few-clouds-night", + ["03n"] = "weather-clouds-night", + ["04n"] = "weather-clouds-night", + ["09n"] = "weather-showers-scattered", + ["10n"] = "weather-showers", + ["11n"] = "weather-strom", + ["13n"] = "weather-snow", + ["50n"] = "weather-fog", +} + +local current_weather_widget = wibox.widget({ + { + { + id = "icon", + image = icon_dir .. "weather-showers.svg", + resize = true, + forced_height = dpi(42), + forced_width = dpi(42), + widget = wibox.widget.imagebox, + }, + { + { + { + id = "description", + text = "Mostly cloudy", + font = helpers.ui.set_font("Bold 10"), + widget = wibox.widget.textbox, + }, + { + id = "humidity", + text = "Humidity: 80%", + font = helpers.ui.set_font("9"), + widget = wibox.widget.textbox, + }, + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + }, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal, + }, + nil, + { + { + { + id = "temp_current", + markup = "20°", + halign = "right", + font = helpers.ui.set_font("Bold 16"), + widget = wibox.widget.textbox, + }, + { + id = "feels_like", + markup = "Feels like: 19°", + font = helpers.ui.set_font("8"), + widget = wibox.widget.textbox, + }, + spacing = dpi(-6), + layout = wibox.layout.fixed.vertical, + }, + widget = wibox.container.place, + }, + layout = wibox.layout.align.horizontal, +}) + +local hourly_widget = function() + local widget = wibox.widget({ + { + { + id = "time", + text = "12PM", + font = helpers.ui.set_font("9"), + widget = wibox.widget.textbox, + }, + widget = wibox.container.place, + }, + { + { + id = "icon", + image = icon_dir .. "weather-clear-sky.svg", + resize = true, + forced_height = dpi(16), + forced_width = dpi(16), + widget = wibox.widget.imagebox, + }, + widget = wibox.container.place, + }, + { + { + id = "temp", + markup = "1°", + font = helpers.ui.set_font("9"), + widget = wibox.widget.textbox, + }, + widget = wibox.container.place, + }, + spacing = dpi(6), + layout = wibox.layout.fixed.vertical, + }) + + widget.update = function(result) + local time = widget:get_children_by_id("time")[1] + local icon = widget:get_children_by_id("icon")[1] + local temp = widget:get_children_by_id("temp")[1] + + temp:set_markup(math.floor(result.temp) .. "°") + + time:set_text(os.date("%I%p", tonumber(result.dt))) + + icon.image = icon_dir .. icon_map[result.weather[1].icon] .. ".svg" + + icon:emit_signal("widget::redraw_needed") + end + + return widget +end + +local hourly_widget_1 = hourly_widget() +local hourly_widget_2 = hourly_widget() +local hourly_widget_3 = hourly_widget() +local hourly_widget_4 = hourly_widget() +local hourly_widget_5 = hourly_widget() +local hourly_widget_6 = hourly_widget() + +local weather_widget = wibox.widget({ + { + text = "Weather", + font = helpers.ui.set_font("Bold 16"), + halign = "center", + widget = wibox.widget.textbox, + }, + current_weather_widget, + { + hourly_widget_1, + hourly_widget_2, + hourly_widget_3, + hourly_widget_4, + hourly_widget_5, + hourly_widget_6, + spacing = dpi(10), + layout = wibox.layout.flex.horizontal, + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, +}) + +local show_hourly_forecast = true +local show_daily_forecast = true + +local url = ( + "https://api.openweathermap.org/data/2.5/onecall" + .. "?lat=" + .. config.coordinates.lat + .. "&lon=" + .. config.coordinates.lon + .. "&appid=" + .. config.api_key + .. "&units=" + .. config.units + .. "&exclude=minutely" + .. (show_hourly_forecast == false and ",hourly" or "") + .. (show_daily_forecast == false and ",daily" or "") +) + +awful.widget.watch(string.format(GET_FORECAST_CMD, url), 600, function(_, stdout, stderr) + if stderr == "" then + local result = json.decode(stdout) + + if not result.current then + return + end + + -- Current weather setup + local icon = current_weather_widget:get_children_by_id("icon")[1] + local description = current_weather_widget:get_children_by_id("description")[1] + local humidity = current_weather_widget:get_children_by_id("humidity")[1] + local temp_current = current_weather_widget:get_children_by_id("temp_current")[1] + local feels_like = current_weather_widget:get_children_by_id("feels_like")[1] + + icon.image = icon_dir .. icon_map[result.current.weather[1].icon] .. ".svg" + icon:emit_signal("widget::redraw_needed") + + description:set_text(result.current.weather[1].description:gsub("^%l", string.upper)) + + humidity:set_text("Humidity: " .. result.current.humidity .. "%") + + temp_current:set_markup(math.floor(result.current.temp) .. "°") + + feels_like:set_markup("Feels like: " .. math.floor(result.current.feels_like) .. "°") + + -- Hourly widget setup + hourly_widget_1.update(result.hourly[1]) + hourly_widget_2.update(result.hourly[2]) + hourly_widget_3.update(result.hourly[3]) + hourly_widget_4.update(result.hourly[4]) + hourly_widget_5.update(result.hourly[5]) + hourly_widget_6.update(result.hourly[6]) + end +end) + +return weather_widget diff --git a/dot_config/awesome/ui/init.lua b/dot_config/awesome/ui/init.lua new file mode 100644 index 0000000..7b7d1af --- /dev/null +++ b/dot_config/awesome/ui/init.lua @@ -0,0 +1,5 @@ +require("ui.popups") +require("ui.notif-panel") +require("ui.info-panel") +require("ui.top-panel") +require("ui.titlebar") diff --git a/dot_config/awesome/ui/notif-panel/init.lua b/dot_config/awesome/ui/notif-panel/init.lua new file mode 100644 index 0000000..04deb87 --- /dev/null +++ b/dot_config/awesome/ui/notif-panel/init.lua @@ -0,0 +1,334 @@ +local gears = require("gears") +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") +local naughty = require("naughty") +local rubato = require("lib.rubato") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local notifs_text = wibox.widget({ + font = helpers.ui.set_font("Bold 20"), + markup = "Notifications", + halign = "center", + widget = wibox.widget.textbox, +}) + +local notifs_clear = wibox.widget({ + markup = helpers.ui.colorize_text(" ", theme.color.red), + font = helpers.ui.set_font("Bold 21"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, +}) + +notifs_clear:buttons(gears.table.join(awful.button({}, 1, function() + _G.Notif_center_reset_notifs_container() +end))) + +helpers.ui.add_hover_cursor(notifs_clear, "hand2") + +local notifs_empty = wibox.widget({ + { + nil, + { + nil, + { + markup = helpers.ui.colorize_text("Nothing Here!", theme.color.subtext1), + font = helpers.ui.set_font("Bold 17"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + layout = wibox.layout.align.vertical, + }, + layout = wibox.layout.align.horizontal, + }, + forced_height = dpi(730), + widget = wibox.container.background, + bg = theme.color.surface0, + shape = helpers.ui.rrect(8), +}) + +local notifs_container = wibox.widget({ + spacing = dpi(10), + spacing_widget = { + { + shape = helpers.ui.rrect(8), + widget = wibox.container.background, + }, + top = dpi(2), + bottom = dpi(2), + left = dpi(6), + right = dpi(6), + widget = wibox.container.margin, + }, + forced_width = dpi(320), + forced_height = dpi(730), --Use it like in notifs_empty else it will look weird + layout = wibox.layout.fixed.vertical, +}) + +local remove_notifs_empty = true + +Notif_center_reset_notifs_container = function() + notifs_container:reset(notifs_container) + notifs_container:insert(1, notifs_empty) + remove_notifs_empty = true +end + +Notif_center_remove_notif = function(box) + notifs_container:remove_widgets(box) + + if #notifs_container.children == 0 then + notifs_container:insert(1, notifs_empty) + remove_notifs_empty = true + end +end + +local create_notif = function(icon, n) + local time = os.date("%H:%M") + local box = {} + + box = wibox.widget({ + { + { + { + { + image = icon, + resize = true, + clip_shape = helpers.ui.rrect(8), + halign = "center", + valign = "center", + widget = wibox.widget.imagebox, + }, + strategy = "exact", + height = dpi(50), + width = dpi(50), + widget = wibox.container.constraint, + }, + { + { + nil, + { + { + { + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + speed = dpi(50), + { + markup = n.title, + font = helpers.ui.set_font("Bold 9"), + halign = "left", + widget = wibox.widget.textbox, + }, + forced_width = dpi(140), + widget = wibox.container.scroll.horizontal, + }, + nil, + { + markup = helpers.ui.colorize_text(time, theme.color.subtext1), + halign = "right", + valign = "bottom", + font = helpers.ui.set_font("Bold 10"), + widget = wibox.widget.textbox, + }, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + { + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + speed = dpi(50), + { + markup = n.message, + halign = "left", + widget = wibox.widget.textbox, + }, + forced_width = dpi(165), + widget = wibox.container.scroll.horizontal, + }, + spacing = dpi(3), + layout = wibox.layout.fixed.vertical, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }, + left = dpi(17), + widget = wibox.container.margin, + }, + layout = wibox.layout.align.horizontal, + }, + margins = dpi(15), + widget = wibox.container.margin, + }, + forced_height = dpi(85), + widget = wibox.container.background, + bg = theme.color.surface0, + shape = helpers.ui.rrect(8), + }) + + box:buttons(gears.table.join(awful.button({}, 1, function() + _G.Notif_center_remove_notif(box) + end))) + + return box +end + +notifs_container:buttons(gears.table.join( + awful.button({}, 4, nil, function() + if #notifs_container.children == 1 then + return + end + notifs_container:insert(1, notifs_container.children[#notifs_container.children]) + notifs_container:remove(#notifs_container.children) + end), + + awful.button({}, 5, nil, function() + if #notifs_container.children == 1 then + return + end + notifs_container:insert(#notifs_container.children + 1, notifs_container.children[1]) + notifs_container:remove(1) + end) +)) + +notifs_container:insert(1, notifs_empty) + +naughty.connect_signal("request::display", function(n) + if #notifs_container.children == 1 and remove_notifs_empty then + notifs_container:reset(notifs_container) + remove_notifs_empty = false + end + + local appicon = n.icon or n.app_icon + if not appicon then + appicon = theme.pfp --notification_icon + end + + notifs_container:insert(1, create_notif(appicon, n)) +end) + +local notifs = wibox.widget({ + { + { + { + nil, + notifs_text, + notifs_clear, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + left = dpi(5), + right = dpi(5), + top = dpi(7), + bottom = dpi(7), + layout = wibox.container.margin, + }, + widget = wibox.container.background, + bg = theme.color.surface0, + shape = helpers.ui.rrect(8), + }, + notifs_container, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical, +}) + +local actions = wibox.widget({ + { + { + { + widget = require("ui.notif-panel.widgets.vol_slider"), + }, + { + widget = require("ui.notif-panel.widgets.mic_slider"), + }, + layout = wibox.layout.flex.vertical, + spacing = dpi(1), + }, + widget = wibox.container.margin, + top = dpi(20), + bottom = dpi(20), + left = dpi(35), + right = dpi(35), + }, + forced_height = dpi(120), + widget = wibox.container.background, + bg = theme.color.surface0, + shape = helpers.ui.rrect(8), +}) + +-- Sidebar +local action = wibox({ + visible = false, + ontop = true, + width = dpi(410), + height = awful.screen.focused().geometry.height - dpi(100), + y = dpi(60), + bg = theme.bg_normal, + border_width = theme.border_width * 2, + border_color = theme.border_normal, +}) + +-- Sidebar widget setup +action:setup({ + { + notifs, + nil, + actions, + spacing = dpi(20), + layout = wibox.layout.align.vertical, + }, + margins = { + top = dpi(20), + bottom = dpi(20), + left = dpi(20), + right = dpi(20), + }, + widget = wibox.container.margin, +}) + +-- Slide animation +local slide = rubato.timed({ + pos = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width, + rate = 60, + intro = 0.2, + duration = 0.4, + subscribed = function(pos) + action.x = awful.screen.focused().geometry.x - pos + end, +}) + +-- Timer of action's death +action.timer = gears.timer({ + timeout = 0.5, + single_shot = true, + callback = function() + action.visible = not action.visible + end, +}) +action.shape = function(cr, w, h) --Rounded Corners + gears.shape.rounded_rect(cr, w, h, 14) +end + +-- Toggle function +action.toggle = function() + if action.visible then + slide.target = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width + action.timer:start() + else + awesome.emit_signal("widget::update_vol") + awesome.emit_signal("widget::update_mic") + slide.target = awful.screen.focused().geometry.x + - awful.screen.focused().geometry.width + + action.width + + dpi(25) + action.visible = not action.visible + end +end + +-- Get signal to execute the function (if that makes sense) +awesome.connect_signal("action::toggle", function() + action.toggle() +end) + +return action diff --git a/dot_config/awesome/ui/notif-panel/widgets/bri_slider.lua b/dot_config/awesome/ui/notif-panel/widgets/bri_slider.lua new file mode 100644 index 0000000..7cb05e0 --- /dev/null +++ b/dot_config/awesome/ui/notif-panel/widgets/bri_slider.lua @@ -0,0 +1,50 @@ +local gears = require("gears") +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local slider = wibox.widget({ + bar_shape = helpers.ui.rrect(9), + bar_height = 6, + bar_color = theme.bg_focus, + bar_active_color = theme.color.yellow, + handle_shape = gears.shape.circle, + handle_color = theme.color.yellow, + handle_width = dpi(12), + value = dpi(25), + widget = wibox.widget.slider, +}) + +helpers.ui.add_hover_cursor(slider, "hand1") + +local bri_slider = wibox.widget({ + { + markup = helpers.ui.colorize_text("󰃞 ", theme.color.yellow), + font = helpers.ui.set_font("14"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox(), + }, + slider, + layout = wibox.layout.fixed.horizontal, + spacing = 0, +}) + +awful.spawn.easy_async_with_shell( + "brightnessctl | grep -i 'current' | awk '{ print $4}' | tr -d \"(%)\"", + function(stdout) + local value = string.gsub(stdout, "^%s*(.-)%s*$", "%1") + bri_slider.value = tonumber(value) + end +) + +slider:connect_signal("property::value", function(_, new_value) + slider.value = new_value + awful.spawn("brightnessctl set " .. new_value .. "%", false) +end) + +return bri_slider diff --git a/dot_config/awesome/ui/notif-panel/widgets/mic_slider.lua b/dot_config/awesome/ui/notif-panel/widgets/mic_slider.lua new file mode 100644 index 0000000..338538e --- /dev/null +++ b/dot_config/awesome/ui/notif-panel/widgets/mic_slider.lua @@ -0,0 +1,124 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local config = require("config") +local microphone = config.widget.mic.name + +local slider = wibox.widget({ + bar_shape = helpers.ui.rrect(9), + bar_height = dpi(6), + bar_color = theme.color.base, + bar_active_color = theme.color.blue, + handle_shape = gears.shape.circle, + handle_color = theme.color.blue, + handle_width = dpi(12), + value = dpi(75), + forced_width = dpi(239), + widget = wibox.widget.slider, +}) + +local osd_value = wibox.widget({ + text = "0%", + font = helpers.ui.set_font("10"), + widget = wibox.widget.textbox(), +}) +local icon = wibox.widget({ + markup = helpers.ui.colorize_text("󰍬", theme.color.blue), + font = helpers.ui.set_font("14"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox(), +}) + +local function get_val() + awesome.connect_signal("signal::mic", function(_, muted) + if muted then + icon.markup = helpers.ui.colorize_text("󰍭", theme.color.blue) + icon.font = helpers.ui.set_font("14") + else + icon.markup = helpers.ui.colorize_text("󰍬", theme.color.blue) + icon.font = helpers.ui.set_font("17") + end + end) +end + +get_val() + +icon:buttons(gears.table.join(awful.button({}, 1, function() + local script = "pamixer --source" .. microphone .. "-t" + + awful.spawn(script, false) + awesome.emit_signal("widget::update_mic") +end))) + +slider:buttons(gears.table.join( + awful.button({}, 4, nil, function() + if slider:get_value() > 100 then + slider:set_value(100) + return + end + slider:set_value(slider:get_value() + 5) + end), + + awful.button({}, 5, nil, function() + if slider:get_value() < 0 then + slider:set_value(0) + return + end + slider:set_value(slider:get_value() - 5) + end) +)) + +helpers.ui.add_hover_cursor(slider, "hand1") +helpers.ui.add_hover_cursor(icon, "hand2") + +local mic_slider = wibox.widget({ + { + { + layout = wibox.layout.fixed.horizontal, + icon, + }, + left = 0, + right = dpi(14), + top = dpi(5), + bottom = dpi(5), + layout = wibox.container.margin, + }, + slider, + layout = wibox.layout.fixed.horizontal, + { + { + layout = wibox.layout.fixed.horizontal, + osd_value, + }, + left = dpi(3), + right = 0, + top = 0, + bottom = 0, + layout = wibox.container.margin, + }, +}) + +local update_microphone = function() -- Sets the Volume Correct + awful.spawn.easy_async_with_shell("pamixer --source " .. microphone .. " --get-volume", function(stdout) + slider.value = tonumber(stdout:match("%d+")) + end) +end + +awesome.connect_signal("widget::update_mic", function() + update_microphone() +end) + +slider:connect_signal("property::value", function(_, new_value) + awful.spawn("pamixer --source " .. microphone .. " --set-volume " .. new_value, false) + local volume_level = slider:get_value() + osd_value.text = volume_level .. "%" +end) + +return mic_slider diff --git a/dot_config/awesome/ui/notif-panel/widgets/vol_slider.lua b/dot_config/awesome/ui/notif-panel/widgets/vol_slider.lua new file mode 100644 index 0000000..4b4c1f4 --- /dev/null +++ b/dot_config/awesome/ui/notif-panel/widgets/vol_slider.lua @@ -0,0 +1,124 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local slider = wibox.widget({ + bar_shape = helpers.ui.rrect(9), + bar_height = dpi(6), + bar_color = theme.color.base, + bar_active_color = theme.color.blue, + handle_shape = gears.shape.circle, + handle_color = theme.color.blue, + handle_width = dpi(12), + value = dpi(75), + forced_width = dpi(239), + widget = wibox.widget.slider, +}) + +local osd_value = wibox.widget({ + text = "0%", + font = helpers.ui.set_font("10"), + widget = wibox.widget.textbox(), +}) +local icon = wibox.widget({ + markup = helpers.ui.colorize_text("󰕾 ", theme.color.blue), + font = helpers.ui.set_font("14"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox(), +}) + +local function get_val() + awesome.connect_signal("signal::volume", function(_, muted) + if muted then + icon.markup = helpers.ui.colorize_text("󰖁", theme.color.blue) + else + icon.markup = helpers.ui.colorize_text("󰕾", theme.color.blue) + end + end) +end + +get_val() + +icon:buttons(gears.table.join(awful.button({}, 1, function() + local script = "pamixer -t" + + awful.spawn(script, false) + awesome.emit_signal("widget::update_vol") +end))) + +slider:buttons(gears.table.join( + awful.button({}, 4, nil, function() + if slider:get_value() > 100 then + slider:set_value(100) + return + end + slider:set_value(slider:get_value() + 5) + end), + + awful.button({}, 5, nil, function() + if slider:get_value() < 0 then + slider:set_value(0) + return + end + slider:set_value(slider:get_value() - 5) + end) +)) + +helpers.ui.add_hover_cursor(slider, "hand1") +helpers.ui.add_hover_cursor(icon, "hand2") + +local vol_slider = wibox.widget({ + { + { + layout = wibox.layout.fixed.horizontal, + icon, + }, + left = 0, + right = dpi(14), + top = dpi(5), + bottom = dpi(5), + layout = wibox.container.margin, + }, + slider, + layout = wibox.layout.fixed.horizontal, + { + { + layout = wibox.layout.fixed.horizontal, + osd_value, + }, + left = dpi(3), + right = 0, + top = 0, + bottom = 0, + layout = wibox.container.margin, + }, +}) + +local update_volume = function() -- Sets the Volume Correct + awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) + slider.value = tonumber(stdout:match("%d+")) + end) +end + +awesome.connect_signal("widget::update_vol", function() + update_volume() +end) + +awesome.connect_signal("widget::update_vol_slider", function(volume_level) + slider:set_value(volume_level) +end) + +slider:connect_signal("property::value", function(_, new_value) + awful.spawn("pamixer --set-volume " .. new_value, false) + awesome.emit_signal("widget::update_vol_pulse") -- update_vol_pulse doesn't Update Volume Signal + local volume_level = slider:get_value() + osd_value.text = volume_level .. "%" +end) + +return vol_slider diff --git a/dot_config/awesome/ui/popups/init.lua b/dot_config/awesome/ui/popups/init.lua new file mode 100644 index 0000000..8d6ae8b --- /dev/null +++ b/dot_config/awesome/ui/popups/init.lua @@ -0,0 +1,10 @@ +local req = { + "layout", + "notifications", + "scratchpad", + "volume", +} + +for _, x in pairs(req) do + require(... .. "." .. x) +end diff --git a/dot_config/awesome/ui/popups/layout/init.lua b/dot_config/awesome/ui/popups/layout/init.lua new file mode 100644 index 0000000..08b5a28 --- /dev/null +++ b/dot_config/awesome/ui/popups/layout/init.lua @@ -0,0 +1,131 @@ +local awful = require("awful") +local gears = require("gears") +local beautiful = require("beautiful") +local wibox = require("wibox") + +local keys = require("config").keys +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local ll = awful.widget.layoutlist({ + base_layout = wibox.widget({ + spacing = dpi(5), + forced_num_cols = dpi(4), + layout = wibox.layout.grid.vertical, + }), + + widget_template = { + { + { + id = "icon_role", + forced_height = dpi(1), + forced_width = dpi(1), + widget = wibox.widget.imagebox, + }, + margins = dpi(15), + widget = wibox.container.margin, + }, + id = "background_role", + forced_width = dpi(70), + forced_height = dpi(70), + shape = gears.shape.rounded_rect, + widget = wibox.container.background, + }, +}) + +local layout_popup = awful.popup({ + widget = wibox.widget({ + ll, + margins = 4, --border margins (padding) + widget = wibox.container.margin, + }), + + border_color = theme.border_normal, + bg = theme.bg_normal, + border_width = theme.border_width, + placement = awful.placement.centered, + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, +}) + +function gears.table.iterate_value(t, value, step_size, filter, _) + local k = gears.table.hasitem(t, value) + if not k then + return + end + + step_size = step_size or 1 + local new_key = gears.math.cycle(#t, k + step_size) + + if filter and not filter(t[new_key]) then + for i = 1, #t do + local k2 = gears.math.cycle(#t, new_key + i) + if filter(t[k2]) then + return t[k2], k2 + end + end + + return + end + + return t[new_key], new_key +end + +-- Timer for Death of PopUp +layout_popup.timer = gears.timer({ + timeout = 0.8, + single_shot = true, + callback = function() + layout_popup.visible = false + end, +}) + +function layout_popup.changed() + layout_popup.visible = true + if not layout_popup.visible then + layout_popup.timer:start() + else + layout_popup.timer:again() + end +end + +-- Mouse Support +layout_popup:connect_signal("mouse::enter", function() + layout_popup.timer:stop() +end) +layout_popup:connect_signal("mouse::leave", function() + layout_popup.timer:start() +end) + +awful.keygrabber({ + start_callback = function() + layout_popup.visible = true + end, + + stop_callback = function() + layout_popup.visible = false + end, + + export_keybindings = true, + stop_event = "release", + stop_key = { "Escape", "Super_L", "Super_R" }, + + keybindings = { + { + { keys.mod }, + " ", + function() + awful.layout.set(gears.table.iterate_value(ll.layouts, ll.current_layout, 1), layout_popup.changed()) + end, + }, + + { + { keys.mod, "Shift" }, + " ", + function() + awful.layout.set(gears.table.iterate_value(ll.layouts, ll.current_layout, -1), layout_popup.changed()) + end, + }, + }, +}) diff --git a/dot_config/awesome/ui/popups/notifications/error.lua b/dot_config/awesome/ui/popups/notifications/error.lua new file mode 100644 index 0000000..5414ce0 --- /dev/null +++ b/dot_config/awesome/ui/popups/notifications/error.lua @@ -0,0 +1,12 @@ +local naughty = require("naughty") + +--- Check if awesome encountered an error during startup and fell back to +--- another config (This code will only ever execute for the fallback config) +naughty.connect_signal("request::display_error", function(message, startup) + naughty.notification({ + urgency = "critical", + app_name = "Awesome", + title = "Oops, an error happened" .. (startup and " during startup!" or "!"), + message = message, + }) +end) diff --git a/dot_config/awesome/ui/popups/notifications/init.lua b/dot_config/awesome/ui/popups/notifications/init.lua new file mode 100644 index 0000000..6f4590d --- /dev/null +++ b/dot_config/awesome/ui/popups/notifications/init.lua @@ -0,0 +1,350 @@ +local gears = require("gears") +local wibox = require("wibox") +local awful = require("awful") +local beautiful = require("beautiful") +local naughty = require("naughty") +local helpers = require("helpers") +local menubar = require("menubar") +local animation = require("lib.animation") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +--- Naughty Notifications with animation +--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +naughty.persistence_enabled = true +naughty.config.defaults.ontop = true +naughty.config.defaults.timeout = 6 +naughty.config.defaults.title = "System Notification" +naughty.config.defaults.position = "top_right" + +local function get_oldest_notification() + for _, notification in ipairs(naughty.active) do + if notification and notification.timeout > 0 then + return notification + end + end + + --- Fallback to first one. + return naughty.active[1] +end + +--- Handle notification icon +naughty.connect_signal("request::icon", function(n, context, hints) + --- Handle other contexts here + if context ~= "app_icon" then + return + end + + --- Use XDG icon + local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower()) + + if path then + n.icon = path + end +end) + +--- Use XDG icon +naughty.connect_signal("request::action_icon", function(a, _, hints) + a.icon = menubar.utils.lookup_icon(hints.id) +end) + +naughty.connect_signal("request::display", function(n) + --- random accent color + local accent_colors = theme.color.accent + + --- table of icons + local app_icons = { + ["firefox"] = { icon = "" }, + ["discord"] = { icon = "󰙯" }, + ["music"] = { icon = "󰝚" }, + ["screenshot tool"] = { icon = "󰊓" }, + } + + local app_icon = nil + local tolow = string.lower + + if app_icons[tolow(n.app_name)] then + app_icon = app_icons[tolow(n.app_name)].icon + else + app_icon = "󰂚" + end + + local app_icon_n = wibox.widget({ + { + font = helpers.ui.set_font("Round 13"), + markup = helpers.ui.colorize_text(app_icon, theme.color.base), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + bg = accent_colors, + widget = wibox.container.background, + shape = gears.shape.circle, + forced_height = dpi(20), + forced_width = dpi(20), + }) + + local icon = wibox.widget({ + { + { + { + image = n.icon, + resize = true, + clip_shape = gears.shape.circle, + halign = "center", + valign = "center", + widget = wibox.widget.imagebox, + }, + border_width = dpi(2), + border_color = accent_colors, + shape = gears.shape.circle, + widget = wibox.container.background, + }, + strategy = "exact", + height = dpi(50), + width = dpi(50), + widget = wibox.container.constraint, + }, + { + nil, + nil, + { + nil, + nil, + app_icon_n, + layout = wibox.layout.align.horizontal, + expand = "none", + }, + layout = wibox.layout.align.vertical, + expand = "none", + }, + layout = wibox.layout.stack, + }) + + local app_name = wibox.widget({ + font = helpers.ui.set_font("Bold 12"), + text = n.app_name:gsub("^%l", string.upper), + widget = wibox.widget.textbox, + }) + + local dismiss = wibox.widget({ + { + font = helpers.ui.set_font("Bold 10"), + markup = helpers.ui.colorize_text("", theme.color.accent), + widget = wibox.widget.textbox, + valign = "center", + halign = "center", + }, + margins = dpi(4), + widget = wibox.container.margin, + }) + + dismiss:buttons(gears.table.join(awful.button({}, 1, function() + n:destroy(naughty.notification_closed_reason.dismissed_by_user) + end))) + + local timeout_arc = wibox.widget({ + widget = wibox.container.arcchart, + forced_width = dpi(26), + forced_height = dpi(26), + max_value = 100, + min_value = 0, + value = 0, + thickness = dpi(4), + rounded_edge = true, + bg = theme.color.base, + colors = { + { + type = "linear", + from = { 0, 0 }, + to = { 400, 400 }, + stops = { + { 0, accent_colors }, + { 0.2, accent_colors }, + { 0.4, accent_colors }, + { 0.6, accent_colors }, + { 0.8, accent_colors }, + }, + }, + }, + dismiss, + }) + + local title2 = wibox.widget.textbox() + title2.font = helpers.ui.set_font("Bold 11") + title2.text = n.title + + local title = wibox.widget({ + widget = wibox.container.scroll.horizontal, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + fps = 60, + speed = 75, + title2, + }) + + local message2 = wibox.widget.textbox() + message2.font = helpers.ui.set_font("11") + message2.text = n.message + + local message = wibox.widget({ + widget = wibox.container.scroll.horizontal, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + fps = 60, + speed = 75, + message2, + }) + + local actions = wibox.widget({ + notification = n, + + base_layout = wibox.widget({ + spacing = dpi(3), + layout = wibox.layout.flex.horizontal, + }), + + widget_template = { + { + { + { + id = "text_role", + font = helpers.ui.set_font("10"), + widget = wibox.widget.textbox, + }, + left = dpi(6), + right = dpi(6), + widget = wibox.container.margin, + }, + widget = wibox.container.place, + }, + bg = theme.color.base, + forced_height = dpi(25), + forced_width = dpi(70), + widget = wibox.container.background, + }, + style = { + underline_normal = false, + underline_selected = true, + }, + widget = naughty.list.actions, + }) + + local widget = naughty.layout.box({ + notification = n, + type = "notification", + cursor = "hand2", + shape = helpers.ui.rrect(12), + border_color = theme.color.surface0, + border_width = dpi(3), + maximum_width = dpi(350), + maximum_height = dpi(180), + bg = "#00000000", + + widget_template = { + { + layout = wibox.layout.fixed.vertical, + { + { + { + layout = wibox.layout.align.horizontal, + app_name, + nil, + timeout_arc, + }, + margins = { top = dpi(3), bottom = dpi(3), left = dpi(15), right = dpi(15) }, + widget = wibox.container.margin, + }, + bg = theme.color.surface0, + widget = wibox.container.background, + }, + { + { + layout = wibox.layout.fixed.vertical, + { + layout = wibox.layout.fixed.horizontal, + spacing = dpi(10), + icon, + { + expand = "none", + layout = wibox.layout.align.vertical, + nil, + { + layout = wibox.layout.fixed.vertical, + title, + message, + }, + nil, + }, + }, + { + helpers.ui.vertical_pad(dpi(10)), + { + actions, + shape = helpers.ui.rrect(0), + widget = wibox.container.background, + }, + visible = n.actions and #n.actions > 0, + layout = wibox.layout.fixed.vertical, + }, + }, + margins = dpi(15), + widget = wibox.container.margin, + }, + }, + --- Anti-aliasing container + shape = helpers.ui.rrect(0), + bg = theme.color.base, + widget = wibox.container.background, + }, + }) + + --- Don't destroy the notification on click --- + widget.buttons = {} + + --- Disables Hand Cursor in Whole wibox --- + helpers.ui.add_hover_cursor(widget, "left_ptr") + + --- Adds Close Cursor on Close Sign --- + helpers.ui.add_hover_cursor(dismiss, "hand2") + + local anim = animation:new({ + duration = n.timeout, + target = 100, + easing = animation.easing.linear, + reset_on_stop = false, + update = function(_, pos) + timeout_arc.value = pos + end, + }) + + anim:connect_signal("ended", function() + n:reset_timeout(0.0000001) + end) + + widget:connect_signal("mouse::enter", function() + n:reset_timeout(0) + anim:stop() + end) + + widget:connect_signal("mouse::leave", function() + anim:start() + end) + + local notification_height = widget.height + theme.notification_spacing + local total_notifications_height = #naughty.active * notification_height + + if total_notifications_height > n.screen.workarea.height then + get_oldest_notification():destroy(naughty.notification_closed_reason.too_many_on_screen) + end + + anim:start() + + --- Destroy popups notifs if dont_disturb mode is on + ---@diagnostic disable-next-line: undefined-field + if _G.dnd_state then + naughty.destroy_all_notifications(nil, 1) + end +end) + +require(... .. ".error") diff --git a/dot_config/awesome/ui/popups/notifications/playerctl.lua b/dot_config/awesome/ui/popups/notifications/playerctl.lua new file mode 100644 index 0000000..7343b37 --- /dev/null +++ b/dot_config/awesome/ui/popups/notifications/playerctl.lua @@ -0,0 +1,20 @@ +local naughty = require("naughty") +local playerctl_daemon = require("signals.playerctl") +local beautiful = require("beautiful") + +local theme = beautiful.get() + +playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, _, new, _) + if album_path == "" then -- Sets Image for Notification -- + album_path = theme.music + end + + if new == true then + naughty.notify({ + app_name = "Music", + title = title, + text = artist, + image = album_path, + }) + end +end) diff --git a/dot_config/awesome/ui/popups/scratchpad/init.lua b/dot_config/awesome/ui/popups/scratchpad/init.lua new file mode 100644 index 0000000..a0661c9 --- /dev/null +++ b/dot_config/awesome/ui/popups/scratchpad/init.lua @@ -0,0 +1,27 @@ +local bling = require("lib.bling") +local rubato = require("lib.rubato") + +-- 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. +local anim_y = rubato.timed({ + pos = -1000, + rate = 60, + intro = 0.2, + duration = 0.4, + awestore_compat = true, -- This option must be set to true. +}) + +local term_scratch = bling.module.scratchpad({ + command = "alacritty --class spad", -- How to spawn the scratchpad + rule = { instance = "spad" }, -- The rule that the scratchpad will be searched by + sticky = true, -- Whether the scratchpad should be sticky + autoclose = true, -- Whether it should hide itself when losing focus + floating = true, -- Whether it should be floating (MUST BE TRUE FOR ANIMATIONS) + geometry = { x = 456, y = 33, height = 600, width = 1000 }, -- 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) + 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 = { 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. +}) +awesome.connect_signal("scratchpad::toggle", function() + term_scratch:toggle() +end) diff --git a/dot_config/awesome/ui/popups/volume/init.lua b/dot_config/awesome/ui/popups/volume/init.lua new file mode 100644 index 0000000..98a3f84 --- /dev/null +++ b/dot_config/awesome/ui/popups/volume/init.lua @@ -0,0 +1,284 @@ +local gears = require("gears") +local awful = require("awful") +local beautiful = require("beautiful") +local wibox = require("wibox") +local helpers = require("helpers") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +--- Volume OSD +--- ~~~~~~~~~~ +local icon = wibox.widget({ + { + id = "icon2", + image = theme.volume_on, + resize = true, + widget = wibox.widget.imagebox, + }, + forced_height = dpi(150), + top = dpi(12), + bottom = dpi(12), + widget = wibox.container.margin, +}) + +local icon3 = icon.icon2 + +local osd_header = wibox.widget({ + text = "Volume", + font = helpers.ui.set_font("Bold 12"), + halign = "left", + valign = "center", + widget = wibox.widget.textbox, +}) + +local osd_value = wibox.widget({ + text = "0%", + font = helpers.ui.set_font("Bold 12"), + halign = "center", + valign = "center", + widget = wibox.widget.textbox, +}) + +local slider_osd = wibox.widget({ + nil, + { + id = "vol_osd_slider", + bar_shape = gears.shape.rounded_rect, + bar_height = dpi(12), + bar_color = theme.color.surface0, + bar_active_color = theme.color.blue, + handle_color = theme.color.blue, + handle_shape = gears.shape.circle, + handle_width = dpi(24), + handle_border_color = "#00000012", + handle_border_width = dpi(1), + maximum = 100, + widget = wibox.widget.slider, + }, + nil, + expand = "none", + layout = wibox.layout.align.vertical, +}) + +local vol_osd_slider = slider_osd.vol_osd_slider + +vol_osd_slider:buttons(gears.table.join( + awful.button({}, 4, nil, function() + if vol_osd_slider:get_value() > 100 then + vol_osd_slider:set_value(100) + return + end + vol_osd_slider:set_value(vol_osd_slider:get_value() + 5) + end), + + awful.button({}, 5, nil, function() + if vol_osd_slider:get_value() < 0 then + vol_osd_slider:set_value(0) + return + end + vol_osd_slider:set_value(vol_osd_slider:get_value() - 5) + end) +)) + +helpers.ui.add_hover_cursor(vol_osd_slider, "hand1") + +local update_volume = function() -- Sets the Volume Correct + awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) + vol_osd_slider.value = tonumber(stdout:match("%d+")) + end) +end + +awesome.connect_signal("widget::update_vol", function() + update_volume() +end) + +update_volume() + +vol_osd_slider:connect_signal("property::value", function(_, new_value) + local volume_level = vol_osd_slider:get_value() + awful.spawn("pamixer --set-volume " .. new_value, false) + + -- Update textbox widget text + osd_value.text = volume_level .. "%" + + -- Update the volume slider if values here change + awesome.emit_signal("widget::update_vol_pulse") + awesome.emit_signal("widget::update_vol_slider", volume_level) + + if awful.screen.focused().show_vol_osd then + awesome.emit_signal("module::volume_osd:show", true) + end +end) + +vol_osd_slider:connect_signal("button::press", function() + awful.screen.focused().show_vol_osd = true +end) + +vol_osd_slider:connect_signal("mouse::enter", function() + awful.screen.focused().show_vol_osd = true +end) + +-- The emit will come from the volume-slider +awesome.connect_signal("module::volume_osd", function(volume) + vol_osd_slider:set_value(volume) +end) + +local volume_osd_height = dpi(250) +local volume_osd_width = dpi(250) + +screen.connect_signal("request::desktop_decoration", function(s) + s = s or {} + s.show_vol_osd = false + + s.volume_osd_overlay = awful.popup({ + type = "notification", + screen = s, + shape = helpers.ui.rrect(15), + height = volume_osd_height, + width = volume_osd_width, + maximum_height = volume_osd_height, + maximum_width = volume_osd_width, + bg = theme.color.transparent, + offset = dpi(5), + border_width = dpi(3), + border_color = theme.color.surface0, + ontop = true, + visible = false, + preferred_anchors = "middle", + preferred_positions = { "left", "right", "top", "bottom" }, + widget = { + { + { + layout = wibox.layout.fixed.vertical, + { + { + layout = wibox.layout.align.horizontal, + expand = "none", + nil, + icon, + nil, + }, + { + layout = wibox.layout.fixed.vertical, + spacing = dpi(5), + { + layout = wibox.layout.align.horizontal, + expand = "none", + osd_header, + nil, + osd_value, + }, + slider_osd, + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + }, + left = dpi(24), + right = dpi(24), + widget = wibox.container.margin, + }, + bg = theme.color.base, + widget = wibox.container.background, + }, + }) + + -- Reset timer on mouse hover + s.volume_osd_overlay:connect_signal("mouse::enter", function() + awful.screen.focused().show_vol_osd = true + awesome.emit_signal("module::volume_osd:rerun") + end) +end) + +local hide_osd = gears.timer({ + timeout = 1, + autostart = true, + callback = function() + local focused = awful.screen.focused() + focused.volume_osd_overlay.visible = false + focused.show_vol_osd = false + end, +}) + +awesome.connect_signal("module::volume_osd:rerun", function() + if hide_osd.started then + hide_osd:again() + else + hide_osd:start() + end +end) + +local placement_placer = function() + local focused = awful.screen.focused() + local volume_osd = focused.volume_osd_overlay + awful.placement.centered(volume_osd) +end + +-- Get Vol +local function get_vol() + local script = "pamixer --get-volume" + local script2 = "pamixer --get-mute" + + awful.spawn.easy_async_with_shell(script, function() + awful.spawn.easy_async_with_shell(script2, function(is_mute) + local muted + + if is_mute:match("true") then + muted = true + else + muted = false + end + + if muted then + vol_osd_slider.bar_active_color = theme.color.red + vol_osd_slider.handle_color = theme.color.red + icon3.image = theme.volume_off + else + vol_osd_slider.bar_active_color = theme.color.blue + vol_osd_slider.handle_color = theme.color.blue + icon3.image = theme.volume_on + end + end) + end) +end + +awesome.connect_signal("module::volume_osd:show", function(bool) + placement_placer() + + awful.screen.focused().volume_osd_overlay.visible = bool + + if bool then + awesome.emit_signal("module::volume_osd:rerun") + awesome.emit_signal("module::brightness_osd:show", false) + else + if hide_osd.started then + hide_osd:stop() + end + end +end) + +local volume = {} + +volume.increase = function() + local script = "pamixer -i 5" + + awful.spawn(script, false) + get_vol() +end + +volume.decrease = function() + local script = "pamixer -d 5" + + awful.spawn(script, false) + get_vol() +end + +volume.mute = function() + local script = "pamixer -t" + + awful.spawn(script, false) + get_vol() +end + +return volume diff --git a/dot_config/awesome/ui/titlebar/init.lua b/dot_config/awesome/ui/titlebar/init.lua new file mode 100644 index 0000000..598c1c3 --- /dev/null +++ b/dot_config/awesome/ui/titlebar/init.lua @@ -0,0 +1,57 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local xresources = require("beautiful.xresources") + +local dpi = xresources.apply_dpi + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- buttons for the titlebar + local buttons = gears.table.join( + awful.button({}, 1, function() + c:activate({ context = "titlebar", action = "mouse_move" }) + end), + + awful.button({}, 3, function() + c:activate({ context = "titlebar", action = "mouse_resize" }) + end) + ) + + local titlebar_top = awful.titlebar(c, { + size = 30, + expand = "none", + }) + + local left = { + buttons = buttons, + layout = wibox.layout.fixed.horizontal(), + } + + local middle = { + buttons = buttons, + layout = wibox.layout.fixed.horizontal(), + } + + local right = { + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.minimizebutton(c), + awful.titlebar.widget.closebutton(c), + spacing = dpi(11.5), + layout = wibox.layout.fixed.horizontal(), + } + + titlebar_top:setup({ + { + left, + middle, + right, + layout = wibox.layout.align.horizontal(), + }, + left = dpi(13.5), + right = dpi(13.5), + top = dpi(7.4), + bottom = dpi(7.4), + layout = wibox.container.margin, + }) +end) diff --git a/dot_config/awesome/ui/top-panel/config.lua b/dot_config/awesome/ui/top-panel/config.lua new file mode 100644 index 0000000..7f03189 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/config.lua @@ -0,0 +1,13 @@ +local beautiful = require("beautiful") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local M = { + margin = theme.useless_gap * 2, + padding = theme.useless_gap / 1.5, +} + +M.height = (M.padding * 2) + dpi(20) + +return M diff --git a/dot_config/awesome/ui/top-panel/init.lua b/dot_config/awesome/ui/top-panel/init.lua new file mode 100644 index 0000000..9a86e65 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/init.lua @@ -0,0 +1,110 @@ +local awful = require("awful") +local wibox = require("wibox") +local widgets = require("ui.top-panel.widgets") +local beautiful = require("beautiful") +local gears = require("gears") +local vars = require("ui.top-panel.config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +screen.connect_signal("request::desktop_decoration", function(s) + local clockdate = wibox.widget({ + layout = wibox.layout.fixed.horizontal, + widgets.date, + widgets.clock, + }) + + local tasklist = wibox.widget({ + { + layout = wibox.layout.fixed.horizontal, + s.tasklist, -- needs to be here (under the screen.connect_signal) bc of the s + }, + forced_width = dpi(300), + layout = wibox.layout.fixed.horizontal, + }) + + local layoutbox = awful.widget.layoutbox({ + screen = s, + buttons = { + awful.button({}, 1, function() + awful.layout.inc(1) + end), + + awful.button({}, 3, function() + awful.layout.inc(-1) + end), + + awful.button({}, 4, function() + awful.layout.inc(-1) + end), + + awful.button({}, 5, function() + awful.layout.inc(1) + end), + }, + }) + + -- Create the wibox + s.mywibox = awful.wibar({ + position = "top", + screen = s, + margins = { + top = vars.margin, + right = vars.margin, + left = vars.margin, + }, + border_width = theme.border_width, + border_color = theme.border_normal, + height = vars.height, + shape = gears.shape.rounded_rect, + + widget = { + layout = wibox.layout.align.horizontal, + expand = "none", + { + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + widgets.menu, + widgets.seperator, + s.taglist, + widgets.seperator, + tasklist, + }, + left = theme.useless_gap, + right = 0, + top = vars.padding, + bottom = vars.padding, + layout = wibox.container.margin, + }, + { + { + layout = wibox.layout.align.horizontal, + clockdate, + }, + left = 0, + right = 0, + top = vars.padding, + bottom = vars.padding, + layout = wibox.container.margin, + }, + { -- Right widgets + { + layout = wibox.layout.fixed.horizontal, + widgets.systray, + widgets.seperator, + widgets.audio, + widgets.mem, + widgets.cpu, + widgets.disk, + layoutbox, + }, + left = 0, + right = theme.useless_gap, + top = vars.padding, + bottom = vars.padding, + layout = wibox.container.margin, + }, + }, + }) +end) diff --git a/dot_config/awesome/ui/top-panel/widgets/clock.lua b/dot_config/awesome/ui/top-panel/widgets/clock.lua new file mode 100644 index 0000000..b84def2 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/clock.lua @@ -0,0 +1,34 @@ +local gears = require("gears") +local wibox = require("wibox") +local helpers = require("helpers") +local config = require("config") +local beautiful = require("beautiful") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local clock_icon = helpers.ui.create_icon(config.icons.clock, theme.color.pink) + +local clock = wibox.widget.textbox() +clock.font = helpers.ui.set_font("11") + +gears.timer({ + timeout = 60, + autostart = true, + call_now = true, + callback = function() + clock.markup = os.date(config.widget.clock.format) + end, +}) + +return wibox.widget({ + { + clock_icon, + clock, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(1), + right = dpi(1), + layout = wibox.container.margin, +}) diff --git a/dot_config/awesome/ui/top-panel/widgets/cpu.lua b/dot_config/awesome/ui/top-panel/widgets/cpu.lua new file mode 100644 index 0000000..9201546 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/cpu.lua @@ -0,0 +1,47 @@ +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers.ui") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +-- Icon +local icon = helpers.create_icon(config.icons.cpu, theme.color.maroon) + +-- Uptime +local cpu = wibox.widget.textbox() +cpu.font = helpers.set_font("10") +cpu.halign = "center" + +local function get_val() + awesome.connect_signal("signal::cpu", function(cpu_perc) + if cpu_perc then + cpu_perc = tonumber(cpu_perc) + else + cpu_perc = "?" + end + + cpu.markup = cpu_perc .. "%" + end) +end + +get_val() + +local full = wibox.widget({ + { + { + icon, + cpu, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(1), + right = 0, + layout = wibox.container.margin, + }, + forced_width = dpi(73), -- Makes it fixed and not Moves Whole Bar + layout = wibox.layout.fixed.horizontal, +}) + +return full diff --git a/dot_config/awesome/ui/top-panel/widgets/date.lua b/dot_config/awesome/ui/top-panel/widgets/date.lua new file mode 100644 index 0000000..17dace5 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/date.lua @@ -0,0 +1,34 @@ +local gears = require("gears") +local wibox = require("wibox") +local helpers = require("helpers") +local beautiful = require("beautiful") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local icon = helpers.ui.create_icon(config.icons.cal, theme.color.teal) + +local date = wibox.widget.textbox() +date.font = helpers.ui.set_font("11") + +gears.timer({ + timeout = 60, + autostart = true, + call_now = true, + callback = function() + date.markup = os.date(config.widget.date.format) + end, +}) + +return wibox.widget({ + { + icon, + date, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(1), + right = dpi(1), + layout = wibox.container.margin, +}) diff --git a/dot_config/awesome/ui/top-panel/widgets/disk.lua b/dot_config/awesome/ui/top-panel/widgets/disk.lua new file mode 100644 index 0000000..941b556 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/disk.lua @@ -0,0 +1,39 @@ +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers.ui") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +-- Icon +local icon = helpers.create_icon(config.icons.disk, theme.color.yellow) + +-- Uptime +local disk = wibox.widget.textbox() +disk.font = helpers.set_font("10") +disk.halign = "center" + +local function get_val() + awesome.connect_signal("signal::disk", function(disk_perc) + if disk_perc then + disk.markup = tonumber(disk_perc) .. "%" + end + end) +end + +get_val() + +local full = wibox.widget({ + { + icon, + disk, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(1), + right = dpi(8), + layout = wibox.container.margin, +}) + +return full diff --git a/dot_config/awesome/ui/top-panel/widgets/init.lua b/dot_config/awesome/ui/top-panel/widgets/init.lua new file mode 100644 index 0000000..9ef50c1 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/init.lua @@ -0,0 +1,14 @@ +return { + clock = require(... .. ".clock"), + cpu = require(... .. ".cpu"), + date = require(... .. ".date"), + disk = require(... .. ".disk"), + mem = require(... .. ".mem"), + menu = require(... .. ".menu"), + promptbox = require(... .. ".promptbox"), + audio = require(... .. ".pulseaudio"), + seperator = require(... .. ".seperator"), + systray = require(... .. ".systray"), + taglist = require(... .. ".taglist"), + tasklist = require(... .. ".tasklist"), +} diff --git a/dot_config/awesome/ui/top-panel/widgets/launcher.lua b/dot_config/awesome/ui/top-panel/widgets/launcher.lua new file mode 100644 index 0000000..52a5662 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/launcher.lua @@ -0,0 +1,7 @@ +local awful = require("awful") +local theme = require("beautiful").get() +local menu = require("main.menu") + +local launcher = awful.widget.launcher({ image = theme.awesome_icon, menu = menu }) + +return launcher diff --git a/dot_config/awesome/ui/top-panel/widgets/mem.lua b/dot_config/awesome/ui/top-panel/widgets/mem.lua new file mode 100644 index 0000000..b534066 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/mem.lua @@ -0,0 +1,41 @@ +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers.ui") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +-- Icon +local icon = helpers.create_icon(config.icons.mem, theme.color.green) + +-- Uptime +local mem = wibox.widget.textbox() +mem.font = helpers.set_font("10") +mem.halign = "center" + +local function get_val() + awesome.connect_signal("signal::mem", function(mem_perc) + mem.markup = tonumber(mem_perc) .. "%" + end) +end + +get_val() + +local full = wibox.widget({ + { + { + icon, + mem, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(1), + right = 0, + layout = wibox.container.margin, + }, + forced_width = dpi(73), + layout = wibox.layout.fixed.horizontal, +}) + +return full diff --git a/dot_config/awesome/ui/top-panel/widgets/menu.lua b/dot_config/awesome/ui/top-panel/widgets/menu.lua new file mode 100644 index 0000000..00688fd --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/menu.lua @@ -0,0 +1,26 @@ +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers.ui") +local config = require("config") + +local dpi = beautiful.xresources.apply_dpi + +-- Menu +local menu = wibox.widget({ + { + font = helpers.set_font("16"), + markup = config.icons.menu, + widget = wibox.widget.textbox(), + }, + bottom = dpi(2), + widget = wibox.container.margin, +}) + +helpers.add_hover_cursor(menu, "hand2") + +menu:add_button(awful.button({}, 1, function() + awesome.emit_signal("sidebar::toggle") +end)) + +return menu diff --git a/dot_config/awesome/ui/top-panel/widgets/power.lua b/dot_config/awesome/ui/top-panel/widgets/power.lua new file mode 100644 index 0000000..a952d46 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/power.lua @@ -0,0 +1,18 @@ +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local config = require("config") +local helpers = require("helpers") + +local theme = beautiful.get() + +-- Menu +local menu = wibox.widget.textbox() +menu.font = helpers.ui.set_font("16") +menu.markup = helpers.ui.colorize_text(config.icons.power, theme.color.red) + +menu:add_button(awful.button({}, 1, function() + awesome.emit_signal("module::exit_screen:show") +end)) + +return menu diff --git a/dot_config/awesome/ui/top-panel/widgets/promptbox.lua b/dot_config/awesome/ui/top-panel/widgets/promptbox.lua new file mode 100644 index 0000000..06ce84a --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/promptbox.lua @@ -0,0 +1,5 @@ +local awful = require("awful") + +local promptbox = awful.widget.prompt() + +return promptbox diff --git a/dot_config/awesome/ui/top-panel/widgets/pulseaudio.lua b/dot_config/awesome/ui/top-panel/widgets/pulseaudio.lua new file mode 100644 index 0000000..e4d1e5c --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/pulseaudio.lua @@ -0,0 +1,80 @@ +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require("helpers") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +-- Icon +local icon = helpers.ui.create_icon(config.icons.vol.on, theme.color.blue) + +-- Uptime +local pulseaudio = wibox.widget.textbox() +pulseaudio.font = helpers.ui.set_font("10") +pulseaudio.halign = "center" + +local function get_val() + awesome.connect_signal("signal::volume", function(vol, muted) + if muted then + pulseaudio.markup = "muted" + icon.markup = helpers.ui.colorize_text(config.icons.vol.off, theme.color.blue) + else + pulseaudio.markup = tonumber(vol) .. "%" + icon.markup = helpers.ui.colorize_text(config.icons.vol.on, theme.color.blue) + end + end) +end + +get_val() + +local full = wibox.widget({ + { + { + icon, + pulseaudio, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(5), + right = dpi(8), + layout = wibox.container.margin, + }, + forced_width = dpi(73), + layout = wibox.layout.fixed.horizontal, +}) + +full:add_button(awful.button({}, 1, function() + awesome.emit_signal("action::toggle") +end)) + +-- Update Function +local update_volume = function() + awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) + pulseaudio.markup = tonumber(stdout:match("%d+")) .. "%" + + if tonumber(stdout:match("%d+")) < 10 then + icon.markup = helpers.ui.colorize_text(config.icons.vol.low, theme.color.blue) + elseif tonumber(stdout:match("%d+")) < 50 then + icon.markup = helpers.ui.colorize_text(config.icons.vol.med, theme.color.blue) + elseif tonumber(stdout:match("%d+")) < 100 then + icon.markup = helpers.ui.colorize_text(config.icons.vol.high, theme.color.blue) + else + end + end) +end + +update_volume() + +awesome.connect_signal("widget::update_vol", function() + update_volume() +end) + +awesome.connect_signal("widget::update_vol_pulse", function() + update_volume() +end) + +helpers.ui.add_hover_cursor(full, "hand2") + +return full diff --git a/dot_config/awesome/ui/top-panel/widgets/seperator.lua b/dot_config/awesome/ui/top-panel/widgets/seperator.lua new file mode 100644 index 0000000..183a7e1 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/seperator.lua @@ -0,0 +1,12 @@ +local beautiful = require("beautiful") +local wibox = require("wibox") +local helpers = require("helpers") + +local theme = beautiful.get() + +local seperator = wibox.widget.textbox() + +seperator.font = helpers.ui.set_font("14") +seperator.markup = helpers.ui.colorize_text("|", theme.color.subtext1) + +return seperator diff --git a/dot_config/awesome/ui/top-panel/widgets/systray.lua b/dot_config/awesome/ui/top-panel/widgets/systray.lua new file mode 100644 index 0000000..8f3cf86 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/systray.lua @@ -0,0 +1,64 @@ +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local rubato = require("lib.rubato") +local helpers = require("helpers") +local config = require("config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local arrow = wibox.widget.textbox() +arrow.font = helpers.ui.set_font("13") +arrow.markup = config.icons.arr.r + +local systray = wibox.widget.systray() +systray.visible = true +theme.systray_icon_spacing = dpi(4) + +local sys = wibox.widget({ + widget = wibox.container.constraint, + strategy = "max", + visible = true, + width = 0, + { + widget = wibox.container.margin, + margins = dpi(2), + systray, + }, +}) + +local slide = rubato.timed({ + duration = 0.9, + awestore_compat = true, + subscribed = function(pos) + sys.width = pos + end, +}) + +local value = true + +arrow.toggle = function() + if value == false then + arrow.markup = config.icons.arr.r + value = true + slide:set(2) + else + arrow.markup = config.icons.arr.l + slide:set(500) + value = false + end +end + +arrow:add_button(awful.button({}, 1, function() + arrow.toggle() +end)) + +local full = wibox.widget({ + layout = wibox.layout.fixed.horizontal, + arrow, + sys, + spacing = dpi(2), +}) + +return full diff --git a/dot_config/awesome/ui/top-panel/widgets/taglist.lua b/dot_config/awesome/ui/top-panel/widgets/taglist.lua new file mode 100644 index 0000000..01d5383 --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/taglist.lua @@ -0,0 +1,114 @@ +local awful = require("awful") +local wibox = require("wibox") +local beautiful = require("beautiful") +local bling = require("lib.bling") +local keys = require("config").keys +local vars = require("ui.top-panel.config") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +awful.screen.connect_for_each_screen(function(s) + s.taglist = awful.widget.taglist({ + screen = s, + filter = awful.widget.taglist.filter.all, + + widget_template = { + { + { + { + id = "text_role", + widget = wibox.widget.textbox, + }, + layout = wibox.layout.fixed.horizontal, + }, + left = dpi(4), + right = dpi(4), + widget = wibox.container.margin, + }, + id = "background_role", + widget = wibox.container.background, + + -- Add support for hover colors and an index label + create_callback = function(self, c3, index, _) + self:get_children_by_id("text_role")[1].markup = " " .. index .. " " + + self:connect_signal("mouse::enter", function() + -- BLING: Only show widget when there are clients in the tag + if #c3:clients() > 0 then + -- BLING: Update the widget with the new tag + awesome.emit_signal("bling::tag_preview::update", c3) + -- BLING: Show the widget + awesome.emit_signal("bling::tag_preview::visibility", s, true) + end + end) + + self:connect_signal("mouse::leave", function() + -- BLING: Turn the widget off + awesome.emit_signal("bling::tag_preview::visibility", s, false) + + if self.has_backup then + self.bg = self.backup + end + end) + end, + + update_callback = function(self, _, index, _) + self:get_children_by_id("text_role")[1].markup = " " .. index .. " " + end, + }, + + buttons = { + awful.button({}, 1, function(t) + t:view_only() + end), + + awful.button({ keys.mod }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), + + awful.button({}, 3, awful.tag.viewtoggle), + + awful.button({ keys.mod }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + + awful.button({}, 4, function(t) + awful.tag.viewprev(t.screen) + end), + + awful.button({}, 5, function(t) + awful.tag.viewnext(t.screen) + end), + }, + }) + + bling.widget.tag_preview.enable({ + show_client_content = true, -- Whether or not to show the client content + x = 0, -- The x-coord of the popup + y = 0, -- The y-coord of the popup + scale = 0.2, -- The scale of the previews compared to the screen + honor_padding = true, -- Honor padding when creating widget size + honor_workarea = true, -- Honor work area when creating widget size + + placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) + awful.placement.top_left(c, { + margins = { + top = vars.height + (vars.margin * 1.5), + left = vars.margin, + }, + }) + end, + + background_widget = wibox.widget({ -- Set a background image (like a wallpaper) for the widget + image = theme.wallpaper, + horizontal_fit_policy = "fit", + vertical_fit_policy = "fit", + widget = wibox.widget.imagebox, + }), + }) +end) diff --git a/dot_config/awesome/ui/top-panel/widgets/tasklist.lua b/dot_config/awesome/ui/top-panel/widgets/tasklist.lua new file mode 100644 index 0000000..fb2aaae --- /dev/null +++ b/dot_config/awesome/ui/top-panel/widgets/tasklist.lua @@ -0,0 +1,8 @@ +local awful = require("awful") + +awful.screen.connect_for_each_screen(function(s) + s.tasklist = awful.widget.tasklist({ + screen = s, + filter = awful.widget.tasklist.filter.focused, + }) +end) diff --git a/dot_config/bat/config b/dot_config/bat/config new file mode 100644 index 0000000..98b160a --- /dev/null +++ b/dot_config/bat/config @@ -0,0 +1,27 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +--theme="Catppuccin-macchiato" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +#--italic-text=always + +# Uncomment the following line to disable automatic paging: +#--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for Arduino .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" + +--style=auto diff --git a/dot_config/btop/btop.conf b/dot_config/btop/btop.conf new file mode 100644 index 0000000..d6be048 --- /dev/null +++ b/dot_config/btop/btop.conf @@ -0,0 +1,248 @@ +#? Config file for btop v. 1.3.2 + +#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. +#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" +color_theme = "/home/marley/.config/btop/themes/catppuccin_macchiato.theme" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = False + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = True + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. +force_tty = False + +#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. +#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. +#* Use whitespace " " as separator between different presets. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = True + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = True + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty". +graph_symbol_gpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace. +shown_boxes = "cpu mem proc net" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 2000 + +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +proc_sorting = "name" + +#* Reverse sorting order, True or False. +proc_reversed = False + +#* Show processes as a tree. +proc_tree = True + +#* Use the cpu graph colors in the process list. +proc_colors = True + +#* Use a darkening gradient in the process list. +proc_gradient = True + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = False + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = True + +#* Show cpu graph for each process. +proc_cpu_graphs = True + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = False + +#* Show proc box on left side of screen instead of right. +proc_left = False + +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +proc_filter_kernel = False + +#* In tree-view, always accumulate child process resources in the parent process. +proc_aggregate = True + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "Auto" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "Auto" + +#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". +show_gpu_info = "Auto" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = True + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = False + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = False + +#* Shows the system uptime in the CPU box. +show_uptime = True + +#* Show cpu temperature. +check_temp = True + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = True + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = False + +#* Show CPU frequency. +show_cpu_freq = True + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = True + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user". +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = True + +#* Show mem box below net box instead of above. +mem_below_net = False + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = True + +#* If swap memory should be shown in memory box. +show_swap = False + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = True + +#* If mem box should be split to also show disks info. +show_disks = True + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = True + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = True + +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = False + +#* Set to true to show available disk space for privileged users. +disk_free_priv = False + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = True + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = False + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = False + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +io_graph_speeds = "" + +#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = True + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = True + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* Show battery stats in top right if battery is present. +show_battery = True + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Show power stats of battery next to charge indicator. +show_battery_watts = True + +#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING" + +#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. +nvml_measure_pcie_speeds = True + +#* Horizontally mirror the GPU graph. +gpu_mirror_graph = True + +#* Custom gpu0 model name, empty string to disable. +custom_gpu_name0 = "" + +#* Custom gpu1 model name, empty string to disable. +custom_gpu_name1 = "" + +#* Custom gpu2 model name, empty string to disable. +custom_gpu_name2 = "" + +#* Custom gpu3 model name, empty string to disable. +custom_gpu_name3 = "" + +#* Custom gpu4 model name, empty string to disable. +custom_gpu_name4 = "" + +#* Custom gpu5 model name, empty string to disable. +custom_gpu_name5 = "" diff --git a/dot_config/cheat/conf.yml b/dot_config/cheat/conf.yml new file mode 100644 index 0000000..44cda39 --- /dev/null +++ b/dot_config/cheat/conf.yml @@ -0,0 +1,83 @@ +--- +# The editor to use with 'cheat -e '. Defaults to $EDITOR or $VISUAL. +editor: nvim + +# Should 'cheat' always colorize output? +colorize: true + +# Which 'chroma' colorscheme should be applied to the output? +# Options are available here: +# https://github.com/alecthomas/chroma/tree/master/styles +style: catppuccin-macchiato + +# Which 'chroma' "formatter" should be applied? +# One of: "terminal", "terminal256", "terminal16m" +formatter: terminal256 + +# Through which pager should output be piped? +# 'less -FRX' is recommended on Unix systems +# 'more' is recommended on Windows +pager: less -FRX + +# Cheatpaths are paths at which cheatsheets are available on your local +# filesystem. +# +# It is useful to sort cheatsheets into different cheatpaths for organizational +# purposes. For example, you might want one cheatpath for community +# cheatsheets, one for personal cheatsheets, one for cheatsheets pertaining to +# your day job, one for code snippets, etc. +# +# Cheatpaths are scoped, such that more "local" cheatpaths take priority over +# more "global" cheatpaths. (The most global cheatpath is listed first in this +# file; the most local is listed last.) For example, if there is a 'tar' +# cheatsheet on both global and local paths, you'll be presented with the local +# one by default. ('cheat -p' can be used to view cheatsheets from alternative +# cheatpaths.) +# +# Cheatpaths can also be tagged as "read only". This instructs cheat not to +# automatically create cheatsheets on a read-only cheatpath. Instead, when you +# would like to edit a read-only cheatsheet using 'cheat -e', cheat will +# perform a copy-on-write of that cheatsheet from a read-only cheatpath to a +# writeable cheatpath. +# +# This is very useful when you would like to maintain, for example, a +# "pristine" repository of community cheatsheets on one cheatpath, and an +# editable personal reponsity of cheatsheets on another cheatpath. +# +# Cheatpaths can be also configured to automatically apply tags to cheatsheets +# on certain paths, which can be useful for querying purposes. +# Example: 'cheat -t work jenkins'. +# +# Community cheatsheets must be installed separately, though you may have +# downloaded them automatically when installing 'cheat'. If not, you may +# download them here: +# +# https://github.com/cheat/cheatsheets +cheatpaths: + # Cheatpath properties mean the following: + # 'name': the name of the cheatpath (view with 'cheat -d', filter with 'cheat -p') + # 'path': the filesystem path of the cheatsheet directory (view with 'cheat -d') + # 'tags': tags that should be automatically applied to sheets on this path + # 'readonly': shall user-created ('cheat -e') cheatsheets be saved here? + - name: community + path: /home/marley/.config/cheat/cheatsheets/community + tags: [community] + readonly: true + + # If you have personalized cheatsheets, list them last. They will take + # precedence over the more global cheatsheets. + - name: personal + path: /home/marley/.config/cheat/cheatsheets/personal + tags: [personal] + readonly: false + + # While it requires no configuration here, it's also worth noting that + # cheat will automatically append directories named '.cheat' within the + # current working directory to the 'cheatpath'. This can be very useful if + # you'd like to closely associate cheatsheets with, for example, a directory + # containing source code. + # + # Such "directory-scoped" cheatsheets will be treated as the most "local" + # cheatsheets, and will override less "local" cheatsheets. Similarly, + # directory-scoped cheatsheets will always be editable ('readonly: false'). + diff --git a/dot_config/composer/composer.json b/dot_config/composer/composer.json new file mode 100644 index 0000000..7080992 --- /dev/null +++ b/dot_config/composer/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "laravel/installer": "^5.6", + "cpriego/valet-linux": "^2.3" + } +} diff --git a/dot_config/composer/composer.lock b/dot_config/composer/composer.lock new file mode 100644 index 0000000..c2aa15b --- /dev/null +++ b/dot_config/composer/composer.lock @@ -0,0 +1,2487 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "f549eefbe875104320937dfd396c3f80", + "packages": [ + { + "name": "carbonphp/carbon-doctrine-types", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/dbal": "<4.0.0 || >=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2024-02-09T16:56:22+00:00" + }, + { + "name": "cpriego/valet-linux", + "version": "v2.3.10", + "source": { + "type": "git", + "url": "https://github.com/cpriego/valet-linux.git", + "reference": "321e261bfc425b06acd9cba4eab11e44cc4f6759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cpriego/valet-linux/zipball/321e261bfc425b06acd9cba4eab11e44cc4f6759", + "reference": "321e261bfc425b06acd9cba4eab11e44cc4f6759", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-posix": "*", + "illuminate/container": "~5.3|^6.0|^7.0|^8.0|^9.0|^10.0", + "mnapoli/silly": "~1.1", + "nategood/httpful": "~0.2", + "outrightvision/api-model": "^1.0", + "php": ">=7.0", + "symfony/process": "~2.7|~3.0|~4.0|~5.0|^6.0", + "tightenco/collect": "~5.3|^6.0|^7.0|^8.0|^9.0" + }, + "require-dev": { + "mockery/mockery": "^1.2.3", + "phpunit/phpunit": "~5.5|^9.0" + }, + "bin": [ + "valet" + ], + "type": "library", + "autoload": { + "files": [ + "cli/includes/compatibility.php", + "cli/includes/facades.php", + "cli/includes/helpers.php" + ], + "psr-4": { + "Valet\\": "cli/Valet/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + }, + { + "name": "Adam Wathan", + "email": "adam.wathan@gmail.com" + }, + { + "name": "Carlos Priego", + "email": "carlos.enrique.priego@gmail.com" + }, + { + "name": "Leonardo Nodari", + "email": "nodarileonardo@gmail.com" + }, + { + "name": "Joaquín Marcher", + "email": "joaquin@marcher.com.uy" + }, + { + "name": "Ludovic Lemarinel", + "email": "ludovic@adesin.fr" + } + ], + "description": "A more enjoyable local development experience for Linux.", + "keywords": [ + "arch", + "fedora", + "laravel", + "linux", + "ubuntu", + "valet", + "wwdhhd", + "zonda" + ], + "support": { + "issues": "https://github.com/cpriego/valet-linux/issues", + "source": "https://github.com/cpriego/valet-linux/tree/v2.3.10" + }, + "time": "2024-02-14T10:32:47+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.10", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.10" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2024-02-18T20:23:39+00:00" + }, + { + "name": "illuminate/collections", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "f9589f1063a449111dcaa1d68285b507d9483a95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/f9589f1063a449111dcaa1d68285b507d9483a95", + "reference": "f9589f1063a449111dcaa1d68285b507d9483a95", + "shasum": "" + }, + "require": { + "illuminate/conditionable": "^10.0", + "illuminate/contracts": "^10.0", + "illuminate/macroable": "^10.0", + "php": "^8.1" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^6.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2024-03-20T20:09:13+00:00" + }, + { + "name": "illuminate/conditionable", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/conditionable.git", + "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/d0958e4741fc9d6f516a552060fd1b829a85e009", + "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009", + "shasum": "" + }, + "require": { + "php": "^8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Conditionable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2023-02-03T08:06:17+00:00" + }, + { + "name": "illuminate/container", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/container.git", + "reference": "ddc26273085fad3c471b2602ad820e0097ff7939" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/container/zipball/ddc26273085fad3c471b2602ad820e0097ff7939", + "reference": "ddc26273085fad3c471b2602ad820e0097ff7939", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^10.0", + "php": "^8.1", + "psr/container": "^1.1.1|^2.0.1" + }, + "provide": { + "psr/container-implementation": "1.1|2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Container\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Container package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2023-06-18T09:12:03+00:00" + }, + { + "name": "illuminate/contracts", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", + "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", + "shasum": "" + }, + "require": { + "php": "^8.1", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2024-01-15T18:52:32+00:00" + }, + { + "name": "illuminate/filesystem", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/filesystem.git", + "reference": "592fb581a52fba43bf78c2e4b22db540c9f9f149" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/592fb581a52fba43bf78c2e4b22db540c9f9f149", + "reference": "592fb581a52fba43bf78c2e4b22db540c9f9f149", + "shasum": "" + }, + "require": { + "illuminate/collections": "^10.0", + "illuminate/contracts": "^10.0", + "illuminate/macroable": "^10.0", + "illuminate/support": "^10.0", + "php": "^8.1", + "symfony/finder": "^6.2" + }, + "suggest": { + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-hash": "Required to use the Filesystem class.", + "illuminate/http": "Required for handling uploaded files (^7.0).", + "league/flysystem": "Required to use the Flysystem local driver (^3.0.16).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", + "symfony/mime": "Required to enable support for guessing extensions (^6.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "files": [ + "functions.php" + ], + "psr-4": { + "Illuminate\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Filesystem package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2024-03-11T21:45:53+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/dff667a46ac37b634dcf68909d9d41e94dc97c27", + "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2023-06-05T12:46:42+00:00" + }, + { + "name": "illuminate/support", + "version": "v10.48.4", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "980d80017e859c8b1720892d952516e8c0b6708f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/980d80017e859c8b1720892d952516e8c0b6708f", + "reference": "980d80017e859c8b1720892d952516e8c0b6708f", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^2.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-mbstring": "*", + "illuminate/collections": "^10.0", + "illuminate/conditionable": "^10.0", + "illuminate/contracts": "^10.0", + "illuminate/macroable": "^10.0", + "nesbot/carbon": "^2.67", + "php": "^8.1", + "voku/portable-ascii": "^2.0" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^10.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.7).", + "symfony/process": "Required to use the composer class (^6.2).", + "symfony/uid": "Required to use Str::ulid() (^6.2).", + "symfony/var-dumper": "Required to use the dd function (^6.2).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2024-03-11T21:46:45+00:00" + }, + { + "name": "laravel/installer", + "version": "v5.7.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/installer.git", + "reference": "9aa23f46453076e026237a54ae7eb23455ab1921" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/installer/zipball/9aa23f46453076e026237a54ae7eb23455ab1921", + "reference": "9aa23f46453076e026237a54ae7eb23455ab1921", + "shasum": "" + }, + "require": { + "illuminate/filesystem": "^10.20|^11.0", + "illuminate/support": "^10.20|^11.0", + "laravel/prompts": "^0.1", + "php": "^8.2", + "symfony/console": "^6.2|^7.0", + "symfony/process": "^6.2|^7.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" + }, + "bin": [ + "bin/laravel" + ], + "type": "library", + "autoload": { + "psr-4": { + "Laravel\\Installer\\Console\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel application installer.", + "keywords": [ + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/installer/issues", + "source": "https://github.com/laravel/installer/tree/v5.7.1" + }, + "time": "2024-04-02T14:11:43+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.1.17", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", + "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/collections": "^10.0|^11.0", + "php": "^8.1", + "symfony/console": "^6.2|^7.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-mockery": "^1.1" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.1.17" + }, + "time": "2024-03-13T16:05:43+00:00" + }, + { + "name": "mnapoli/silly", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/mnapoli/silly.git", + "reference": "fdb69ac9335b4c83f70baf433eae91e691901f1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mnapoli/silly/zipball/fdb69ac9335b4c83f70baf433eae91e691901f1c", + "reference": "fdb69ac9335b4c83f70baf433eae91e691901f1c", + "shasum": "" + }, + "require": { + "php": ">=7.4", + "php-di/invoker": "~2.0", + "psr/container": "^1.0|^2.0", + "symfony/console": "~3.0|~4.0|~5.0|~6.0|~7.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.12", + "mnapoli/phpunit-easymock": "~1.0", + "phpunit/phpunit": "^6.4|^7|^8|^9|^10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Silly\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Silly CLI micro-framework based on Symfony Console", + "keywords": [ + "PSR-11", + "cli", + "console", + "framework", + "micro-framework", + "silly" + ], + "support": { + "issues": "https://github.com/mnapoli/silly/issues", + "source": "https://github.com/mnapoli/silly/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/mnapoli/silly", + "type": "tidelift" + } + ], + "time": "2024-01-18T15:47:39+00:00" + }, + { + "name": "nategood/httpful", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/nategood/httpful.git", + "reference": "0cded3ea97ba905600de9ceb9ef13f3ab681587c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nategood/httpful/zipball/0cded3ea97ba905600de9ceb9ef13f3ab681587c", + "reference": "0cded3ea97ba905600de9ceb9ef13f3ab681587c", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "psr-0": { + "Httpful": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nate Good", + "email": "me@nategood.com", + "homepage": "http://nategood.com" + } + ], + "description": "A Readable, Chainable, REST friendly, PHP HTTP Client", + "homepage": "http://github.com/nategood/httpful", + "keywords": [ + "api", + "curl", + "http", + "requests", + "rest", + "restful" + ], + "support": { + "issues": "https://github.com/nategood/httpful/issues", + "source": "https://github.com/nategood/httpful/tree/v0.3.2" + }, + "time": "2020-01-25T01:13:13+00:00" + }, + { + "name": "nesbot/carbon", + "version": "2.72.3", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "*", + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "squizlabs/php_codesniffer": "^3.4" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2024-01-25T10:35:09+00:00" + }, + { + "name": "outrightvision/api-model", + "version": "v1.0.24", + "source": { + "type": "git", + "url": "https://github.com/OUTRIGHT-Vision/api-model.git", + "reference": "f781b494a485ff915f307c3364a20579466c67e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/OUTRIGHT-Vision/api-model/zipball/f781b494a485ff915f307c3364a20579466c67e0", + "reference": "f781b494a485ff915f307c3364a20579466c67e0", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0" + }, + "require-dev": { + "orchestra/testbench": "^8.5", + "php": "^8.2", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Support/helpers.php" + ], + "psr-4": { + "Tests\\": "tests/", + "OUTRIGHTVision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joaquin Marcher", + "email": "joaquin@marcher.com.uy" + } + ], + "description": "Generate Laravel-like Api Models", + "keywords": [ + "api", + "eloquent", + "laravel", + "models" + ], + "support": { + "issues": "https://github.com/OUTRIGHT-Vision/api-model/issues", + "source": "https://github.com/OUTRIGHT-Vision/api-model/tree/v1.0.24" + }, + "time": "2023-12-06T13:59:55+00:00" + }, + { + "name": "php-di/invoker", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/PHP-DI/Invoker.git", + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/33234b32dafa8eb69202f950a1fc92055ed76a86", + "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "psr/container": "^1.0|^2.0" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "mnapoli/hard-mode": "~0.3.0", + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Invoker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Generic and extensible callable invoker", + "homepage": "https://github.com/PHP-DI/Invoker", + "keywords": [ + "callable", + "dependency", + "dependency-injection", + "injection", + "invoke", + "invoker" + ], + "support": { + "issues": "https://github.com/PHP-DI/Invoker/issues", + "source": "https://github.com/PHP-DI/Invoker/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + } + ], + "time": "2023-09-08T09:24:21+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "symfony/console", + "version": "v7.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.0.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-01T11:04:53+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/11d736e97f116ac375a81f96e662911a34cd50ce", + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-10-31T17:30:12+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/process", + "version": "v6.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "710e27879e9be3395de2b98da3f52a946039f297" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/710e27879e9be3395de2b98da3f52a946039f297", + "reference": "710e27879e9be3395de2b98da3f52a946039f297", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-02-20T12:31:00+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.4.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-12-19T21:51:00+00:00" + }, + { + "name": "symfony/string", + "version": "v7.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b", + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.0.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-02-01T13:17:36+00:00" + }, + { + "name": "symfony/translation", + "version": "v6.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/bce6a5a78e94566641b2594d17e48b0da3184a8e", + "reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.5|^3.0" + }, + "conflict": { + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<5.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^4.18|^5.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v6.4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-02-20T13:16:58+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.4.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", + "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-23T14:51:35+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v6.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "95bd2706a97fb875185b51ecaa6112ec184233d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/95bd2706a97fb875185b51ecaa6112ec184233d4", + "reference": "95bd2706a97fb875185b51ecaa6112ec184233d4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", + "twig/twig": "^2.13|^3.0.4" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-03-19T11:56:30+00:00" + }, + { + "name": "tightenco/collect", + "version": "v9.52.7", + "source": { + "type": "git", + "url": "https://github.com/tighten/collect.git", + "reference": "b15143cd11fe01a700fcc449df61adc64452fa6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tighten/collect/zipball/b15143cd11fe01a700fcc449df61adc64452fa6d", + "reference": "b15143cd11fe01a700fcc449df61adc64452fa6d", + "shasum": "" + }, + "require": { + "php": "^8.0", + "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "nesbot/carbon": "^2.23.0", + "phpunit/phpunit": "^8.3" + }, + "type": "library", + "autoload": { + "files": [ + "src/Collect/Support/helpers.php", + "src/Collect/Support/alias.php" + ], + "psr-4": { + "Tightenco\\Collect\\": "src/Collect" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "Collect - Illuminate Collections as a separate package.", + "keywords": [ + "collection", + "laravel" + ], + "support": { + "issues": "https://github.com/tighten/collect/issues", + "source": "https://github.com/tighten/collect/tree/v9.52.7" + }, + "abandoned": "illuminate/collections", + "time": "2023-04-14T21:51:36+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "b56450eed252f6801410d810c8e1727224ae0743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2022-03-08T17:03:00+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/dot_config/dot_curlrc b/dot_config/dot_curlrc new file mode 100644 index 0000000..d83a650 --- /dev/null +++ b/dot_config/dot_curlrc @@ -0,0 +1,11 @@ +# limit the timeout in seconds +connect-timeout = 60 + +# follow HTTP redirects +location + +# show error messages +show-error + +# Disguise as IE 9 on Windows 7 +user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" diff --git a/dot_config/executable_dot_fehbg b/dot_config/executable_dot_fehbg new file mode 100644 index 0000000..2860bc2 --- /dev/null +++ b/dot_config/executable_dot_fehbg @@ -0,0 +1,2 @@ +#!/bin/sh +feh --no-fehbg --bg-fill '/home/marley/data/photos/wallpaper/city.png' diff --git a/dot_config/firefox/install.txt b/dot_config/firefox/install.txt new file mode 100644 index 0000000..51a7d56 --- /dev/null +++ b/dot_config/firefox/install.txt @@ -0,0 +1,6 @@ +about:config +"userprof" +switch "toolkit.legacyUserProfileCustomizations.stylesheets" to true +about:support +find profile folder +softlink userChrome.css to $PROFILE_FOLDER/chrome/userChrome.css diff --git a/dot_config/firefox/userChrome.css b/dot_config/firefox/userChrome.css new file mode 100644 index 0000000..49e7afc --- /dev/null +++ b/dot_config/firefox/userChrome.css @@ -0,0 +1,49 @@ +#tabbrowser-tabs { + visibility: collapse; +} +#navigator-toolbox { + display: flex; + flex-flow: row wrap; +} +#titlebar { + order: 1; + max-width: 146px; +} +#titlebar #TabsToolbar { + background-color: var(--toolbar-bgcolor); + background-image: var(--toolbar-bgimage); +} +#titlebar #TabsToolbar .titlebar-spacer { + background-color: rgba(0, 0, 0, 0.05); + margin: 3px; + border-radius: 25%; + cursor: grab; +} +#titlebar #TabsToolbar .titlebar-spacer[type="pre-tabs"] { + display: none; +} +#nav-bar { + order: 0; + width: calc(100% - 146px); +} + +/* Shove bookmarks bar over for macOS titlebar buttons */ +/* #PersonalToolbar { */ +/* order: 2; */ +/* } */ + +/* Update - Hides the new Firefox home + tab dropdown. If you want to +* keep/customize those buttons. remove the CSS below and adjust the widths above +* to get everything fitting in one line */ +#TabsToolbar .toolbar-items { + display: none; +} + +#nav-bar { + order: 0; + width: 100%; +} + +#sidebar-header { + visibility: collapse !important; +} diff --git a/dot_config/fish/completions/dotfiles.fish b/dot_config/fish/completions/dotfiles.fish new file mode 100644 index 0000000..854e2ad --- /dev/null +++ b/dot_config/fish/completions/dotfiles.fish @@ -0,0 +1,43 @@ +#!/usr/bin/env fish + +set -l commands init clone ignore attributes readme + +complete --command dotfiles --wraps git + +# init +complete --command dotfiles \ + --condition "not __fish_seen_subcommand_from $commands" \ + --arguments init \ + --description "Create a new bare repo with the git folder specified" + +complete --command dotfiles \ + --condition "__fish_seen_subcommand_from init; and not __fish_seen_subcommand_from (__fish_complete_directories)" \ + --arguments "(__fish_complete_directories)" + +# clone +complete --command dotfiles \ + --condition "not __fish_seen_subcommand_from $commands" \ + --arguments clone \ + --description "Clone your dotfiles from remote and install them" + +complete --command dotfiles \ + --condition "__fish_seen_subcommand_from clone; and not __fish_seen_subcommand_from (__fish_complete_directories)" \ + --arguments "(__fish_complete_directories)" + +# ignore +complete --command dotfiles \ + --condition "not __fish_seen_subcommand_from $commands" \ + --arguments ignore \ + --description "Add a pattern to gitignore, or edit file if none given" + +# attributes +complete -f --command dotfiles \ + --condition "not __fish_seen_subcommand_from $commands" \ + --arguments attributes \ + --description "Add a pattern to gitattributes, or edit file if none given" + +# readme +complete -f --command dotfiles \ + --condition "not __fish_seen_subcommand_from $commands" \ + --arguments readme \ + --description "Edit the README.md file" diff --git a/dot_config/fish/completions/fisher.fish b/dot_config/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/dot_config/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/dot_config/fish/completions/fzf_configure_bindings.fish b/dot_config/fish/completions/fzf_configure_bindings.fish new file mode 100644 index 0000000..b38ef92 --- /dev/null +++ b/dot_config/fish/completions/fzf_configure_bindings.fish @@ -0,0 +1,8 @@ +complete fzf_configure_bindings --no-files +complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h" +complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory" +complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log" +complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status" +complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history" +complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes" +complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables" diff --git a/dot_config/fish/completions/pipx.fish b/dot_config/fish/completions/pipx.fish new file mode 100644 index 0000000..79be035 --- /dev/null +++ b/dot_config/fish/completions/pipx.fish @@ -0,0 +1,17 @@ + +function __fish_pipx_complete + set -x _ARGCOMPLETE 1 + set -x _ARGCOMPLETE_DFS \t + set -x _ARGCOMPLETE_IFS \n + set -x _ARGCOMPLETE_SUPPRESS_SPACE 1 + set -x _ARGCOMPLETE_SHELL fish + set -x COMP_LINE (commandline -p) + set -x COMP_POINT (string length (commandline -cp)) + set -x COMP_TYPE + if set -q _ARC_DEBUG + pipx 8>&1 9>&2 1>&9 2>&1 + else + pipx 8>&1 9>&2 1>/dev/null 2>&1 + end +end +complete --command pipx -f -a '(__fish_pipx_complete)' diff --git a/dot_config/fish/conf.d/00-init.fish b/dot_config/fish/conf.d/00-init.fish new file mode 100644 index 0000000..28e8f32 --- /dev/null +++ b/dot_config/fish/conf.d/00-init.fish @@ -0,0 +1,30 @@ +#!/usr/bin/env fish + +# Base path. +set -Ux fish_user_paths "$HOME/.local/bin" + +# Config files. +set -Ux XDG_CONFIG_HOME "$HOME/.config" +set -Ux XDG_CACHE_HOME "$HOME/.cache" +set -Ux XDG_DATA_HOME "$HOME/.local/share" +set -Ux XDG_STATE_HOME "$HOME/.local/state" + +# Machine info. +set -gx OS "$(uname)" + +if command -v hostnamectl &>/dev/null + set -gx HOST "$(hostnamectl --static)" +else if command -v scutil &>/dev/null # macOS + set -gx HOST "$(scutil --get ComputerName)" +end + +# Projects dir. +set -gx HACK "$HOME/hackin" + +# Editor. +set -gx EDITOR nvim +set -gx VISUAL "$EDITOR" +set -gx SUDO_EDITOR "$EDITOR" + +# Use vi key bindings. +set -g fish_key_bindings fish_vi_key_bindings diff --git a/dot_config/fish/conf.d/10-starship.fish b/dot_config/fish/conf.d/10-starship.fish new file mode 100644 index 0000000..459dc72 --- /dev/null +++ b/dot_config/fish/conf.d/10-starship.fish @@ -0,0 +1,10 @@ +#!/usr/bin/env fish + +function starship_transient_prompt_func + starship module character +end + +if status is-interactive + starship init fish | source + enable_transience +end diff --git a/dot_config/fish/conf.d/20-aliases.fish b/dot_config/fish/conf.d/20-aliases.fish new file mode 100644 index 0000000..198e6d6 --- /dev/null +++ b/dot_config/fish/conf.d/20-aliases.fish @@ -0,0 +1,46 @@ +#!/usr/bin/env fish + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Shell aliases. +abbr -a rl --position command "source $XDG_CONFIG_HOME/fish/config.fish" +abbr -a c --position command clear +abbr -a e --position command "$EDITOR" +abbr -a v --position command "$EDITOR" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Default command options. + +abbr -a cp --position command "cp -iv" +# │└─ list copied files +# └─ prompt before overwriting an existing file + +abbr -a mkdir --position command "mkdir -pv" +# │└─ list created directories +# └─ create intermediate directories + +abbr -a mv --position command "mv -iv" +# │└─ list moved files +# └─ prompt before overwriting an existing file + +abbr -a rm --position command "rm -rf" +# │└─ do not ask for confirmation +# └─ recursively remove directories and files + +# Colored grep output. +abbr -a grep --position command "grep --color=auto" +abbr -a fgrep --position command "fgrep --color=auto" +abbr -a egrep --position command "egrep --color=auto" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Combinations. + +function mkcd -d "Make a directory and CD into it" + mkdir "$argv" && cd "$argv" +end + +function cdls -d "CD into a directory and list its contents" + cd "$argv" && ls +end diff --git a/dot_config/fish/conf.d/20-gpg.fish b/dot_config/fish/conf.d/20-gpg.fish new file mode 100644 index 0000000..870d96f --- /dev/null +++ b/dot_config/fish/conf.d/20-gpg.fish @@ -0,0 +1,6 @@ +#!/usr/bin/env fish + +if test "$(command -v gpgconf &>/dev/null)" + set -gx GPG_TTY (tty) + gpgconf --launch gpg-agent +end diff --git a/dot_config/fish/conf.d/30-asdf.fish b/dot_config/fish/conf.d/30-asdf.fish new file mode 100644 index 0000000..2cc1d5d --- /dev/null +++ b/dot_config/fish/conf.d/30-asdf.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +source /opt/asdf-vm/asdf.fish diff --git a/dot_config/fish/conf.d/30-bat.fish b/dot_config/fish/conf.d/30-bat.fish new file mode 100644 index 0000000..a5d9510 --- /dev/null +++ b/dot_config/fish/conf.d/30-bat.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +set -gx BATDIFF_USE_DELTA true + +function cat --wraps bat + bat $argv +end diff --git a/dot_config/fish/conf.d/30-chezmoi.fish b/dot_config/fish/conf.d/30-chezmoi.fish new file mode 100644 index 0000000..1a87490 --- /dev/null +++ b/dot_config/fish/conf.d/30-chezmoi.fish @@ -0,0 +1,6 @@ +#!/usr/bin/env fish + +abbr -a cz --position command chezmoi +abbr -a czap --position command "chezmoi apply" +abbr -a cza --position command "chezmoi add" +abbr -a czc --position command "chezmoi cd" diff --git a/dot_config/fish/conf.d/30-eza.fish b/dot_config/fish/conf.d/30-eza.fish new file mode 100644 index 0000000..6b9da65 --- /dev/null +++ b/dot_config/fish/conf.d/30-eza.fish @@ -0,0 +1,18 @@ +#!/usr/bin/env fish + +function ls --wraps eza + eza --all --icons=auto --sort=name --group-directories-first $argv +end + +function lst --wraps eza + ls --tree $argv +end + +function lsl --wraps eza + eza --all --icons=auto --sort=name --group-directories-first --grid --long \ + --git --header $argv +end + +function lslt --wraps eza + lsl --tree $argv +end diff --git a/dot_config/fish/conf.d/30-fzf.fish b/dot_config/fish/conf.d/30-fzf.fish new file mode 100644 index 0000000..00f276d --- /dev/null +++ b/dot_config/fish/conf.d/30-fzf.fish @@ -0,0 +1,19 @@ +#!/usr/bin/env fish + +set -gx FZF_DEFAULT_CMD 'rg --files --hidden --glob "!.git"' + +set -gx FZF_DEFAULT_OPTS "\ +--margin=10%,5% \ +--border=sharp \ +--pointer=' ' \ +--marker=' ' \ +--prompt=' ' \ +--preview-label-pos='bottom' \ +--preview-window='border-sharp' \ +--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \ +--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \ +--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796" + +# fzf.fish +set -g fzf_preview_dir_cmd eza --all --color=always --sort=name --group-directories-first +set -g fzf_diff_highlighter delta --paging=never --features=arctic-fox diff --git a/dot_config/fish/conf.d/30-git.fish b/dot_config/fish/conf.d/30-git.fish new file mode 100644 index 0000000..2feb5b8 --- /dev/null +++ b/dot_config/fish/conf.d/30-git.fish @@ -0,0 +1,51 @@ +#!/usr/bin/env fish + +abbr -a g --position command git +abbr -a d --position command dotfiles + +################################################################################ +# Functions # +################################################################################ + +function git_develop_branch + command git rev-parse --git-dir &>/dev/null || return + set -l branch + + for branch in dev devel develop development + if command git show-ref -q --verify refs/heads/$branch + echo $branch + return 0 + end + end + + echo develop + return 1 +end + +function git_main_branch + command git rev-parse --git-dir &>/dev/null || return + set -l ref + + for ref in + refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,master} + if command git show-ref -q --verify $ref + echo (basename $ref) + return 0 + end + end + + echo main + return 1 +end + +function git_current_branch + set -l ref (git symbolic-ref --quiet HEAD 2>/dev/null) + set -l ret $status + + if [ $ret -ne 0 ] + [ $ret -eq 128 ] && return # no git repo + set ref (git rev-parse --short HEAD 2>/dev/null) || return + end + + echo (string replace "refs/heads/" "" $ref) +end diff --git a/dot_config/fish/conf.d/30-gtk.fish b/dot_config/fish/conf.d/30-gtk.fish new file mode 100644 index 0000000..e24bbbb --- /dev/null +++ b/dot_config/fish/conf.d/30-gtk.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +set -gx GTK_THEME Catppuccin-Macchiato-Standard-Pink-Dark diff --git a/dot_config/fish/conf.d/30-journalctl.fish b/dot_config/fish/conf.d/30-journalctl.fish new file mode 100644 index 0000000..80459e4 --- /dev/null +++ b/dot_config/fish/conf.d/30-journalctl.fish @@ -0,0 +1,4 @@ +#!/usr/bin/env fish + +abbr -a jf --position command "sudo journalctl --follow --unit" +abbr -a je --position command "sudo journalctl --pager-end --unit" diff --git a/dot_config/fish/conf.d/30-lazygit.fish b/dot_config/fish/conf.d/30-lazygit.fish new file mode 100644 index 0000000..0cf92f0 --- /dev/null +++ b/dot_config/fish/conf.d/30-lazygit.fish @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +function lzg --wraps=lazygit + set -f configs "$XDG_CONFIG_HOME/lazygit/config.yml,$HOME/.themes/lazygit/catppuccin/themes-mergable/macchiato/pink.yml" + + if test "$(pwd)" = "$HOME" + lazygit --use-config-file="$configs" --work-tree="$HOME" --git-dir="$HOME/.dot" + else + lazygit --use-config-file="$configs" + end +end diff --git a/dot_config/fish/conf.d/30-man.fish b/dot_config/fish/conf.d/30-man.fish new file mode 100644 index 0000000..bdf7a4a --- /dev/null +++ b/dot_config/fish/conf.d/30-man.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +set -gx MANPAGER "nvim +Man!" diff --git a/dot_config/fish/conf.d/30-php.fish b/dot_config/fish/conf.d/30-php.fish new file mode 100644 index 0000000..07cf29c --- /dev/null +++ b/dot_config/fish/conf.d/30-php.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +fish_add_path "$HOME/.config/composer/vendor/bin" + +abbr -a p --position command php +abbr -a pa --position command "php artisan" +abbr -a a --position command "php artisan" diff --git a/dot_config/fish/conf.d/30-systemctl.fish b/dot_config/fish/conf.d/30-systemctl.fish new file mode 100644 index 0000000..5dcfa02 --- /dev/null +++ b/dot_config/fish/conf.d/30-systemctl.fish @@ -0,0 +1,9 @@ +#!/usr/bin/env fish + +abbr -a sctl --position command "sudo systemctl" +abbr -a sctls --position command "sudo systemctl status" +abbr -a sctle --position command "sudo systemctl enable --now" +abbr -a sctld --position command "sudo systemctl disable --now" +abbr -a sctlr --position command "sudo systemctl restart" +abbr -a sctlo --position command "sudo systemctl stop" +abbr -a sctla --position command "sudo systemctl start" diff --git a/dot_config/fish/conf.d/30-volta.fish b/dot_config/fish/conf.d/30-volta.fish new file mode 100644 index 0000000..e4dbf8a --- /dev/null +++ b/dot_config/fish/conf.d/30-volta.fish @@ -0,0 +1,5 @@ +#!/usr/bin/env fish + +fish_add_path "$HOME/.volta/bin" + +set -gx VOLTA_HOME "$HOME/.volta" diff --git a/dot_config/fish/conf.d/30-wget.fish b/dot_config/fish/conf.d/30-wget.fish new file mode 100644 index 0000000..5abbcdd --- /dev/null +++ b/dot_config/fish/conf.d/30-wget.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +set -gx WGETRC "$XDG_CONFIG_HOME/wgetrc" + +function wget --wraps wget + wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" +end diff --git a/dot_config/fish/conf.d/30-yay.fish b/dot_config/fish/conf.d/30-yay.fish new file mode 100644 index 0000000..bc6f402 --- /dev/null +++ b/dot_config/fish/conf.d/30-yay.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +abbr -a y --position command yay +abbr -a yi --position command "yay -S" +abbr -a yr --position command "yay -R" +abbr -a yc --position command "yay -Sc" +abbr -a yu --position command "yay -Syu" diff --git a/dot_config/fish/conf.d/autopair.fish b/dot_config/fish/conf.d/autopair.fish new file mode 100644 index 0000000..abb4bf3 --- /dev/null +++ b/dot_config/fish/conf.d/autopair.fish @@ -0,0 +1,39 @@ +status is-interactive || exit + +set --global autopair_left "(" "[" "{" '"' "'" +set --global autopair_right ")" "]" "}" '"' "'" +set --global autopair_pairs "()" "[]" "{}" '""' "''" + +function _autopair_fish_key_bindings --on-variable fish_key_bindings + set --query fish_key_bindings[1] || return + + test $fish_key_bindings = fish_default_key_bindings && + set --local mode default insert || + set --local mode insert default + + bind --mode $mode[-1] --erase \177 \b \t + + bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ + bind --mode $mode[1] \b _autopair_backspace + bind --mode $mode[1] \t _autopair_tab + + printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" + bind --mode $mode[-1] --erase $left $right + if test $left = $right + bind --mode $mode[1] $left "_autopair_insert_same \\$left" + else + bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" + bind --mode $mode[1] $right "_autopair_insert_right \\$right" + end + end +end + +_autopair_fish_key_bindings + +function _autopair_uninstall --on-event autopair_uninstall + string collect ( + bind --all | string replace --filter --regex -- "_autopair.*" --erase + set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" + ) | source + functions --erase (functions --all | string match "_autopair_*") +end diff --git a/dot_config/fish/conf.d/fzf.fish b/dot_config/fish/conf.d/fzf.fish new file mode 100644 index 0000000..8156c11 --- /dev/null +++ b/dot_config/fish/conf.d/fzf.fish @@ -0,0 +1,28 @@ +# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup +if not status is-interactive && test "$CI" != true + exit +end + +# Because of scoping rules, to capture the shell variables exactly as they are, we must read +# them before even executing _fzf_search_variables. We use psub to store the +# variables' info in temporary files and pass in the filenames as arguments. +# This variable is global so that it can be referenced by fzf_configure_bindings and in tests +set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' + + +# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings +fzf_configure_bindings + +# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased +function _fzf_uninstall --on-event fzf_uninstall + _fzf_uninstall_bindings + + set --erase _fzf_search_vars_command + functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings + complete --erase fzf_configure_bindings + + set_color cyan + echo "fzf.fish uninstalled." + echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." + set_color normal +end diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish new file mode 100644 index 0000000..7fe37e2 --- /dev/null +++ b/dot_config/fish/config.fish @@ -0,0 +1,6 @@ +#!/usr/bin/env fish + +# Local environment variables. +if test -e "$HOME/.local.env" + source "~/.local.env" +end diff --git a/dot_config/fish/functions/$.fish b/dot_config/fish/functions/$.fish new file mode 100644 index 0000000..c5e3a14 --- /dev/null +++ b/dot_config/fish/functions/$.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +$argv diff --git a/dot_config/fish/functions/_autopair_backspace.fish b/dot_config/fish/functions/_autopair_backspace.fish new file mode 100644 index 0000000..a43fa79 --- /dev/null +++ b/dot_config/fish/functions/_autopair_backspace.fish @@ -0,0 +1,9 @@ +function _autopair_backspace + set --local index (commandline --cursor) + set --local buffer (commandline) + + test $index -ge 1 && + contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs && + commandline --function delete-char + commandline --function backward-delete-char +end diff --git a/dot_config/fish/functions/_autopair_insert_left.fish b/dot_config/fish/functions/_autopair_insert_left.fish new file mode 100644 index 0000000..f078e86 --- /dev/null +++ b/dot_config/fish/functions/_autopair_insert_left.fish @@ -0,0 +1,13 @@ +function _autopair_insert_left --argument-names left right + set --local buffer (commandline) + set --local before (commandline --cut-at-cursor) + + commandline --insert -- $left + + switch "$buffer" + case "$before"{," "\*,$autopair_right\*} + set --local index (commandline --cursor) + commandline --insert -- $right + commandline --cursor $index + end +end diff --git a/dot_config/fish/functions/_autopair_insert_right.fish b/dot_config/fish/functions/_autopair_insert_right.fish new file mode 100644 index 0000000..a0bd61c --- /dev/null +++ b/dot_config/fish/functions/_autopair_insert_right.fish @@ -0,0 +1,11 @@ +function _autopair_insert_right --argument-names key + set --local buffer (commandline) + set --local before (commandline --cut-at-cursor) + + switch "$buffer" + case "$before$key"\* + commandline --cursor (math (commandline --cursor) + 1) + case \* + commandline --insert -- $key + end +end diff --git a/dot_config/fish/functions/_autopair_insert_same.fish b/dot_config/fish/functions/_autopair_insert_same.fish new file mode 100644 index 0000000..27f971d --- /dev/null +++ b/dot_config/fish/functions/_autopair_insert_same.fish @@ -0,0 +1,20 @@ +function _autopair_insert_same --argument-names key + set --local buffer (commandline) + set --local index (commandline --cursor) + set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer") + + if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0 + test $key = $next && commandline --cursor (math $index + 1) && return + + commandline --insert -- $key + + if test $index -lt 1 || + contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left && + contains -- $next "" " " $autopair_right + commandline --insert -- $key + commandline --cursor (math $index + 1) + end + else + commandline --insert -- $key + end +end diff --git a/dot_config/fish/functions/_autopair_tab.fish b/dot_config/fish/functions/_autopair_tab.fish new file mode 100644 index 0000000..f2ab8eb --- /dev/null +++ b/dot_config/fish/functions/_autopair_tab.fish @@ -0,0 +1,7 @@ +function _autopair_tab + commandline --paging-mode && down-or-search && return + + string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) && + commandline --function end-of-line --function backward-delete-char + commandline --function complete +end diff --git a/dot_config/fish/functions/_fzf_configure_bindings_help.fish b/dot_config/fish/functions/_fzf_configure_bindings_help.fish new file mode 100644 index 0000000..ecfe68e --- /dev/null +++ b/dot_config/fish/functions/_fzf_configure_bindings_help.fish @@ -0,0 +1,43 @@ +function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." + echo "\ +USAGE: + fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...] + +DESCRIPTION + fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it + previously installed. It installs bindings for both default and insert modes. fzf.fish executes + it without options on fish startup to install the out-of-the-box key bindings. + + By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding + can be configured using a namesake corresponding option: + COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION + Search Directory | Ctrl+Alt+F (F for file) | --directory + Search Git Log | Ctrl+Alt+L (L for log) | --git_log + Search Git Status | Ctrl+Alt+S (S for status) | --git_status + Search History | Ctrl+R (R for reverse) | --history + Search Processes | Ctrl+Alt+P (P for process) | --processes + Search Variables | Ctrl+V (V for variable) | --variables + Override a command's binding by specifying its corresponding option with the desired key + sequence. Disable a command's binding by specifying its corresponding option with no value. + + Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly + executed multiple times. Once the desired fzf_configure_bindings command has been found, add it + to your config.fish in order to persist the customized bindings. + + In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an + equals sign between an option's name and value. However, it does not validate key sequences. + + Pass -h or --help to print this help message and exit. + +EXAMPLES + Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V + \$ fzf_configure_bindings --directory=\cf --variables=\e\cv + Default bindings but disable Search History + \$ fzf_configure_bindings --history= + An agglomeration of different options + \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes= + +SEE Also + To learn more about fish key bindings, see bind(1) and fish_key_reader(1). +" +end diff --git a/dot_config/fish/functions/_fzf_extract_var_info.fish b/dot_config/fish/functions/_fzf_extract_var_info.fish new file mode 100644 index 0000000..dd4e952 --- /dev/null +++ b/dot_config/fish/functions/_fzf_extract_var_info.fish @@ -0,0 +1,15 @@ +# helper function for _fzf_search_variables +function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output." + # Extract only the lines about the variable, all of which begin with either + # $variable_name: ...or... $variable_name[ + string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output | + + # Strip the variable name prefix, including ": " for scope info lines + string replace --regex "^\\\$$variable_name(?:: )?" '' | + + # Distill the lines of values, replacing... + # [1]: |value| + # ...with... + # [1] value + string replace --regex ": \|(.*)\|" ' $1' +end diff --git a/dot_config/fish/functions/_fzf_preview_changed_file.fish b/dot_config/fish/functions/_fzf_preview_changed_file.fish new file mode 100644 index 0000000..78dd561 --- /dev/null +++ b/dot_config/fish/functions/_fzf_preview_changed_file.fish @@ -0,0 +1,49 @@ +# helper for _fzf_search_git_status +# arg should be a line from git status --short, e.g. +# MM functions/_fzf_preview_changed_file.fish +# D README.md +# R LICENSE -> "New License" +function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file." + # remove quotes because they'll be interpreted literally by git diff + # no need to requote when referencing $path because fish does not perform word splitting + # https://fishshell.com/docs/current/fish_for_bash_users.html + set -f path (string unescape (string sub --start 4 $path_status)) + # first letter of short format shows index, second letter shows working tree + # https://git-scm.com/docs/git-status/2.35.0#_short_format + set -f index_status (string sub --length 1 $path_status) + set -f working_tree_status (string sub --start 2 --length 1 $path_status) + + set -f diff_opts --color=always + + if test $index_status = '?' + _fzf_report_diff_type Untracked + _fzf_preview_file $path + else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU + # Unmerged statuses taken directly from git status help's short format table + # Unmerged statuses are mutually exclusive with other statuses, so if we see + # these, then safe to assume the path is unmerged + _fzf_report_diff_type Unmerged + git diff $diff_opts -- $path + else + if test $index_status != ' ' + _fzf_report_diff_type Staged + + # renames are only detected in the index, never working tree, so only need to test for it here + # https://stackoverflow.com/questions/73954214 + if test $index_status = R + # diff the post-rename path with the original path, otherwise the diff will show the entire file as being added + set -f orig_and_new_path (string split --max 1 -- ' -> ' $path) + git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2] + # path currently has the form of "original -> current", so we need to correct it before it's used below + set path $orig_and_new_path[2] + else + git diff --staged $diff_opts -- $path + end + end + + if test $working_tree_status != ' ' + _fzf_report_diff_type Unstaged + git diff $diff_opts -- $path + end + end +end diff --git a/dot_config/fish/functions/_fzf_preview_file.fish b/dot_config/fish/functions/_fzf_preview_file.fish new file mode 100644 index 0000000..c926475 --- /dev/null +++ b/dot_config/fish/functions/_fzf_preview_file.fish @@ -0,0 +1,43 @@ +# helper function for _fzf_search_directory and _fzf_search_git_status +function _fzf_preview_file --description "Print a preview for the given file based on its file type." + # because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file + # as one argument, we collect all the arguments into one single variable and treat that as the path + set -f file_path $argv + + if test -L "$file_path" # symlink + # notify user and recurse on the target of the symlink, which can be any of these file types + set -l target_path (realpath "$file_path") + + set_color yellow + echo "'$file_path' is a symlink to '$target_path'." + set_color normal + + _fzf_preview_file "$target_path" + else if test -f "$file_path" # regular file + if set --query fzf_preview_file_cmd + # need to escape quotes to make sure eval receives file_path as a single arg + eval "$fzf_preview_file_cmd '$file_path'" + else + bat --style=numbers --color=always "$file_path" + end + else if test -d "$file_path" # directory + if set --query fzf_preview_dir_cmd + # see above + eval "$fzf_preview_dir_cmd '$file_path'" + else + # -A list hidden files as well, except for . and .. + # -F helps classify files by appending symbols after the file name + command ls -A -F "$file_path" + end + else if test -c "$file_path" + _fzf_report_file_type "$file_path" "character device file" + else if test -b "$file_path" + _fzf_report_file_type "$file_path" "block device file" + else if test -S "$file_path" + _fzf_report_file_type "$file_path" socket + else if test -p "$file_path" + _fzf_report_file_type "$file_path" "named pipe" + else + echo "$file_path doesn't exist." >&2 + end +end diff --git a/dot_config/fish/functions/_fzf_report_diff_type.fish b/dot_config/fish/functions/_fzf_report_diff_type.fish new file mode 100644 index 0000000..cc26fb3 --- /dev/null +++ b/dot_config/fish/functions/_fzf_report_diff_type.fish @@ -0,0 +1,18 @@ +# helper for _fzf_preview_changed_file +# prints out something like +# ╭────────╮ +# │ Staged │ +# ╰────────╯ +function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch." + # number of "-" to draw is the length of the string to box + 2 for padding + set -f repeat_count (math 2 + (string length $diff_type)) + set -f line (string repeat --count $repeat_count ─) + set -f top_border ╭$line╮ + set -f btm_border ╰$line╯ + + set_color yellow + echo $top_border + echo "│ $diff_type │" + echo $btm_border + set_color normal +end diff --git a/dot_config/fish/functions/_fzf_report_file_type.fish b/dot_config/fish/functions/_fzf_report_file_type.fish new file mode 100644 index 0000000..49e02e1 --- /dev/null +++ b/dot_config/fish/functions/_fzf_report_file_type.fish @@ -0,0 +1,6 @@ +# helper function for _fzf_preview_file +function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file." + set_color red + echo "Cannot preview '$file_path': it is a $file_type." + set_color normal +end diff --git a/dot_config/fish/functions/_fzf_search_directory.fish b/dot_config/fish/functions/_fzf_search_directory.fish new file mode 100644 index 0000000..4541eec --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_directory.fish @@ -0,0 +1,33 @@ +function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths." + # Directly use fd binary to avoid output buffering delay caused by a fd alias, if any. + # Debian-based distros install fd as fdfind and the fd package is something else, so + # check for fdfind first. Fall back to "fd" for a clear error message. + set -f fd_cmd (command -v fdfind || command -v fd || echo "fd") + set -f --append fd_cmd --color=always $fzf_fd_opts + + set -f fzf_arguments --multi --ansi $fzf_directory_opts + set -f token (commandline --current-token) + # expand any variables or leading tilde (~) in the token + set -f expanded_token (eval echo -- $token) + # unescape token because it's already quoted so backslashes will mess up the path + set -f unescaped_exp_token (string unescape -- $expanded_token) + + # If the current token is a directory and has a trailing slash, + # then use it as fd's base directory. + if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token" + set --append fd_cmd --base-directory=$unescaped_exp_token + # use the directory name as fzf's prompt to indicate the search is limited to that directory + set --prepend fzf_arguments --prompt="Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}" + set -f file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) + else + set --prepend fzf_arguments --prompt="Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}' + set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments) + end + + + if test $status -eq 0 + commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ') + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_search_git_log.fish b/dot_config/fish/functions/_fzf_search_git_log.fish new file mode 100644 index 0000000..aa54724 --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_git_log.fish @@ -0,0 +1,36 @@ +function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash." + if not git rev-parse --git-dir >/dev/null 2>&1 + echo '_fzf_search_git_log: Not in a git repository.' >&2 + else + if not set --query fzf_git_log_format + # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below + set -f fzf_git_log_format '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)' + end + + set -f preview_cmd 'git show --color=always --stat --patch {1}' + if set --query fzf_diff_highlighter + set preview_cmd "$preview_cmd | $fzf_diff_highlighter" + end + + set -f selected_log_lines ( + git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \ + _fzf_wrapper --ansi \ + --multi \ + --scheme=history \ + --prompt="Git Log> " \ + --preview=$preview_cmd \ + --query=(commandline --current-token) \ + $fzf_git_log_opts + ) + if test $status -eq 0 + for line in $selected_log_lines + set -f abbreviated_commit_hash (string split --field 1 " " $line) + set -f full_commit_hash (git rev-parse $abbreviated_commit_hash) + set -f --append commit_hashes $full_commit_hash + end + commandline --current-token --replace (string join ' ' $commit_hashes) + end + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_search_git_status.fish b/dot_config/fish/functions/_fzf_search_git_status.fish new file mode 100644 index 0000000..358f88c --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_git_status.fish @@ -0,0 +1,41 @@ +function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths." + if not git rev-parse --git-dir >/dev/null 2>&1 + echo '_fzf_search_git_status: Not in a git repository.' >&2 + else + set -f preview_cmd '_fzf_preview_changed_file {}' + if set --query fzf_diff_highlighter + set preview_cmd "$preview_cmd | $fzf_diff_highlighter" + end + + set -f selected_paths ( + # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe + git -c color.status=always status --short | + _fzf_wrapper --ansi \ + --multi \ + --prompt="Git Status> " \ + --query=(commandline --current-token) \ + --preview=$preview_cmd \ + --nth="2.." \ + $fzf_git_status_opts + ) + if test $status -eq 0 + # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle + # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping") + set -f cleaned_paths + + for path in $selected_paths + if test (string sub --length 1 $path) = R + # path has been renamed and looks like "R LICENSE -> LICENSE.md" + # extract the path to use from after the arrow + set --append cleaned_paths (string split -- "-> " $path)[-1] + else + set --append cleaned_paths (string sub --start=4 $path) + end + end + + commandline --current-token --replace -- (string join ' ' $cleaned_paths) + end + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_search_history.fish b/dot_config/fish/functions/_fzf_search_history.fish new file mode 100644 index 0000000..cafbce9 --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_history.fish @@ -0,0 +1,39 @@ +function _fzf_search_history --description "Search command history. Replace the command line with the selected command." + # history merge incorporates history changes from other fish sessions + # it errors out if called in private mode + if test -z "$fish_private_mode" + builtin history merge + end + + if not set --query fzf_history_time_format + # Reference https://devhints.io/strftime to understand strftime format symbols + set -f fzf_history_time_format "%m-%d %H:%M:%S" + end + + # Delinate time from command in history entries using the vertical box drawing char (U+2502). + # Then, to get raw command from history entries, delete everything up to it. The ? on regex is + # necessary to make regex non-greedy so it won't match into commands containing the char. + set -f time_prefix_regex '^.*? │ ' + # Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line + set -f commands_selected ( + builtin history --null --show-time="$fzf_history_time_format │ " | + _fzf_wrapper --read0 \ + --print0 \ + --multi \ + --scheme=history \ + --prompt="History> " \ + --query=(commandline) \ + --preview="string replace --regex '$time_prefix_regex' '' -- {} | fish_indent --ansi" \ + --preview-window="bottom:3:wrap" \ + $fzf_history_opts | + string split0 | + # remove timestamps from commands selected + string replace --regex $time_prefix_regex '' + ) + + if test $status -eq 0 + commandline --replace -- $commands_selected + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_search_processes.fish b/dot_config/fish/functions/_fzf_search_processes.fish new file mode 100644 index 0000000..133a880 --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_processes.fish @@ -0,0 +1,32 @@ +function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process." + # Directly use ps command because it is often aliased to a different command entirely + # or with options that dirty the search results and preview output + set -f ps_cmd (command -v ps || echo "ps") + # use all caps to be consistent with ps default format + # snake_case because ps doesn't seem to allow spaces in the field names + set -f ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command') + set -f processes_selected ( + $ps_cmd -A -opid,command | \ + _fzf_wrapper --multi \ + --prompt="Processes> " \ + --query (commandline --current-token) \ + --ansi \ + # first line outputted by ps is a header, so we need to mark it as so + --header-lines=1 \ + # ps uses exit code 1 if the process was not found, in which case show an message explaining so + --preview="$ps_cmd -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \ + --preview-window="bottom:4:wrap" \ + $fzf_processes_opts + ) + + if test $status -eq 0 + for process in $processes_selected + set -f --append pids_selected (string split --no-empty --field=1 -- " " $process) + end + + # string join to replace the newlines outputted by string split with spaces + commandline --current-token --replace -- (string join ' ' $pids_selected) + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_search_variables.fish b/dot_config/fish/functions/_fzf_search_variables.fish new file mode 100644 index 0000000..52a7c70 --- /dev/null +++ b/dot_config/fish/functions/_fzf_search_variables.fish @@ -0,0 +1,47 @@ +# This function expects the following two arguments: +# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables +# argument 2 = output of (set --names | psub), i.e. a file with all variable names +function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable." + if test -z "$set_names_output" + printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2 + + commandline --function repaint + return 22 # 22 means invalid argument in POSIX + end + + # Exclude the history variable from being piped into fzf because + # 1. it's not included in $set_names_output + # 2. it tends to be a very large value => increases computation time + # 3._fzf_search_history is a much better way to examine history anyway + set -f all_variable_names (string match --invert history <$set_names_output) + + set -f current_token (commandline --current-token) + # Use the current token to pre-populate fzf's query. If the current token begins + # with a $, remove it from the query so that it will better match the variable names + set -f cleaned_curr_token (string replace -- '$' '' $current_token) + + set -f variable_names_selected ( + printf '%s\n' $all_variable_names | + _fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \ + --prompt="Variables> " \ + --preview-window="wrap" \ + --multi \ + --query=$cleaned_curr_token \ + $fzf_variables_opts + ) + + if test $status -eq 0 + # If the current token begins with a $, do not overwrite the $ when + # replacing the current token with the selected variable. + # Uses brace expansion to prepend $ to each variable name. + commandline --current-token --replace ( + if string match --quiet -- '$*' $current_token + string join " " \${$variable_names_selected} + else + string join " " $variable_names_selected + end + ) + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/_fzf_wrapper.fish b/dot_config/fish/functions/_fzf_wrapper.fish new file mode 100644 index 0000000..45556ce --- /dev/null +++ b/dot_config/fish/functions/_fzf_wrapper.fish @@ -0,0 +1,20 @@ +function _fzf_wrapper --description "Prepares some environment variables before executing fzf." + # Make sure fzf uses fish to execute preview commands, some of which + # are autoloaded fish functions so don't exist in other shells. + # Use --function so that it doesn't clobber SHELL outside this function. + set -f --export SHELL (command --search fish) + + # If FZF_DEFAULT_OPTS is not set, then set some sane defaults. + # See https://github.com/junegunn/fzf#environment-variables + if not set --query FZF_DEFAULT_OPTS + # cycle allows jumping between the first and last results, making scrolling faster + # layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env + # border shows where the fzf window begins and ends + # height=90% leaves space to see the current command and some scrollback, maintaining context of work + # preview-window=wrap wraps long lines in the preview window, making reading easier + # marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >) + set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"' + end + + fzf $argv +end diff --git a/dot_config/fish/functions/cpkey.fish b/dot_config/fish/functions/cpkey.fish new file mode 100644 index 0000000..349091c --- /dev/null +++ b/dot_config/fish/functions/cpkey.fish @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +function cpkey -d "Copy the id_ed25519 public key to clipboard, generating the keypair if needed" + if ! [ -O "~/.ssh/id_ed25519.pub" ] + echo "=> Generating id_ed25519 keypair..." + ssh-keygen -f "~/.ssh/id_ed25519" + end + + more "~/.ssh/id_ed25519.pub" | copyq copy - + echo "=> Public key copied to clipbard" +end diff --git a/dot_config/fish/functions/extract.fish b/dot_config/fish/functions/extract.fish new file mode 100644 index 0000000..3c56e05 --- /dev/null +++ b/dot_config/fish/functions/extract.fish @@ -0,0 +1,45 @@ +#!/usr/bin/env fish + +# Extracts archived files / mounts disk images. +# Usage: extract + +function extract -a file + if [ -f "$file" ] + switch file + case "*.tar.bz2" + tar -jxvf $file + case "*.tar.gz" + tar -zxvf $file + case "*.bz2" + bunzip2 $file + case "*.dmg" + if [ "$(uname)" = Darwin ] + hdiutil mount $file + end + case "*.gz" + gunzip $file + case "*.tar" + tar -xvf $file + case "*.tbz2" + tar -jxvf $file + case "*.tgz" + tar -zxvf $file + case "*.zip" + unzip $file + case "*.ZIP" + unzip $file + case "*pax" + cat $file | pax -r + case "*.pax.Z" + uncompress $file --stdout | pax -r + case "*.rar" + unrar x $file + case "*.Z" + uncompress $file + case "*" + echo "'$file' cannot be extracted/mounted via extract()." + end + else + echo "'$file' is not a valid file." + end +end diff --git a/dot_config/fish/functions/fish_greeting.fish b/dot_config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..8516e35 --- /dev/null +++ b/dot_config/fish/functions/fish_greeting.fish @@ -0,0 +1,5 @@ +#!/usr/bin/env fish + +function fish_greeting + fortune | cowsay | lolcat +end diff --git a/dot_config/fish/functions/fisher.fish b/dot_config/fish/functions/fisher.fish new file mode 100644 index 0000000..b1513d3 --- /dev/null +++ b/dot_config/fish/functions/fisher.fish @@ -0,0 +1,240 @@ +function fisher --argument-names cmd --description "A plugin manager for Fish" + set --query fisher_path || set --local fisher_path $__fish_config_dir + set --local fisher_version 4.4.4 + set --local fish_plugins $__fish_config_dir/fish_plugins + + switch "$cmd" + case -v --version + echo "fisher, version $fisher_version" + case "" -h --help + echo "Usage: fisher install Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] List installed plugins matching regex" + echo "Options:" + echo " -v, --version Print version" + echo " -h, --help Print this help message" + echo "Variables:" + echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~ + case ls list + string match --entire --regex -- "$argv[2]" $_fisher_plugins + case install update remove + isatty || read --local --null --array stdin && set --append argv $stdin + + set --local install_plugins + set --local update_plugins + set --local remove_plugins + set --local arg_plugins $argv[2..-1] + set --local old_plugins $_fisher_plugins + set --local new_plugins + + test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) + + if ! set --query argv[2] + if test "$cmd" != update + echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 + else if ! set --query file_plugins + echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 + end + set arg_plugins $file_plugins + end + + for plugin in $arg_plugins + set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin) + contains -- "$plugin" $new_plugins || set --append new_plugins $plugin + end + + if set --query argv[2] + for plugin in $new_plugins + if contains -- "$plugin" $old_plugins + test "$cmd" = remove && + set --append remove_plugins $plugin || + set --append update_plugins $plugin + else if test "$cmd" = install + set --append install_plugins $plugin + else + echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 + end + end + else + for plugin in $new_plugins + contains -- "$plugin" $old_plugins && + set --append update_plugins $plugin || + set --append install_plugins $plugin + end + + for plugin in $old_plugins + contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin + end + end + + set --local pid_list + set --local source_plugins + set --local fetch_plugins $update_plugins $install_plugins + set --local fish_path (status fish-path) + + echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) + + for plugin in $fetch_plugins + set --local source (command mktemp -d) + set --append source_plugins $source + + command mkdir -p $source/{completions,conf.d,themes,functions} + + $fish_path --command " + if test -e $plugin + command cp -Rf $plugin/* $source + else + set temp (command mktemp -d) + set repo (string split -- \@ $plugin) || set repo[2] HEAD + + if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1]) + set name (string split -- / \$path)[-1] + set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz + else + set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2] + end + + echo Fetching (set_color --underline)\$url(set_color normal) + + if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null + command cp -Rf \$temp/*/* $source + else + echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 + command rm -rf $source + end + + command rm -rf \$temp + end + + set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files + " & + + set --append pid_list (jobs --last --pid) + end + + wait $pid_list 2>/dev/null + + for plugin in $fetch_plugins + if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source + if set --local index (contains --index -- "$plugin" $install_plugins) + set --erase install_plugins[$index] + else + set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] + end + end + end + + for plugin in $update_plugins $remove_plugins + if set --local index (contains --index -- "$plugin" $_fisher_plugins) + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + if contains -- "$plugin" $remove_plugins + for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) + emit {$name}_uninstall + end + printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + set --erase _fisher_plugins[$index] + end + + command rm -rf (string replace -- \~ ~ $$plugin_files_var) + + functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) + + for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) + complete --erase --command $name + end + + set --erase $plugin_files_var + end + end + + if set --query update_plugins[1] || set --query install_plugins[1] + command mkdir -p $fisher_path/{functions,themes,conf.d,completions} + end + + for plugin in $update_plugins $install_plugins + set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] + set --local files $source/{functions,themes,conf.d,completions}/* + + if set --local index (contains --index -- $plugin $install_plugins) + set --local user_files $fisher_path/{functions,themes,conf.d,completions}/* + set --local conflict_files + + for file in (string replace -- $source/ $fisher_path/ $files) + contains -- $file $user_files && set --append conflict_files $file + end + + if set --query conflict_files[1] && set --erase install_plugins[$index] + echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 + continue + end + end + + for file in (string replace -- $source/ "" $files) + command cp -RLf $source/$file $fisher_path/$file + end + + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~) + + contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin + contains -- $plugin $install_plugins && set --local event install || set --local event update + + printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + + for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~) + source $file + if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) + emit {$name}_$event + end + end + end + + command rm -rf $source_plugins + + if set --query _fisher_plugins[1] + set --local commit_plugins + + for plugin in $file_plugins + contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin + end + + for plugin in $_fisher_plugins + contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin + end + + printf "%s\n" $commit_plugins >$fish_plugins + else + set --erase _fisher_plugins + command rm -f $fish_plugins + end + + set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) + + test "$total" != "0 0 0" && echo (string join ", " ( + test $total[1] = 0 || echo "Installed $total[1]") ( + test $total[2] = 0 || echo "Updated $total[2]") ( + test $total[3] = 0 || echo "Removed $total[3]") + ) plugin/s + case \* + echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 + end +end + +if ! set --query _fisher_upgraded_to_4_4 + set --universal _fisher_upgraded_to_4_4 + if functions --query _fisher_list + set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share + command rm -rf $XDG_DATA_HOME/fisher + functions --erase _fisher_{list,plugin_parse} + fisher update >/dev/null 2>/dev/null + else + for var in (set --names | string match --entire --regex '^_fisher_.+_files$') + set $var (string replace -- ~ \~ $$var) + end + functions --erase _fisher_fish_postexec + end +end diff --git a/dot_config/fish/functions/fm.fish b/dot_config/fish/functions/fm.fish new file mode 100644 index 0000000..5708167 --- /dev/null +++ b/dot_config/fish/functions/fm.fish @@ -0,0 +1,5 @@ +#!/usr/bin/env fish + +function fm --wraps=fzf -d "Use fzf as a simple file viewer" + find . -type d | fzf --preview='eza --color=always -T {} | head -n 50' +end diff --git a/dot_config/fish/functions/fuck.fish b/dot_config/fish/functions/fuck.fish new file mode 100644 index 0000000..c046ab7 --- /dev/null +++ b/dot_config/fish/functions/fuck.fish @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +function fuck -d "Correct your previous console command" + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end +end diff --git a/dot_config/fish/functions/fzf.fish b/dot_config/fish/functions/fzf.fish new file mode 100644 index 0000000..90e0813 --- /dev/null +++ b/dot_config/fish/functions/fzf.fish @@ -0,0 +1,9 @@ +#!/usr/bin/env fish + +function fzf --wraps=fzf + if set --query TMUX + fzf-tmux -p 90%,95% $argv + else + command fzf $argv + end +end diff --git a/dot_config/fish/functions/fzf_configure_bindings.fish b/dot_config/fish/functions/fzf_configure_bindings.fish new file mode 100644 index 0000000..4b4e7a2 --- /dev/null +++ b/dot_config/fish/functions/fzf_configure_bindings.fish @@ -0,0 +1,46 @@ +# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect +# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1 +function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options." + # no need to install bindings if not in interactive mode or running tests + status is-interactive || test "$CI" = true; or return + + set -f options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?' + argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null + if test $status -ne 0 + echo "Invalid option or a positional argument was provided." >&2 + _fzf_configure_bindings_help + return 22 + else if set --query _flag_help + _fzf_configure_bindings_help + return + else + # Initialize with default key sequences and then override or disable them based on flags + # index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = processes, 6 = variables + set -f key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \c = control, \e = escape + set --query _flag_directory && set key_sequences[1] "$_flag_directory" + set --query _flag_git_log && set key_sequences[2] "$_flag_git_log" + set --query _flag_git_status && set key_sequences[3] "$_flag_git_status" + set --query _flag_history && set key_sequences[4] "$_flag_history" + set --query _flag_processes && set key_sequences[5] "$_flag_processes" + set --query _flag_variables && set key_sequences[6] "$_flag_variables" + + # If fzf bindings already exists, uninstall it first for a clean slate + if functions --query _fzf_uninstall_bindings + _fzf_uninstall_bindings + end + + for mode in default insert + test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory + test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log + test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status + test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history + test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] _fzf_search_processes + test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command" + end + + function _fzf_uninstall_bindings --inherit-variable key_sequences + bind --erase -- $key_sequences + bind --erase --mode insert -- $key_sequences + end + end +end diff --git a/dot_config/fish/functions/git_open.fish b/dot_config/fish/functions/git_open.fish new file mode 100644 index 0000000..d8e67eb --- /dev/null +++ b/dot_config/fish/functions/git_open.fish @@ -0,0 +1,25 @@ +#!/usr/bin/env fish + +function git_open + set -f origin "$(git remote get-url origin)" + + switch "$origin" + case "*github*" + if command -v gh &>/dev/null + gh repo view --web &>/dev/null + else if command -v hub &>/dev/null + hub browse &>/dev/null + else + set_color red + echo "[ERROR] Install gh-cli or hub to open Github repos." >&2 + set_color normal + return 1 + end + case "https://*" + open '$origin' >/dev/null & + case "*" + set_color red + printf "[ERROR] Unrecognized origin %s" "$origin" >&2 + return 1 + end +end diff --git a/dot_config/fish/functions/hack.fish b/dot_config/fish/functions/hack.fish new file mode 100644 index 0000000..a53f322 --- /dev/null +++ b/dot_config/fish/functions/hack.fish @@ -0,0 +1,15 @@ +#!/usr/bin/env fish + +function hack --description "Select a GH repo, [clone it], enter its directory" + set -f repos $(gh repo list --source --no-archived --json name,description --jq '.[] | "\(.name) \u001b[1;30m\(.description)\u001b[0m"') + set -f repo $(gum filter --height 10 $repos | string split ' ')[1] + + set -f path "$HOME/hackin/$repo" + + if test ! -d $path + echo "Cloning $repo into $path..." + gh repo clone $repo $path + end + + cd $path +end diff --git a/dot_config/fish/functions/open.fish b/dot_config/fish/functions/open.fish new file mode 100644 index 0000000..a0c2fef --- /dev/null +++ b/dot_config/fish/functions/open.fish @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +if test "$OS" = Darwin + function open --wraps open + open "$argv" + end +else + function open --wraps xdg-open + xdg-open "$argv" >/dev/null + end +end diff --git a/dot_config/fish/functions/pkgsearch.fish b/dot_config/fish/functions/pkgsearch.fish new file mode 100644 index 0000000..dd6930e --- /dev/null +++ b/dot_config/fish/functions/pkgsearch.fish @@ -0,0 +1,12 @@ +#!/usr/bin/env fish + +function pkgsearch -d "Search the core/extra/AUR repos for a package" + set -f res (yay -Slq | command fzf --multi --preview 'yay -Si {}' --height=90% --layout=reverse) + + if test $status -eq 0 + set -l pkgs (string join ' ' $res) + commandline --current-token --replace -- "yay -S $res" + end + + commandline --function repaint +end diff --git a/dot_config/fish/functions/tmux_up.fish b/dot_config/fish/functions/tmux_up.fish new file mode 100644 index 0000000..f0c4a13 --- /dev/null +++ b/dot_config/fish/functions/tmux_up.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +function tmux_up --description "Update tmux plugins" + ~/.config/tmux/plugins/tpm/bin/install_plugins + ~/.config/tmux/plugins/tpm/bin/clean_plugins + ~/.config/tmux/plugins/tpm/bin/update_plugins all +end diff --git a/dot_config/fish/functions/up.fish b/dot_config/fish/functions/up.fish new file mode 100644 index 0000000..9e83a5b --- /dev/null +++ b/dot_config/fish/functions/up.fish @@ -0,0 +1,28 @@ +function up --description "Update everything except pacman/yay" + cd $HOME || exit 1 + + if type -q brew + set_color magenta && echo Homebrew && set_color normal + brew update && brew upgrade + end + + if type -q npm + set_color magenta && echo npm && set_color normal + npm up -g + end + + if type -q tmux + set_color magenta && echo tmux && set_color normal + tmux_up + end + + if type -q fish_update_completions + set_color magenta && echo "fish completions" && set_color normal + fish_update_completions + end + + if type -q fisher + set_color magenta && echo fisher && set_color normal + fisher update + end +end diff --git a/dot_config/gh/config.yml b/dot_config/gh/config.yml new file mode 100644 index 0000000..241fb97 --- /dev/null +++ b/dot_config/gh/config.yml @@ -0,0 +1,17 @@ +# The current version of the config schema +version: 1 +# What protocol to use when performing git operations. Supported values: ssh, https +git_protocol: https +# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. +editor: +# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled +prompt: enabled +# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. +pager: +# Aliases allow you to create nicknames for gh commands +aliases: + co: pr checkout +# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport. +http_unix_socket: +# What web browser gh should use when opening URLs. If blank, will refer to environment. +browser: diff --git a/dot_config/git/config b/dot_config/git/config new file mode 100644 index 0000000..332287a --- /dev/null +++ b/dot_config/git/config @@ -0,0 +1,126 @@ +[core] + attributesFile = ~/.config/git/.gitattributes + excludesFile = ~/.config/git/.gitignore + hooksPath = ~/.config/git/hooks + + # Whitespace types to treat as errors. + # blank-at-eol: looks for spaces at EOL. + # -blank-at-eof: allows blank lines at EOF. + # space-before-tab: looks for spaces immediately before tabs at the beginning + # of the line. + whitespace = blank-at-eol,-blank-at-eof,space-before-tab + + # Prevent showing files whose names contain non-ASCII symbols as unversioned. + # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html + precomposeunicode = false + + # Speed up commands involving untracked files such as `git status`. + # https://git-scm.com/docs/git-update-index#_untracked_cache + untrackedCache = true + + # Use delta. + pager = delta + +[user] + # Do not guess the user's identity. + useConfigOnly = true + +[include] + path = ~/.config/git/config.delta-themes + +[delta] + navigate = true + syntax-theme = Catppuccin-mocha + features = mellow-barbet + true-color = always + hyperlinks = true + +[color] + diff = always + +[pretty] + lo = tformat:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %s %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) + lc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n + lt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) + lf = format:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n + rlo = tformat:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %gs %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) + rlc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n + rlt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) + rlf = format:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%n%C(white)Reflog:%C(reset) %gN %C(241)<%gE>%C(reset)%n %C(italic)%gs%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n + +[include] + path = ~/.config/git/config.aliases + +[init] + defaultBranch = main + +[interactive] + diffFilter = delta --color-only + +[status] + showstash = true + +[commit] + gpgSign = true + +[tag] + gpgSign = true + +[push] + autoSetupRemote = true + + # Push tags automatically. + followTags = true + +[rebase] + autosquash = true + +[merge] + # Include summaries of merged commits in merge commit messages. + log = true + + # delta. + conflictstyle = diff3 + +[mergetool] + keepBackup = false + hideResolved = true + +[diff] + # Detect when files are copied as well as renamed. + renames = copies + + # delta + colorMoved = default + +[apply] + # Fix whitespace errors when applying a patch, as specified in + # core.whitespace. + whitespace = true + +[branch] + # Show most recently changed branches first. + sort = -committerdate + + autoSetupMerge = simple + +[url "git@github.com:"] + insteadOf = @gh: + +[url "aur@aur.archlinux.org"] + insteadOf = @aur: + +[url "https://github.com/"] + insteadOf = gh:// + +[url "https://aur.archlinux.org/"] + insteadOf = aur:// + +[credential "https://github.com"] + helper = !/usr/bin/gh auth git-credential + +[credential "https://gist.github.com"] + helper = !/usr/bin/gh auth git-credential + +[include] + path = ~/.config/git/config.local diff --git a/dot_config/git/config.aliases b/dot_config/git/config.aliases new file mode 100644 index 0000000..b041a75 --- /dev/null +++ b/dot_config/git/config.aliases @@ -0,0 +1,164 @@ +# vim:set ft=gitconfig : + +[alias] + + # Staging - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + a = add + aa = add --all + + # Interactively stage parts of a file. + apa = add --patch + + da = diff + das = diff --staged + daw = diff --word-diff # show diff by word + dasw = diff --staged --word-diff + + d = "!f() { git diff "$@" ':(exclude)package-lock.json' ':(exclude)*.lock'; }; f" + ds = "!f() { git diff --staged "$@" ':(exclude)package-lock.json' ':(exclude)*.lock'; }; f" + dw = "!f() { git diff --word-diff "$@" ':(exclude)package-lock.json' ':(exclude)*.lock'; }; f" + dsw = "!f() { git diff --staged --word-diff "$@" ':(exclude)package-lock.json' ':(exclude)*.lock'; }; f" + + st = status --short --branch + stu = status --short --branch -u + stl = status + + # Committing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + c = commit + ce = commit --amend + cen = commit --amend --no-edit --no-verify + ca = "!git add --all && git commit" + cae = "!git add --all && git commit --amend" + caen = "!git add --all && git commit --amend --no-edit --no-verify" + cfu = commit --fixup + + rev = revert + + # Working Dir & Index Manipulation - - - - - - - - - - - - - - - - - - - - - - + + co = checkout + + rt = reset + # rt -- [] - undo but keep changes in working dir. + + rts = reset --soft # undo commits and stage their changes + + rs = restore --worktree # revert local changes + rst = restore --staged # unstage things + rsa = restore --worktree --staged + + rss = restore --worktree --source # specify a commit to revert to + rsts = restore --staged --source + rsas = restore --worktree --staged --source + + rmc = rm --cached # leave worktree copy alone + + sta = stash push + stam = stash push --message + staa = stash push --include-untracked + staam = stash push --include-untracked --message + + stap = stash pop + stal = stash list + stas = stash show --text + + cl = clean -f # remove untracked & unignored files + cldr = clean --dry-run + + # Branches - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + b = branch + cb = checkout -b + cm = "!git checkout $(git_main_branch)" + cd = "!git checkout $(git_develop_branch)" + + m = merge + mtl = mergetool --no-prompt + ma = merge --abort + + cp = cherry-pick + cpa = cherry-pick --abort + cpc = cherry-pick --continue + cpq = cherry-pick --quit + + # Remotes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + p = push + pv = push -v + pdr = push --dry-run + pf = push --force-with-lease --force-if-includes + pfv = push -v --force-with-lease --force-if-includes + pff = push --force + pffv = push -v --force + + f = fetch + fa = fetch --all --prune + + pl = pull + plr = pull --rebase + + sub = submodule + subu = submodule update --init --recursive + + # Logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + # Current branch. + l = log --pretty=lc --graph + lo = log --pretty=lo --graph --date=human + ls = log --pretty=lo --graph --date=human --simplify-by-decoration + lf = log --pretty=lf --graph + ld = log --pretty=lf --graph --cc --stat + lp = log --pretty=lf --graph --cc --patch + + ls = log -5 --pretty=lc --graph + los = log -5 --pretty=lo --graph --date=human + lss = log -5 --pretty=lo --graph --date=human --simplify-by-decoration + lfs = log -5 --pretty=lf --graph + lds = log -5 --pretty=lf --graph --cc --stat + lps = log -5 --pretty=lf --graph --cc --patch + + # All branches on all remotes. + la = log --pretty=lc --graph --all + lao = log --pretty=lo --graph --all --date=human + las = log --pretty=lo --graph --all --date=human --simplify-by-decoration + laf = log --pretty=lf --graph --all + lad = log --pretty=lf --graph --all --cc --stat + lap = log --pretty=lf --graph --all --cc --patch + + las = log -5 --pretty=lc --graph --all + laos = log -5 --pretty=lo --graph --all --date=human + lass = log -5 --pretty=lo --graph --all --date=human --simplify-by-decoration + lafs = log -5 --pretty=lf --graph --all + lads = log -5 --pretty=lf --graph --all --cc --stat + laps = log -5 --pretty=lf --graph --all --cc --patch + + + # Shortcuts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + nevermind = "!git reset --hard HEAD && git clean -df" + + open = "!fish -c git_open" + + chash = "!git log --oneline | gum filter --height 10 | cut -d' ' -f1 | copyq copy - &>/dev/null" + + # Notes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + # A note on reset, restore, and revert, paraphrased from `man git`, plus myown + # own on `rm`: + # + # revert - make a new commit that reverts a previous commit. + # restore - undo uncommitted changes in the working tree. + # reset - update the branch and change commit history. + # rm - same as system rm; remove files, either from git's knowledge, the + # working directory, or both. + # + # These are not a description of the *possible* uses, rather a narrowing of + # the *intended* uses. + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + # PATH VALUES: + # :/ - all files within the root of the working tree, so all files in the + # repo, a la git add's --all option. diff --git a/dot_config/git/config.delta-themes b/dot_config/git/config.delta-themes new file mode 100644 index 0000000..241aac5 --- /dev/null +++ b/dot_config/git/config.delta-themes @@ -0,0 +1,513 @@ +# vim:set ft=gitconfig : +# +# To use these themes, first include this file in your own gitconfig file: +# +# [include] +# path = PATH/TO/delta/themes.gitconfig +# +# Then, in your own gitconfig file, activate the chosen theme, e.g. +# +# [delta] +# features = kingfisher +# +# Please add your own themes to this file, and open a PR. +# +# Instructions: +# +# 1. The name of the theme must be the name of some sort of wild organism: +# mammal, bird, plant, mollusk -- whatever. It can be in any language. +# +# 2. Use `delta --show-config` to list all the style settings that are active in +# your current delta environment, but only include settings in your theme +# that are essential to its appearance. +# +# 3. Include either `dark = true` or `light = true` according to whether it is +# designed for a light or dark terminal background. (This marks a feature as +# a "theme", causing it to be picked up by `delta --show-themes`). +# +# 4. Feel free to include a comment line indicating who is the author of the +# theme. E.g. a link to your github user page. + +[delta "colibri"] + # author: https://github.com/pablospe + # Based on woolly-mammoth: https://github.com/Kr1ss-XD. + commit-decoration-style = 130 box + dark = true + file-decoration-style = "#606018" overline + file-added-label = [●] + file-copied-label = [C] + file-modified-label = [+] + file-removed-label = [⛌] + file-renamed-label = [→] + file-style = 232 bold 184 + hunk-header-style = syntax bold italic 237 + line-numbers = true + line-numbers-left-format = "{nm:>1}┊" + line-numbers-left-style = red + line-numbers-minus-style = red bold + line-numbers-plus-style = green bold + line-numbers-right-format = " {np:>1}┊" + line-numbers-right-style = green + line-numbers-zero-style = "#545474" italic + minus-emph-style = normal "#80002a" + minus-style = normal "#5e0000" + plus-emph-style = syntax bold "#007e5e" + plus-style = syntax "#003500" + syntax-theme = OneHalfDark + whitespace-error-style = "#80002a" reverse + zero-style = syntax + blame-format = "{author:<18} ({commit:>7}) ┊{timestamp:^16}┊ " + +[delta "collared-trogon"] + # author: https://github.com/clnoll + commit-decoration-style = bold box ul + dark = true + file-decoration-style = none + file-style = omit + hunk-header-decoration-style = "#022b45" box ul + hunk-header-file-style = "#999999" + hunk-header-line-number-style = bold "#003300" + hunk-header-style = file line-number syntax + line-numbers = true + line-numbers-left-style = "#022b45" + line-numbers-minus-style = "#80002a" + line-numbers-plus-style = "#003300" + line-numbers-right-style = "#022b45" + line-numbers-zero-style = "#999999" + minus-emph-style = normal "#80002a" + minus-style = normal "#330011" + plus-emph-style = syntax "#003300" + plus-style = syntax "#001a00" + syntax-theme = Nord + +[delta "coracias-caudatus"] + # author: https://github.com/clnoll + commit-decoration-style = ol "#7536ff" + commit-style = "#200078" + file-decoration-style = none + file-style = omit + hunk-header-decoration-style = "#cfd6ff" ul + hunk-header-file-style = "#858dff" + hunk-header-line-number-style = "#7536ff" + hunk-header-style = file line-number syntax + light = true + line-numbers = true + line-numbers-left-format = "{nm:>4} ." + line-numbers-left-style = "#e3ab02" + line-numbers-minus-style = "#ff38b6" + line-numbers-plus-style = "#00e0c2" + line-numbers-right-format = "{np:>4} " + line-numbers-right-style = white + line-numbers-zero-style = "#cccccc" + minus-emph-style = bold "#ff3838" "#ffe3f7" + minus-style = "#ff0080" + plus-emph-style = "#008a81" bold "#00ffbf" + plus-style = syntax "#cffff3" + syntax-theme = GitHub + +[delta "hoopoe"] + # author: https://github.com/dandavison + light = true + pink = "#ffe0e0" + dark-pink = "#ffc0c0" + green = "#d0ffd0" + dark-green = "#a0efa0" + dark-green-2 = "#067a00" + minus-style = normal hoopoe.pink + minus-emph-style = normal hoopoe.dark-pink + minus-non-emph-style = minus-style + plus-style = syntax hoopoe.green + plus-emph-style = syntax hoopoe.dark-green + plus-non-emph-style = plus-style + minus-empty-line-marker-style = minus-style + plus-empty-line-marker-style = plus-style + commit-decoration-style = blue ol + commit-style = raw + file-style = omit + hunk-header-decoration-style = blue box + hunk-header-file-style = red + hunk-header-line-number-style = hoopoe.dark-green-2 + hunk-header-style = file line-number syntax + syntax-theme = GitHub + zero-style = syntax + +[delta "tangara-chilensis"] + # author: https://github.com/clnoll + commit-decoration-style = bold box ul "#34fd50" + dark = true + file-decoration-style = none + file-style = omit + hunk-header-decoration-style = "#00b494" box ul + hunk-header-file-style = "#999999" + hunk-header-line-number-style = bold "#03a4ff" + hunk-header-style = file line-number syntax + line-numbers = true + line-numbers-left-style = black + line-numbers-minus-style = "#B10036" + line-numbers-plus-style = "#03a4ff" + line-numbers-right-style = black + line-numbers-zero-style = "#999999" + minus-emph-style = normal "#de004e" + minus-style = normal "#990017" + plus-emph-style = syntax "#03a4ff" + plus-style = syntax "#450eff" + side-by-side = true + syntax-theme = Vibrant Sunburst + +[delta "villsau"] + # author: https://github.com/torarnv + dark = true + file-style = omit + hunk-header-decoration-style = omit + hunk-header-file-style = magenta + hunk-header-line-number-style = dim magenta + hunk-header-style = file line-number syntax + line-numbers = false + minus-emph-style = bold red 52 + minus-empty-line-marker-style = normal "#3f0001" + minus-non-emph-style = dim red + minus-style = bold red + plus-emph-style = bold green 22 + plus-empty-line-marker-style = normal "#002800" + plus-non-emph-style = dim green + plus-style = bold green + syntax-theme = OneHalfDark + whitespace-error-style = reverse red + zero-style = dim syntax + +[delta "woolly-mammoth"] + # author: https://github.com/Kr1ss-XD + commit-decoration-style = 232 130 box + commit-style = 232 bold italic 130 + dark = true + file-added-label = [+] + file-copied-label = [C] + file-decoration-style = "#606018" overline + file-modified-label = [M] + file-removed-label = [-] + file-renamed-label = [R] + file-style = 232 bold 184 + hunk-header-decoration-style = none + hunk-header-style = syntax bold italic 237 + line-numbers = true + line-numbers-left-format = "{nm:>1}┊" + line-numbers-left-style = red + line-numbers-minus-style = red italic black + line-numbers-plus-style = green italic black + line-numbers-right-format = "{np:>1}┊" + line-numbers-right-style = green + line-numbers-zero-style = "#545474" italic + minus-emph-style = syntax bold "#780000" + minus-style = syntax "#400000" + plus-emph-style = syntax bold "#007800" + plus-style = syntax "#004000" + syntax-theme = Vibrant Sunburst + whitespace-error-style = "#280050" reverse + zero-style = syntax + blame-format = "{author:<18} ({commit:>7}) ┊{timestamp:^16}┊ " + blame-palette = "#101010 #200020 #002800 #000028 #202000 #280000 #002020 #002800 #202020" + +[delta "calochortus-lyallii"] + # author: https://github.com/manojkarthick + commit-decoration-style = none + dark = true + file-added-label = [+] + file-copied-label = [C] + file-decoration-style = none + file-modified-label = [M] + file-removed-label = [-] + file-renamed-label = [R] + file-style = 232 bold 184 + hunk-header-decoration-style = none + hunk-header-file-style = "#999999" + hunk-header-line-number-style = bold "#03a4ff" + hunk-header-style = file line-number syntax + line-numbers = true + line-numbers-left-style = black + line-numbers-minus-style = "#B10036" + line-numbers-plus-style = "#03a4ff" + line-numbers-right-style = black + line-numbers-zero-style = "#999999" + minus-emph-style = syntax bold "#780000" + minus-style = syntax "#400000" + plus-emph-style = syntax bold "#007800" + plus-style = syntax "#004000" + whitespace-error-style = "#280050" reverse + zero-style = syntax + syntax-theme = Nord + +[delta "mantis-shrimp"] + #author: https://github.com/2kabhishek + dark = true + side-by-side = true + keep-plus-minus-markers = true + hyperlinks = true + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + file-style = omit + zero-style = syntax + syntax-theme = Monokai Extended + commit-decoration-style ="#11ce16" box + commit-style = "#ffd21a" bold italic + hunk-header-decoration-style = "#1688f0" box ul + hunk-header-file-style = "#c63bee" ul bold + hunk-header-line-number-style = "#ffd21a" box bold + hunk-header-style = file line-number syntax bold italic + line-numbers = true + line-numbers-left-format = "{nm:>1}|" + line-numbers-left-style = "#1688f0" + line-numbers-minus-style = "#ff0051" bold + line-numbers-plus-style = "#03e57f" bold + line-numbers-right-format = "{np:>1}|" + line-numbers-right-style = "#1688f0" + line-numbers-zero-style = "#aaaaaa" italic + minus-emph-style = syntax bold "#b80000" + minus-style = syntax "#5d001e" + plus-emph-style = syntax bold "#007800" + plus-style = syntax "#004433" + whitespace-error-style = "#280050" + +[delta "mantis-shrimp-lite"] + #author: https://github.com/2kabhishek + dark = true + side-by-side = true + keep-plus-minus-markers = true + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + file-style = omit + zero-style = syntax + syntax-theme = Monokai Extended + commit-decoration-style = green box + commit-style = yellow bold italic + hunk-header-decoration-style = blue box ul + hunk-header-file-style = purple ul bold + hunk-header-line-number-style = yellow box bold + hunk-header-style = file line-number syntax bold italic + line-numbers = true + line-numbers-left-format = "{nm:>1}|" + line-numbers-left-style = blue + line-numbers-minus-style = red bold + line-numbers-plus-style = green bold + line-numbers-right-format = "{np:>1}|" + line-numbers-right-style = blue + line-numbers-zero-style = white italic + minus-emph-style = syntax bold red + plus-emph-style = syntax bold green + whitespace-error-style = purple bold + +[delta "zebra-dark"] + minus-style = syntax "#330f0f" + minus-emph-style = syntax "#4f1917" + plus-style = syntax "#0e2f19" + plus-emph-style = syntax "#174525" + map-styles = \ + bold purple => syntax "#330f29", \ + bold blue => syntax "#271344", \ + bold cyan => syntax "#0d3531", \ + bold yellow => syntax "#222f14" + zero-style = syntax + whitespace-error-style = "#aaaaaa" + +[delta "zebra-light"] + minus-style = syntax "#fbdada" + minus-emph-style = syntax "#f6b6b6" + plus-style = syntax "#d6ffd6" + plus-emph-style = syntax "#adffad" + map-styles = \ + bold purple => syntax "#feecf7", \ + bold blue => syntax "#e5dff6", \ + bold cyan => syntax "#d8fdf6", \ + bold yellow => syntax "#f4ffe0" + zero-style = syntax + whitespace-error-style = "#aaaaaa" + +[delta "chameleon"] + #author: https://github.com/AirOnSkin + dark = true + line-numbers = true + side-by-side = true + keep-plus-minus-markers = false + syntax-theme = Nord + file-style = "#434C5E" bold + file-decoration-style = "#434C5E" ul + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + hunk-header-style = omit + line-numbers-left-format = " {nm:>3} │" + line-numbers-left-style = red + line-numbers-right-format = " {np:>3} │" + line-numbers-right-style = green + line-numbers-minus-style = red italic black + line-numbers-plus-style = green italic black + line-numbers-zero-style = "#434C5E" italic + minus-style = bold red + minus-emph-style = bold "#202020" "#FF5555" + minus-non-emph-style = bold + plus-style = bold green + plus-emph-style = bold "#202020" "#50FA7B" + plus-non-emph-style = bold + zero-style = syntax + blame-code-style = syntax + blame-format = "{author:<18} ({commit:>9}) {timestamp:^16}" + blame-palette = "#2E3440" "#3B4252" "#434C5E" "#4C566A" + merge-conflict-begin-symbol = ~ + merge-conflict-end-symbol = ~ + merge-conflict-ours-diff-header-style = "#F1FA8C" bold + merge-conflict-ours-diff-header-decoration-style = "#434C5E" box + merge-conflict-theirs-diff-header-style = "#F1FA8C" bold + merge-conflict-theirs-diff-header-decoration-style = "#434C5E" box + +[delta "gruvmax-fang"] + # author: https://github.com/maxfangx + # General appearance + dark = true + syntax-theme = gruvbox-dark + # File + file-style = "#FFFFFF" bold + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + file-decoration-style = "#434C5E" ul + file-decoration-style = "#84786A" ul + # No hunk headers + hunk-header-style = omit + # Line numbers + line-numbers = true + line-numbers-left-style = "#84786A" + line-numbers-right-style = "#84786A" + line-numbers-minus-style = "#A02A11" + line-numbers-plus-style = "#479B36" + line-numbers-zero-style = "#84786A" + line-numbers-left-format = " {nm:>3} │" + line-numbers-right-format = " {np:>3} │" + # Diff contents + inline-hint-style = syntax + minus-style = syntax "#330011" + minus-emph-style = syntax "#80002a" + minus-non-emph-style = syntax auto + plus-style = syntax "#001a00" + plus-emph-style = syntax "#003300" + plus-non-emph-style = syntax auto + whitespace-error-style = "#FB4934" reverse + # Commit hash + commit-decoration-style = normal box + commit-style = "#ffffff" bold + # Blame + blame-code-style = syntax + blame-format = "{author:>18} ({commit:>8}) {timestamp:<13} " + blame-palette = "#000000" "#1d2021" "#282828" "#3c3836" + # Merge conflicts + merge-conflict-begin-symbol = ⌃ + merge-conflict-end-symbol = ⌄ + merge-conflict-ours-diff-header-style = "#FABD2F" bold + merge-conflict-theirs-diff-header-style = "#FABD2F" bold overline + merge-conflict-ours-diff-header-decoration-style = '' + merge-conflict-theirs-diff-header-decoration-style = '' + +[delta "discord"] + commit-style = omit + file-style = 34 ul + file-decoration-style = none + hunk-header-style = omit + minus-style = 31 + minus-non-emph-style = 31 + minus-emph-style = 40 + minus-empty-line-marker-style = 31 + zero-style = 30 + plus-style = 32 + plus-non-emph-style = 32 + plus-emph-style = 40 + grep-file-style = 34 + grep-line-number-style = 34 + whitespace-error-style = 41 + blame-code-style = omit + true-color = never + file-modified-label = changed: + right-arrow = > + hyperlinks = false + keep-plus-minus-markers = true + diff-stat-align-width = 10 + syntax-theme = none + width = variable + +[delta "mellow-barbet"] + # author: https://github.com/kvrohit + # To configure terminal colors see https://github.com/kvrohit/mellow.nvim#terminals + dark = true + syntax-theme = base16 + line-numbers = true + side-by-side = true + file-style = brightwhite + file-decoration-style = none + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + hunk-header-decoration-style = "#3e3e43" box ul + plus-style = brightgreen black + plus-emph-style = black green + minus-style = brightred black + minus-emph-style = black red + line-numbers-minus-style = brightred + line-numbers-plus-style = brightgreen + line-numbers-left-style = "#3e3e43" + line-numbers-right-style = "#3e3e43" + line-numbers-zero-style = "#57575f" + zero-style = syntax + whitespace-error-style = black bold + blame-code-style = syntax + blame-palette = "#161617" "#1b1b1d" "#2a2a2d" "#3e3e43" + merge-conflict-begin-symbol = ~ + merge-conflict-end-symbol = ~ + merge-conflict-ours-diff-header-style = yellow bold + merge-conflict-ours-diff-header-decoration-style = "#3e3e43" box + merge-conflict-theirs-diff-header-style = yellow bold + merge-conflict-theirs-diff-header-decoration-style = "#3e3e43" box + +[delta "arctic-fox"] + # author: https://github.com/anthony-halim + dark = true + syntax-theme = Nord + file-added-label = [+] + file-copied-label = [==] + file-modified-label = [*] + file-removed-label = [-] + file-renamed-label = [->] + file-style = omit + hunk-header-decoration-style = "#5E81AC" ul + hunk-header-file-style = blue ul bold + hunk-header-line-number-style = yellow box bold + hunk-header-style = file line-number syntax bold italic + plus-style = brightgreen + plus-emph-style = black green + minus-style = brightred + minus-emph-style = black red + line-numbers = true + line-numbers-minus-style = brightred + line-numbers-plus-style = brightgreen + line-numbers-left-style = "#5E81AC" + line-numbers-right-style = "#5E81AC" + line-numbers-zero-style = "#4C566A" + zero-style = syntax + whitespace-error-style = black bold + blame-code-style = syntax + blame-format = "{author:<18} {commit:<6} {timestamp:<15}" + blame-palette = "#2E3440" "#3B4252" "#434C5E" + merge-conflict-begin-symbol = ~ + merge-conflict-end-symbol = ~ + merge-conflict-ours-diff-header-style = yellow bold + merge-conflict-ours-diff-header-decoration-style = "#5E81AC" box + merge-conflict-theirs-diff-header-style = yellow bold + merge-conflict-theirs-diff-header-decoration-style = "#5E81AC" box diff --git a/dot_config/git/config.local.tmpl b/dot_config/git/config.local.tmpl new file mode 100644 index 0000000..236f9eb --- /dev/null +++ b/dot_config/git/config.local.tmpl @@ -0,0 +1,6 @@ +# vim:set ft=gitconfig : + +[user] + name = punkfairie + email = 23287005+punkfairie@users.noreply.github.com + signingkey = {{ .gpgKey }} diff --git a/dot_config/git/dot_gitattributes b/dot_config/git/dot_gitattributes new file mode 100644 index 0000000..25ba6ef --- /dev/null +++ b/dot_config/git/dot_gitattributes @@ -0,0 +1,10 @@ +# Automatically normalize line endings. +# https://git-scm.com/docs/gitattributes +# https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings + +* text=auto + +*.png binary +*.jpg binary +*.jpeg binary +*.bmp binary diff --git a/dot_config/git/gitmojis b/dot_config/git/gitmojis new file mode 100644 index 0000000..c093c3a --- /dev/null +++ b/dot_config/git/gitmojis @@ -0,0 +1 @@ +{"gitmojis":[{"emoji":"🎨","entity":"🎨","code":":art:","description":"Improve structure / format of the code.","name":"art","semver":null},{"emoji":"⚡️","entity":"⚡","code":":zap:","description":"Improve performance.","name":"zap","semver":"patch"},{"emoji":"🔥","entity":"🔥","code":":fire:","description":"Remove code or files.","name":"fire","semver":null},{"emoji":"🐛","entity":"🐛","code":":bug:","description":"Fix a bug.","name":"bug","semver":"patch"},{"emoji":"🚑️","entity":"🚑","code":":ambulance:","description":"Critical hotfix.","name":"ambulance","semver":"patch"},{"emoji":"✨","entity":"✨","code":":sparkles:","description":"Introduce new features.","name":"sparkles","semver":"minor"},{"emoji":"📝","entity":"📝","code":":memo:","description":"Add or update documentation.","name":"memo","semver":null},{"emoji":"🚀","entity":"🚀","code":":rocket:","description":"Deploy stuff.","name":"rocket","semver":null},{"emoji":"💄","entity":"&#ff99cc;","code":":lipstick:","description":"Add or update the UI and style files.","name":"lipstick","semver":"patch"},{"emoji":"🎉","entity":"🎉","code":":tada:","description":"Begin a project.","name":"tada","semver":null},{"emoji":"✅","entity":"✅","code":":white_check_mark:","description":"Add, update, or pass tests.","name":"white-check-mark","semver":null},{"emoji":"🔒️","entity":"🔒","code":":lock:","description":"Fix security or privacy issues.","name":"lock","semver":"patch"},{"emoji":"🔐","entity":"🔐","code":":closed_lock_with_key:","description":"Add or update secrets.","name":"closed-lock-with-key","semver":null},{"emoji":"🔖","entity":"🔖","code":":bookmark:","description":"Release / Version tags.","name":"bookmark","semver":null},{"emoji":"🚨","entity":"🚨","code":":rotating_light:","description":"Fix compiler / linter warnings.","name":"rotating-light","semver":null},{"emoji":"🚧","entity":"🚧","code":":construction:","description":"Work in progress.","name":"construction","semver":null},{"emoji":"💚","entity":"💚","code":":green_heart:","description":"Fix CI Build.","name":"green-heart","semver":null},{"emoji":"⬇️","entity":"⬇️","code":":arrow_down:","description":"Downgrade dependencies.","name":"arrow-down","semver":"patch"},{"emoji":"⬆️","entity":"⬆️","code":":arrow_up:","description":"Upgrade dependencies.","name":"arrow-up","semver":"patch"},{"emoji":"📌","entity":"📌","code":":pushpin:","description":"Pin dependencies to specific versions.","name":"pushpin","semver":"patch"},{"emoji":"👷","entity":"👷","code":":construction_worker:","description":"Add or update CI build system.","name":"construction-worker","semver":null},{"emoji":"📈","entity":"📈","code":":chart_with_upwards_trend:","description":"Add or update analytics or track code.","name":"chart-with-upwards-trend","semver":"patch"},{"emoji":"♻️","entity":"♻","code":":recycle:","description":"Refactor code.","name":"recycle","semver":null},{"emoji":"➕","entity":"➕","code":":heavy_plus_sign:","description":"Add a dependency.","name":"heavy-plus-sign","semver":"patch"},{"emoji":"➖","entity":"➖","code":":heavy_minus_sign:","description":"Remove a dependency.","name":"heavy-minus-sign","semver":"patch"},{"emoji":"🔧","entity":"🔧","code":":wrench:","description":"Add or update configuration files.","name":"wrench","semver":"patch"},{"emoji":"🔨","entity":"🔨","code":":hammer:","description":"Add or update development scripts.","name":"hammer","semver":null},{"emoji":"🌐","entity":"🌐","code":":globe_with_meridians:","description":"Internationalization and localization.","name":"globe-with-meridians","semver":"patch"},{"emoji":"✏️","entity":"","code":":pencil2:","description":"Fix typos.","name":"pencil2","semver":"patch"},{"emoji":"💩","entity":"","code":":poop:","description":"Write bad code that needs to be improved.","name":"poop","semver":null},{"emoji":"⏪️","entity":"⏪","code":":rewind:","description":"Revert changes.","name":"rewind","semver":"patch"},{"emoji":"🔀","entity":"🔀","code":":twisted_rightwards_arrows:","description":"Merge branches.","name":"twisted-rightwards-arrows","semver":null},{"emoji":"📦️","entity":"F4E6;","code":":package:","description":"Add or update compiled files or packages.","name":"package","semver":"patch"},{"emoji":"👽️","entity":"F47D;","code":":alien:","description":"Update code due to external API changes.","name":"alien","semver":"patch"},{"emoji":"🚚","entity":"F69A;","code":":truck:","description":"Move or rename resources (e.g.: files, paths, routes).","name":"truck","semver":null},{"emoji":"📄","entity":"F4C4;","code":":page_facing_up:","description":"Add or update license.","name":"page-facing-up","semver":null},{"emoji":"💥","entity":"💥","code":":boom:","description":"Introduce breaking changes.","name":"boom","semver":"major"},{"emoji":"🍱","entity":"F371","code":":bento:","description":"Add or update assets.","name":"bento","semver":"patch"},{"emoji":"♿️","entity":"♿","code":":wheelchair:","description":"Improve accessibility.","name":"wheelchair","semver":"patch"},{"emoji":"💡","entity":"💡","code":":bulb:","description":"Add or update comments in source code.","name":"bulb","semver":null},{"emoji":"🍻","entity":"🍻","code":":beers:","description":"Write code drunkenly.","name":"beers","semver":null},{"emoji":"💬","entity":"💬","code":":speech_balloon:","description":"Add or update text and literals.","name":"speech-balloon","semver":"patch"},{"emoji":"🗃️","entity":"🗃","code":":card_file_box:","description":"Perform database related changes.","name":"card-file-box","semver":"patch"},{"emoji":"🔊","entity":"🔊","code":":loud_sound:","description":"Add or update logs.","name":"loud-sound","semver":null},{"emoji":"🔇","entity":"🔇","code":":mute:","description":"Remove logs.","name":"mute","semver":null},{"emoji":"👥","entity":"👥","code":":busts_in_silhouette:","description":"Add or update contributor(s).","name":"busts-in-silhouette","semver":null},{"emoji":"🚸","entity":"🚸","code":":children_crossing:","description":"Improve user experience / usability.","name":"children-crossing","semver":"patch"},{"emoji":"🏗️","entity":"f3d7;","code":":building_construction:","description":"Make architectural changes.","name":"building-construction","semver":null},{"emoji":"📱","entity":"📱","code":":iphone:","description":"Work on responsive design.","name":"iphone","semver":"patch"},{"emoji":"🤡","entity":"🤡","code":":clown_face:","description":"Mock things.","name":"clown-face","semver":null},{"emoji":"🥚","entity":"🥚","code":":egg:","description":"Add or update an easter egg.","name":"egg","semver":"patch"},{"emoji":"🙈","entity":"bdfe7;","code":":see_no_evil:","description":"Add or update a .gitignore file.","name":"see-no-evil","semver":null},{"emoji":"📸","entity":"📸","code":":camera_flash:","description":"Add or update snapshots.","name":"camera-flash","semver":null},{"emoji":"⚗️","entity":"⚗","code":":alembic:","description":"Perform experiments.","name":"alembic","semver":"patch"},{"emoji":"🔍️","entity":"🔍","code":":mag:","description":"Improve SEO.","name":"mag","semver":"patch"},{"emoji":"🏷️","entity":"🏷","code":":label:","description":"Add or update types.","name":"label","semver":"patch"},{"emoji":"🌱","entity":"🌱","code":":seedling:","description":"Add or update seed files.","name":"seedling","semver":null},{"emoji":"🚩","entity":"🚩","code":":triangular_flag_on_post:","description":"Add, update, or remove feature flags.","name":"triangular-flag-on-post","semver":"patch"},{"emoji":"🥅","entity":"🥅","code":":goal_net:","description":"Catch errors.","name":"goal-net","semver":"patch"},{"emoji":"💫","entity":"💫","code":":dizzy:","description":"Add or update animations and transitions.","name":"dizzy","semver":"patch"},{"emoji":"🗑️","entity":"🗑","code":":wastebasket:","description":"Deprecate code that needs to be cleaned up.","name":"wastebasket","semver":"patch"},{"emoji":"🛂","entity":"🛂","code":":passport_control:","description":"Work on code related to authorization, roles and permissions.","name":"passport-control","semver":"patch"},{"emoji":"🩹","entity":"🩹","code":":adhesive_bandage:","description":"Simple fix for a non-critical issue.","name":"adhesive-bandage","semver":"patch"},{"emoji":"🧐","entity":"🧐","code":":monocle_face:","description":"Data exploration/inspection.","name":"monocle-face","semver":null},{"emoji":"⚰️","entity":"⚰","code":":coffin:","description":"Remove dead code.","name":"coffin","semver":null},{"emoji":"🧪","entity":"🧪","code":":test_tube:","description":"Add a failing test.","name":"test-tube","semver":null},{"emoji":"👔","entity":"👔","code":":necktie:","description":"Add or update business logic.","name":"necktie","semver":"patch"},{"emoji":"🩺","entity":"🩺","code":":stethoscope:","description":"Add or update healthcheck.","name":"stethoscope","semver":null},{"emoji":"🧱","entity":"🧱","code":":bricks:","description":"Infrastructure related changes.","name":"bricks","semver":null},{"emoji":"🧑‍💻","entity":"🧑‍💻","code":":technologist:","description":"Improve developer experience.","name":"technologist","semver":null},{"emoji":"💸","entity":"💸","code":":money_with_wings:","description":"Add sponsorships or money related infrastructure.","name":"money-with-wings","semver":null},{"emoji":"🧵","entity":"🧵","code":":thread:","description":"Add or update code related to multithreading or concurrency.","name":"thread","semver":null},{"emoji":"🦺","entity":"🦺","code":":safety_vest:","description":"Add or update code related to validation.","name":"safety-vest","semver":null}]} \ No newline at end of file diff --git a/dot_config/git/hooks/executable_prepare-commit-msg b/dot_config/git/hooks/executable_prepare-commit-msg new file mode 100644 index 0000000..7d3ef9a --- /dev/null +++ b/dot_config/git/hooks/executable_prepare-commit-msg @@ -0,0 +1,137 @@ +#!/usr/bin/env fish + +set -l msg_file $argv[1] +set -l commit_type $(string trim $argv[2]) +set -l commit_sha $(string trim $argv[3]) + +# Rebasing || cherry-picking. +if test "$commit_type" = messageg || test "$commit_type" = message + exit 0 +end + +if test -n "$commit_sha" + gum confirm "Create a new commit message?" || exit 0 +end + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set -l gitmojis $(curl -s https://gitmoji.dev/api/gitmojis | jello -rl '\ +result = [] +for entry in _.gitmojis: + item = entry.emoji + " - " + entry.description + + if entry.semver is not None: + item += " \033[91;3m(" + entry.semver + ")\033[0m" + + result.append(item) + +result +') + +set -l types \ + "build: Changes that affect the build system or external dependencies" \ + "ci: Changes to the CI configuration files and scripts" \ + "docs: Documentation only changes" \ + "feat: A new feature" \ + "fix: A bug fix" \ + "perf: A code change that improves performance" \ + "refactor: A code change that neither fixes a bug nor adds a feature" \ + "style: Changes that do not affect the meaning of the code" \ + "test: Adding missing tests or correcting existing tests" \ + "chore: Update dependencies; bump version numbers; etc" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# HAS to be global so the function has access to it. +set -g gitmoji "$(gum filter --height=10 $gitmojis)" + +# Abort if no emoji was selected +if ! test -n "$gitmoji" + exit 1 +end + +set -l emoji $(string sub --length 1 $gitmoji) + +function breaking + string match -rq '\(major\)' "$gitmoji" +end + +# function minor +# string match -rq '\(minor\)' "$gitmoji" +# end +# +# function patch +# string match -r '\(patch\)' "$gitmoji" +# end + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set -l type $(gum filter --height=10 $types) +set type $(string match --regex '^[a-z]+' $type) + +set -l scope $(gum input --placeholder "scope") + +test -n "$scope" && set scope "($scope)" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set -l summary "$type$scope: " +breaking && set summary "$type$scope!: " +set summary $(gum input --value "$summary" --placeholder "Summary of this change") + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set -l footer "" +breaking && set footer $(gum input --value "BREAKING CHANGE: " --placeholder "The breaking change being introduced") + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# if breaking && test "$(git_current_branch)" = "$(git_main_branch)" +# set -l msg "You are commiting a breaking change on to the main branch. Continue commit?\n(Selecting no will save your commit message to the clipboard)" +# +# gum confirm $msg || begin +# copyq copy "$emoji $summary\n$description$footer" +# exit +# end +# end + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set -l msg "$(cat $msg_file)" + +set -l new_msg "$emoji $summary\n\n" + +if test ! -z "$footer" + set new_msg "$new_msg$footer\n\n" +end + +set new_msg "$new_msg$msg" + +echo -e "$new_msg" >"$msg_file" + +# function tag +# if breaking || minor || patch +# if test "$(git_current_branch)" = "$(git_main_branch)" +# gum confirm "Bump version number and tag commit?" || return +# +# set -f last $(git describe --tags --abbrev=0 || 'v0.0.0') +# set last $(string replace v '' $last | string split .) +# +# set -f i 0 +# if breaking +# set i 1 +# else if minor +# set i 2 +# else if patch +# set i 3 +# end +# +# if test $i -gt 0 +# set last[$i] $(math $last[$i] + 1) +# end +# +# set -f new "$last[1].$last[2].$last[3]" +# git tag -a "v$new" -m "Version $new" +# end +# end +# end diff --git a/dot_config/glow/glow.yml b/dot_config/glow/glow.yml new file mode 100644 index 0000000..fc4e804 --- /dev/null +++ b/dot_config/glow/glow.yml @@ -0,0 +1,10 @@ +# style name or JSON path (default "auto") +style: "~/.config/glow/macchiato.json" +# show local files only; no network (TUI-mode only) +local: false +# mouse support (TUI-mode only) +mouse: false +# use pager to display markdown +pager: true +# word-wrap at width +width: 80 diff --git a/dot_config/gtk-3.0/bookmarks b/dot_config/gtk-3.0/bookmarks new file mode 100644 index 0000000..85b462c --- /dev/null +++ b/dot_config/gtk-3.0/bookmarks @@ -0,0 +1 @@ +file:///home/marley/data diff --git a/dot_config/gtk-3.0/settings.ini b/dot_config/gtk-3.0/settings.ini new file mode 100644 index 0000000..79cd81c --- /dev/null +++ b/dot_config/gtk-3.0/settings.ini @@ -0,0 +1,4 @@ +[Settings] +gtk-cursor-theme-name = Catppuccin-Macchiato-Pink-Cursors +gtk-theme-name = Catppuccin-Macchiato-Standard-Pink-Dark +gtk-icon-theme-name = Papirus diff --git a/dot_config/gtk-4.0/symlink_assets b/dot_config/gtk-4.0/symlink_assets new file mode 100644 index 0000000..0ee6310 --- /dev/null +++ b/dot_config/gtk-4.0/symlink_assets @@ -0,0 +1 @@ +/usr/share/themes/Catppuccin-Macchiato-Standard-Pink-Dark/gtk-4.0/assets diff --git a/dot_config/gtk-4.0/symlink_gtk-dark.css b/dot_config/gtk-4.0/symlink_gtk-dark.css new file mode 100644 index 0000000..b533e53 --- /dev/null +++ b/dot_config/gtk-4.0/symlink_gtk-dark.css @@ -0,0 +1 @@ +/usr/share/themes/Catppuccin-Macchiato-Standard-Pink-Dark/gtk-4.0/gtk-dark.css diff --git a/dot_config/gtk-4.0/symlink_gtk.css b/dot_config/gtk-4.0/symlink_gtk.css new file mode 100644 index 0000000..7666b4d --- /dev/null +++ b/dot_config/gtk-4.0/symlink_gtk.css @@ -0,0 +1 @@ +/usr/share/themes/Catppuccin-Macchiato-Standard-Pink-Dark/gtk-4.0/gtk.css diff --git a/dot_config/hyfetch.json b/dot_config/hyfetch.json new file mode 100644 index 0000000..43e2ccf --- /dev/null +++ b/dot_config/hyfetch.json @@ -0,0 +1,16 @@ +{ + "preset": "lesbian", + "mode": "rgb", + "light_dark": "dark", + "lightness": 0.7, + "color_align": { + "mode": "horizontal", + "custom_colors": [], + "fore_back": null + }, + "backend": "neofetch", + "args": null, + "distro": null, + "pride_month_shown": [], + "pride_month_disable": false +} \ No newline at end of file diff --git a/dot_config/lazygit/config.yml b/dot_config/lazygit/config.yml new file mode 100644 index 0000000..e9d693f --- /dev/null +++ b/dot_config/lazygit/config.yml @@ -0,0 +1,10 @@ +--- +gui: + nerdFontsVersion: "3" +git: + paging: + colorArg: always + pager: delta --paging=never --features=arctic-fox +os: + copyToClipboardCmd: "copyq copy {{text}}" + editPreset: nvim-remote diff --git a/dot_config/mopidy/mopidy.conf b/dot_config/mopidy/mopidy.conf new file mode 100644 index 0000000..e30faf1 --- /dev/null +++ b/dot_config/mopidy/mopidy.conf @@ -0,0 +1,168 @@ +# For further information about options in this file see: +# https://docs.mopidy.com/ +# +# The initial commented out values reflect the defaults as of: +# Mopidy 3.4.1 +# Mopidy-ALSAMixer 2.0.1 +# Mopidy-File 3.4.1 +# Mopidy-HTTP 3.4.1 +# Mopidy-Local 3.2.1 +# Mopidy-M3U 3.4.1 +# Mopidy-MPD 3.3.0 +# Mopidy-MPRIS 3.0.3 +# Mopidy-Podcast 3.0.1 +# Mopidy-SoftwareMixer 3.4.1 +# Mopidy-Stream 3.4.1 +# +# Available options and defaults might have changed since then, +# run `mopidy config` to see the current effective config and +# `mopidy --version` to check the current version. + +[core] +#cache_dir = $XDG_CACHE_DIR/mopidy +#config_dir = $XDG_CONFIG_DIR/mopidy +#data_dir = $XDG_DATA_DIR/mopidy +#max_tracklist_length = 10000 +#restore_state = false + +[logging] +#verbosity = 0 +#format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s +#color = true +#config_file = + +[audio] +#mixer = software +#mixer_volume = +output = tee name=t ! queue ! autoaudiosink t. ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE ! udpsink host=localhost port=5555 +#buffer_time = + +[proxy] +#scheme = +#hostname = +#port = +#username = +#password = + +[file] +enabled = false +media_dirs = + /mnt/babeshare/babez/Music|Babeshare +# $XDG_MUSIC_DIR|Music +# ~/|Home +#excluded_file_extensions = +# .directory +# .html +# .jpeg +# .jpg +# .log +# .nfo +# .pdf +# .png +# .txt +# .zip +#show_dotfiles = false +#follow_symlinks = false +#metadata_timeout = 1000 + +[http] +#enabled = true +#hostname = 127.0.0.1 +#port = 6680 +#zeroconf = Mopidy HTTP server on $hostname +#allowed_origins = +#csrf_protection = true +#default_app = mopidy + +[m3u] +#enabled = true +#base_dir = +#default_encoding = latin-1 +#default_extension = .m3u8 +#playlists_dir = + +[softwaremixer] +#enabled = true + +[stream] +enabled = false +#protocols = +# http +# https +# mms +# rtmp +# rtmps +# rtsp +#metadata_blacklist = +#timeout = 5000 + +[alsamixer] +#enabled = true +#card = 0 +#control = Master +#min_volume = 0 +#max_volume = 100 +#volume_scale = cubic + +[local] +#enabled = true +#max_search_results = 100 +media_dir = /mnt/babeshare/babez/Music/ +#scan_timeout = 1000 +#scan_flush_threshold = 100 +#scan_follow_symlinks = false +#included_file_extensions = +#excluded_file_extensions = +# .cue +# .directory +# .html +# .jpeg +# .jpg +# .log +# .nfo +# .pdf +# .png +# .txt +# .zip +#directories = +# Albums local:directory?type=album +# Artists local:directory?type=artist +# Composers local:directory?type=artist&role=composer +# Genres local:directory?type=genre +# Performers local:directory?type=artist&role=performer +# Release Years local:directory?type=date&format=%25Y +# Tracks local:directory?type=track +# Last Week's Updates local:directory?max-age=604800 +# Last Month's Updates local:directory?max-age=2592000 +#timeout = 10 +#use_artist_sortname = false +#album_art_files = +# *.jpg +# *.jpeg +# *.png + +[mpd] +#enabled = true +hostname = 127.0.0.1 +#port = 6600 +#password = +#max_connections = 20 +#connection_timeout = 60 +#zeroconf = Mopidy MPD server on $hostname +#command_blacklist = +# listall +# listallinfo +#default_playlist_scheme = m3u + +[mpris] +#enabled = true +#bus_type = session + +[podcast] +enabled = false +#browse_root = Podcasts.opml +#browse_order = desc +#lookup_order = asc +#cache_size = 64 +#cache_ttl = 86400 +#timeout = 10 diff --git a/dot_config/ncmpcpp/config b/dot_config/ncmpcpp/config new file mode 100644 index 0000000..345fc55 --- /dev/null +++ b/dot_config/ncmpcpp/config @@ -0,0 +1,598 @@ +############################################################## +## This is an example configuration file. Copy it to ## +## $XDG_CONFIG_HOME/ncmpcpp/config or $HOME/.ncmpcpp/config ## +## and set up your preferences. ## +############################################################## +# +##### directories ###### +## +## Directory for storing ncmpcpp related files. Changing it is useful if you +## want to store everything somewhere else and provide command line setting for +## alternative location to config file which defines that while launching +## ncmpcpp. +## +# +#ncmpcpp_directory = ~/.config/ncmpcpp +# +## +## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other +## MPD clients (eg. ncmpc) also use that location. +## +# +#lyrics_directory = ~/.lyrics +# +##### connection settings ##### +# +#mpd_host = localhost +# +#mpd_port = 6600 +# +#mpd_connection_timeout = 5 +# +## Needed for tag editor and file operations to work. +## +mpd_music_dir = /mnt/babeshare/babez/Music/ +# +#mpd_crossfade_time = 5 +# +# Exclude pattern for random song action +# http://www.boost.org/doc/libs/1_46_1/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html +#random_exclude_pattern = "^(temp|midi_songs).*" +# +##### music visualizer ##### +## +## In order to make music visualizer work with MPD you need to use the fifo +## output. Its format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. As an example here is +## the relevant section for mpd.conf: +## +## audio_output { +## type "fifo" +## name "Visualizer feed" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +## If the visualization on occasion diverges from the audio output, please set +## 'buffer_time' parameter of your audio output in mpd.conf to '100000' (100ms) +## or less to prevent that from happening. +## +## Note: If you're using Mopidy, an address of a udpsink gstreamer's output is +## also accepted. For example, the following section in mopidy.conf: +## +## [audio] +## output = tee name=t ! queue ! autoaudiosink t. +## ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE +## ! udpsink host=localhost port=5555 +## +## will make localhost:5555 available as a source of data for the stereo +## visualizer. +## +# +visualizer_data_source = "localhost:5555" +# +## +## Note: Below parameter is needed for ncmpcpp to determine which output +## provides data for visualizer and reset it at the beginning of visualization +## to synchronize with audio. +## +# +# visualizer_output_name = Visualizer feed +# +## +## If you set format to 44100:16:2, make it 'yes'. +## +# visualizer_in_stereo = yes +# +## +## Note: set below to >=10 only if you have synchronization issues with +## visualization and audio. +## +# +#visualizer_sync_interval = 0 +# +## +## Note: To enable spectrum frequency visualization you need to compile ncmpcpp +## with fftw3 support. +## +# +## Available values: spectrum, wave, wave_filled, ellipse. +## +# visualizer_type = spectrum +# +#visualizer_fps = 60 +# +#visualizer_autoscale = no +# +# visualizer_look = ●▮ +# +#visualizer_color = blue, cyan, green, yellow, magenta, red +# +## Alternative subset of 256 colors for terminals that support it. +## +# visualizer_color = 47, 83, 119, 155, 191, 227, 221, 215, 209, 203, 197, 161 +# +## +## Note: The next few visualization options apply to the spectrum visualizer. +## +# +## Use unicode block characters for a smoother, more continuous look. +## This will override the visualizer_look option. With transparent terminals +## and visualizer_in_stereo set, artifacts may be visible on the bottom half of +## the visualization. +# +#visualizer_spectrum_smooth_look = yes +# +## A value between 1 and 5 inclusive. Specifying a larger value makes the +## visualizer look at a larger slice of time, which results in less jumpy +## visualizer output. +# +#visualizer_spectrum_dft_size = 2 +# +#visualizer_spectrum_gain = 10 +# +## Left-most frequency of visualizer in Hz, must be less than HZ MAX +# +#visualizer_spectrum_hz_min = 20 +# +## Right-most frequency of visualizer in Hz, must be greater than HZ MIN +# +#visualizer_spectrum_hz_max = 20000 +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding but if it failed to do so, you +## can specify charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build supports charset detection by +## checking output of `ncmpcpp --version`. +## +## Note: Since MPD uses UTF-8 by default, setting this option makes sense only +## if your encoding is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## Time of inactivity (in seconds) after playlist highlighting will be disabled +## (0 = always on). +## +#playlist_disable_highlight_delay = 5 +# +## Defines how long messages are supposed to be visible. +## +#message_delay_time = 5 +# +##### song format ##### +## +## For a song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - date +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## %P - priority +## $R - begin right alignment +## +## If you want to make sure that a part of the format is displayed only when +## certain tags are present, you can archieve it by grouping them with brackets, +## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are +## present or '' otherwise. It is also possible to define a list of +## alternatives by providing several groups and separating them with '|', +## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is +## not present. +## +## Note: If you want to set limit on maximal length of a tag, just put the +## appropriate number between % and character that defines tag type, e.g. to +## make album take max. 20 terminal cells, use '%20b'. +## +## In addition, formats support markers used for text attributes. They are +## followed by character '$'. After that you can put: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use a non-color attribute anymore, just put it again, +## but this time insert character '/' between '$' and attribute character, +## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with +## reversed colors. +## +## If you want to use 256 colors and/or background colors in formats (the naming +## scheme is described below in section about color definitions), it can be done +## with the syntax $(COLOR), e.g. to set the artist tag to one of the +## non-standard colors and make it have yellow background, you need to write +## $(197_yellow)%a$(end). Note that for standard colors this is interchangable +## with attributes listed above. +## +## Note: colors can be nested. +## +# +#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3%l$9} +# +#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} +# +#song_library_format = {%n - }{%t}|{%f} +# +#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +# +#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# +#current_item_prefix = $(yellow)$r +# +#current_item_suffix = $/r$(end) +# +#current_item_inactive_column_prefix = $(white)$r +# +#current_item_inactive_column_suffix = $/r$(end) +# +#now_playing_prefix = $b +# +#now_playing_suffix = $/b +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = $6 +# +#selected_item_suffix = $9 +# +#modified_item_prefix = $3> $9 +# +## +## Note: attributes are not supported for the following variables. +## +#song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. The sort mode +## determines how songs are sorted, and can be used in combination with a sort +## format to specify a custom sorting format. Available values for +## browser_sort_mode are "type", "name", "mtime", "format" and "none". +## +# +#browser_sort_mode = type +# +#browser_sort_format = {%a - }{%t}|{%f} {%l} +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of the column)[color of the column]{displayed tag} +## +## Note: Width is by default in %, if you want a column to have fixed size, add +## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of +## screen (so the real width will depend on actual screen size), whereas +## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen +## is. +## +## - color is optional (if you want the default one, leave the field empty). +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, separated with +## character ':', e.g. {lr:Length} gives you right aligned column of lengths +## named "Length". +## +## - define sequence of tags, that have to be displayed in case predecessor is +## empty in a way similar to the one in classic song format, i.e. using '|' +## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to +## display artist tag and then composer and performer if previous ones are not +## available. +## +# +#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each time song changes. Useful for +## notifications etc. +## +#execute_on_song_change = "" +# +## +## Note: Custom command that will be executed each time player state +## changes. The environment variable MPD_PLAYER_STATE is set to the current +## state (either unknown, play, pause, or stop) for its duration. +## +# +#execute_on_player_state_change = "" +# +#playlist_show_mpd_host = no +# +#playlist_show_remaining_time = no +# +#playlist_shorten_total_times = no +# +#playlist_separate_albums = no +# +## +## Note: Possible display modes: classic, columns. +## +#playlist_display_mode = columns +# +#browser_display_mode = classic +# +#search_engine_display_mode = classic +# +#playlist_editor_display_mode = classic +# +#discard_colors_if_item_is_selected = yes +# +#show_duplicate_tags = yes +# +#incremental_seeking = yes +# +#seek_time = 1 +# +#volume_change_step = 2 +# +#autocenter_mode = no +# +#centered_cursor = no +# +## +## Note: You can specify third character which will be used to build 'empty' +## part of progressbar. +## +#progressbar_look = => +# +## Available values: database, playlist. +## +#default_place_to_search_in = database +# +## Available values: classic, alternative. +## +#user_interface = classic +# +#data_fetching_delay = yes +# +## Available values: artist, album_artist, date, genre, composer, performer. +## +#media_library_primary_tag = artist +# +#media_library_albums_split_by_date = yes +# +#media_library_hide_album_dates = no +# +## Available values: wrapped, normal. +## +#default_find_mode = wrapped +# +#default_tag_editor_pattern = %n - %t +# +#header_visibility = yes +# +#statusbar_visibility = yes +# +## Show the "Connected to ..." message on startup +#connected_message_on_startup = yes +# +#titles_visibility = yes +# +#header_text_scrolling = yes +# +#cyclic_scrolling = no +# +#lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet +# +#follow_now_playing_lyrics = no +# +#fetch_lyrics_for_current_song_in_background = no +# +#store_lyrics_in_song_dir = no +# +#generate_win32_compatible_filenames = yes +# +#allow_for_physical_item_deletion = no +# +## +## Note: If you set this variable, ncmpcpp will try to get info from last.fm in +## language you set and if it fails, it will fall back to english. Otherwise it +## will use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = en +# +#space_add_mode = add_remove +# +#show_hidden_files_in_local_browser = no +# +## +## How shall screen switcher work? +## +## - "previous" - switch between the current and previous screen. +## - "screen1,...,screenN" - switch between given sequence of screens. +## +## Screens available for use: help, playlist, browser, search_engine, +## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, +## lyrics, last_fm. +## +#screen_switcher_mode = playlist, browser +# +## +## Note: You can define startup screen by choosing screen from the list above. +## +#startup_screen = playlist +# +## +## Note: You can define startup slave screen by choosing screen from the list +## above or an empty value for no slave screen. +## +#startup_slave_screen = "" +# +#startup_slave_screen_focus = no +# +## +## Default width of locked screen (in %). Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = 50 +# +#ask_for_locked_screen_width_part = yes +# +#jump_to_now_playing_song_at_start = yes +# +#ask_before_clearing_playlists = yes +# +#clock_display_seconds = no +# +#display_volume_level = yes +# +#display_bitrate = no +# +#display_remaining_time = no +# +## Available values: none, basic, extended, perl. +## +#regular_expressions = perl +# +## +## Note: if below is enabled, ncmpcpp will ignore leading "The" word while +## sorting items in browser, tags in media library, etc. +## +#ignore_leading_the = no +# +## +## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and +## filtering lists. This takes an effect only if boost was compiled with ICU +## support. +## +#ignore_diacritics = no +# +#block_search_constraints_change_if_items_found = yes +# +#mouse_support = yes +# +#mouse_list_scroll_whole_page = no +# +#lines_scrolled = 5 +# +#empty_tag_marker = +# +#tags_separator = " | " +# +#tag_editor_extended_numeration = no +# +#media_library_sort_by_mtime = no +# +#enable_window_title = yes +# +## +## Note: You can choose default search mode for search engine. Available modes +## are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but +## if your mpd is on a remote machine, downloading big database to process +## it can take a while +## +## - 3 - match only exact values (this mode uses mpd function for searching in +## database and local one for searching in current playlist) +## +# +#search_engine_default_search_mode = 1 +# +#external_editor = nano +# +## Note: set to yes if external editor is a console application. +## +#use_console_editor = yes +# +##### colors definitions ##### +## +## It is possible to set a background color by setting a color value +## "_", e.g. red_black will set foregound color to red +## and background color to black. +## +## In addition, for terminals that support 256 colors it is possible to set one +## of them by using a number in range [1, 256] instead of color name, +## e.g. numerical value corresponding to red_black is 2_1. To find out if the +## terminal supports 256 colors, run ncmpcpp and check out the bottom of the +## help screen for list of available colors and their numerical values. +## +## What is more, there are two special values for the background color: +## "transparent" and "current". The first one explicitly sets the background to +## be transparent, while the second one allows you to preserve current +## background color and change only the foreground one. It's used implicitly +## when background color is not specified. +## +## Moreover, it is possible to attach format information to selected color +## variables by appending to their end a colon followed by one or more format +## flags, e.g. black:b or red:ur. The following variables support this syntax: +## visualizer_color, color1, color2, empty_tag_color, volume_color, +## state_line_color, state_flags_color, progressbar_color, +## progressbar_elapsed_color, player_state_color, statusbar_time_color, +## alternative_ui_separator_color. +## +## Note: due to technical limitations of older ncurses version, if 256 colors +## are used there is a possibility that you'll be able to use only colors with +## transparent background. +# +#colors_enabled = yes +# +#empty_tag_color = cyan +# +#header_window_color = default +# +#volume_color = default +# +#state_line_color = default +# +#state_flags_color = default:b +# +#main_window_color = yellow +# +#color1 = white +# +#color2 = green +# +#progressbar_color = black:b +# +#progressbar_elapsed_color = green:b +# +#statusbar_color = default +# +#statusbar_time_color = default:b +# +#player_state_color = default:b +# +#alternative_ui_separator_color = black:b +# +#window_border_color = green +# +#active_window_border = red +# diff --git a/dot_config/neofetch/config.conf b/dot_config/neofetch/config.conf new file mode 100644 index 0000000..498e349 --- /dev/null +++ b/dot_config/neofetch/config.conf @@ -0,0 +1,880 @@ +# vim:set ft=bash : + + print_info() { + + prin " " + info " ​ ​  " title + prin "$(color 7)┌──────────────────────────────────────┐" + + info " ​ ​ $(color 4)󰌢 \n" model + info " ​ ​ $(color 6)󰍛 \n" cpu + info " ​ ​ $(color 2) \n" gpu + info " ​ ​ $(color 1) \n" memory + info " ​ ​ $(color 5)󰍹 \n" resolution + + prin "$(color 7)├──────────────────────────────────────┤" + + info " ​ ​ $(color 4) \n" distro + info " ​ ​ $(color 4) \n" kernel + info " ​ ​ $(color 6) \n" wm + info " ​ ​ $(color 2) \n" shell + info " ​ ​ $(color 3) \n" term + info " ​ ​ $(color 7) \n" term_font + info " ​ ​ $(color 5)󰉼 \n" theme + info " ​ ​ $(color 1)󰀻 \n" icons + info " ​ ​ $(color 2)󰊠 \n" packages + info " ​ ​ $(color 3) \n" uptime + + prin "$(color 7)├──────────────────────────────────────┤" + + info cols + prin + + prin "$(color 7)└──────────────────────────────────────┘" +} + + +# 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="on" + +# 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="gib" + + +# 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="off" + + +# 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="off" + +# 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="on" + +# 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="off" + +# 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="on" + +# 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="on" + +# 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 + +# Local IP interface +# +# Default: 'auto' (interface of default route) +# Values: 'auto', 'en0', 'en1' +# Flag: --ip_interface +local_ip_interface=('auto') + + +# 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 +# Music +# juk +# lollypop +# MellowPlayer +# 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=(distro) + + +# 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 15) + +# 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=49 + + +# 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: --memory_display +# --battery_display +# --disk_display +# +# Example: +# bar: '[---=======]' +# infobar: 'info [---=======]' +# barinfo: '[---=======] info' +# off: 'info' +memory_display="off" +battery_display="off" +disk_display="off" + + +# Backend Settings + + +# Image backend. +# +# Default: 'ascii' +# Values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', 'off', +# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty', 'ueberzug', +# 'viu' + +# 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="auto" + + +# Ascii Options + + +# Ascii distro +# Which distro's ascii art to display. +# +# Default: 'auto' +# Values: 'auto', 'distro_name' +# Flag: --ascii_distro +# NOTE: AIX, Hash, Alpine, AlterLinux, Amazon, Anarchy, Android, instantOS, +# Antergos, antiX, "AOSC OS", "AOSC OS/Retro", Apricity, ArchCraft, +# 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, dahlia, Debian, Deepin, DesaOS, +# Devuan, DracOS, DarkOs, Itc, 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, LaxerOS, LibreELEC, LFS, Linux_Lite, LMDE, +# Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, Manjaro, Maui, +# Mer, Minix, LinuxMint, Live_Raizo, 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, Pengwin, Peppermint, popos, Porteus, PostMarketOS, +# Proxmox, Puppy, PureOS, Qubes, Quibian, Radix, Raspbian, Reborn_OS, +# Redstar, Redcore, Redhat, Refracted_Devuan, Regata, Regolith, Rosa, +# sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor, +# SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, SmartOS, +# Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, t2, +# openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel, +# Ubuntu-Cinnamon, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, +# Ubuntu-Studio, Ubuntu, Univention, Venom, Void, semc, 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="on" + + +# 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="normal" + +# 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" + +# Catimg block size. +# Control the resolution of catimg. +# +# Default: '2' +# Values: '1', '2' +# Flags: --catimg_size +catimg_size="2" + +# Gap between image and text +# +# Default: '3' +# Values: 'num', '-num' +# Flag: --gap +gap=3 + +# 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/dot_config/nvim/after/queries/html/injections.scm b/dot_config/nvim/after/queries/html/injections.scm new file mode 100644 index 0000000..e183fb0 --- /dev/null +++ b/dot_config/nvim/after/queries/html/injections.scm @@ -0,0 +1,36 @@ +;; extends + +; AlpineJS attributes +(attribute + (attribute_name) @_attr + (#lua-match? @_attr "^x%-%l") + (#not-any-of? @_attr "x-teleport" "x-ref" "x-transition") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "javascript")) + +; Blade escaped JS attributes +; +(element + (_ + (tag_name) @_tag + (#lua-match? @_tag "^x%-%l") + (attribute + (attribute_name) @_attr + (#lua-match? @_attr "^::%l") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "javascript")))) + +; Blade PHP attributes +; +(element + (_ + (tag_name) @_tag + (#lua-match? @_tag "^x%-%l") + (attribute + (attribute_name) @_attr + (#lua-match? @_attr "^:%l") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "php_only")))) diff --git a/dot_config/nvim/after/queries/php/indents.scm b/dot_config/nvim/after/queries/php/indents.scm new file mode 100644 index 0000000..b2044f3 --- /dev/null +++ b/dot_config/nvim/after/queries/php/indents.scm @@ -0,0 +1,10 @@ +;; extends + +[ + ; prevent double indent for `return new class ...` + (return_statement + (object_creation_expression)) + ; prevent double indent for `return function() { ... }` + (return_statement + (anonymous_function_creation_expression)) +] @indent.dedent diff --git a/dot_config/nvim/dot_neoconf.json b/dot_config/nvim/dot_neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/dot_config/nvim/dot_neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/dot_config/nvim/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/dot_config/nvim/lazyvim.json b/dot_config/nvim/lazyvim.json new file mode 100644 index 0000000..f03853f --- /dev/null +++ b/dot_config/nvim/lazyvim.json @@ -0,0 +1,9 @@ +{ + "extras": [ + + ], + "news": { + "NEWS.md": "3314" + }, + "version": 3 +} \ No newline at end of file diff --git a/dot_config/nvim/lua/config/autocmds.lua b/dot_config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..f6f949d --- /dev/null +++ b/dot_config/nvim/lua/config/autocmds.lua @@ -0,0 +1,44 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here + +-- Open help window in a vertical split to the right. +vim.api.nvim_create_autocmd("BufWinEnter", { + group = vim.api.nvim_create_augroup("help_window_right", {}), + pattern = { "*.txt" }, + callback = function() + if vim.o.filetype == "help" then + vim.cmd.wincmd("L") + end + end, +}) + +-- Define an autocmd group for the blade workaround +local augroup = vim.api.nvim_create_augroup("lsp_blade_workaround", { clear = true }) + +-- Autocommand to temporarily change 'blade' filetype to 'php' when opening for LSP server activation +vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + group = augroup, + pattern = "*.blade.php", + callback = function() + vim.bo.filetype = "php" + end, +}) + +-- Additional autocommand to switch back to 'blade' after LSP has attached +vim.api.nvim_create_autocmd("LspAttach", { + pattern = "*.blade.php", + callback = function(args) + vim.schedule(function() + -- Check if the attached client is 'intelephense' + for _, client in ipairs(vim.lsp.get_active_clients()) do + if client.name == "intelephense" and client.attached_buffers[args.buf] then + vim.api.nvim_buf_set_option(args.buf, "filetype", "blade") + -- update treesitter parser to blade + vim.api.nvim_buf_set_option(args.buf, "syntax", "blade") + break + end + end + end) + end, +}) diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..2c134f7 --- /dev/null +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..78a7a93 --- /dev/null +++ b/dot_config/nvim/lua/config/lazy.lua @@ -0,0 +1,81 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + -- bootstrap lazy.nvim + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + + -- import any extras modules here + + -- coding + { import = "lazyvim.plugins.extras.coding.yanky" }, + + -- editor + { import = "lazyvim.plugins.extras.editor.aerial" }, + { import = "lazyvim.plugins.extras.editor.leap" }, + { import = "lazyvim.plugins.extras.editor.navic" }, + + -- formatting + { import = "lazyvim.plugins.extras.formatting.prettier" }, + + -- lang + { import = "lazyvim.plugins.extras.lang.json" }, + { import = "lazyvim.plugins.extras.lang.markdown" }, + { import = "lazyvim.plugins.extras.lang.python" }, + { import = "lazyvim.plugins.extras.lang.ruby" }, + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.yaml" }, + + -- linting + { import = "lazyvim.plugins.extras.linting.eslint" }, + + -- lsp + { import = "lazyvim.plugins.extras.lsp.none-ls" }, + + -- test + { import = "lazyvim.plugins.extras.test.core" }, + + -- ui + { import = "lazyvim.plugins.extras.ui.mini-animate" }, + + -- util + { import = "lazyvim.plugins.extras.util.dot" }, + { import = "lazyvim.plugins.extras.util.mini-hipatterns" }, + { import = "lazyvim.plugins.extras.util.project" }, + + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "catppuccin-macchiato", "tokyonight", "habamax" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/dot_config/nvim/lua/config/options.lua b/dot_config/nvim/lua/config/options.lua new file mode 100644 index 0000000..e8fffe0 --- /dev/null +++ b/dot_config/nvim/lua/config/options.lua @@ -0,0 +1,29 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here + +vim.o.shiftwidth = 0 +vim.o.tabstop = 2 +vim.o.expandtab = true + +vim.o.textwidth = 80 +vim.o.colorcolumn = "+1" + +vim.o.number = true +vim.o.relativenumber = true + +vim.o.wrap = false + +vim.g.diffopt = "filler,vertical,closeoff,internal" + +vim.filetype.add({ + extension = { + env = "conf", + }, + filename = { + [".env"] = "conf", + }, + pattern = { + ["%.env%.[%w_.-]+"] = "conf", + }, +}) diff --git a/dot_config/nvim/lua/config/tabset.lua b/dot_config/nvim/lua/config/tabset.lua new file mode 100644 index 0000000..5ed5585 --- /dev/null +++ b/dot_config/nvim/lua/config/tabset.lua @@ -0,0 +1,11 @@ +return { + defaults = { + tabwidth = 2, + expandtab = true, + }, + languages = { + fish = { + tabwidth = 4, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/beacon.lua b/dot_config/nvim/lua/plugins/beacon.lua new file mode 100644 index 0000000..7763a30 --- /dev/null +++ b/dot_config/nvim/lua/plugins/beacon.lua @@ -0,0 +1,9 @@ +return { + { + "rainbowhxch/beacon.nvim", + event = "CursorMoved", + cond = function() + return not vim.g.neovide + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/chezmoi-vim.lua b/dot_config/nvim/lua/plugins/chezmoi-vim.lua new file mode 100644 index 0000000..4d06f5d --- /dev/null +++ b/dot_config/nvim/lua/plugins/chezmoi-vim.lua @@ -0,0 +1,9 @@ +return { + 'alker0/chezmoi.vim', + lazy = false, + init = function() + -- This option is required. + vim.g['chezmoi#use_tmp_buffer'] = true + -- add other options here if needed. + end, +} diff --git a/dot_config/nvim/lua/plugins/conform.lua b/dot_config/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..454080d --- /dev/null +++ b/dot_config/nvim/lua/plugins/conform.lua @@ -0,0 +1,59 @@ +local util = require("conform.util") + +return { + { + "stevearc/conform.nvim", + + -- @class ConformOpts + opts = { + formatters_by_ft = { + -- lua + lua = { "stylua" }, + + -- data/conf + sql = { "prettier" }, + json = { "prettier" }, + toml = { "taplo" }, + yaml = { "prettier" }, + + -- web + html = { "prettier" }, + liquid = { "prettier" }, + css = { "stylelint", "prettier" }, + scss = { "stylelint", "prettier" }, + javascript = { "eslint", "prettier" }, + typescript = { "eslint", "prettier" }, + vue = { "eslint", "prettier" }, + markdown = { "prettier" }, + + -- php + php = { "pint" }, + blade = { "blade-formatter", "rustywind" }, + + -- shell + sh = { "shellcheck", "shfmt" }, + fish = { "fish_indent" }, + + -- misc + ruby = { "prettier" }, + }, + formatters = { + shfmt = { + prepend_args = { "--indent=2", "--case-indent", "--binary-next-line", "--func-next-line" }, + }, + pint = { + meta = { + url = "https://github.com/laravel/pint", + description = "Laravel Pint is an opinionated PHP code style fixer for minimalists. Pint is built on top of PHP-CS-Fixer and makes it simple to ensure that your code style stays clean and consistent.", + }, + command = util.find_executable({ + vim.fn.stdpath("data") .. "/mason/bin/pint", + "vendor/bin/pint", + }, "pint"), + args = { "$FILENAME" }, + stdin = false, + }, + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/cutlass.lua b/dot_config/nvim/lua/plugins/cutlass.lua new file mode 100644 index 0000000..385fd12 --- /dev/null +++ b/dot_config/nvim/lua/plugins/cutlass.lua @@ -0,0 +1,15 @@ +return { + { + "gbprod/cutlass.nvim", + event = "BufReadPost", + opts = { + cut_key = "x", + override_del = true, + registers = { + select = "_", + delete = "_", + change = "_", + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/diffview.lua b/dot_config/nvim/lua/plugins/diffview.lua new file mode 100644 index 0000000..9ab05d8 --- /dev/null +++ b/dot_config/nvim/lua/plugins/diffview.lua @@ -0,0 +1,6 @@ +return { + { + "sindrets/diffview.nvim", + config = true, + }, +} diff --git a/dot_config/nvim/lua/plugins/dim.lua b/dot_config/nvim/lua/plugins/dim.lua new file mode 100644 index 0000000..afec06b --- /dev/null +++ b/dot_config/nvim/lua/plugins/dim.lua @@ -0,0 +1,7 @@ +return { + { + "0oAstro/dim.lua", + event = "LspAttach", + config = true, + }, +} diff --git a/dot_config/nvim/lua/plugins/example.lua b/dot_config/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..6859c0e --- /dev/null +++ b/dot_config/nvim/lua/plugins/example.lua @@ -0,0 +1,265 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- add symbols-outline + { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + config = true, + }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add telescope-fzf-native + { + "telescope.nvim", + dependencies = { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + config = function() + require("telescope").load_extension("fzf") + end, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, "😄") + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, + + -- Use for completion and snippets (supertab) + -- first: disable default and behavior in LuaSnip + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, + -- then: setup supertab in cmp + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-emoji", + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + + local luasnip = require("luasnip") + local cmp = require("cmp") + + opts.mapping = vim.tbl_extend("force", opts.mapping, { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- this way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }) + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/gitsigns.lua b/dot_config/nvim/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..d6b52c2 --- /dev/null +++ b/dot_config/nvim/lua/plugins/gitsigns.lua @@ -0,0 +1,8 @@ +return { + { + "lewis6991/gitsigns.nvim", + dependencies = { + "sindrets/diffview.nvim", + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/lazygit.lua b/dot_config/nvim/lua/plugins/lazygit.lua new file mode 100644 index 0000000..c898cc8 --- /dev/null +++ b/dot_config/nvim/lua/plugins/lazygit.lua @@ -0,0 +1,6 @@ +return { + { + "kdheepak/lazygit.nvim", + cmd = "LazyGit", + }, +} diff --git a/dot_config/nvim/lua/plugins/lazyvim.lua b/dot_config/nvim/lua/plugins/lazyvim.lua new file mode 100644 index 0000000..84bb0c8 --- /dev/null +++ b/dot_config/nvim/lua/plugins/lazyvim.lua @@ -0,0 +1,8 @@ +return { + { + "LazyVim/LazyVim", + opts = { + colorscheme = "catppuccin-macchiato", + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/luasnip.lua b/dot_config/nvim/lua/plugins/luasnip.lua new file mode 100644 index 0000000..304ff2c --- /dev/null +++ b/dot_config/nvim/lua/plugins/luasnip.lua @@ -0,0 +1,14 @@ +return { + { + "L3MON4D3/LuaSnip", + keys = { { "" } }, + opts = { + store_selection_keys = "", + }, + config = function(_, opts) + require("luasnip").setup(opts) + + require("luasnip.loaders.from_lua").lazy_load({ lazy_paths = { "~/.config/nvim/lua/snippets" } }) + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/mason-lspconfig.lua b/dot_config/nvim/lua/plugins/mason-lspconfig.lua new file mode 100644 index 0000000..5564054 --- /dev/null +++ b/dot_config/nvim/lua/plugins/mason-lspconfig.lua @@ -0,0 +1,12 @@ +return { + { + "williamboman/mason-lspconfig.nvim", + dependencies = { + "williamboman/mason.nvim", + "neovim/nvim-lspconfig", + }, + opts = { + automatic_installation = true, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/mason.lua b/dot_config/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..72d030c --- /dev/null +++ b/dot_config/nvim/lua/plugins/mason.lua @@ -0,0 +1,24 @@ +return { + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + -- general + "commitlint", + "prettier", + + -- data/conf + "yamllint", + + -- php + "blade-formatter", + "pint", + "rustywind", + + -- shell + "shellcheck", + "shfmt", + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/neo-tree.lua b/dot_config/nvim/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..067f2b3 --- /dev/null +++ b/dot_config/nvim/lua/plugins/neo-tree.lua @@ -0,0 +1,18 @@ +return { + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + close_if_last_window = true, + window = { + width = 30, + }, + filesystem = { + filtered_items = { + hide_dotfiles = false, + hide_gitignored = false, + hide_hidden = false, + }, + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nerdy.lua b/dot_config/nvim/lua/plugins/nerdy.lua new file mode 100644 index 0000000..aead6dc --- /dev/null +++ b/dot_config/nvim/lua/plugins/nerdy.lua @@ -0,0 +1,9 @@ +return { + { + "2kabhishek/nerdy.nvim", + cmd = "Nerdy", + keys = { + { "ci", "Nerdy", desc = "Pick Icon" }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-cmp.lua b/dot_config/nvim/lua/plugins/nvim-cmp.lua new file mode 100644 index 0000000..4599e44 --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-cmp.lua @@ -0,0 +1,31 @@ +local cmp = require("cmp") + +return { + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + opts = function(_, opts) + opts.mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + cmp.abort() + fallback() + end, + }) + + table.insert(opts.sources, { name = "emoji" }) + + return opts + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-devdocs.lua b/dot_config/nvim/lua/plugins/nvim-devdocs.lua new file mode 100644 index 0000000..134797c --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-devdocs.lua @@ -0,0 +1,36 @@ +return { + { + "luckasRanarison/nvim-devdocs", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "nvim-treesitter/nvim-treesitter", + }, + opts = { + ensure_installed = { + "bash", + "bootstrap~5", + "css", + "eslint", + "fish~3.7", + "html", + "http", + "javascript", + "laravel~10", + "liquid", + "lodash~4", + "lua~5.4", + "markdown", + "nginx", + "node", + "php", + "postgresql~16", + "sass", + "typescript", + "vite", + "vue~3", + "dom", + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-emmet.lua b/dot_config/nvim/lua/plugins/nvim-emmet.lua new file mode 100644 index 0000000..7494ebf --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-emmet.lua @@ -0,0 +1,9 @@ +return { + { + "olrtg/nvim-emmet", + config = function() + vim.keymap.set({ "n", "v" }, "xe", require("nvim-emmet").wrap_with_abbreviation) + end, + ft = { "html", "css", "scss", "vue" }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-lint.lua b/dot_config/nvim/lua/plugins/nvim-lint.lua new file mode 100644 index 0000000..fdfe2f9 --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-lint.lua @@ -0,0 +1,21 @@ +return { + { + "mfussenegger/nvim-lint", + opts = { + linters_by_ft = { + gitcommit = { "commitlint" }, + sql = { "sqlfluff" }, + yaml = { "yamllint" }, + bash = { "shellcheck" }, + sh = { "shellcheck" }, + }, + linters = { + commitlint = { + args = { + "--config ~/.config/git/commitlint.config.js", + }, + }, + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-lspconfig.lua b/dot_config/nvim/lua/plugins/nvim-lspconfig.lua new file mode 100644 index 0000000..99a7c53 --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-lspconfig.lua @@ -0,0 +1,86 @@ +return { + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + servers = { + -- data/conf + sqlls = {}, + taplo = {}, + + -- web + html = { + filetypes = { "html", "liquid" }, + }, + css_variables = { mason = false }, + cssls = {}, + denols = {}, + volar = { + filetypes = { + "typescript", + "javascript", + "javascriptreact", + "typescriptreact", + "vue", + "json", + }, + }, + stylelint_lsp = { + settings = { + stylelintplus = { + autoFixOnFormat = true, + validateOnSave = true, + validateOnType = false, + }, + }, + }, + emmet_language_server = { + filetypes = { + "css", + "eruby", + "html", + "javascriptreact", + "less", + "sass", + "scss", + "pug", + "typescriptreact", + "vue", + "blade", + }, + -- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration). + -- **Note:** only the options listed in the table are supported. + init_options = { + ---@type table + includeLanguages = {}, + --- @type string[] + excludeLanguages = {}, + --- @type string[] + extensionsPath = {}, + --- @type table [Emmet Docs](https://docs.emmet.io/customization/preferences/) + preferences = {}, + --- @type boolean Defaults to `true` + showAbbreviationSuggestions = true, + --- @type "always" | "never" Defaults to `"always"` + showExpandedAbbreviation = "always", + --- @type boolean Defaults to `false` + showSuggestionsAsSnippets = false, + --- @type table [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/) + syntaxProfiles = {}, + --- @type table [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables) + variables = {}, + }, + }, + + -- php + phpactor = { + filetypes = { "php", "blade" }, + }, + + -- shell + bashls = {}, + pkgbuild_language_server = { mason = false }, + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/nvim-treesitter.lua b/dot_config/nvim/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..8f16f33 --- /dev/null +++ b/dot_config/nvim/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,59 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + -- general + "comment", + + -- git + "diff", + "git_config", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + + -- data/conf + "ini", + "ssh_config", + "toml", + + -- web + "html", + "css", + "scss", + "javascript", + "jsdoc", + "vue", + + -- php + "php_only", + "phpdoc", + + -- shell + "bash", + "fish", + }, + }, + + config = function(_, opts) + ---@class ParserInfo[] + local parser_config = require("nvim-treesitter.parsers").get_parser_configs() + + parser_config.blade = { + install_info = { + url = "https://github.com/EmranMR/tree-sitter-blade", + files = { + "src/parser.c", + }, + generate_requires_npm = true, + requires_generate_from_grammar = true, + }, + filetype = "blade", + } + + require("nvim-treesitter.configs").setup(opts) + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/refactoring.lua b/dot_config/nvim/lua/plugins/refactoring.lua new file mode 100644 index 0000000..153ee7d --- /dev/null +++ b/dot_config/nvim/lua/plugins/refactoring.lua @@ -0,0 +1,10 @@ +return { + { + "ThePrimeagen/refactoring.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + config = true, + }, +} diff --git a/dot_config/nvim/lua/plugins/ssr.lua b/dot_config/nvim/lua/plugins/ssr.lua new file mode 100644 index 0000000..0bb4f9c --- /dev/null +++ b/dot_config/nvim/lua/plugins/ssr.lua @@ -0,0 +1,15 @@ +return { + { + "cshuaimin/ssr.nvim", + keys = { + { + "sR", + function() + require("ssr").open() + end, + mode = { "n", "x" }, + desc = "Structural Replace", + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/tabset.lua b/dot_config/nvim/lua/plugins/tabset.lua new file mode 100644 index 0000000..0d54768 --- /dev/null +++ b/dot_config/nvim/lua/plugins/tabset.lua @@ -0,0 +1,6 @@ +return { + { + "FotiadisM/tabset.nvim", + opts = require("config.tabset"), + }, +} diff --git a/dot_config/nvim/lua/plugins/treesj.lua b/dot_config/nvim/lua/plugins/treesj.lua new file mode 100644 index 0000000..c62e929 --- /dev/null +++ b/dot_config/nvim/lua/plugins/treesj.lua @@ -0,0 +1,10 @@ +return { + { + "Wansmer/treesj", + keys = { "m", "j", "s" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + opts = { + max_join_length = 80, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/vim-blade.lua b/dot_config/nvim/lua/plugins/vim-blade.lua new file mode 100644 index 0000000..fb22e0f --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-blade.lua @@ -0,0 +1,6 @@ +return { + { + "jwalton512/vim-blade", + ft = { "blade" }, + }, +} diff --git a/dot_config/nvim/lua/plugins/vim-dotenv.lua b/dot_config/nvim/lua/plugins/vim-dotenv.lua new file mode 100644 index 0000000..418cd3e --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-dotenv.lua @@ -0,0 +1,6 @@ +return { + { + "tpope/vim-dotenv", + ft = { "dotenv" }, + }, +} diff --git a/dot_config/nvim/lua/plugins/vim-gutentags.lua b/dot_config/nvim/lua/plugins/vim-gutentags.lua new file mode 100644 index 0000000..233721f --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-gutentags.lua @@ -0,0 +1,6 @@ +return { + { + "ludovicchabant/vim-gutentags", + lazy = false, + }, +} diff --git a/dot_config/nvim/lua/plugins/vim-pkgbuild.lua b/dot_config/nvim/lua/plugins/vim-pkgbuild.lua new file mode 100644 index 0000000..e98146b --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-pkgbuild.lua @@ -0,0 +1,6 @@ +return { + { + "m-pilia/vim-pkgbuild", + ft = { "pkgbuild" }, + }, +} diff --git a/dot_config/nvim/lua/plugins/vim-tmux-navigator.lua b/dot_config/nvim/lua/plugins/vim-tmux-navigator.lua new file mode 100644 index 0000000..ce695d8 --- /dev/null +++ b/dot_config/nvim/lua/plugins/vim-tmux-navigator.lua @@ -0,0 +1,19 @@ +return { + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, +} diff --git a/dot_config/nvim/lua/snippets/fish.lua b/dot_config/nvim/lua/snippets/fish.lua new file mode 100644 index 0000000..baec2ee --- /dev/null +++ b/dot_config/nvim/lua/snippets/fish.lua @@ -0,0 +1,104 @@ +local ls = require("luasnip") +local s = ls.snippet +local t = ls.text_node +local i = ls.insert_node +local f = ls.function_node +local fmt = require("luasnip.extras.fmt").fmt +local fill = require("snippets.helpers").fill + +return { + s({ trig = "dc", desc = "divider comment" }, f(fill, {}, { user_args = { "#%- " } })), + + s({ trig = "#!", desc = "shebang" }, t("#!/usr/bin/env fish")), + + s( + { trig = "if", desc = "if ... end" }, + fmt( + [[ + if {} + {} + end + ]], + { i(1), i(0) } + ) + ), + + s( + { trig = "elif", desc = "else if ..." }, + fmt( + [[ + else if {} + {} + ]], + { i(1), i(0) } + ) + ), + + s( + { trig = "fori", desc = "for ... in ... end" }, + fmt( + [[ + for {} in {} + {} + end + ]], + { i(1), i(2), i(0) } + ) + ), + + s( + { trig = "wh", desc = "while ... end" }, + fmt( + [[ + while {} + {} + end + ]], + { i(1), i(0) } + ) + ), + + s( + { trig = "wht", desc = "while true ... end" }, + fmt( + [[ + while true + {} + end + ]], + { i(0) } + ) + ), + + s( + { trig = "sw", desc = "switch ... case ... end" }, + fmt( + [[ + switch {} + case {} + {} + end + ]], + { i(1), i(2), i(0) } + ) + ), + + s( + { trig = "func", desc = "function ... end" }, + fmt( + [[ + function {} + {} + end + ]], + { i(1), i(0) } + ) + ), + + s({ trig = "dn", desc = "&>/dev/null" }, t("&>/dev/null")), + + s( + { trig = "abbr", desc = "abbr -a ... --position ..." }, + fmt('abbr -a {} --position {} "{}"', { i(1), i(2, "command"), i(3) }) + ), +} diff --git a/dot_config/nvim/lua/snippets/gitconfig.lua b/dot_config/nvim/lua/snippets/gitconfig.lua new file mode 100644 index 0000000..088e0ef --- /dev/null +++ b/dot_config/nvim/lua/snippets/gitconfig.lua @@ -0,0 +1,8 @@ +local ls = require("luasnip") +local s = ls.snippet +local f = ls.function_node +local helpers = require("snippets.helpers") + +return { + s({ trig = "dc", desc = "divider comment" }, f(helpers.fill, {}, { user_args = { "#%- " } })), +} diff --git a/dot_config/nvim/lua/snippets/helpers.lua b/dot_config/nvim/lua/snippets/helpers.lua new file mode 100644 index 0000000..03ca79f --- /dev/null +++ b/dot_config/nvim/lua/snippets/helpers.lua @@ -0,0 +1,40 @@ +local ls = require("luasnip") +local sn = ls.snippet_node +local i = ls.insert_node + +local M = {} + +M.fill = function(_, parent, args) + local title = "" + local chars = {} + + if #parent.snippet.env.LS_SELECT_RAW > 0 then + for _, ele in ipairs(parent.snippet.env.LS_SELECT_RAW) do + title = title .. ele .. " " + end + end + + for str in string.gmatch(args, "([^%%]+)") do + table.insert(chars, str) + end + + local snip = chars[1] .. " " .. title + + local _, c = unpack(vim.api.nvim_win_get_cursor(0)) + + while #snip < (vim.bo.tw - c - 1) do + snip = snip .. chars[2] + end + + return snip +end + +M.get_visual = function(_, parent) + if #parent.snippet.env.LS_SELECT_RAW > 0 then + return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW)) + else -- If LS_SELECT_RAW is empty, return a blank insert node + return sn(nil, i(1)) + end +end + +return M diff --git a/dot_config/nvim/lua/snippets/html.lua b/dot_config/nvim/lua/snippets/html.lua new file mode 100644 index 0000000..5a34b0d --- /dev/null +++ b/dot_config/nvim/lua/snippets/html.lua @@ -0,0 +1,29 @@ +local ls = require("luasnip") +local s = ls.snippet +local i = ls.insert_node +local fmt = require("luasnip.extras.fmt").fmt + +return { + s( + { trig = "sd!", desc = "Saudade page" }, + fmt( + [[ + + + + + {} + + + + + + + {} + + + ]], + { i(1), i(0) } + ) + ), +} diff --git a/dot_config/nvim/lua/snippets/lua.lua b/dot_config/nvim/lua/snippets/lua.lua new file mode 100644 index 0000000..1fb0ca2 --- /dev/null +++ b/dot_config/nvim/lua/snippets/lua.lua @@ -0,0 +1,8 @@ +local ls = require("luasnip") +local s = ls.snippet +local f = ls.function_node +local fill = require("snippets.helpers").fill + +return { + s({ trig = "dc", desc = "divider comment" }, f(fill, {}, { user_args = { "--%-- " } })), +} diff --git a/dot_config/nvim/queries/blade/folds.scm b/dot_config/nvim/queries/blade/folds.scm new file mode 100644 index 0000000..0705d92 --- /dev/null +++ b/dot_config/nvim/queries/blade/folds.scm @@ -0,0 +1,8 @@ +((directive_start) @start + (directive_end) @end.after + (#set! role block)) + + +((bracket_start) @start + (bracket_end) @end + (#set! role block)) diff --git a/dot_config/nvim/queries/blade/highlights.scm b/dot_config/nvim/queries/blade/highlights.scm new file mode 100644 index 0000000..2c9c2cd --- /dev/null +++ b/dot_config/nvim/queries/blade/highlights.scm @@ -0,0 +1,4 @@ +(directive) @tag +(directive_start) @tag +(directive_end) @tag +(comment) @comment @spell diff --git a/dot_config/nvim/queries/blade/injections.scm b/dot_config/nvim/queries/blade/injections.scm new file mode 100644 index 0000000..bd3ead0 --- /dev/null +++ b/dot_config/nvim/queries/blade/injections.scm @@ -0,0 +1,15 @@ +((text) @injection.content + (#not-has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language php)) + +((text) @injection.content + (#has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language bash)) + +((php_only) @injection.content + (#set! injection.combined) + (#set! injection.language php_only)) +((parameter) @injection.content + (#set! injection.language php_only)) diff --git a/dot_config/nvim/stylua.toml b/dot_config/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/dot_config/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file diff --git a/dot_config/openrazer/persistence.conf b/dot_config/openrazer/persistence.conf new file mode 100644 index 0000000..6440b21 --- /dev/null +++ b/dot_config/openrazer/persistence.conf @@ -0,0 +1,25 @@ +[PM2038H11502057] +dpi_x = 1800 +dpi_y = 1800 +poll_rate = 500 +logo_active = True +logo_brightness = 75 +logo_effect = spectrum +logo_colors = 0 255 0 0 255 255 0 0 255 +logo_speed = 1 +logo_wave_dir = 1 +scroll_active = True +scroll_brightness = 75 +scroll_effect = spectrum +scroll_colors = 0 255 0 0 255 255 0 0 255 +scroll_speed = 1 +scroll_wave_dir = 1 + +[IO2049F50104914] +backlight_active = True +backlight_brightness = 75 +backlight_effect = wave +backlight_colors = 0 255 0 0 255 255 0 0 255 +backlight_speed = 1 +backlight_wave_dir = 1 + diff --git a/dot_config/openrazer/razer.conf b/dot_config/openrazer/razer.conf new file mode 100644 index 0000000..b4a316b --- /dev/null +++ b/dot_config/openrazer/razer.conf @@ -0,0 +1,23 @@ +[General] +# Verbose logging (logs debug messages - lotsa spam) +verbose_logging = False + + +[Startup] +# Set the sync effects flag to true so any assignment of effects will work across devices +sync_effects_enabled = True + +# Turn off the devices when the systems screensaver kicks in +devices_off_on_screensaver = True + +# Battery notifier +battery_notifier = True + +# Battery notification frequency [s] (0 to disable) +battery_notifier_freq = 600 + +# Battery notifications appear when device reaches this percentage +battery_notifier_percent = 33 + +# Apply effects saved to disk when daemon starts +restore_persistence = False diff --git a/dot_config/packages/all b/dot_config/packages/all new file mode 100644 index 0000000..5cf95f0 --- /dev/null +++ b/dot_config/packages/all @@ -0,0 +1,185 @@ +aic94xx-firmware +alsa-utils +arandr +argparse +asdf-vm +ast-firmware +awesome-git +base +base-devel +bat +bat-extras +bind +bluetuith +bluez +bluez-utils +browsh-bin +btop +catppuccin-cursors-macchiato +catppuccin-gtk-theme-macchiato +cheat-bin +cmake +colord +composer +copyq +cowsay +cpio +ctags +dnsmasq +dunst +efibootmgr +eza +fd +feh +firefox +fish +fontforge +fortune-mod-archlinux +fortune-mod-billwurtz +fzf +gamemode +gd +git +git-delta +git-filter-repo +github-cli +glow +gparted +grub +gum +gvfs-smb +hunspell-en_us +hyfetch +hyphen-en +hyprland +imagemagick +inotify-tools +iptables-nft +jc +jq +lazygit +lib32-gamemode +lib32-vkd3d +libheif +libmythes +libreoffice-fresh +libtransmission +linux +linux-firmware +linux-firmware-qlogic +linux-headers +lolcat +lsof +luarocks +lutris +mailhog-bin +man-db +man-pages +meilisearch +mesa +mopidy +mopidy-alsamixer +mopidy-iris +mopidy-local +mopidy-mpd +mopidy-mpris +mopidy-podcast +mpc +mythes-en +ncmpcpp +neovim +networkmanager +nginx +nm-connection-editor +ntfs-3g +openrazer-daemon +pamixer +papirus-folders-catppuccin-git +papirus-icon-theme +php-fpm +php-mcrypt +php-redis +php-sqlite +php83-iconv +picom-git +pipewire +pipewire-alsa +pipewire-pulse +pkgfile +playerctl +plocate +polkit-kde-agent +postgresql +protonup-qt +python-catppuccin +python-pip +python-pipenv +python-pipx +python-pynvim +qt5-graphicaleffects +qt5-quickcontrols2 +qt5-svg +qt5ct +qt6-wayland +razercommander +re2c +redis +reflector +ripgrep +rofi +rofi-calc +rsync +rust +sddm +shfmt +smbclient +starship +steam +swaylock-effects-git +swww-git +termux-language-server +thunar +timeshift +tmux +topgrade +transmission-cli +transmission-gtk +ttf-apple-emoji +ttf-comic-sans +ttf-fairiesevka +ttf-fairiesevka-propo +ttf-fairiesevka-term +ttf-firacode-nerd +ttf-liberation +ttf-nerd-fonts-symbols +ttfautohint +udisks2 +ufw +unzip +upd72020x-fw +ventoy-bin +vesktop +vkd3d +volta +vulkan-tools +wd719x-firmware +wezterm +wget +wine +wireshark-gtk2 +wishlist-bin +wofi +xclip +xdg-desktop-portal +xdg-desktop-portal-gtk +xdg-desktop-portal-hyprland +xfce4-settings +xorg-server +xorg-server-xephyr +xorg-xinit +xorg-xrandr +xorg-xwayland +xsel +yay +zathura +zathura-pdf-mupdf diff --git a/dot_config/picom.conf b/dot_config/picom.conf new file mode 100644 index 0000000..cef3cc8 --- /dev/null +++ b/dot_config/picom.conf @@ -0,0 +1,498 @@ +################################# +# Animations # +################################# + +animations: false; +animation-stiffness = 125 + +animation-window-mass = 1.0 + +animation-dampening = 18 + +animation-clamping = false + +animation-for-open-window = "zoom"; #open window + +animation-for-unmap-window = "zoom"; #minimize window + +animation-for-workspace-switch-in = "fly-in"; #the windows in the workspace that is coming in + +animation-for-workspace-switch-out = "fly-in"; #the windows in the workspace that are coming out + +animation-for-transient-window = "slide-up"; #popup windows + +################################# +# 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 = 7; +#shadow-radius = 0; +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +#shadow-opacity = 0 + +# 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; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# 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 + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# 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 = 'slop'", + "class_g = 'origin.exe'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# 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 = 10 + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ + "class_g = 'slop'", #maim + "class_g = 'origin.exe'", +] + +# 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 = 0.68; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) + frame-opacity = 1.0 +#frame-opacity = 0.7; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = true; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +active-opacity = 0.92; + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ + "class_g = 'awesome'", + "class_g = 'Cairo-clock'", + "class_g = 'Rofi'", + "class_g = 'firefox'", + "class_g = 'Firefox'", + "class_g = 'VSCodium'", + "class_g = 'feh'", + "class_g = 'Thunar'", + "class_g = 'slop'", + "class_g = 'origin.exe'", + "class_g = 'Virt-manager'", + "class_g = 'discord'", + "class_g = 'steam_app_0'", + "class_g = 'SlimeRancher2.exe'", + "class_g = 'Steam'", + "class_g = 'origin.exe'", + "class_g = 'Minecraft 1.8.9'", + "class_g = 'VirtualBox Machine'", + "class_g = 'Wine'", +]; + +# 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 = [ + "100:class_g= 'awesome'", + "100:class_g= 'Rofi'", + "95:class_g= 'URxvt'", + "100:class_g= 'firefox'", + "100:class_g= 'Firefox'", + "100:class_g= 'VSCodium'", + "100:class_g= 'feh'", + "100:class_g= 'Thunar'", + "100:class_g= 'slop'", + "100:class_g= 'Virt-manager'", + "100:class_g= 'discord'", + "100:class_g= 'steam_app_0'", + "100:class_g= 'Steam'", + "100:class_g= 'origin.exe'", + "100:class_g= 'bf1.exe'", + "100:class_g= 'Minecraft 1.8.9'", + "100:class_g= 'SlimeRancher2.exe'", + "100:class_g= 'VirtualBox Machine'", + "100:class_g= 'Wine'", +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +blur-method = "dual_kawase" +blur-size = 30 +# +# blur-deviation = false + +# 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'", + "class_g = 'origin.exe'", + "class_g = 'slop'", # Very important for screenshot, if set else won't work + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# 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 = "xrender"; +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_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Limit picom to repaint at most once every 1 / 'refresh_rate' second to +# boost performance. This should not be used with +# vsync drm/opengl/opengl-oml +# as they essentially does sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +# +# sw-opti = + +# 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. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true + +# 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 = false + +# 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 = tue + +# 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. +# +# 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 = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; + +corner-radius = 12.0; +round-borders = 1; +rounded-corners-exclude = [ + "class_g = 'polybar'", + "class_g = 'awesome'", + "class_g = 'origin.exe'", + "window_type = 'dock'" +]; diff --git a/dot_config/qalculate/qalc.cfg b/dot_config/qalculate/qalc.cfg new file mode 100644 index 0000000..0397b91 --- /dev/null +++ b/dot_config/qalculate/qalc.cfg @@ -0,0 +1,84 @@ + +[General] +version=4.9.0 +save_mode_on_exit=1 +save_definitions_on_exit=1 +clear_history_on_exit=0 +ignore_locale=0 +colorize=1 +auto_update_exchange_rates=-1 +spacious=1 +vertical_space=1 +excessive_parenthesis=0 +short_multiplication=1 +use_unicode_signs=1 +use_unicode_exponents=1 +lower_case_numbers=0 +duodecimal_symbols=0 +lower_case_e=0 +imaginary_j=0 +base_display=1 +twos_complement=1 +hexadecimal_twos_complement=0 +spell_out_logical_operators=1 +digit_grouping=0 +decimal_comma=-1 +dot_as_separator=-1 +comma_as_separator=0 +multiplication_sign=2 +division_sign=0 + +[Mode] +min_deci=0 +use_min_deci=0 +max_deci=2 +use_max_deci=0 +precision=10 +interval_arithmetic=1 +interval_display=0 +min_exp=-1 +negative_exponents=0 +sort_minus_last=1 +number_fraction_format=-1 +complex_number_form=0 +use_prefixes=1 +use_prefixes_for_all_units=0 +use_prefixes_for_currencies=0 +use_binary_prefixes=0 +abbreviate_names=1 +all_prefixes_enabled=0 +denominator_prefix_enabled=1 +place_units_separately=1 +auto_post_conversion=3 +mixed_units_conversion=3 +local_currency_conversion=1 +number_base=10 +number_base_expression=10 +read_precision=0 +assume_denominators_nonzero=1 +warn_about_denominators_assumed_nonzero=1 +structuring=1 +angle_unit=1 +caret_as_xor=0 +concise_uncertainty_input=0 +functions_enabled=1 +variables_enabled=1 +calculate_variables=1 +calculate_functions=1 +variable_units_enabled=1 +sync_units=1 +unknownvariables_enabled=0 +units_enabled=1 +allow_complex=1 +allow_infinite=1 +indicate_infinite_series=0 +show_ending_zeroes=1 +rounding_mode=0 +approximation=-1 +interval_calculation=1 +in_rpn_mode=0 +rpn_syntax=0 +limit_implicit_multiplication=0 +parsing_mode=0 +default_assumption_type=4 +default_assumption_sign=0 diff --git a/dot_config/razercommander/macro_logic.json b/dot_config/razercommander/macro_logic.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/dot_config/razercommander/macro_logic.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/dot_config/razercommander/profiles b/dot_config/razercommander/profiles new file mode 100644 index 0000000..0176222 --- /dev/null +++ b/dot_config/razercommander/profiles @@ -0,0 +1 @@ +[{"name": "Empty", "colors": [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]}, {"name": "ESO", "colors": [[0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.9019607843137255, 0.3803921568627451, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.0, 0.0, 0.0], [0.9019607843137255, 0.3803921568627451, 0.0], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.9019607843137255, 0.3803921568627451, 0.0], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.9019607843137255, 0.3803921568627451, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.7529411764705882, 0.10980392156862745, 0.1568627450980392], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.9019607843137255, 0.3803921568627451, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.9019607843137255, 0.3803921568627451, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.5058823529411764, 0.23921568627450981, 0.611764705882353], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355], [0.1803921568627451, 0.7607843137254902, 0.49411764705882355]]}] \ No newline at end of file diff --git a/dot_config/rofi/config.rasi b/dot_config/rofi/config.rasi new file mode 100644 index 0000000..8719876 --- /dev/null +++ b/dot_config/rofi/config.rasi @@ -0,0 +1,29 @@ +configuration { + modi: "window,run,drun,calc"; + icon-theme: "Papirus"; + show-icons: true; + terminal: "wezterm"; + drun-display-format: "{icon} {name}"; + location: 0; + disable-history: false; + hide-scrollbar: true; + display-drun: "  Apps "; + display-run: "  Run "; + display-window: " 󰕰 Window "; + display-Network: " 󰤨 Network "; + display-calc: " 󰪚 Calc "; + sidebar-mode: true; +} + +@theme "catppuccin-macchiato" + +* { + blue: #f5bde6; + border-col: @blue; + font: "FairiesevkaSans Nerd Font Propo 12"; +} + +window { + border: 1px; + border-radius: 12px; +} diff --git a/dot_config/starship.toml b/dot_config/starship.toml new file mode 100644 index 0000000..aa7775e --- /dev/null +++ b/dot_config/starship.toml @@ -0,0 +1,215 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +palette = "catppuccin_mocha" + +[character] +success_symbol = "[[](pink) ](green)" +error_symbol = "[❯](red)" +vimcmd_symbol = "[❮](green)" +vimcmd_replace_one_symbol = "[❮](green)" +vimcmd_replace_symbol = "[❮](green)" +vimcmd_visual_symbol = "[❮](peach)" + +[status] +disabled = false +style = 'red' +symbol = '✗' +not_executable_symbol = '' +not_found_symbol = '' +sigint_symbol = '󱠰' +signal_symbol = '󱐋' + +[sudo] +disabled = false +style = 'blue' +symbol = '󰌋 ' + +[palettes.catppuccin_mocha] +rosewater = "#f5e0dc" +flamingo = "#f2cdcd" +pink = "#f5c2e7" +mauve = "#cba6f7" +red = "#f38ba8" +maroon = "#eba0ac" +peach = "#fab387" +yellow = "#f9e2af" +green = "#a6e3a1" +teal = "#94e2d5" +sky = "#89dceb" +sapphire = "#74c7ec" +blue = "#89b4fa" +lavender = "#b4befe" +text = "#cdd6f4" +subtext1 = "#bac2de" +subtext0 = "#a6adc8" +overlay2 = "#9399b2" +overlay1 = "#7f849c" +overlay0 = "#6c7086" +surface2 = "#585b70" +surface1 = "#45475a" +surface0 = "#313244" +base = "#1e1e2e" +mantle = "#181825" +crust = "#11111b" + +# Presets - NerdFonts +[aws] +symbol = " " + +[buf] +symbol = " " + +[c] +symbol = " " + +[conda] +symbol = " " + +[crystal] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " 󰌾" + +[docker_context] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[fennel] +symbol = " " + +[fossil_branch] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[guix_shell] +symbol = " " + +[haskell] +symbol = " " + +[haxe] +symbol = " " + +[hg_branch] +symbol = " " + +[hostname] +ssh_symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[kotlin] +symbol = " " + +[lua] +symbol = " " + +[memory_usage] +symbol = "󰍛 " + +[meson] +symbol = "󰔷 " + +[nim] +symbol = "󰆥 " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[ocaml] +symbol = " " + +[os.symbols] +Alpaquita = " " +Alpine = " " +Amazon = " " +Android = " " +Arch = " " +Artix = " " +CentOS = " " +Debian = " " +DragonFly = " " +Emscripten = " " +EndeavourOS = " " +Fedora = " " +FreeBSD = " " +Garuda = "󰛓 " +Gentoo = " " +HardenedBSD = "󰞌 " +Illumos = "󰈸 " +Linux = " " +Mabox = " " +Macos = " " +Manjaro = " " +Mariner = " " +MidnightBSD = " " +Mint = " " +NetBSD = " " +NixOS = " " +OpenBSD = "󰈺 " +openSUSE = " " +OracleLinux = "󰌷 " +Pop = " " +Raspbian = " " +Redhat = " " +RedHatEnterprise = " " +Redox = "󰀘 " +Solus = "󰠳 " +SUSE = " " +Ubuntu = " " +Unknown = " " +Windows = "󰍲 " + +[package] +symbol = "󰏗 " + +[perl] +symbol = " " + +[php] +symbol = " " + +[pijul_channel] +symbol = " " + +[python] +symbol = " " + +[rlang] +symbol = "󰟔 " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[scala] +symbol = " " + +[swift] +symbol = " " + +[zig] +symbol = " " diff --git a/dot_config/tmux/tmux.conf b/dot_config/tmux/tmux.conf new file mode 100644 index 0000000..f5c4387 --- /dev/null +++ b/dot_config/tmux/tmux.conf @@ -0,0 +1,151 @@ +################################################################################ +# Plugins # +################################################################################ + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +#set -g @plugin 'tmux-plugins/tmux-resurrect' +#set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'catppuccin/tmux' + +################################################################################ +# General # +################################################################################ + +# Set shell to fish. +set -g default-shell /bin/fish + +# Make window index start at 1. +set -g base-index 1 + +# Make pane index start at 1. +setw -g pane-base-index 1 + +# Automatically renumber windows when one is deleted. +set -g renumber-windows on + +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",*:RGB" + +set -g @continuum-boot 'on' +set -g @continuum-restore 'on' + +################################################################################ +# Key Mappings # +################################################################################ + +# Remap prefix. +unbind C-b +set-option -g prefix C-a +bind C-a send-prefix + +# Easy reload config. +bind r source-file ~/.config/tmux/tmux.conf \; display-message "Reloaded ~/.config/tmux/tmux.conf" + +# Better split commands. +bind -N 'vsplit' | split-window -h -c "#{pane_current_path}" +bind -N 'vsplit' \\ split-window -h -c "#{pane_current_path}" +bind -N 'hsplit' - split-window -v -c "#{pane_current_path}" +unbind '"' +unbind % + +# Smart pane switching with awareness of vim/fzf. +IS_VIM="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +IS_FZF="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'" + +bind -n -N 'Switch to pane (left)' C-h if-shell "${IS_VIM} || ${IS_FZF}" 'send C-h' 'select-pane -L' +bind -n -N 'Switch to pane (down)' C-j if-shell "${IS_VIM} || ${IS_FZF}" 'send C-j' 'select-pane -D' +bind -n -N 'Switch to pane (up)' C-k if-shell "${IS_VIM} || ${IS_FZF}" 'send C-k' 'select-pane -U' +bind -n -N 'Switch to pane (right)' C-l if-shell "${IS_VIM} || ${IS_FZF}" 'send C-l' 'select-pane -R' + +# Copy-mode. +bind -T copy-mode-vi -N 'Copy mode: switch to pane (left)' C-h if-shell "${IS_VIM} || ${IS_FZF}" 'send C-h' 'select-pane -L' +bind -T copy-mode-vi -N 'Copy mode: Switch to pane (down)' C-j if-shell "${IS_VIM} || ${IS_FZF}" 'send C-j' 'select-pane -D' +bind -T copy-mode-vn -N 'Copy mode: Switch to pane (up)' C-k if-shell "${IS_VIM} || ${IS_FZF}" 'send C-k' 'select-pane -U' +bind -T copy-mode-vn -N 'Copy mode: Switch to pane (right)' C-l if-shell "${IS_VIM} || ${IS_FZF}" 'send C-l' 'select-pane -R' + +# Vi-like resizing. +bind -r -N 'Resize pane (left)' M-h resize-pane -L 5 +bind -r -N 'Resize pane (down)' M-j resize-pane -D 5 +bind -r -N 'Resize pane (up)' M-k resize-pane -U 5 +bind -r -N 'Resize pane (right)' M-l resize-pane -R 5 + +# Even out panes. +bind -N 'Evenly distribute panes' = select-layout -E + +# Swap panes. +bind -r -N 'Swap current pane with the next' H swap-pane -U +bind -r -N 'Swap current pane with the previous' L swap-pane -D + +# Window switching. +bind -N 'Previous window' Left previous-window +bind -N 'Next window' Right next-window + +# Popup. +unbind i +bind -N 'Popup shell' i if-shell -F '#{==:#{session_name},scratch}' { + detach-client + } { + if-shell "tmux has-session -t scratch" { + display-popup -E -h 90% -w 90% "tmux attach-session -t scratch" + } { + display-popup -E -h 90% -w 90% "tmux new-session -d -c '#{pane_current_path}' -s scratch && tmux set-option -t scratch status off && tmux attach-session -t scratch" + } +} + +# Vi copy mode. +setw -g mode-keys vi +set -g set-clipboard external + +unbind [ +bind -N 'Enter normal (copy) mode' Escape copy-mode + +unbind p +bind p paste-buffer + +bind -T copy-mode-vi v send -X begin-selection +bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'copyq copy -' +bind -T copy-mode-vi ? command-prompt -p '?' 'send -X search-backward %1' +bind -T copy-mode-vi / command-prompt -p '/' 'send -X search-forward %1' +bind -T copy-mode-vi q send -X cancel +bind -T copy-mode-vi Escape if-shell -F '#{selection_present}' 'send -X clear-selection' 'send -X cancel' + +################################################################################ +# Catppuccin # +################################################################################ + +# catppuccin +set -g @catppuccin_flavour 'macchiato' + +set -g @catppuccin_window_left_separator "" +set -g @catppuccin_window_right_separator " " +set -g @catppuccin_window_middle_separator " █" +set -g @catppuccin_window_number_position "right" + +set -g @catppuccin_window_default_fill "number" +set -g @catppuccin_window_default_text "#W" + +set -g @catppuccin_window_current_fill "number" +set -g @catppuccin_window_current_text "#W" + +set -g @catppuccin_status_modules_right "directory user host session" +set -g @catppuccin_status_left_separator " " +set -g @catppuccin_status_right_separator "" +set -g @catppuccin_status_right_separator_inverse "no" +set -g @catppuccin_status_fill "icon" +set -g @catppuccin_status_connect_separator "no" + +set -g @catppuccin_directory_text "#{pane_current_path}" +set -g @catppuccin_date_time_text "%b %d • %I:%M %p" + +################################################################################ +# tpm # +################################################################################ + +# Install tpm if not already installed. +if "test ! -d ~/.config/tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'" + +# Init tmux plugin manager. +# Must be very last line!! +run '~/.config/tmux/plugins/tpm/tpm' diff --git a/dot_config/topgrade.d/00-misc.toml b/dot_config/topgrade.d/00-misc.toml new file mode 100644 index 0000000..263e024 --- /dev/null +++ b/dot_config/topgrade.d/00-misc.toml @@ -0,0 +1,68 @@ +[misc] +# Run `sudo -v` to cache credentials at the start of the run +# This avoids a blocking password prompt in the middle of an unattended run +# (default: false) +# pre_sudo = false + +# Sudo command to be used +# sudo_command = "sudo" + +# Disable specific steps - same options as the command line flag +disable = ["pnpm"] + +# Ignore failures for these steps +# ignore_failures = ["powershell"] + +# List of remote machines with Topgrade installed on them +# remote_topgrades = ["toothless", "pi", "parnas"] + +# Path to Topgrade executable on remote machines +# remote_topgrade_path = ".cargo/bin/topgrade" + +# Arguments to pass to SSH when upgrading remote systems +# ssh_arguments = "-o ConnectTimeout=2" + +# Arguments to pass tmux when pulling Repositories +# tmux_arguments = "-S /var/tmux.sock" + +# Do not set the terminal title (default: true) +# set_title = true + +# Display the time in step titles (default: true) +# display_time = true + +# Don't ask for confirmations (no default value) +# assume_yes = true + +# Do not ask to retry failed steps (default: false) +# no_retry = true + +# Run inside tmux (default: false) +# run_in_tmux = true + +# Cleanup temporary or old files (default: false) +cleanup = true + +# Send a notification for every step (default: false) +# notify_each_step = false + +# Skip sending a notification at the end of a run (default: false) +# skip_notify = true + +# The Bash-it branch to update (default: "stable") +# bashit_branch = "stable" + +# Run specific steps - same options as the command line flag +# only = ["system", "emacs"] + +# Whether to self update +# +# this will be ignored if the binary is built without self update support +# +# available also via setting the environment variable TOPGRADE_NO_SELF_UPGRADE) +# no_self_update = true + +# Extra tracing filter directives +# These are prepended to the `--log-filter` argument +# See: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives +# log_filters = ["topgrade::command=debug", "warn"] diff --git a/dot_config/topgrade.d/01-commands.toml b/dot_config/topgrade.d/01-commands.toml new file mode 100644 index 0000000..b51b0fc --- /dev/null +++ b/dot_config/topgrade.d/01-commands.toml @@ -0,0 +1,15 @@ +# Commands to run before anything +[pre_commands] +# "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" + + +# Commands to run after anything +[post_commands] +# "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" + + +# Custom commands +[commands] +"Fish Shell Completions" = "fish_update_completions" +"Update dotfiles dependencies" = "dotfiles submodule update --init --recursive" +"Update package list" = "yay -Qeq > ~/.config/packages/all && set_color green && printf '%s'  && set_color normal && printf '%s' ' done\n'" diff --git a/dot_config/topgrade.d/10-brew.toml b/dot_config/topgrade.d/10-brew.toml new file mode 100644 index 0000000..a6e54a4 --- /dev/null +++ b/dot_config/topgrade.d/10-brew.toml @@ -0,0 +1,19 @@ +[brew] +# For the BrewCask step +# If `Repo Cask Upgrade` exists, then use the `-a` option. +# Otherwise, use the `--greedy` option. +# greedy_cask = true + +# For the BrewCask step +# If `Repo Cask Upgrade` does not exist, then use the `--greedy_latest` optoin. +# NOTE: the above entry `greedy_cask` contains this entry, though you can enable +# both of them, they won't clash with each other. +# greedy_latest = true + +# For the BrewFormula step +# Execute `brew autoremove` after the step. +autoremove = true + +# For the BrewFormula step +# Upgrade formulae built from the HEAD branch; `brew upgrade --fetch-HEAD` +# fetch_head = true diff --git a/dot_config/topgrade.d/10-composer.toml b/dot_config/topgrade.d/10-composer.toml new file mode 100644 index 0000000..ab92cec --- /dev/null +++ b/dot_config/topgrade.d/10-composer.toml @@ -0,0 +1,2 @@ +[composer] +# self_update = true diff --git a/dot_config/topgrade.d/10-firmware.toml b/dot_config/topgrade.d/10-firmware.toml new file mode 100644 index 0000000..d96eaba --- /dev/null +++ b/dot_config/topgrade.d/10-firmware.toml @@ -0,0 +1,3 @@ +[firmware] +# Offer to update firmware; if false just check for and display available updates +# upgrade = true diff --git a/dot_config/topgrade.d/10-git.toml b/dot_config/topgrade.d/10-git.toml new file mode 100644 index 0000000..b986166 --- /dev/null +++ b/dot_config/topgrade.d/10-git.toml @@ -0,0 +1,15 @@ +[git] +# How many repos to pull at max in parallel +# max_concurrency = 5 + +# Additional git repositories to pull +# repos = [ +# "~/src/*/", +# "~/.config/something" +# ] + +# Don't pull the predefined git repos +# pull_predefined = false + +# Arguments to pass Git when pulling Repositories +# arguments = "--rebase --autostash" diff --git a/dot_config/topgrade.d/10-linux.toml b/dot_config/topgrade.d/10-linux.toml new file mode 100644 index 0000000..7f8a97f --- /dev/null +++ b/dot_config/topgrade.d/10-linux.toml @@ -0,0 +1,43 @@ +[linux] +# Arch Package Manager to use. +# Allowed values: +# autodetect, aura, garuda_update, pacman, pamac, paru, pikaur, trizen, yay +arch_package_manager = "yay" + +# Arguments to pass yay (or paru) when updating packages +# yay_arguments = "--nodevel" + +# Arguments to pass dnf when updating packages +# dnf_arguments = "--refresh" + +# aura_aur_arguments = "-kx" + +# aura_pacman_arguments = "" +# garuda_update_arguments = "" + +# show_arch_news = true + +# trizen_arguments = "--devel" + +# pikaur_arguments = "" + +# pamac_arguments = "--no-devel" + +# enable_tlmgr = true + +# emerge_sync_flags = "-q" + +# emerge_update_flags = "-uDNa --with-bdeps=y world" + +# redhat_distro_sync = false + +# suse_dup = false + +# rpm_ostree = false + +# nix_arguments = "--flake" + +# nix_env_arguments = "--prebuilt-only" + +# Extra Home Manager arguments +# home_manager_arguments = ["--flake", "file"] diff --git a/dot_config/topgrade.d/10-npm.toml b/dot_config/topgrade.d/10-npm.toml new file mode 100644 index 0000000..f30d57c --- /dev/null +++ b/dot_config/topgrade.d/10-npm.toml @@ -0,0 +1,3 @@ +[npm] +# Use sudo if the NPM directory isn't owned by the current user +# use_sudo = true diff --git a/dot_config/transmission/settings.json b/dot_config/transmission/settings.json new file mode 100644 index 0000000..2f4e827 --- /dev/null +++ b/dot_config/transmission/settings.json @@ -0,0 +1,119 @@ +{ + "alt-speed-down": 50, + "alt-speed-enabled": false, + "alt-speed-time-begin": 540, + "alt-speed-time-day": 127, + "alt-speed-time-enabled": false, + "alt-speed-time-end": 1020, + "alt-speed-up": 50, + "announce-ip": "", + "announce-ip-enabled": false, + "anti-brute-force-enabled": false, + "anti-brute-force-threshold": 100, + "bind-address-ipv4": "0.0.0.0", + "bind-address-ipv6": "::", + "blocklist-enabled": false, + "blocklist-updates-enabled": true, + "blocklist-url": "http://www.example.com/blocklist", + "cache-size-mb": 4, + "compact-view": false, + "default-trackers": "", + "details-window-height": 500, + "details-window-width": 700, + "dht-enabled": true, + "download-dir": "/home/marley/data/piracy", + "download-queue-enabled": true, + "download-queue-size": 5, + "encryption": 1, + "idle-seeding-limit": 30, + "idle-seeding-limit-enabled": false, + "incomplete-dir": "/home/marley/Downloads", + "incomplete-dir-enabled": false, + "inhibit-desktop-hibernation": false, + "lpd-enabled": true, + "main-window-height": 465, + "main-window-is-maximized": false, + "main-window-width": 808, + "main-window-x": 50, + "main-window-y": 50, + "message-level": 4, + "open-dialog-dir": "/home/marley", + "peer-congestion-algorithm": "", + "peer-limit-global": 200, + "peer-limit-per-torrent": 50, + "peer-port": 51413, + "peer-port-random-high": 65535, + "peer-port-random-low": 49152, + "peer-port-random-on-start": false, + "peer-socket-tos": "le", + "pex-enabled": true, + "port-forwarding-enabled": true, + "preallocation": 1, + "prefetch-enabled": true, + "queue-stalled-enabled": true, + "queue-stalled-minutes": 30, + "ratio-limit": 2, + "ratio-limit-enabled": true, + "recent-download-dir-1": "/home/marley/data/piracy", + "recent-download-dir-2": "", + "recent-download-dir-3": "", + "recent-download-dir-4": "", + "rename-partial-files": false, + "rpc-authentication-required": false, + "rpc-bind-address": "0.0.0.0", + "rpc-enabled": false, + "rpc-host-whitelist": "", + "rpc-host-whitelist-enabled": true, + "rpc-password": "{5696d56b762c22da89f3034fd5fea64113da04b9OrSJjgb5", + "rpc-port": 9091, + "rpc-socket-mode": "0750", + "rpc-url": "/transmission/", + "rpc-username": "", + "rpc-whitelist": "127.0.0.1,::1", + "rpc-whitelist-enabled": true, + "scrape-paused-torrents-enabled": true, + "script-torrent-added-enabled": false, + "script-torrent-added-filename": "", + "script-torrent-done-enabled": false, + "script-torrent-done-filename": "", + "script-torrent-done-seeding-enabled": false, + "script-torrent-done-seeding-filename": "", + "seed-queue-enabled": false, + "seed-queue-size": 10, + "show-backup-trackers": false, + "show-extra-peer-details": false, + "show-filterbar": true, + "show-notification-area-icon": false, + "show-options-window": true, + "show-statusbar": true, + "show-toolbar": true, + "show-tracker-scrapes": false, + "sort-mode": "sort-by-name", + "sort-reversed": false, + "speed-limit-down": 100, + "speed-limit-down-enabled": false, + "speed-limit-up": 100, + "speed-limit-up-enabled": false, + "start-added-torrents": true, + "statusbar-stats": "total-ratio", + "tcp-enabled": true, + "torrent-added-notification-enabled": true, + "torrent-added-verify-mode": "fast", + "torrent-complete-notification-enabled": true, + "torrent-complete-sound-command": [ + "canberra-gtk-play", + "-i", + "complete-download", + "-d", + "transmission torrent downloaded" + ], + "torrent-complete-sound-enabled": true, + "trash-can-enabled": true, + "trash-original-torrent-files": false, + "umask": "022", + "upload-slots-per-torrent": 8, + "user-has-given-informed-consent": true, + "utp-enabled": true, + "watch-dir": "/home/marley/Desktop", + "watch-dir-enabled": false +} diff --git a/dot_config/wezterm/wezterm.lua b/dot_config/wezterm/wezterm.lua new file mode 100644 index 0000000..a6ca83d --- /dev/null +++ b/dot_config/wezterm/wezterm.lua @@ -0,0 +1,78 @@ +-- wezterm API +local wezterm = require("wezterm") + +local config = wezterm.config_builder() + +config.color_scheme = "Catppuccin Macchiato" +config.enable_tab_bar = false + +-- config.default_prog = { "/usr/bin/fish" } + +config.enable_wayland = false + +config.font = wezterm.font_with_fallback({ + { family = "FairiesevkaTerm Nerd Font Mono" }, + { + family = "FiraCode Nerd Font", + harfbuzz_features = { + "cv02", + "cv06", + "ss01", + "cv14", + "onum", + "ss04", + "cv18", + "cv31", + "cv30", + "cv25", + "cv26", + "cv32", + "ss06", + "ss07", + }, + }, + { family = "Apple Color Emoji" }, +}) +config.font_size = 11.0 + +config.hyperlink_rules = { + -- Linkify things that look like URLs and the host has a TLD name. + -- + -- Compiled-in default. Used if you don't specify any hyperlink_rules. + { + regex = "\\b\\w+://[\\w.-]+\\.[a-z]{2,15}\\S*\\b", + format = "$0", + }, + + -- linkify email addresses + -- Compiled-in default. Used if you don't specify any hyperlink_rules. + { + regex = [[\b\w+@[\w-]+(\.[\w-]+)+\b]], + format = "mailto:$0", + }, + + -- file:// URI + -- Compiled-in default. Used if you don't specify any hyperlink_rules. + { + regex = [[\bfile://\S*\b]], + format = "$0", + }, + + -- Linkify things that look like URLs with numeric addresses as hosts. + -- E.g. http://127.0.0.1:8000 for a local development server, + -- or http://192.168.1.1 for the web interface of many routers. + { + regex = [[\b\w+://(?:[\d]{1,3}\.){3}[\d]{1,3}\S*\b]], + format = "$0", + }, + + -- Make username/project paths clickable. This implies paths like the following are for GitHub. + -- As long as a full URL hyperlink regex exists above this it should not match a full URL to + -- GitHub or GitLab / BitBucket (i.e. https://gitlab.com/user/project.git is still a whole clickable URL) + { + regex = [[["]?([\w\d]{1}[-\w\d]+)(/){1}([-\w\d\.]+)["]?]], + format = "https://www.github.com/$1/$3", + }, +} + +return config diff --git a/dot_config/wgetrc b/dot_config/wgetrc new file mode 100644 index 0000000..0ba8ac2 --- /dev/null +++ b/dot_config/wgetrc @@ -0,0 +1,18 @@ +# Use the server-provided last modification date, if available. +timestamping = on + +# Wait 60 seconds before timing out. +timeout = 60 + +# Retry a few times when a download fails, but don't overdo it (the default is +# 20!). +tries = 3 + +# Retry even when the connection was refused. +retry_connrefused = on + +# Use the last component of a redirection URL for the local file name. +trust_server_names = on + +# Disguise as IE 9 on Windows 7 +user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) diff --git a/dot_config/yay/config.json b/dot_config/yay/config.json new file mode 100644 index 0000000..77d058b --- /dev/null +++ b/dot_config/yay/config.json @@ -0,0 +1,50 @@ +{ + "aururl": "https://aur.archlinux.org", + "aurrpcurl": "https://aur.archlinux.org/rpc?", + "buildDir": "/home/marley/.cache/yay", + "editor": "", + "editorflags": "", + "makepkgbin": "makepkg", + "makepkgconf": "", + "pacmanbin": "pacman", + "pacmanconf": "/etc/pacman.conf", + "redownload": "no", + "answerclean": "None", + "answerdiff": "Installed", + "answeredit": "", + "answerupgrade": "", + "gitbin": "git", + "gpgbin": "gpg", + "gpgflags": "", + "mflags": "", + "sortby": "votes", + "searchby": "name-desc", + "gitflags": "", + "removemake": "yes", + "sudobin": "sudo", + "sudoflags": "", + "version": "12.3.0", + "requestsplitn": 150, + "completionrefreshtime": 7, + "maxconcurrentdownloads": 1, + "bottomup": true, + "sudoloop": false, + "timeupdate": false, + "devel": false, + "cleanAfter": false, + "keepSrc": false, + "provides": true, + "pgpfetch": true, + "cleanmenu": false, + "diffmenu": false, + "editmenu": false, + "combinedupgrade": true, + "useask": false, + "batchinstall": false, + "singlelineresults": false, + "separatesources": true, + "debug": false, + "rpc": true, + "doubleconfirm": true, + "rebuild": "no" +} diff --git a/dot_config/zathura/zathurarc b/dot_config/zathura/zathurarc new file mode 100644 index 0000000..2b870f7 --- /dev/null +++ b/dot_config/zathura/zathurarc @@ -0,0 +1 @@ +include catppuccin-macchiato diff --git a/dot_icons/default/index.theme b/dot_icons/default/index.theme new file mode 100644 index 0000000..d878bb7 --- /dev/null +++ b/dot_icons/default/index.theme @@ -0,0 +1,2 @@ +[icon theme] +Inherits=Catppuccin-Macchiato-Pink-Cursors diff --git a/dot_plugin-versions b/dot_plugin-versions new file mode 100644 index 0000000..fc960a4 --- /dev/null +++ b/dot_plugin-versions @@ -0,0 +1,3 @@ +# plugin-name git-url git-ref +asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git 0ea8bb5 +php https://github.com/asdf-community/asdf-php.git 1eaf4de diff --git a/dot_screenlayout/executable_multihead.sh b/dot_screenlayout/executable_multihead.sh new file mode 100644 index 0000000..8ea044e --- /dev/null +++ b/dot_screenlayout/executable_multihead.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output DVI-I-0 --off --output DVI-I-1 --off --output HDMI-0 --off --output DP-0 --mode 1920x1200 --pos 0x0 --rotate normal --output DP-1 --off --output DVI-D-0 --mode 1680x1050 --pos 1920x75 --rotate normal --output None-1-1 --off diff --git a/dot_tool-versions b/dot_tool-versions new file mode 100644 index 0000000..53bf93f --- /dev/null +++ b/dot_tool-versions @@ -0,0 +1,2 @@ +asdf-plugin-manager 1.3.0 +php system diff --git a/dot_xprofile b/dot_xprofile new file mode 100644 index 0000000..e4eeab9 --- /dev/null +++ b/dot_xprofile @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap + +if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" +fi + +if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap -merge "$usermodmap" +fi + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh; do + # shellcheck source=/dev/null + [ -x "$f" ] && . "$f" + done + + unset f +fi + +# "$HOME/.screenlayout/multihead.sh" + +copyq & +mopidy & diff --git a/private_dot_bash_history b/private_dot_bash_history new file mode 100644 index 0000000..bdb67b6 --- /dev/null +++ b/private_dot_bash_history @@ -0,0 +1,67 @@ +sudo pacman -S firefox +firefox +clear +sudo pacman -S git +sudo pacman -S openssh +clear +sudo pacman -S gh +mkdir hackin +cd hackin +git clone https://github.com/punkfairie/dotfiles.git +ls ~ +cd dotfiles/ +ls +ls -a +man cp +cp -r .config ~/.config +git branch dotfiles.sh +ls +git checkout dotfiles.sh +ls +cd .. +rm -rf dotfiles/ +git clone https://github.com/punkfairie/dotfiles.git +git switch dotfiles.sh +cd dotfiles +git switch dotfiles.sh +ls +ls -a +cp -r .config ~/.config +ls -a ~` +ls -a ~ +man xclip +cat ~/.ssh/id_ed25519.pub | xclip -clipboard +cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard +cd hackin/dotfiles +git submodule update --init --recursive +cp -r . ~/ +ls -a ~ +rm -rf ~/.git ~/.gitignore ~/.gitconfig ~/.gitmodules +ls -a ~/ +ls -a +ls -a ~/.themes +ls -a ~/.themes/bat/ +ls -a ~/.themes/bat/catppuccin/ +clear +fc-cache +fc-list +fc-list | grep Fairisevka +fc-list | grep Fairiesevka +fc-list | grep Fairiesevka | less +fc-list | grep "Fairiesevka Term" | less +fc-list | grep "Fairiesevka" | less +fc-list +yay -S ttf-fairisevka-term +yay -S ttf-fairiesevka-term +clear +yay -S --needed ttf-fairiesevka-term ttf-fairiesevka-propo +ls -a +nvim .config/nvim/ +ls +ls -a +rm .wakatime .wakatime.bdb .wakatime.cfg +rm -rf .wakatime .wakatime.bdb .wakatime.cfg +clear +which fish +echo "$(which fish)" | sudo tee -a /etc/shells +chsh -s "$(which fish)" diff --git a/private_dot_gnupg/private_common.conf b/private_dot_gnupg/private_common.conf new file mode 100644 index 0000000..5add401 --- /dev/null +++ b/private_dot_gnupg/private_common.conf @@ -0,0 +1 @@ +use-keyboxd diff --git a/private_dot_gnupg/private_gpg-agent.conf b/private_dot_gnupg/private_gpg-agent.conf new file mode 100644 index 0000000..ec6706d --- /dev/null +++ b/private_dot_gnupg/private_gpg-agent.conf @@ -0,0 +1,5 @@ +pinentry-program /usr/bin/pinentry-qt5 + +# Stop asking for password so often. +default-cache-ttl 60480000 +max-cache-ttl 60480000 diff --git a/tags b/tags new file mode 100644 index 0000000..f5e39be --- /dev/null +++ b/tags @@ -0,0 +1,817 @@ +!_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ +!_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ +!_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ +!_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ +!_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ +!_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ +!_TAG_FIELD_DESCRIPTION input /input file/ +!_TAG_FIELD_DESCRIPTION name /tag name/ +!_TAG_FIELD_DESCRIPTION pattern /pattern/ +!_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ +!_TAG_FIELD_DESCRIPTION!XML uri /uri associated with name prefix/ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_KIND_DESCRIPTION!CSS c,class /classes/ +!_TAG_KIND_DESCRIPTION!CSS i,id /identities/ +!_TAG_KIND_DESCRIPTION!CSS s,selector /selectors/ +!_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/ +!_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/ +!_TAG_KIND_DESCRIPTION!JSON a,array /arrays/ +!_TAG_KIND_DESCRIPTION!JSON b,boolean /booleans/ +!_TAG_KIND_DESCRIPTION!JSON n,number /numbers/ +!_TAG_KIND_DESCRIPTION!JSON o,object /objects/ +!_TAG_KIND_DESCRIPTION!JSON s,string /strings/ +!_TAG_KIND_DESCRIPTION!JSON z,null /nulls/ +!_TAG_KIND_DESCRIPTION!Lua f,function /functions/ +!_TAG_KIND_DESCRIPTION!SVG d,def /ids in defs tags/ +!_TAG_KIND_DESCRIPTION!Scheme f,function /functions/ +!_TAG_KIND_DESCRIPTION!Scheme s,set /sets/ +!_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/ +!_TAG_KIND_DESCRIPTION!Sh f,function /functions/ +!_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/ +!_TAG_KIND_DESCRIPTION!Sh s,script /script files/ +!_TAG_KIND_DESCRIPTION!XML i,id /id attributes/ +!_TAG_KIND_DESCRIPTION!XML n,nsprefix /namespace prefixes/ +!_TAG_KIND_DESCRIPTION!XML r,root /root elements/ +!_TAG_KIND_DESCRIPTION!Yaml a,anchor /anchors/ +!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ +!_TAG_OUTPUT_FILESEP slash /slash or backslash/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_OUTPUT_VERSION 0.0 /current.age/ +!_TAG_PARSER_VERSION!CSS 0.0 /current.age/ +!_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/ +!_TAG_PARSER_VERSION!JSON 0.0 /current.age/ +!_TAG_PARSER_VERSION!Lua 0.0 /current.age/ +!_TAG_PARSER_VERSION!SVG 0.0 /current.age/ +!_TAG_PARSER_VERSION!Scheme 0.0 /current.age/ +!_TAG_PARSER_VERSION!Sh 0.0 /current.age/ +!_TAG_PARSER_VERSION!XML 0.0 /current.age/ +!_TAG_PARSER_VERSION!Yaml 0.0 /current.age/ +!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ +!_TAG_PROC_CWD /home/marley/.local/share/chezmoi/ // +!_TAG_PROGRAM_AUTHOR Universal Ctags Team // +!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ +!_TAG_PROGRAM_URL https://ctags.io/ /official site/ +!_TAG_PROGRAM_VERSION 6.1.0 /v6.1.0/ +!_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/ +!_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/ +!_TAG_ROLE_DESCRIPTION!Yaml!anchor alias /alias/ +#TabsToolbar .toolbar-items dot_config/firefox/userChrome.css /^#TabsToolbar .toolbar-items {$/;" c +#nav-bar dot_config/firefox/userChrome.css /^#nav-bar {$/;" i +#navigator-toolbox dot_config/firefox/userChrome.css /^#navigator-toolbox {$/;" i +#sidebar-header dot_config/firefox/userChrome.css /^#sidebar-header {$/;" i +#tabbrowser-tabs dot_config/firefox/userChrome.css /^#tabbrowser-tabs {$/;" i +#titlebar dot_config/firefox/userChrome.css /^#titlebar {$/;" i +#titlebar #TabsToolbar dot_config/firefox/userChrome.css /^#titlebar #TabsToolbar {$/;" i +#titlebar #TabsToolbar .titlebar-spacer dot_config/firefox/userChrome.css /^#titlebar #TabsToolbar .titlebar-spacer {$/;" c +#titlebar #TabsToolbar .titlebar-spacer[type="pre-tabs"] dot_config/firefox/userChrome.css /^#titlebar #TabsToolbar .titlebar-spacer[type="pre-tabs"] {$/;" c +0 dot_config/transmission/settings.json /^ "canberra-gtk-play",$/;" s array:torrent-complete-sound-command +1 dot_config/transmission/settings.json /^ "-i",$/;" s array:torrent-complete-sound-command +2 dot_config/transmission/settings.json /^ "complete-download",$/;" s array:torrent-complete-sound-command +3 dot_config/transmission/settings.json /^ "-d",$/;" s array:torrent-complete-sound-command +4 dot_config/transmission/settings.json /^ "transmission torrent downloaded"$/;" s array:torrent-complete-sound-command +Catppuccin-Macchiato-Standard-Pink-Dark dot_config/gtk-4.0/symlink_gtk-dark.css /^\/usr\/share\/themes\/Catppuccin-Macchiato-Standard-Pink-Dark\/gtk-4.0\/gtk-dark.css$/;" s +Catppuccin-Macchiato-Standard-Pink-Dark dot_config/gtk-4.0/symlink_gtk.css /^\/usr\/share\/themes\/Catppuccin-Macchiato-Standard-Pink-Dark\/gtk-4.0\/gtk.css$/;" s +Copy mode dot_config/tmux/tmux.conf /^bind -T copy-mode-vi -N 'Copy mode: Switch to pane (down)' C-j if-shell "${IS_VIM} || ${IS_FZF}/;" k +Copy mode dot_config/tmux/tmux.conf /^bind -T copy-mode-vi -N 'Copy mode: switch to pane (left)' C-h if-shell "${IS_VIM} || ${IS_FZF}/;" k +Copy mode dot_config/tmux/tmux.conf /^bind -T copy-mode-vn -N 'Copy mode: Switch to pane (right)' C-l if-shell "${IS_VIM} || ${IS_FZF}/;" k +Copy mode dot_config/tmux/tmux.conf /^bind -T copy-mode-vn -N 'Copy mode: Switch to pane (up)' C-k if-shell "${IS_VIM} || ${IS_FZF}/;" k +General dot_config/openrazer/razer.conf /^[General]$/;" s +IO2049F50104914 dot_config/openrazer/persistence.conf /^[IO2049F50104914]$/;" s +IS_FZF dot_config/tmux/tmux.conf /^IS_FZF="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\\\S+\\\\\/)?fzf$'"$/;" k +IS_VIM dot_config/tmux/tmux.conf /^IS_VIM="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\\\S+\\\\\/)?g?(view|n?/;" k +NEWS.md dot_config/nvim/lazyvim.json /^ "NEWS.md": "3314"$/;" s object:news +Notif_center_remove_notif dot_config/awesome/ui/notif-panel/init.lua /^Notif_center_remove_notif = function(box)$/;" f +Notif_center_reset_notifs_container dot_config/awesome/ui/notif-panel/init.lua /^Notif_center_reset_notifs_container = function()$/;" f +PM2038H11502057 dot_config/openrazer/persistence.conf /^[PM2038H11502057]$/;" s +Remember dot_config/awesome/lib/savefloats.lua /^function Remember(c)$/;" f +Restore dot_config/awesome/lib/savefloats.lua /^function Restore(c)$/;" f +Settings dot_config/gtk-3.0/settings.ini /^[Settings]$/;" s +Startup dot_config/openrazer/razer.conf /^[Startup]$/;" s +[""] dot_config/nvim/lua/plugins/nvim-cmp.lua /^ [""] = function(fallback)$/;" f +[""] dot_config/nvim/lua/plugins/example.lua /^ [""] = cmp.mapping(function(fallback)$/;" f +[""] dot_config/nvim/lua/plugins/example.lua /^ [""] = cmp.mapping(function(fallback)$/;" f +_get_widget_geometry dot_config/awesome/helpers/ui.lua /^local function _get_widget_geometry(_hierarchy, widget)$/;" f +abort dot_config/awesome/lib/animation/init.lua /^function animation:abort()$/;" f unknown:animation +add_hover_cursor dot_config/awesome/helpers/ui.lua /^function ui.add_hover_cursor(w, hover_cursor)$/;" f unknown:ui +alsamixer dot_config/mopidy/mopidy.conf /^[alsamixer]$/;" s +alt-speed-down dot_config/transmission/settings.json /^ "alt-speed-down": 50,$/;" n +alt-speed-enabled dot_config/transmission/settings.json /^ "alt-speed-enabled": false,$/;" b +alt-speed-time-begin dot_config/transmission/settings.json /^ "alt-speed-time-begin": 540,$/;" n +alt-speed-time-day dot_config/transmission/settings.json /^ "alt-speed-time-day": 127,$/;" n +alt-speed-time-enabled dot_config/transmission/settings.json /^ "alt-speed-time-enabled": false,$/;" b +alt-speed-time-end dot_config/transmission/settings.json /^ "alt-speed-time-end": 1020,$/;" n +alt-speed-up dot_config/transmission/settings.json /^ "alt-speed-up": 50,$/;" n +animations dot_config/picom.conf /^animations: false;$/;" k +announce-ip dot_config/transmission/settings.json /^ "announce-ip": "",$/;" s +announce-ip-enabled dot_config/transmission/settings.json /^ "announce-ip-enabled": false,$/;" b +answerclean dot_config/yay/config.json /^ "answerclean": "None",$/;" s +answerdiff dot_config/yay/config.json /^ "answerdiff": "Installed",$/;" s +answeredit dot_config/yay/config.json /^ "answeredit": "",$/;" s +answerupgrade dot_config/yay/config.json /^ "answerupgrade": "",$/;" s +anti-brute-force-enabled dot_config/transmission/settings.json /^ "anti-brute-force-enabled": false,$/;" b +anti-brute-force-threshold dot_config/transmission/settings.json /^ "anti-brute-force-threshold": 100,$/;" n +args dot_config/hyfetch.json /^ "args": null,$/;" z +ascii_bold dot_config/neofetch/config.conf /^ascii_bold="on"$/;" k +ascii_colors dot_config/neofetch/config.conf /^ascii_colors=(distro)$/;" k +ascii_distro dot_config/neofetch/config.conf /^ascii_distro="auto"$/;" k +audio dot_config/mopidy/mopidy.conf /^[audio]$/;" s +aurrpcurl dot_config/yay/config.json /^ "aurrpcurl": "https:\/\/aur.archlinux.org\/rpc?",$/;" s +aururl dot_config/yay/config.json /^ "aururl": "https:\/\/aur.archlinux.org",$/;" s +backend dot_config/hyfetch.json /^ "backend": "neofetch",$/;" s +backend dot_config/picom.conf /^backend = "glx";$/;" k +background_color dot_config/neofetch/config.conf /^background_color=$/;" k +background_update dot_config/btop/btop.conf /^background_update = True$/;" k +backlight_active dot_config/openrazer/persistence.conf /^backlight_active = True$/;" k section:IO2049F50104914 +backlight_brightness dot_config/openrazer/persistence.conf /^backlight_brightness = 75$/;" k section:IO2049F50104914 +backlight_colors dot_config/openrazer/persistence.conf /^backlight_colors = 0 255 0 0 255 255 0 0 255$/;" k section:IO2049F50104914 +backlight_effect dot_config/openrazer/persistence.conf /^backlight_effect = wave$/;" k section:IO2049F50104914 +backlight_speed dot_config/openrazer/persistence.conf /^backlight_speed = 1$/;" k section:IO2049F50104914 +backlight_wave_dir dot_config/openrazer/persistence.conf /^backlight_wave_dir = 1$/;" k section:IO2049F50104914 +bar_border dot_config/neofetch/config.conf /^bar_border="on"$/;" k +bar_char_elapsed dot_config/neofetch/config.conf /^bar_char_elapsed="-"$/;" k +bar_char_total dot_config/neofetch/config.conf /^bar_char_total="="$/;" k +bar_color_elapsed dot_config/neofetch/config.conf /^bar_color_elapsed="distro"$/;" k +bar_color_total dot_config/neofetch/config.conf /^bar_color_total="distro"$/;" k +bar_length dot_config/neofetch/config.conf /^bar_length=15$/;" k +base_10_sizes dot_config/btop/btop.conf /^base_10_sizes = False$/;" k +batchinstall dot_config/yay/config.json /^ "batchinstall": false,$/;" b +battery_display dot_config/neofetch/config.conf /^battery_display="off"$/;" k +battery_notifier dot_config/openrazer/razer.conf /^battery_notifier = True$/;" k section:Startup +battery_notifier_freq dot_config/openrazer/razer.conf /^battery_notifier_freq = 600$/;" k section:Startup +battery_notifier_percent dot_config/openrazer/razer.conf /^battery_notifier_percent = 33$/;" k section:Startup +bind-address-ipv4 dot_config/transmission/settings.json /^ "bind-address-ipv4": "0.0.0.0",$/;" s +bind-address-ipv6 dot_config/transmission/settings.json /^ "bind-address-ipv6": "::",$/;" s +block_height dot_config/neofetch/config.conf /^block_height=1$/;" k +block_range dot_config/neofetch/config.conf /^block_range=(0 15)$/;" k +block_width dot_config/neofetch/config.conf /^block_width=3$/;" k +blocklist-enabled dot_config/transmission/settings.json /^ "blocklist-enabled": false,$/;" b +blocklist-updates-enabled dot_config/transmission/settings.json /^ "blocklist-updates-enabled": true,$/;" b +blocklist-url dot_config/transmission/settings.json /^ "blocklist-url": "http:\/\/www.example.com\/blocklist",$/;" s +bold dot_config/neofetch/config.conf /^bold="on"$/;" k +borders dot_config/picom.conf /^round-borders = 1;$/;" k +bottomup dot_config/yay/config.json /^ "bottomup": true,$/;" b +box_widget dot_config/awesome/ui/info-panel/init.lua /^local function box_widget(widgets, _width, _height)$/;" f +buildDir dot_config/yay/config.json /^ "buildDir": "\/home\/marley\/.cache\/yay",$/;" s +cache-size-mb dot_config/transmission/settings.json /^ "cache-size-mb": 4,$/;" n +calculatePAS dot_config/awesome/lib/animation/tween.lua /^local function calculatePAS(p, a, c, d)$/;" f +callback dot_config/awesome/main/menu.lua /^ callback = function()$/;" f +callback dot_config/awesome/signals/cpu.lua /^ callback = function()$/;" f +callback dot_config/awesome/signals/disk.lua /^ callback = function()$/;" f +callback dot_config/awesome/signals/mem.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/info-panel/init.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/notif-panel/init.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/popups/layout/init.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/popups/volume/init.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/top-panel/widgets/clock.lua /^ callback = function()$/;" f +callback dot_config/awesome/ui/top-panel/widgets/date.lua /^ callback = function()$/;" f +callback dot_config/nvim/lua/config/autocmds.lua /^ callback = function()$/;" f +callback dot_config/nvim/lua/config/autocmds.lua /^ callback = function(args)$/;" f +catimg_size dot_config/neofetch/config.conf /^catimg_size="2"$/;" k +cc dot_config/awesome/themes/catppuccin/assets/volume.svg /^ inkscape:version="0.92.4 5da689c313, 2019-01-14">$/;" n uri:http://creativecommons.org/ns# +changed dot_config/awesome/ui/popups/layout/init.lua /^function layout_popup.changed()$/;" f unknown:layout_popup +checkNewParams dot_config/awesome/lib/animation/tween.lua /^local function checkNewParams(_, _, subject, target, easing)$/;" f +checkSubjectAndTargetRecursively dot_config/awesome/lib/animation/tween.lua /^local function checkSubjectAndTargetRecursively(subject, target, path)$/;" f +check_temp dot_config/btop/btop.conf /^check_temp = True$/;" k +clamping dot_config/picom.conf /^animation-clamping = false$/;" k +cleanAfter dot_config/yay/config.json /^ "cleanAfter": false,$/;" b +cleanmenu dot_config/yay/config.json /^ "cleanmenu": false,$/;" b +clock_format dot_config/btop/btop.conf /^clock_format = "%X"$/;" k +codepoint_to_utf8 dot_config/awesome/lib/json.lua /^local function codepoint_to_utf8(n)$/;" f +col_offset dot_config/neofetch/config.conf /^col_offset=49$/;" k +color_align dot_config/hyfetch.json /^ "color_align": {$/;" o +color_blocks dot_config/neofetch/config.conf /^color_blocks="on"$/;" k +color_theme dot_config/btop/btop.conf /^color_theme = "\/home\/marley\/.config\/btop\/themes\/catppuccin_macchiato.theme"$/;" k +colorize_text dot_config/awesome/helpers/ui.lua /^function ui.colorize_text(text, color)$/;" f unknown:ui +colors dot_config/neofetch/config.conf /^colors=(distro)$/;" k +combinedupgrade dot_config/yay/config.json /^ "combinedupgrade": true,$/;" b +compact-view dot_config/transmission/settings.json /^ "compact-view": false,$/;" b +completionrefreshtime dot_config/yay/config.json /^ "completionrefreshtime": 7,$/;" n +cond dot_config/nvim/lua/plugins/beacon.lua /^ cond = function()$/;" f +config dot_config/nvim/lua/plugins/example.lua /^ config = function()$/;" f +config dot_config/nvim/lua/plugins/luasnip.lua /^ config = function(_, opts)$/;" f +config dot_config/nvim/lua/plugins/nvim-emmet.lua /^ config = function()$/;" f +config dot_config/nvim/lua/plugins/nvim-treesitter.lua /^ config = function(_, opts)$/;" f +copyTables dot_config/awesome/lib/animation/tween.lua /^local function copyTables(destination, keysTable, valuesTable)$/;" f +core dot_config/mopidy/mopidy.conf /^[core]$/;" s +corners dot_config/picom.conf /^detect-rounded-corners = true;$/;" k +cpriego/valet-linux dot_config/composer/composer.json /^ "cpriego\/valet-linux": "^2.3"$/;" s object:require +cpu_bottom dot_config/btop/btop.conf /^cpu_bottom = False$/;" k +cpu_brand dot_config/neofetch/config.conf /^cpu_brand="on"$/;" k +cpu_core_map dot_config/btop/btop.conf /^cpu_core_map = ""$/;" k +cpu_cores dot_config/neofetch/config.conf /^cpu_cores="off"$/;" k +cpu_graph_lower dot_config/btop/btop.conf /^cpu_graph_lower = "Auto"$/;" k +cpu_graph_upper dot_config/btop/btop.conf /^cpu_graph_upper = "Auto"$/;" k +cpu_invert_lower dot_config/btop/btop.conf /^cpu_invert_lower = True$/;" k +cpu_sensor dot_config/btop/btop.conf /^cpu_sensor = "Auto"$/;" k +cpu_single_graph dot_config/btop/btop.conf /^cpu_single_graph = False$/;" k +cpu_speed dot_config/neofetch/config.conf /^cpu_speed="off"$/;" k +cpu_temp dot_config/neofetch/config.conf /^cpu_temp="off"$/;" k +create_button dot_config/awesome/lib/exit-screen.lua /^local create_button = function(symbol, hover_color, _, command)$/;" f +create_callback dot_config/awesome/ui/top-panel/widgets/taglist.lua /^ create_callback = function(self, c3, index, _)$/;" f +create_exit_screen dot_config/awesome/lib/exit-screen.lua /^local create_exit_screen = function(s)$/;" f +create_icon dot_config/awesome/helpers/ui.lua /^function ui.create_icon(i, c)$/;" f unknown:ui +create_notif dot_config/awesome/ui/notif-panel/init.lua /^local create_notif = function(icon, n)$/;" f +create_set dot_config/awesome/lib/json.lua /^local function create_set(...)$/;" f +crop_mode dot_config/neofetch/config.conf /^crop_mode="normal"$/;" k +crop_offset dot_config/neofetch/config.conf /^crop_offset="center"$/;" k +current-color-scheme dot_config/awesome/ui/info-panel/weather/icons/weather-clouds-night.svg /^