diff --git a/bootstrap/install_packages.sh b/bootstrap/install_packages.sh index 66ac563..a7383fd 100755 --- a/bootstrap/install_packages.sh +++ b/bootstrap/install_packages.sh @@ -11,6 +11,7 @@ PKG_TSV_FILE=${PKG_TSV_FILE:-bootstrap/packages_stable.tsv} packages_repo="${BOOTSTRAP_PACKAGES:-$(grep -e ' R ' "$PKG_TSV_FILE" | cut -f1 -d' ')}" packages_aur="${BOOTSTRAP_PACKAGES_AUR:-$(grep -e ' A ' "$PKG_TSV_FILE" | cut -f1 -d' ')}" packages_pipx="${BOOTSTRAP_PACKAGES_PIPX:-$(grep -e ' P ' "$PKG_TSV_FILE" | cut -f1,5 -d' ')}" +packages_uv="${BOOTSTRAP_PACKAGES_PIPX:-$(grep -e ' U ' "$PKG_TSV_FILE" | cut -f1,5 -d' ')}" main() { local cmd="" @@ -18,7 +19,7 @@ main() { case "$1" in -v | --version) - printf "Package bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.3\n" + printf "Package bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.4\n" ;; -h | --help) printf "Usage: install [-f|--force][-v|--version][-h|--help]\n\n-f Do not ask for any confirmations but force update and installation.\n" @@ -72,6 +73,14 @@ install_packages() { fi } +# check if any packages in list +has_pkg() { # 1=variable containing packages + if [ -n "$1" ]; then + return 0 + fi + return 1 +} + install_pipx() { if type pipx >/dev/null 2>&1; then echo "Existing pipx installation found .........................................." @@ -84,6 +93,18 @@ install_pipx() { fi } +install_uv() { + if type uv >/dev/null 2>&1; then + echo "Existing uv installation found .........................................." + return + fi + if "$unattended"; then + paru -S --noconfirm uv + else + paru -S uv + fi +} + install_pipx_pkgs() { while IFS= read -r line; do if [ -z "$line" ]; then return; fi @@ -97,6 +118,20 @@ install_pipx_pkgs() { done <<<"$packages_pipx" } +install_uv_pkgs() { + while IFS= read -r line; do + if [ -z "$line" ]; then return; fi + prog=$(echo "$line" | cut -f1 -d' ') + injections=$(echo "$line" | cut -f2 -d' ') + + cmd_with_args="uv tool install" + for inject_args in ${injections//,/ }; do + cmd_with_args+=" --with $inject_args" + done + $cmd_with_args "$prog" + done <<<"$packages_uv" +} + install() { unattended=$1 echo "Beginning package bootstrap ..............................................." @@ -105,11 +140,20 @@ install() { echo "Installing apps ..........................................................." update_repos "$unattended" install_packages "$unattended" - echo "Done ......................................................................" - echo "Installing pipx ..........................................................." - install_pipx - echo "Installing pipx packages .................................................." - install_pipx_pkgs + + if has_pkg "$packages_pipx"; then + echo "Installing pipx ..........................................................." + install_pipx + echo "Installing pipx packages .................................................." + install_pipx_pkgs + fi + + if has_pkg "$packages_uv"; then + echo "Installing uv ..........................................................." + install_uv + echo "Installing uv packages .................................................." + install_uv_pkgs + fi echo "Done ......................................................................" } diff --git a/bootstrap/packages_stable.tsv b/bootstrap/packages_stable.tsv index fb736d2..b98f22d 100644 --- a/bootstrap/packages_stable.tsv +++ b/bootstrap/packages_stable.tsv @@ -29,9 +29,10 @@ bash-language-server Bash language server implementation based on Tree Sitter an bat Cat clone with syntax highlighting and git integration R bats Bash Automated Testing System R bc An arbitrary precision calculator language R -beancount A personal double entry accounting and budgeting software P git+https://github.com/bratekarate/beancount-categorizer.git,beancount-dkb,fava,python-magic,smart-importer +beancount A personal double entry accounting and budgeting software U git+https://github.com/bratekarate/beancount-categorizer.git,beancount-dkb,fava,git+https://github.com/andreasgerstmayr/fava-dashboards.git,python-magic,smart-importer,neovim +beanquery A customizable light-weight SQL query tool that works on tabular data, including Beancount U bearssl Implementation of the SSL/TLS protocol (RFC 5246) written in C R -beets Organize your music collection from the command line P beetcamp,deets-describe,beets-ydl,pyacoustid,pylast +beets Organize your music collection from the command line U beetcamp,beets-describe,beets-ydl,pyacoustid,pylast bemenu-dmenu Symlink for using bemenu (native wayland support) as a drop-in replacement to dmenu A bemoji Emoji picker that remembers your favorites A bibclean BibTeX and Scribe bibliography prettyprinter and syntax checker A @@ -69,7 +70,7 @@ edir Program to rename, remove, and copy files and directories using your editor efm-langserver General purpose Language Server A enca Charset analyser and converter R entr Run arbitrary commands when files change R -euporie View and work with ipnb Python notebooks from the cli P +euporie View and work with ipnb Python notebooks from the cli U exercism-bin Command line client for exercism.io A exfat-utils Utilities for exFAT file system R eza A modern replacement for ls (community fork of exa) R @@ -157,7 +158,7 @@ maim Utility to take a screenshot using imlib2 R mako Lightweight notification daemon for Wayland R man-db A utility for reading man pages R man-pages Linux man pages R -markdown-anki-decks Construct and modify anki decks directly with markdown P +markdown-anki-decks Construct and modify anki decks directly with markdown U markdownlint-cli MarkdownLint Command Line Interface A masterpdfeditor-free A complete solution for creation and editing PDF files - Free version without watermark A mbsync-git free (GPL) mailbox synchronization program A @@ -208,7 +209,7 @@ offpunk Fork of the command-line Gemini client AV-98 with added offline capabili oh-my-zsh-git A community-driven framework for managing your zsh configuration. Includes 180+ optional plugins and over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community A os-prober Utility to detect other OSes on a set of drives R pacman-contrib Contributed scripts and tools for pacman systems R -papis Papis is a powerful and highly extensible command-line based document and bibliography manager. P whoosh,papis-zotero,papis-scihub,git+https://git.martyoeh.me/Marty/papis-extract.git,git+https://github.com/supersambo/papis-tui,pybtex-apa-style,git+https://git.martyoeh.me/Marty/papis-bbt-formatter.git +papis Papis is a powerful and highly extensible command-line based document and bibliography manager. U whoosh,papis-zotero,papis-scihub,git+https://git.martyoeh.me/Marty/papis-extract.git,git+https://github.com/supersambo/papis-tui,pybtex-apa-style,git+https://git.martyoeh.me/Marty/papis-bbt-formatter.git parallel A shell tool for executing jobs in parallel R parsec-bin Remotely connect to a gaming pc for a low latency remote computing experience A paru-bin Feature packed AUR helper A @@ -233,7 +234,7 @@ protonvpn Official ProtonVPN metapackage that installs protonvpn-gui and protonv ptpython Python REPL build on top of prompt_toolkit A pulsemixer CLI and curses mixer for pulseaudio R pup Command line tool for processing HTML A -pv A terminal-based tool for monitoring the progress of data through a pipeline. R +pv A terminal-based tool for monitoring the progress of data through a pipeline R pyright Type checker for the Python language R python-adblock Brave's adblock library in Python R python-dictcc commandline tool for dict.cc A @@ -258,6 +259,7 @@ python-pyqt6-networkauth Python bindings for QtNetworkAuth R python-readability-lxml Fast html to text parser (article readability tool) python library R python-slugify A Python slugify application that handles unicode R python-tasklib Python library for interacting with taskwarrior databases R +python-tgpt Programmatic access to tgpt through python U qemu-desktop A QEMU setup for desktop environments R qt5-wayland Provides APIs for Wayland R qt5-xmlpatterns Support for XPath, XQuery, XSLT and XML schema validation R @@ -311,7 +313,7 @@ tidy-viewer CLI csv pretty printer that uses column styling A timew Timewarrior, A command line time tracking application R tinyxxd Standalone version of the hex dump utility that comes with ViM R tlp Linux Advanced Power Management R -toilet free replacement for the FIGlet utility. A +toilet Free replacement for the FIGlet utility R topgrade-bin Invoke the upgrade procedure of multiple package managers A traceroute Tracks the route taken by packets over an IP network R translate-shell A command-line interface and interactive shell for Google Translate R diff --git a/bootstrap/packages_testing.tsv b/bootstrap/packages_testing.tsv index e53c5da..1226a04 100644 --- a/bootstrap/packages_testing.tsv +++ b/bootstrap/packages_testing.tsv @@ -2,15 +2,9 @@ Name Description Source Target adbfs-rootless-git fuse filesystem over adb tool for android devices, no device root required A arch-install-scripts Scripts to aid in installing Arch Linux R blueberry Bluetooth configuration tool R -dotter-rs-bin A dotfile manager and templater written in Rust A -eza A modern replacement for ls (community fork of exa) R feishin-appimage A modern self-hosted music player. A -khal CLI calendar application built around CalDAV R m4b-tool-bin A command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b A nodejs-markmap-cli Create markmaps (mindmaps from markdown) from CLI A -pv A terminal-based tool for monitoring the progress of data through a pipeline R qpwgraph PipeWire Graph Qt GUI Interface R texlive-latexextra TeX Live - LaTeX additional packages R -toilet Free replacement for the FIGlet utility R -vifm A file manager with curses interface, which provides Vi[m]-like environment R woeusb-ng Simple tool that enable you to create your own usb stick with Windows installer. A diff --git a/desktop/.config/waybar/config b/desktop/.config/waybar/config index 6946a07..6f2a18e 100644 --- a/desktop/.config/waybar/config +++ b/desktop/.config/waybar/config @@ -2,10 +2,11 @@ "layer": "top", "modules-left": ["river/tags", "custom/events", "custom/vidl", "river/window"], "modules-center": ["clock", "custom/media"], - "modules-right": ["river/mode", "custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "battery", "tray"], + "modules-right": ["river/mode", "custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "tray", "battery"], "custom/archupdates": { - "format": "{} {icon}", - "format-alt-click": "right", + "format": "{icon}", + "format-alt": "{} {icon}", + "format-alt-click": "click-right", "format-icons": { "default": "" }, @@ -16,17 +17,22 @@ }, "backlight": { "device": "intel_backlight", - "format": "{percent}% {icon}", - "format-icons": ["滋", "", "", ""], + "format": "{icon}", + "format-alt": "{percent}% {icon}", + "format-alt-click": "click-right", + "format-icons": ["󰛩", "󱩎", "󱩏", "󱩐", "󱩑", "󱩒", "󱩓", "󱩔", "󱩕", "󱩖", "󰛨"], + "tooltip-format": "{percent}% {icon}", "on-scroll-up": "brightnessctl set 1%+", "on-scroll-down": "brightnessctl set 1%-" }, "battery": { - "format": "{capacity}% {icon}", - "format-alt":"{capacity}% ({time}) {icon}", + "format": "{icon}", + "format-warning": "{capacity}% {icon}", + "format-critical": "{capacity}% {icon}", + "format-alt":"{capacity}% {icon}", "format-alt-click": "click-right", "format-icons": ["", "", "", "", ""], - "interval": 60, + "interval": 10, "states": { "warning": 30, "critical": 15 @@ -39,14 +45,15 @@ }, "cpu": { "interval": 10, - "format": "{usage}% ", + "format": "", + "format-alt": "{usage}% ", + "format-alt-click": "click-right", "max-length": 10, "states": { "warning": 50, "critical": 80 }, - "on-click": "$TERMINAL start --class float top", - "on-click-right": "$TERMINAL start --class float glances" + "on-click": "$TERMINAL start --class float htop" }, "custom/events": { "exec-if": "command -v khal >/dev/null 2>&1", @@ -54,7 +61,7 @@ "return-type": "json", "interval": 300, "on-click": "$TERMINAL start --class float ikhal", - "format": "{icon}{}", + "format": "{icon}{0}", // issue tracked here https://github.com/Alexays/Waybar/issues/3623 "format-icons": { "event": " ", "no-event": "", @@ -62,9 +69,12 @@ }, "memory": { "interval": 30, - "format": "{avail:0.1f}G ", + "format": "{icon}", "format-alt": "{used:0.1f}G/{total:0.1f}G ", "format-alt-click": "click-right", + "tooltip": true, + "tooltip-format": "{used:0.1f}G/{total:0.1f}G \nUsed: {percentage} %\nSwap: {swapPercentage} %", + "format-icons": ["󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"], "max-length": 10 }, "mpd": { @@ -93,7 +103,7 @@ }, "custom/media": { "format": "{icon}{}", - "format-alt-click": "right", + "format-alt-click": "click-right", "return-type": "json", "format-icons": { "Playing": " ", @@ -108,11 +118,11 @@ }, "network": { "format": "{ifname}", - "format-wifi": "{signalStrength}% ", - "format-ethernet": "{ipaddr}/{cidr} 󰈀", - "format-disconnected": "󰖪", + "format-wifi": "", + "format-ethernet": "󰈀 ", + "format-disconnected": "󰖪 ", "tooltip-format": "{ifname} via {gwaddr} 󰈁", - "tooltip-format-wifi": "{essid}: {bandwidthDownBits}-{bandwidthUpBits} ({signalStrength}%)  {ifname}", + "tooltip-format-wifi": "{essid}: {bandwidthDownBits}-{bandwidthUpBits} ({signalStrength}%)  {ifname}", "tooltip-format-ethernet": "{ifname} 󰈀", "tooltip-format-disconnected": "Disconnected", "max-length": 50, @@ -120,9 +130,11 @@ // "on-click-right": "sudo rfkill toggle wlan" }, "pulseaudio": { - "format": "{volume}% {icon}", + "format": "{icon}", + "format-alt": "{volume}% {icon}", "format-bluetooth": "{volume}% {icon} ", - "format-muted": "", + "format-alt-click": "click-right", + "format-muted": "󰖁", "format-icons": { "headphone": "", "hands-free": "", @@ -130,22 +142,24 @@ "phone": "", "portable": "", "car": "", - "default": ["", ""] + "default": ["", "", ""] }, - "scroll-step": 1, + "scroll-step": 2, "on-click": "$TERMINAL start --class float pulsemixer", "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +1%", "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -1%" }, "river/tags": { "num-tags": 10, - "tag-labels": [ "", "", "", "", "", "", "", "", "", "" ] + "tag-labels": [ "", "", "", "", "", "", "", "", "", "" ], }, "river/mode": { "format": "{} ", }, "river/window": { - "format": " {}", + "format": " ", + "format-alt": " {}", + "format-alt-click": "click-right", "max-length": 70 }, "temperature": { @@ -153,7 +167,9 @@ "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input", "critical-threshold": 80, // "format-critical": "{temperatureC}° ", - "format": "{temperatureC}° ", + "format": "", + "format-alt": "{temperatureC}° ", + "format-alt-click": "click-right", "on-click": "$TERMINAL start --class float watch sensors" }, "tray": { @@ -172,20 +188,20 @@ "pia": "󰖂", "netbird": "󱗆" }, + "format-alt": "{} {icon}", + "format-alt-click": "click-right", "exec": "~/.config/waybar/modules/wireguard json", "exec-if": "command -v nmcli >/dev/null 2>&1", "return-type": "json", "signal": 6, - "interval": 60, + "interval": 20, }, "custom/vidl": { - "format": "{icon}{}", - "format-alt-click": "right", - "format-icons": { - "default": " " - }, + "format": "", + "format-alt": " {}", + "format-alt-click": "click-right", "exec": "wc -l ~/.local/share/vidl/vidl_queue | cut -d' ' -f1", - "exec-if": "[ -f ~/.local/share/vidl/vidl_queue ]", + "exec-if": "[ $(vidl -p) = 'running' ] && [ $(vidl -P) -gt 0 ]", "interval": 5, "on-click": "$TERMINAL start --class float nvim ~/.local/share/vidl/vidl_queue" }, diff --git a/desktop/.config/waybar/style.css b/desktop/.config/waybar/style.css index 348a579..5d210fe 100644 --- a/desktop/.config/waybar/style.css +++ b/desktop/.config/waybar/style.css @@ -45,6 +45,13 @@ window#waybar.hidden { color: @base0C; } +/* give coherent background */ +.modules-right { + padding: 0; + margin: 0; + background-color: @base01; +} + #clock, #battery, #cpu, @@ -64,7 +71,7 @@ window#waybar.hidden { #custom-events, #custom-vidl, #custom-media { - padding: 0 10px; + padding: 0 5px; margin: 0 5px; color: @base05; background-color: @base01; @@ -84,6 +91,10 @@ window#waybar.hidden { background-color: @base02; } +#mode.interact_float { + background-color: @base0D; +} + /* Mark active output through highlighted window background */ #window { background-color: transparent; diff --git a/nvim/.config/nvim/lua/plugins/formatting.lua b/nvim/.config/nvim/lua/plugins/formatting.lua index 42c24d8..2ff40a2 100644 --- a/nvim/.config/nvim/lua/plugins/formatting.lua +++ b/nvim/.config/nvim/lua/plugins/formatting.lua @@ -13,6 +13,7 @@ local formatters = { liquid = { "prettier" }, lua = { "stylua" }, markdown = { "prettier", "injected" }, + nim = { "nimpretty" }, python = { "ruff_fix", "ruff_format", "ruff_organize_imports" }, quarto = { "prettier", "injected" }, sh = { "shfmt" }, diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua index ec10a8f..5b6e2ac 100644 --- a/nvim/.config/nvim/lua/plugins/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -29,6 +29,7 @@ local servers = { }, }, marksman = {}, + nim_langserver = {}, basedpyright = {}, ruff = {}, serve_d = {}, @@ -287,6 +288,7 @@ return { local python_path -- ensure python virtualenv is determined automatically on lsp start + -- we primarily use pyright for cmp lsp completion & hover info lspconfig.basedpyright.setup({ on_attach = function(client, bufnr) on_attach(client, bufnr) @@ -299,12 +301,13 @@ return { client.config.settings.python.pythonPath = python_path end, settings = { - -- disable imports and linting since, we use ruff for that + -- disable imports and linting since, using ruff for it pyright = { disableOrganizeImports = true, }, python = { analysis = { + -- ignore all files, use ruff for linting ignore = { "*" }, }, }, diff --git a/scripts/.local/bin/vidl b/scripts/.local/bin/vidl index 5192922..86b34bf 100755 --- a/scripts/.local/bin/vidl +++ b/scripts/.local/bin/vidl @@ -33,7 +33,7 @@ Options: urls=("$@") -while getopts "t:f:d:hcp" opt; do +while getopts "t:f:d:hcpP" opt; do case "$opt" in # v) verbose=1 # ;; @@ -50,6 +50,9 @@ while getopts "t:f:d:hcp" opt; do ONLY_DO=clear ;; p) + ONLY_DO=status + ;; + P) ONLY_DO=remaining ;; h | \? | *) @@ -155,6 +158,7 @@ is_in_queue() { # 1=url } add_to_queue() { # 1=url + if is_in_queue "$1"; then return; fi echo "$1" >>"$queue_file" echo "added $url to queue." @@ -193,6 +197,14 @@ print_queue_remaining() { wc -l "$queue_file" | cut -f1 -d' ' } +print_status() { + if is_only_instance; then + printf "stopped\n" + return + fi + printf "running\n" +} + main() { setup if [ "$ONLY_DO" = "clear" ]; then @@ -201,6 +213,9 @@ main() { elif [ "$ONLY_DO" = "remaining" ]; then print_queue_remaining exit + elif [ "$ONLY_DO" = "status" ]; then + print_status + exit fi for url in "$@"; do