summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua104
-rwxr-xr-xar/.local/bin/mounter6
-rwxr-xr-xar/.local/bin/statusbar/sb-forecast4
3 files changed, 61 insertions, 53 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
index 7356619..a06c925 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/colorizer.lua
@@ -12,58 +12,66 @@ return {
end,
config = function()
require("colorizer").setup({
- filetypes = { "*" }, -- Filetype options. Accepts table like `user_default_options`
- buftypes = {}, -- Buftype options. Accepts table like `user_default_options`
- -- Boolean | List of usercommands to enable. See User commands section.
- user_commands = true, -- Enable all or some usercommands
- lazy_load = false, -- Lazily schedule buffer highlighting setup function
- user_default_options = {
- names = false, -- "Name" codes like Blue or red. Added from `vim.api.nvim_get_color_map()`
- names_opts = { -- options for mutating/filtering names.
- lowercase = true, -- name:lower(), highlight `blue` and `red`
- camelcase = true, -- name, highlight `Blue` and `Red`
- uppercase = true, -- name:upper(), highlight `BLUE` and `RED`
- strip_digits = false, -- ignore names with digits,
- -- highlight `blue` and `red`, but not `blue3` and `red4`
+ filetypes = { "*" },
+ buftypes = {},
+ user_commands = true,
+ lazy_load = false,
+ options = {
+ parsers = {
+ css = false, -- preset: enables names, hex, rgb, hsl, oklch
+ css_fn = false, -- preset: enables rgb, hsl, oklch
+ names = {
+ enable = false,
+ lowercase = true,
+ camelcase = true,
+ uppercase = true,
+ strip_digits = false,
+ custom = false, -- table|function|false
+ },
+ hex = {
+ default = false, -- default value for format keys (see above)
+ rgb = true, -- #RGB
+ rgba = false, -- #RGBA
+ rrggbb = false, -- #RRGGBB
+ rrggbbaa = false, -- #RRGGBBAA
+ aarrggbb = false, -- 0xAARRGGBB
+ },
+ rgb = { enable = true },
+ hsl = { enable = false },
+ oklch = { enable = false },
+ tailwind = {
+ enable = true, -- parse Tailwind color names
+ lsp = true, -- use Tailwind LSP documentColor
+ update_names = true,
+ },
+ sass = {
+ enable = false,
+ parsers = { css = true },
+ variable_pattern = "^%$([%w_-]+)",
+ },
+ xterm = { enable = false },
+ custom = {},
},
- -- Expects a table of color name to #RRGGBB value pairs. # is optional
- -- Example: { cool = "#107dac", ["notcool"] = "#ee9240" }
- -- Set to false to disable, for example when setting filetype options
- names_custom = false, -- Custom names to be highlighted: table|function|false
- RGB = true, -- #RGB hex codes
- RGBA = true, -- #RGBA hex codes
- RRGGBB = true, -- #RRGGBB hex codes
- RRGGBBAA = true, -- #RRGGBBAA hex codes
- AARRGGBB = false, -- 0xAARRGGBB hex codes
- rgb_fn = true, -- CSS rgb() and rgba() functions
- hsl_fn = true, -- CSS hsl() and hsla() functions
- css = true, -- Enable all CSS *features*:
- -- names, RGB, RGBA, RRGGBB, RRGGBBAA, AARRGGBB, rgb_fn, hsl_fn
- css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
- -- Tailwind colors. boolean|'normal'|'lsp'|'both'. True sets to 'normal'
- tailwind = true, -- Enable tailwind colors
- tailwind_opts = { -- Options for highlighting tailwind names
- update_names = false, -- When using tailwind = 'both', update tailwind names from LSP results. See tailwind section
+ display = {
+ mode = "background", -- "background"|"foreground"|"virtualtext"
+ background = {
+ bright_fg = "#000000",
+ dark_fg = "#ffffff",
+ },
+ virtualtext = {
+ char = "■",
+ position = "eol", -- "eol"|"before"|"after"
+ hl_mode = "foreground",
+ },
+ priority = {
+ default = 150, -- vim.hl.priorities.diagnostics
+ lsp = 200, -- vim.hl.priorities.user
+ },
},
- -- parsers can contain values used in `user_default_options`
- sass = { enable = false, parsers = { "css" } }, -- Enable sass colors
- -- Highlighting mode. 'background'|'foreground'|'virtualtext'
- mode = "background", -- Set the display mode
- -- Virtualtext character to use
- virtualtext = "■",
- -- Display virtualtext inline with color. boolean|'before'|'after'. True sets to 'after'
- virtualtext_inline = false,
- -- Virtualtext highlight mode: 'background'|'foreground'
- virtualtext_mode = "foreground",
- -- update color values even if buffer is not focused
- -- example use: cmp_menu, cmp_docs
- always_update = false,
- -- hooks to invert control of colorizer
hooks = {
- -- called before line parsing. Accepts boolean or function that returns boolean
- -- see hooks section below
- disable_line_highlight = false,
+ should_highlight_line = false, -- function(line, bufnr, line_num) -> bool
},
+ always_update = false,
},
})
end,
diff --git a/ar/.local/bin/mounter b/ar/.local/bin/mounter
index e62f61b..54b6eb5 100755
--- a/ar/.local/bin/mounter
+++ b/ar/.local/bin/mounter
@@ -91,7 +91,7 @@ rawdisks="$(echo "$lsblkoutput" | awk '
' | sed "s/^/💾 /" | filter)"
# Get all available IP addresses with open Samba shares in the wlan0 subnet, excluding eth0 IP
-smbips="$(sudo arp-scan --interface=eth0 --interface=wlan0 --localnet | grep -vEi '(EFM Networks|DUP:)' | awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/{print $1}')"
+smbips="$(sudo arp-scan --interface=eth0 --interface=wlan0 --localnet 2>/dev/null | grep -vEi '(EFM Networks|DUP:)' | awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/{print $1}')"
# Get currently mounted CIFS shares
mountedsmbs="$(grep 'cifs' /etc/mtab)"
@@ -109,7 +109,7 @@ username=$(whoami)
password=$(pass show default/mac)
EOF
)
- smb=$(
+ linux=$(
smbclient -L "$smbip" -U% -A /dev/stdin <<EOF 2>/dev/null | awk '/Disk/ {print $1}' | grep -vEi '(ADMIN|\w)\$|Macintosh'
username=$(whoami)
password=$(pass show default/default)
@@ -129,7 +129,7 @@ EOF
if ! echo "$smbshares" | grep -q "$share"; then
smbshares+="//$smbip/$share"$'\n'
fi
- done <<<"$smb"
+ done <<<"$linux"
done
smbshares="$(echo "$smbshares" | sed '/^$/d')"
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast
index af3c7fd..d2b49a8 100755
--- a/ar/.local/bin/statusbar/sb-forecast
+++ b/ar/.local/bin/statusbar/sb-forecast
@@ -7,7 +7,7 @@
locationfile="${XDG_CACHE_HOME:-${HOME}/.cache}/statusbar/location"
if [ ! -s "$locationfile" ] || [ $(($(date +%s) - $(stat -c %Y "$locationfile" 2>/dev/null || echo 0))) -gt 86400 ]; then
mkdir -p "${XDG_CACHE_HOME:-${HOME}/.cache}/statusbar"
- curl -s http://ip-api.com/json 2>/dev/null | jq -r '[.regionName, .countryCode] | join(",")' > "$locationfile" 2>/dev/null || true
+ curl -s http://ip-api.com/json 2>/dev/null | jq -r '[.regionName, .countryCode] | join(",")' >"$locationfile" 2>/dev/null || true
fi
location=$(cat "$locationfile" 2>/dev/null || echo "")
@@ -17,7 +17,7 @@ weatherreportjson="${XDG_CACHE_HOME:-${HOME}/.cache}/weatherreport.json"
error() {
rm -f "$weatherreport" "$weatherreportjson"
- notify-send "⛔ Failed to update 'weather$1'"
+ # notify-send "⛔ Failed to update 'weather$1'"
echo "❓"
exit 1
}