├── .gitignore ├── .gitmodules ├── .luarc.json ├── .stylua.toml ├── README.md ├── arch-post.sh ├── config.rayconfig ├── hyprland └── .config │ ├── dolphinrc │ ├── dunst │ └── dunstrc │ ├── eww │ ├── eww.yuck │ └── widgets │ │ └── calendar.yuck │ ├── hypr │ ├── hyprland.conf │ └── hyprpaper.conf │ ├── ncspot │ └── config.toml │ ├── waybar │ ├── config.jsonc │ ├── custom │ │ ├── focus_class.sh │ │ ├── spotify │ │ │ └── mediaplayer.py │ │ ├── tailscale │ │ │ ├── check_status.sh │ │ │ ├── inverted-tailscale-icon.png │ │ │ ├── tailscale-icon.png │ │ │ ├── tailscale-icon.sh │ │ │ └── toggle.sh │ │ └── tunnelbear │ │ │ ├── check_status.sh │ │ │ ├── toggle.sh │ │ │ ├── tunnelbear-icon.sh │ │ │ ├── tunnelbear-logo-off.png │ │ │ └── tunnelbear-logo.png │ ├── mocha.css │ └── style.css │ ├── wofi │ ├── config │ ├── dmenu │ │ ├── launcher.sh │ │ └── scripts │ │ │ ├── calculator │ │ │ ├── camera │ │ │ ├── close-all │ │ │ ├── kill-process │ │ │ ├── man-search │ │ │ ├── open-file │ │ │ ├── reboot │ │ │ ├── shutdown │ │ │ ├── sleep │ │ │ ├── system-info │ │ │ ├── toggle-hyprsunset │ │ │ ├── toggle-rgb │ │ │ └── toggle-waybar │ └── style.css │ ├── xdg-desktop-portal │ ├── hyprland-portals.conf │ └── portals.conf │ └── yazi │ └── theme.toml ├── nix ├── flake.lock ├── flake.nix ├── home.nix └── user │ ├── alacritty │ ├── alacritty.nix │ └── alacritty.toml │ ├── kitty │ ├── current-theme.conf │ ├── kitty.conf │ └── kitty.nix │ ├── shell │ ├── .gitconfig │ ├── .tmux.conf │ ├── bin.nix │ ├── bin │ │ ├── bare-clone │ │ ├── gca │ │ ├── ghpr │ │ ├── kill-other-windows │ │ ├── switch-session │ │ ├── tmss │ │ ├── update-pio │ │ └── update-wanted │ ├── starship.toml │ └── zsh.nix │ └── vscode │ ├── keybindings.json │ ├── settings.json │ └── vscode.nix ├── nvim └── .config │ └── nvim │ ├── after │ ├── ftplugin │ │ ├── oil.lua │ │ └── qf.lua │ ├── lsp │ │ └── .gitkeep │ └── queries │ │ ├── javascript │ │ └── injections.scm │ │ ├── javascriptreact │ │ └── injections.scm │ │ ├── typescript │ │ └── injections.scm │ │ └── typescriptreact │ │ └── injections.scm │ ├── init.lua │ ├── lazy-lock.json │ └── lua │ └── joogie │ ├── autocmds │ ├── init.lua │ ├── node-exec.lua │ ├── opencode.lua │ └── super-zen.lua │ ├── init.lua │ ├── keymaps │ └── init.lua │ ├── options │ └── init.lua │ ├── plugins │ ├── diffview.lua │ ├── formatter.lua │ ├── gitsigns.lua │ ├── init.lua │ ├── local.lua │ ├── lsp.lua │ ├── neo-test.lua │ ├── nvim-cmp.lua │ ├── snacks.lua │ ├── theme.lua │ └── treesitter.lua │ └── utils │ └── init.lua ├── old ├── bspwm │ └── .config │ │ ├── bspwm │ │ └── bspwmrc │ │ ├── gtk-3.0 │ │ └── settings.ini │ │ ├── picom │ │ ├── launch.sh │ │ └── picom.conf │ │ ├── polybar │ │ ├── config.ini │ │ ├── launch.sh │ │ ├── modules.ini │ │ └── scripts │ │ │ ├── Brightness │ │ │ ├── ExternalRules │ │ │ ├── MediaControl │ │ │ ├── ScreenShoTer │ │ │ ├── Term │ │ │ ├── Updates │ │ │ ├── Volume │ │ │ ├── Weather │ │ │ ├── colors.ini │ │ │ └── system.ini │ │ ├── rofi │ │ └── config.rasi │ │ └── sxhkd │ │ └── sxhkdrc ├── keyboard │ └── neo_ergo.layout.json ├── scripts │ ├── config-terminal.sh │ ├── install-bspwm.sh │ ├── install-fonts.sh │ ├── install-picom.sh │ ├── install-polybar.sh │ ├── install-rofi.sh │ ├── post-install.sh │ └── raycast │ │ ├── vpn-connect.sh │ │ └── vpn-disconnect.sh └── win │ ├── .joogie.omp.json │ ├── profile.ps1 │ └── scoop.json ├── sddm ├── etc │ └── sddm.conf ├── install-dependencies.sh ├── link.sh └── macos │ ├── Main.qml │ ├── UserModel.qml │ ├── background.png │ ├── components │ ├── Clock.qml │ ├── RebootToolTip.qml │ ├── ShutdownToolTip.qml │ ├── TextConstants.qml │ └── VirtualKeyboard.qml │ ├── faces │ └── .face.icon │ ├── fonts │ └── SFUIText-Semibold.otf │ ├── images │ ├── .face.icon │ ├── capslock.svg │ ├── conf.svg │ ├── go-down.svg │ ├── login.svg │ ├── system-reboot-hover.svg │ ├── system-reboot-pressed.svg │ ├── system-reboot.svg │ ├── system-shutdown-hover.svg │ ├── system-shutdown-pressed.svg │ ├── system-shutdown.svg │ ├── system-suspend-hover.svg │ ├── system-suspend-pressed.svg │ └── system-suspend.svg │ ├── metadata.desktop │ ├── theme.conf │ └── theme.conf.user ├── shell ├── .config │ ├── kitty │ │ ├── current-theme.conf │ │ └── kitty.conf │ └── starship.toml ├── .gitconfig ├── .local │ └── custom │ │ └── bin │ │ ├── _wt │ │ ├── clone │ │ ├── gh-comments │ │ ├── lsort │ │ └── summarize ├── .tmux.conf ├── .zshrc └── raycast-scripts │ └── timelog.sh └── wallpapers ├── abstract-swirls.jpg ├── alden.png ├── cloudsday.jpg ├── evening-sky.png ├── macos11-night.jpg ├── rainnight.jpg ├── tahoe-beach-night.png └── windows-11-monochrome.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | nvim/.config/nvm/ 2 | nvim/.config/gh/ 3 | nvim/.config/devcert/ 4 | nvim/.config/zsh/ 5 | nvim/.config/github-copilot/ 6 | nvim/.config/nextjs-nodejs/ 7 | nvim/.config/wslu/ 8 | nvim/.config/nvim/plugin/ 9 | shell/.local/share 10 | shell/.local/state 11 | 12 | .private.sh 13 | 14 | .DS_Store 15 | .aider* 16 | 17 | mcpservers.json 18 | 19 | *.cbor 20 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dots"] 2 | path = dots 3 | url = https://github.com/princejoogie/dots.git 4 | -------------------------------------------------------------------------------- /.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", 3 | "Lua.diagnostics.disable": [ 4 | "duplicate-set-field", 5 | "undefined-global", 6 | "missing-fields" 7 | ], 8 | "Lua.workspace.checkThirdParty": false, 9 | "diagnostics.globals": ["vim", "Snacks"] 10 | } 11 | -------------------------------------------------------------------------------- /.stylua.toml: -------------------------------------------------------------------------------- 1 | syntax = "All" 2 | column_width = 120 3 | line_endings = "Unix" 4 | indent_type = "Spaces" 5 | indent_width = 2 6 | quote_style = "AutoPreferDouble" 7 | call_parentheses = "Always" 8 | collapse_simple_statement = "Never" 9 | space_after_function_names = "Never" 10 | 11 | [sort_requires] 12 | enabled = false 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | Personal dotfiles configuration using Nix flakes for reproducible system management. 4 | 5 | ![sc1](https://github.com/user-attachments/assets/a129c2cb-e0a0-420b-b8bf-aa79c05728eb) 6 | ![sc2](https://github.com/user-attachments/assets/af4f3786-5444-464f-b639-ffa916ebbb0c) 7 | 8 | ## Features 9 | 10 | - **Hyprland** - Wayland compositor configuration 11 | - **Neovim** - Complete development environment 12 | - **Terminal tools** - Alacritty, Kitty, Zsh with Starship 13 | - **System utilities** - Waybar, Dunst, Wofi, and more 14 | - **Nix flakes** - Reproducible system configuration 15 | 16 | ## Installation 17 | 18 | ### Prerequisites 19 | 20 | - Install [Nix](https://nixos.org/download) 21 | - Install [nix-darwin](https://github.com/LnL7/nix-darwin?tab=readme-ov-file#flakes) (flakes) 22 | - Install [home-manager](https://nix-community.github.io/home-manager/index.xhtml#sec-install-nix-darwin-module) (darwin module) 23 | 24 | ### Setup 25 | 26 | 1. Clone this repository: 27 | ```sh 28 | git clone https://github.com/princejoogie/dotfiles.git ~/dotfiles 29 | ``` 30 | 31 | 2. Apply the configuration: 32 | ```sh 33 | darwin-rebuild switch --flake ~/dotfiles/nix 34 | ``` 35 | 36 | ## Structure 37 | 38 | - `nix/` - Nix flake configuration and home-manager setup 39 | - `hyprland/` - Hyprland and related Wayland tools configuration 40 | - `nvim/` - Neovim configuration with Lua 41 | - `shell/` - Shell configuration (Zsh, Git, Tmux) 42 | - `sddm/` - Display manager themes -------------------------------------------------------------------------------- /arch-post.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | install_git() { 4 | echo "" 5 | if [[ -x "$(command -v git)" ]]; then 6 | echo "'git' is already installed" 7 | else 8 | echo "Installing 'git'" 9 | pacman -S --noconfirm git 10 | fi 11 | } 12 | 13 | install_yay() { 14 | echo "" 15 | if [[ -x "$(command -v yay)" ]]; then 16 | echo "'yay' is already installed" 17 | else 18 | echo "Installing 'yay'" 19 | git clone https://aur.archlinux.org/yay-bin.git 20 | cd yay-bin || exit 21 | makepkg -si 22 | cd .. || exit 23 | rm -rf yay-bin 24 | fi 25 | 26 | declare -A packages=( 27 | ["stow"]=stow 28 | ["tmux"]=tmux 29 | ["git-delta"]=delta 30 | ["ripgrep"]=rg 31 | ) 32 | 33 | for pkg in "${!packages[@]}"; do 34 | bin="${packages[$pkg]}" 35 | if [[ -x "$(command -v "$bin")" ]]; then 36 | echo "$pkg (binary: $bin) is already installed" 37 | else 38 | echo "Installing $pkg" 39 | yay -S --noconfirm "$pkg" 40 | fi 41 | done 42 | } 43 | 44 | install_cargo() { 45 | echo "" 46 | if [[ -x "$(command -v cargo)" ]]; then 47 | echo "'cargo' is already installed" 48 | else 49 | echo "Installing cargo" 50 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 51 | fi 52 | 53 | declare -A packages=( 54 | ["bob-nvim"]=bob 55 | ["tmux-sessionizer"]=tms 56 | ["fnm"]=fnm 57 | ["tree-sitter-cli"]=tree-sitter 58 | ) 59 | 60 | for pkg in "${!packages[@]}"; do 61 | bin="${packages[$pkg]}" 62 | if [[ -x "$(command -v "$bin")" ]]; then 63 | echo "$pkg (binary: $bin) is already installed" 64 | else 65 | echo "Installing $pkg" 66 | cargo install "$pkg" 67 | fi 68 | done 69 | } 70 | 71 | install_git 72 | install_yay 73 | install_cargo 74 | -------------------------------------------------------------------------------- /config.rayconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/config.rayconfig -------------------------------------------------------------------------------- /hyprland/.config/dolphinrc: -------------------------------------------------------------------------------- 1 | [CompactMode] 2 | PreviewSize=96 3 | 4 | [DetailsMode] 5 | PreviewSize=112 6 | 7 | [General] 8 | Version=202 9 | ViewPropsTimestamp=2025,5,3,1,9,35.934 10 | 11 | [IconsMode] 12 | PreviewSize=256 13 | 14 | [KFileDialog Settings] 15 | Places Icons Auto-resize=false 16 | Places Icons Static Size=48 17 | 18 | [MainWindow] 19 | MenuBar=Disabled 20 | 21 | [PlacesPanel] 22 | IconSize=48 23 | 24 | [PreviewSettings] 25 | Plugins=appimagethumbnail,audiothumbnail,comicbookthumbnail,cursorthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,imagethumbnail,jpegthumbnail,kraorathumbnail,windowsexethumbnail,windowsimagethumbnail,opendocumentthumbnail,svgthumbnail,ffmpegthumbs,gdk-pixbuf-thumbnailer 26 | 27 | [UiSettings] 28 | ColorScheme=catpuccin-mocha-blue 29 | -------------------------------------------------------------------------------- /hyprland/.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | max_icon_size = 32 3 | max_icon_size = 32 4 | width = (0,512) 5 | font = SF Pro Display 12 6 | padding = 15 7 | horizontal_padding = 10 8 | gaps = true 9 | gap_size = 5 10 | corner_radius = 6 11 | origin = top-right 12 | offset = 20x20 13 | frame_color = "#bac2de" 14 | frame_width = 2 15 | separator_color = frame 16 | vertical_alignment = top 17 | icon_path = /usr/share/icons/breeze-dark/status/:/usr/share/icons/breeze-dark/devices/:/usr/share/pixmaps/ 18 | mouse_left_click = do_action, close_current 19 | mouse_middle_click = close_all 20 | mouse_right_click = close_current 21 | 22 | [urgency_low] 23 | background = "#bac2dedb" 24 | foreground = "#11111b" 25 | 26 | [urgency_normal] 27 | background = "#bac2dedb" 28 | foreground = "#11111b" 29 | 30 | [urgency_critical] 31 | background = "#f38ba8db" 32 | foreground = "#11111b" 33 | frame_color = "#f38ba8" 34 | 35 | [slack] 36 | desktop_entry = Slack 37 | new_icon=/usr/share/pixmaps/slack.png 38 | -------------------------------------------------------------------------------- /hyprland/.config/eww/eww.yuck: -------------------------------------------------------------------------------- 1 | (include "widgets/calendar.yuck") 2 | -------------------------------------------------------------------------------- /hyprland/.config/eww/widgets/calendar.yuck: -------------------------------------------------------------------------------- 1 | (defwindow calendar 2 | :monitor 0 3 | :geometry (geometry :x 1160 :y 0 :width 240 :height 200) 4 | :stacking "fg" 5 | :focusable true 6 | :on-lost-focus "eww close calendar" 7 | :visible false 8 | (calendar 9 | :show-heading true 10 | :show-day-names true 11 | :show-week-numbers false 12 | ) 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /hyprland/.config/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | # preload = ~/dotfiles/wallpapers/macos11-night.jpg 2 | # wallpaper = ,~/dotfiles/wallpapers/macos11-night.jpg 3 | 4 | preload = ~/dotfiles/wallpapers/tahoe-beach-night.png 5 | wallpaper = ,~/dotfiles/wallpapers/tahoe-beach-night.png 6 | -------------------------------------------------------------------------------- /hyprland/.config/ncspot/config.toml: -------------------------------------------------------------------------------- 1 | [bindings] 2 | "g" = "move_top" 3 | "G" = "move_bottom" 4 | 5 | [theme] 6 | background = "#1e1e2e" 7 | primary = "#cdd6f4" 8 | secondary = "#94e2d5" 9 | title = "#89b4fa" 10 | playing = "#a6e3a1" 11 | playing_bg = "#1e1e2e" 12 | highlight = "#cdd6f4" 13 | highlight_bg = "#536994" 14 | playing_selected = "#a6e3a1" 15 | error = "#1e1e2e" 16 | error_bg = "#f38ba8" 17 | statusbar = "#89b4fa" 18 | statusbar_bg = "#313244" 19 | statusbar_progress = "#89b4fa" 20 | cmdline = "#89b4fa" 21 | cmdline_bg = "#181825" 22 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/config.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "spacing": 0, 4 | "height": 0, 5 | "margin-top": 0, 6 | "margin-right": 0, 7 | "margin-left": 0, 8 | "margin-bottom": 0, 9 | "modules-left": [ 10 | "hyprland/workspaces", 11 | "tray", 12 | "custom/spotify", 13 | "cpu" 14 | ], 15 | "modules-center": [ 16 | "hyprland/window" 17 | ], 18 | "modules-right": [ 19 | "network", 20 | "memory", 21 | "pulseaudio#output", 22 | "pulseaudio#input", 23 | "image#tailscale", 24 | "custom/tailscale", 25 | "image#tunnelbear", 26 | "custom/tunnelbear", 27 | "clock" 28 | ], 29 | "hyprland/window": { 30 | "format": "{title:.80}", 31 | "rewrite": { 32 | "(.*) — Zen Browser": "$1", 33 | "tms": "Terminal: Kitty", 34 | "t": "Terminal: Kitty" 35 | }, 36 | "tooltip-format": "{title}\n\nClass: {class}", 37 | "separate-outputs": true, 38 | "on-click": "hyprctl activewindow -j | jq -r '.title' | wl-copy; notify-send 'Copied title to clipboard'", 39 | "on-click-right": "hyprctl activewindow -j | jq -r '.class' | wl-copy; notify-send 'Copied class to clipboard'" 40 | }, 41 | "hyprland/workspaces": { 42 | "disable-scroll": true, 43 | "all-outputs": true, 44 | "tooltip": false 45 | }, 46 | "tray": { 47 | "icon-size": 16, 48 | "show-passive-items": true, 49 | "spacing": 10, 50 | "tooltip": false 51 | }, 52 | "clock": { 53 | "format": "{:%I:%M %p - %a, %d %b %Y}", 54 | "tooltip": false, 55 | "on-click": "notion-calendar-electron" 56 | }, 57 | "cpu": { 58 | "tooltip": true, 59 | "interval": 1, 60 | // reduce this to the number of cores you have 61 | "format": " {icon0}{icon1}{icon2}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}", 62 | "format-icons": [ 63 | "", 64 | "", 65 | "", 66 | "", 67 | "", 68 | "", 69 | "", 70 | "" 71 | ] 72 | }, 73 | "memory": { 74 | "format": " {used}GB", 75 | "interval": 1, 76 | "states": { 77 | "critical": 80 78 | } 79 | }, 80 | "network": { 81 | "format-wifi": " {bandwidthDownBits}", 82 | "format-ethernet": " {bandwidthDownBits}", 83 | "format-disconnected": "󰖪 no network", 84 | "interval": 1, 85 | "tooltip": true, 86 | "tooltip-format": "IP: {ipaddr}\nInterface: {ifname}\nGateway: {gwaddr}\nNetmask: {netmask}\nUpload: {bandwidthUpBits}\nDownload: {bandwidthDownBits}" 87 | }, 88 | "pulseaudio#output": { 89 | "format": "{icon} {volume}%", 90 | "format-bluetooth": "{icon}  {volume}%", 91 | "format-muted": "", 92 | "format-icons": { 93 | "default": [ 94 | "", 95 | "" 96 | ] 97 | }, 98 | "scroll-step": 1, 99 | "on-click": "pavucontrol" 100 | }, 101 | "pulseaudio#input": { 102 | "format-source": " {volume}%", 103 | "format-source-muted": " MUTED", 104 | "format": "{format_source}", 105 | "tooltip": false, 106 | "scroll-step": 1, 107 | "smooth-scrolling-threshold": 1, 108 | "max-volume": 100, 109 | "on-click": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", 110 | "on-click-middle": "pavucontrol", 111 | "on-scroll-up": "pactl set-source-volume @DEFAULT_SOURCE@ +1%", 112 | "on-scroll-down": "pactl set-source-volume @DEFAULT_SOURCE@ -1%" 113 | }, 114 | "custom/spotify": { 115 | "exec": "python3 ~/dotfiles/hyprland/.config/waybar/custom/spotify/mediaplayer.py --player spotify", 116 | "format": "{text:.50}  ", 117 | "tooltip-format": "{text}", 118 | "return-type": "json", 119 | "on-click": "playerctl --player=spotify play-pause", 120 | "on-click-right": "~/dotfiles/hyprland/.config/waybar/custom/focus_class.sh 'Spotify'", 121 | "on-scroll-up": "playerctl --player=spotify next", 122 | "on-scroll-down": "playerctl --player=spotify previous" 123 | }, 124 | "image#tailscale": { 125 | "exec": "~/dotfiles/hyprland/.config/waybar/custom/tailscale/tailscale-icon.sh", 126 | "size": 16, 127 | "on-click": "~/dotfiles/hyprland/.config/waybar/custom/tailscale/toggle.sh", 128 | "interval": 1 129 | }, 130 | "custom/tailscale": { 131 | "exec": "~/dotfiles/hyprland/.config/waybar/custom/tailscale/check_status.sh", 132 | "interval": 1, 133 | "format": "{text}", 134 | "tooltip": true, 135 | "return-type": "json", 136 | "on-click": "~/dotfiles/hyprland/.config/waybar/custom/tailscale/toggle.sh" 137 | }, 138 | "image#tunnelbear": { 139 | "exec": "~/dotfiles/hyprland/.config/waybar/custom/tunnelbear/tunnelbear-icon.sh", 140 | "size": 16, 141 | "on-click": "~/dotfiles/hyprland/.config/waybar/custom/tunnelbear/toggle.sh", 142 | "interval": 1 143 | }, 144 | "custom/tunnelbear": { 145 | "exec": "~/dotfiles/hyprland/.config/waybar/custom/tunnelbear/check_status.sh", 146 | "interval": 1, 147 | "format": "{text}", 148 | "tooltip": true, 149 | "return-type": "json", 150 | "on-click": "~/dotfiles/hyprland/.config/waybar/custom/tunnelbear/toggle.sh" 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/focus_class.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | class=$1 4 | 5 | if [ -z "$class" ]; then 6 | echo "No class specified" 7 | exit 1 8 | fi 9 | 10 | spotify_ws=$(hyprctl clients -j | jq -r '.[] | select(.class=="'"$class"'") | .workspace.id' | head -n1) 11 | 12 | [ -n "$spotify_ws" ] && hyprctl dispatch workspace "$spotify_ws" 13 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tailscale/check_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | status_json=$(tailscale status --json) 4 | state=$(jq -r '.BackendState' <<< "$status_json") 5 | hostname=$(jq -r '.Self.HostName' <<< "$status_json") 6 | tailscale_ips=$(jq -r '.Self.TailscaleIPs[]' <<< "$status_json" | sed 's/^/ - /' | paste -sd '\r' -) 7 | tailnet=$(jq -r '.CurrentTailnet.Name' <<< "$status_json") 8 | online=$(jq -r '.Self.Online' <<< "$status_json") 9 | peer_count=$(jq '.Peer | length' <<< "$status_json") 10 | peers=$(jq -r '.Peer | to_entries[] | " - \((if .value.Online then "󱘖 " else " " end) + .value.DNSName)"' <<< "$status_json" | paste -sd '\r' -) 11 | [[ -z "$peers" ]] && peers=" - No peers found" 12 | 13 | tooltip="Tailnet: $tailnet\rDevice: $hostname\rStatus: $( [[ $online == true ]] && echo "Online" || echo "Offline" )\rTailscale IPs:\r$tailscale_ips\rPeers ($peer_count):\r$peers" 14 | 15 | if [[ "$state" == "Running" ]]; then 16 | echo "{\"text\": \"ON\", \"tooltip\": \"$tooltip\"}" 17 | else 18 | echo "{\"text\": \"OFF\", \"tooltip\": \"VPN is not running\"}" 19 | fi 20 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tailscale/inverted-tailscale-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/hyprland/.config/waybar/custom/tailscale/inverted-tailscale-icon.png -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tailscale/tailscale-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/hyprland/.config/waybar/custom/tailscale/tailscale-icon.png -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tailscale/tailscale-icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | STATE=$(tailscale status --json | jq -r '.BackendState') 4 | 5 | if [[ "$STATE" == "Running" ]]; then 6 | echo "/home/joogie/dotfiles/hyprland/.config/waybar/custom/tailscale/inverted-tailscale-icon.png" 7 | exit 0 8 | fi 9 | 10 | echo "/home/joogie/dotfiles/hyprland/.config/waybar/custom/tailscale/tailscale-icon.png" 11 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tailscale/toggle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | STATE=$(tailscale status --json | jq -r '.BackendState') 4 | 5 | if [[ "$STATE" == "Running" ]]; then 6 | tailscale down 7 | else 8 | tailscale up --accept-routes --advertise-exit-node --advertise-routes=192.168.1.0/24 9 | fi 10 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tunnelbear/check_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if TunnelBear Japan connection is active 4 | if nmcli connection show --active | grep -q "TunnelBear Japan"; then 5 | tooltip="TunnelBear VPN\rStatus: Connected\rLocation: Japan" 6 | echo "{\"text\": \"ON\", \"tooltip\": \"$tooltip\"}" 7 | else 8 | echo "{\"text\": \"OFF\", \"tooltip\": \"TunnelBear VPN is not running\"}" 9 | fi -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tunnelbear/toggle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if TunnelBear Japan connection is active 4 | if nmcli connection show --active | grep -q "TunnelBear Japan"; then 5 | nmcli connection down "TunnelBear Japan" 6 | else 7 | nmcli connection up "TunnelBear Japan" 8 | fi -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tunnelbear/tunnelbear-icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if TunnelBear Japan connection is active 4 | if nmcli connection show --active | grep -q "TunnelBear Japan"; then 5 | echo "/home/joogie/dotfiles/hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo.png" 6 | exit 0 7 | fi 8 | 9 | echo "/home/joogie/dotfiles/hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo-off.png" -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo-off.png -------------------------------------------------------------------------------- /hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/hyprland/.config/waybar/custom/tunnelbear/tunnelbear-logo.png -------------------------------------------------------------------------------- /hyprland/.config/waybar/mocha.css: -------------------------------------------------------------------------------- 1 | @define-color black #000000; 2 | @define-color rosewater #f5e0dc; 3 | @define-color flamingo #f2cdcd; 4 | @define-color pink #f5c2e7; 5 | @define-color mauve #cba6f7; 6 | @define-color red #f38ba8; 7 | @define-color maroon #eba0ac; 8 | @define-color peach #fab387; 9 | @define-color yellow #f9e2af; 10 | @define-color green #a6e3a1; 11 | @define-color teal #94e2d5; 12 | @define-color sky #89dceb; 13 | @define-color sapphire #74c7ec; 14 | @define-color blue #89b4fa; 15 | @define-color lavender #b4befe; 16 | @define-color text #cdd6f4; 17 | @define-color subtext1 #bac2de; 18 | @define-color subtext0 #a6adc8; 19 | @define-color overlay2 #9399b2; 20 | @define-color overlay1 #7f849c; 21 | @define-color overlay0 #6c7086; 22 | @define-color surface2 #585b70; 23 | @define-color surface1 #45475a; 24 | @define-color surface0 #313244; 25 | @define-color base #1e1e2e; 26 | @define-color mantle #181825; 27 | @define-color crust #11111b; 28 | -------------------------------------------------------------------------------- /hyprland/.config/waybar/style.css: -------------------------------------------------------------------------------- 1 | @import "mocha.css"; 2 | 3 | * { 4 | border: none; 5 | border-radius: 6px; 6 | min-height: 0; 7 | font-family: "FiraCode Nerd Font"; 8 | font-weight: 500; 9 | font-size: 14px; 10 | padding: 0; 11 | } 12 | 13 | window#waybar { 14 | background: transparent; 15 | border-radius: 0px; 16 | } 17 | 18 | tooltip { 19 | background-color: @base; 20 | border: 1px solid @overlay1; 21 | color: @text; 22 | } 23 | 24 | #clock, 25 | #cpu, 26 | #memory, 27 | #battery, 28 | #network, 29 | #pulseaudio { 30 | margin: 6px 6px 2px 0px; 31 | padding: 2px 8px; 32 | } 33 | 34 | #tray { 35 | background-color: @base; 36 | border: 1px solid @surface1; 37 | color: @text; 38 | margin: 6px 0px 2px 6px; 39 | padding: 2px 4px; 40 | } 41 | 42 | #workspaces { 43 | background: transparent; 44 | border: none; 45 | margin: 6px 0px 2px 6px; 46 | padding: 0; 47 | } 48 | 49 | #workspaces button { 50 | all: initial; 51 | color: @text; 52 | background-color: @base; 53 | border: 1px solid @surface1; 54 | padding: 2px 8px; 55 | border-radius: 6px; 56 | } 57 | 58 | #workspaces button:not(:first-child) { 59 | margin-left: 2px; 60 | } 61 | 62 | #workspaces button.active { 63 | background-color: @base; 64 | border-color: @blue; 65 | color: @text; 66 | } 67 | 68 | #workspaces button.urgent { 69 | background-color: @overlay1; 70 | color: @text; 71 | border-color: @red; 72 | } 73 | 74 | #cpu.critical, 75 | #memory.critical, 76 | #battery.warning, 77 | #battery.critical, 78 | #battery.urgent { 79 | color: @yellow; 80 | } 81 | 82 | .custom-spotify { 83 | padding-left: 6px; 84 | padding-right: 6px; 85 | padding-top: 4px; 86 | } 87 | 88 | #custom-tailscale { 89 | padding-right: 6px; 90 | margin: 6px 6px 2px 0px; 91 | } 92 | 93 | #custom-tunnelbear { 94 | padding-right: 6px; 95 | margin: 6px 6px 2px 0px; 96 | } 97 | 98 | #image { 99 | /* background-color: @base; */ 100 | padding-right: 6px; 101 | padding-left: 4px; 102 | margin: 6px 0px 2px 0px; 103 | } 104 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/config: -------------------------------------------------------------------------------- 1 | width=600 2 | height=400 3 | location=center 4 | show=drun 5 | prompt=Search... 6 | filter_rate=100 7 | allow_markup=true 8 | no_actions=true 9 | halign=fill 10 | orientation=vertical 11 | content_halign=fill 12 | insensitive=true 13 | allow_images=true 14 | image_size=24 15 | gtk_dark=true 16 | dynamic_lines=true 17 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/launcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$HOME/dotfiles/hyprland/.config/wofi/dmenu/scripts" 4 | SCRIPTS=$(ls "$SCRIPT_DIR") 5 | 6 | selected=$(printf "%s\n" "$SCRIPTS" | wofi --dmenu -p "Run script or Search web") 7 | 8 | # Exit if user presses Escape (no input at all) 9 | [ -z "$selected" ] && exit 10 | 11 | if printf "%s\n" "$SCRIPTS" | grep -Fxq "$selected"; then 12 | exec "$SCRIPT_DIR/$selected" 13 | else 14 | printf "%s" "$selected" | jq -sRr @uri | xargs -r -I{} xdg-open "https://www.google.com/search?q={}" 15 | fi 16 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/calculator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | wofi-calc 4 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/camera: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | device=$(v4l2-ctl --list-devices | grep -E '/dev/video[0-9]+' | head -n1 | xargs) 4 | 5 | if [ -z "$device" ]; then 6 | notify-send "Camera" "No video devices found" 7 | exit 1 8 | fi 9 | 10 | # Check if camera is in use 11 | pids=$(fuser "$device" 2>/dev/null | tr -d '\n' | sed 's/.*: *//') 12 | 13 | if [ -n "$pids" ]; then 14 | apps="" 15 | for pid in $pids; do 16 | # Skip non-numeric PIDs (like 'm' suffix from fuser) 17 | if [[ "$pid" =~ ^[0-9]+$ ]]; then 18 | app_info=$(ps axl | grep "^ *[^ ]* *[^ ]* *$pid " | grep -v grep) 19 | if [ -n "$app_info" ]; then 20 | app_name=$(echo "$app_info" | awk '{print $NF}' | sed 's|.*/||') 21 | apps="$apps$app_name (PID: $pid)\n" 22 | fi 23 | fi 24 | done 25 | 26 | if [ -n "$apps" ]; then 27 | notify-send "Camera" "Camera is in use by:\n$apps" 28 | exit 1 29 | fi 30 | fi 31 | 32 | DISPLAY=:0 ffplay -f v4l2 -i "$device" -window_title "Camera" 33 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/close-all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for pid in $(hyprctl --instance 0 clients -j | jq -r '.[] | .pid'); do 4 | kill -9 "$pid" 5 | done 6 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/kill-process: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # dmenu theming 4 | lines="-l 20" 5 | font="-fn Inconsolata-13" 6 | 7 | selected="$(ps -a -u $USER | wofi --show dmenu -i -p "Type to search and select process to kill" | awk '{print $1" "$4}')" 8 | 9 | if [[ ! -z $selected ]]; then 10 | answer="$(echo -e "Yes\nNo" | wofi --show dmenu -i -p "$selected will be killed, are you sure?")" 11 | 12 | if [[ $answer == "Yes" ]]; then 13 | selpid="$(awk '{print $1}' <<<$selected)" 14 | kill -9 $selpid 15 | notify-send "Success" "Process $selpid killed" 16 | else 17 | notify-send "Cancelled" "Process kill cancelled" 18 | fi 19 | fi 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/man-search: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | prompt="-p Manual:" 4 | 5 | # terminal to open manual 6 | terminal="kitty" 7 | 8 | # list all manuals 9 | manual="$(man -k . | wofi --show dmenu $prompt | awk '{print $1}')" 10 | 11 | # open selected manual with terminal 12 | if [[ ! -z "$manual" ]]; then 13 | eval "$($terminal -T "Mansearch - Manual Viewer" man "$manual")" 14 | fi 15 | 16 | exit 0 17 | 18 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/open-file: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | root_path="$HOME" 4 | 5 | prompt="Folder" 6 | 7 | folder_path="$(rg --files --hidden --no-ignore --maxdepth 5 "$root_path" | 8 | grep -v '/\.' | 9 | sed -E 's|/[^/]+$||' | 10 | sort -u | 11 | sed "s|^$root_path/||" | 12 | wofi --show dmenu -p "$prompt")" 13 | 14 | if [[ -n "$folder_path" ]]; then 15 | if [[ "$folder_path" == "$root_path" ]]; then 16 | search_path="$root_path" 17 | else 18 | search_path="$root_path/$folder_path" 19 | fi 20 | 21 | mapfile -t files < <(find "$search_path" -maxdepth 1 -type f) 22 | 23 | if [[ ${#files[@]} -eq 0 ]]; then 24 | prompt="No files here!" 25 | file_name="" 26 | else 27 | prompt="File:" 28 | file_name="$(printf "%s\n" "${files[@]##*/}" | wofi --show dmenu -p "$prompt")" 29 | fi 30 | 31 | if [[ -n "$file_name" ]]; then 32 | xdg-open "$search_path/$file_name" 33 | fi 34 | fi 35 | 36 | exit 0 37 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/reboot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | reboot 4 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/shutdown: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | shutdown now 4 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/sleep: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | systemctl suspend 4 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/system-info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | hyprsysteminfo 4 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/toggle-hyprsunset: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if pgrep -x hyprsunset > /dev/null; then 4 | pkill -x hyprsunset 5 | notify-send "'hyprsunset' stopped" 6 | else 7 | hyprsunset --temperature 4000 & 8 | notify-send "'hyprsunset' started" 9 | fi 10 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/toggle-rgb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | STATE_FILE="$HOME/.rgb_state" 4 | 5 | if [[ -f "$STATE_FILE" && "$(cat "$STATE_FILE")" == "white" ]]; then 6 | openrgb --mode static --color 000000 7 | echo "black" > "$STATE_FILE" 8 | notify-send "RGB lights set to black" 9 | else 10 | openrgb --mode static --color 11EC57 11 | echo "white" > "$STATE_FILE" 12 | notify-send "RGB lights set to white" 13 | fi 14 | 15 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/dmenu/scripts/toggle-waybar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | WAYBAR_PID=$(pgrep -x waybar) 4 | 5 | # Check if Waybar is running 6 | if [ -n "$WAYBAR_PID" ]; then 7 | # Kill Waybar using its PID 8 | kill "$WAYBAR_PID" 9 | else 10 | # Start Waybar 11 | waybar & 12 | fi 13 | -------------------------------------------------------------------------------- /hyprland/.config/wofi/style.css: -------------------------------------------------------------------------------- 1 | window { 2 | font-family: "SF Pro Display"; 3 | font-weight: normal; 4 | font-size: 16px; 5 | border: 1px solid #313244; 6 | background-color: transparent; 7 | border-radius: 12px; 8 | } 9 | 10 | #outer-box { 11 | border: 1px solid #313244; 12 | border-radius: 12px; 13 | background-color: #11111b; 14 | } 15 | 16 | #input { 17 | padding: 12px 24px; 18 | color: #cdd6f4; 19 | border-left: none; 20 | border-right: none; 21 | border-top: none; 22 | border-bottom: 1px solid #313244; 23 | outline: none; 24 | box-shadow: none; 25 | font-weight: bold; 26 | background-color: #11111b; 27 | outline: none; 28 | border-bottom-left-radius: 0px; 29 | border-bottom-right-radius: 0px; 30 | border-top-right-radius: 12px; 31 | border-top-left-radius: 12px; 32 | } 33 | 34 | #inner-box { 35 | margin: 8px; 36 | color: #cdd6f4; 37 | font-weight: bold; 38 | background-color: #11111b; 39 | border-bottom-left-radius: 12px; 40 | border-bottom-right-radius: 12px; 41 | } 42 | 43 | #scroll { 44 | border: none; 45 | border-radius: 0px; 46 | } 47 | 48 | #img { 49 | margin-right: 6px; 50 | object-fit: contain; 51 | } 52 | 53 | #img:selected { 54 | outline: none; 55 | box-shadow: none; 56 | } 57 | 58 | #text:selected { 59 | outline: none; 60 | box-shadow: none; 61 | color: #cdd6f4; 62 | border: none; 63 | border-radius: 0px; 64 | background-color: #1e1e2e; 65 | } 66 | 67 | #entry { 68 | padding: 12px; 69 | outline: none; 70 | box-shadow: none; 71 | border: none; 72 | border-radius: 12px; 73 | background-color: transparent; 74 | } 75 | 76 | #entry:selected { 77 | border-radius: 6px; 78 | background-color: #1e1e2e; 79 | } 80 | -------------------------------------------------------------------------------- /hyprland/.config/xdg-desktop-portal/hyprland-portals.conf: -------------------------------------------------------------------------------- 1 | [preferred] 2 | default=hyprland;gtk 3 | org.freedesktop.impl.portal.FileChooser=kde 4 | -------------------------------------------------------------------------------- /hyprland/.config/xdg-desktop-portal/portals.conf: -------------------------------------------------------------------------------- 1 | [preferred] 2 | default=hyprland 3 | -------------------------------------------------------------------------------- /nix/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "home-manager": { 4 | "inputs": { 5 | "nixpkgs": [ 6 | "nixpkgs" 7 | ] 8 | }, 9 | "locked": { 10 | "lastModified": 1750730235, 11 | "narHash": "sha256-rZErlxiV7ssvI8t7sPrKU+fRigNc2KvoKZG3gtUtK50=", 12 | "owner": "nix-community", 13 | "repo": "home-manager", 14 | "rev": "d07e9cceb4994ed64a22b9b36f8b76923e87ac38", 15 | "type": "github" 16 | }, 17 | "original": { 18 | "owner": "nix-community", 19 | "repo": "home-manager", 20 | "type": "github" 21 | } 22 | }, 23 | "nix-darwin": { 24 | "inputs": { 25 | "nixpkgs": [ 26 | "nixpkgs" 27 | ] 28 | }, 29 | "locked": { 30 | "lastModified": 1750618568, 31 | "narHash": "sha256-w9EG5FOXrjXGfbqCcQg9x1lMnTwzNDW5BMXp8ddy15E=", 32 | "owner": "LnL7", 33 | "repo": "nix-darwin", 34 | "rev": "1dd19f19e4b53a1fd2e8e738a08dd5fe635ec7e5", 35 | "type": "github" 36 | }, 37 | "original": { 38 | "owner": "LnL7", 39 | "repo": "nix-darwin", 40 | "type": "github" 41 | } 42 | }, 43 | "nixpkgs": { 44 | "locked": { 45 | "lastModified": 1750605355, 46 | "narHash": "sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI=", 47 | "owner": "NixOS", 48 | "repo": "nixpkgs", 49 | "rev": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", 50 | "type": "github" 51 | }, 52 | "original": { 53 | "owner": "NixOS", 54 | "ref": "nixpkgs-unstable", 55 | "repo": "nixpkgs", 56 | "type": "github" 57 | } 58 | }, 59 | "root": { 60 | "inputs": { 61 | "home-manager": "home-manager", 62 | "nix-darwin": "nix-darwin", 63 | "nixpkgs": "nixpkgs" 64 | } 65 | } 66 | }, 67 | "root": "root", 68 | "version": 7 69 | } 70 | -------------------------------------------------------------------------------- /nix/flake.nix: -------------------------------------------------------------------------------- 1 | # https://daiderd.com/nix-darwin/manual/index.html 2 | { 3 | description = "nix-darwin configuration for princejoogie"; 4 | 5 | inputs = { 6 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 7 | nix-darwin.url = "github:LnL7/nix-darwin"; 8 | nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; 9 | home-manager.url = "github:nix-community/home-manager"; 10 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; 11 | }; 12 | 13 | outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager }: 14 | let 15 | system = "aarch64-darwin"; 16 | pkgs = import nixpkgs { 17 | inherit system; 18 | config.allowUnfree = true; 19 | }; 20 | systemConfig = { pkgs, ... }: { 21 | environment.systemPackages = with pkgs; [ 22 | kitty 23 | ripgrep 24 | tmux 25 | zoxide 26 | ]; 27 | 28 | nix.settings.experimental-features = "nix-command flakes"; 29 | programs.zsh.enable = true; 30 | system.primaryUser = "prince.juguilon"; 31 | system.configurationRevision = self.rev or self.dirtyRev or null; 32 | system.stateVersion = 5; 33 | 34 | users.users."prince.juguilon" = { 35 | name = "prince.juguilon"; 36 | home = "/Users/prince.juguilon"; 37 | }; 38 | 39 | system.defaults = { 40 | dock.autohide = true; 41 | dock.mru-spaces = true; 42 | finder.AppleShowAllExtensions = true; 43 | finder.FXPreferredViewStyle = "clmv"; 44 | finder.ShowPathbar = true; 45 | NSGlobalDomain.AppleInterfaceStyle = "Dark"; 46 | }; 47 | 48 | system.keyboard = { 49 | enableKeyMapping = true; 50 | remapCapsLockToControl = true; 51 | }; 52 | 53 | homebrew = { 54 | brewPrefix = 55 | if pkgs.stdenv.hostPlatform.isAarch64 then "/opt/homebrew/bin" 56 | else "/usr/local"; 57 | enable = true; 58 | onActivation = { 59 | upgrade = true; 60 | autoUpdate = true; 61 | }; 62 | brews = [ 63 | "csvlens" 64 | "fd" 65 | "ghostscript" 66 | "imagemagick" 67 | "jq" 68 | "libpq" 69 | "netcat" 70 | "stow" 71 | "tectonic" 72 | "wget" 73 | ]; 74 | casks = [ 75 | "arc" 76 | "docker" 77 | "google-chrome" 78 | "hiddenbar" 79 | "karabiner-elements" 80 | "linear-linear" 81 | "mac-mouse-fix" 82 | "raycast" 83 | "shortcat" 84 | "shottr" 85 | "slack" 86 | "tunnelbear" 87 | "tunnelblick" 88 | ]; 89 | }; 90 | 91 | nixpkgs.hostPlatform = system; 92 | }; 93 | in 94 | { 95 | darwinConfigurations."princejoogie-macos" = nix-darwin.lib.darwinSystem { 96 | inherit system pkgs; 97 | modules = [ 98 | systemConfig 99 | home-manager.darwinModules.home-manager 100 | { 101 | home-manager.useGlobalPkgs = true; 102 | home-manager.users."prince.juguilon" = ./home.nix; 103 | } 104 | ]; 105 | }; 106 | }; 107 | } 108 | -------------------------------------------------------------------------------- /nix/home.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.username = "prince.juguilon"; 4 | home.homeDirectory = "/Users/prince.juguilon"; 5 | home.stateVersion = "24.05"; 6 | 7 | home.packages = with pkgs; [ 8 | discord 9 | spotify 10 | appcleaner 11 | ]; 12 | 13 | imports = [ 14 | ./user/shell/zsh.nix 15 | ./user/shell/bin.nix 16 | ./user/kitty/kitty.nix 17 | ./user/vscode/vscode.nix 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /nix/user/alacritty/alacritty.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | home.file.".config/alacritty".source = ./.; 4 | home.file.".config/alacritty".recursive = true; 5 | } 6 | -------------------------------------------------------------------------------- /nix/user/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [colors.bright] 2 | black = "#585B70" 3 | blue = "#89B4FA" 4 | cyan = "#94E2D5" 5 | green = "#A6E3A1" 6 | magenta = "#F5C2E7" 7 | red = "#F38BA8" 8 | white = "#A6ADC8" 9 | yellow = "#F9E2AF" 10 | 11 | [colors.cursor] 12 | cursor = "#F5E0DC" 13 | text = "#1E1E2E" 14 | 15 | [colors.dim] 16 | black = "#45475A" 17 | blue = "#89B4FA" 18 | cyan = "#94E2D5" 19 | green = "#A6E3A1" 20 | magenta = "#F5C2E7" 21 | red = "#F38BA8" 22 | white = "#BAC2DE" 23 | yellow = "#F9E2AF" 24 | 25 | [colors.hints.end] 26 | background = "#A6ADC8" 27 | foreground = "#1E1E2E" 28 | 29 | [colors.hints.start] 30 | background = "#F9E2AF" 31 | foreground = "#1E1E2E" 32 | 33 | [colors.normal] 34 | black = "#45475A" 35 | blue = "#89B4FA" 36 | cyan = "#94E2D5" 37 | green = "#A6E3A1" 38 | magenta = "#F5C2E7" 39 | red = "#F38BA8" 40 | white = "#BAC2DE" 41 | yellow = "#F9E2AF" 42 | 43 | [colors.primary] 44 | background = "#000000" 45 | bright_foreground = "#CDD6F4" 46 | dim_foreground = "#CDD6F4" 47 | foreground = "#CDD6F4" 48 | 49 | [colors.search.focused_match] 50 | background = "#A6E3A1" 51 | foreground = "#1E1E2E" 52 | 53 | [colors.search.matches] 54 | background = "#A6ADC8" 55 | foreground = "#1E1E2E" 56 | 57 | [colors.selection] 58 | background = "#F5E0DC" 59 | text = "#1E1E2E" 60 | 61 | [colors.vi_mode_cursor] 62 | cursor = "#B4BEFE" 63 | text = "#1E1E2E" 64 | 65 | [font] 66 | size = 14 67 | 68 | [font.normal] 69 | family = "FiraCode Nerd Font" 70 | 71 | [window] 72 | padding.x = 10 73 | padding.y = 10 74 | opacity = 0.85 75 | blur = true 76 | decorations = "Buttonless" 77 | -------------------------------------------------------------------------------- /nix/user/kitty/current-theme.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Mocha 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | # The basic colors 10 | foreground #cdd6f4 11 | # background #1e1e2e 12 | background #000000 13 | selection_foreground #1e1e2e 14 | selection_background #f5e0dc 15 | 16 | # Cursor colors 17 | cursor #f5e0dc 18 | cursor_text_color #1e1e2e 19 | 20 | # URL underline color when hovering with mouse 21 | url_color #f5e0dc 22 | 23 | # Kitty window border colors 24 | active_border_color #b4befe 25 | inactive_border_color #6c7086 26 | bell_border_color #f9e2af 27 | 28 | # OS Window titlebar colors 29 | wayland_titlebar_color system 30 | macos_titlebar_color system 31 | 32 | # Tab bar colors 33 | active_tab_foreground #11111b 34 | active_tab_background #cba6f7 35 | inactive_tab_foreground #cdd6f4 36 | inactive_tab_background #181825 37 | tab_bar_background #11111b 38 | 39 | # Colors for marks (marked text in the terminal) 40 | mark1_foreground #1e1e2e 41 | mark1_background #b4befe 42 | mark2_foreground #1e1e2e 43 | mark2_background #cba6f7 44 | mark3_foreground #1e1e2e 45 | mark3_background #74c7ec 46 | 47 | # The 16 terminal colors 48 | 49 | # black 50 | color0 #45475a 51 | color8 #585b70 52 | 53 | # red 54 | color1 #f38ba8 55 | color9 #f38ba8 56 | 57 | # green 58 | color2 #a6e3a1 59 | color10 #a6e3a1 60 | 61 | # yellow 62 | color3 #f9e2af 63 | color11 #f9e2af 64 | 65 | # blue 66 | color4 #89b4fa 67 | color12 #89b4fa 68 | 69 | # magenta 70 | color5 #f5c2e7 71 | color13 #f5c2e7 72 | 73 | # cyan 74 | color6 #94e2d5 75 | color14 #94e2d5 76 | 77 | # white 78 | color7 #bac2de 79 | color15 #a6adc8 80 | -------------------------------------------------------------------------------- /nix/user/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | include current-theme.conf 2 | 3 | enable_audio_bell no 4 | background_opacity 1 5 | background_blur 100 6 | hide_window_decorations yes 7 | cursor_trail 3 8 | 9 | font_family FiraCode Nerd Font 10 | bold_font auto 11 | italic_font auto 12 | bold_italic_font auto 13 | 14 | font_size 12.0 15 | 16 | window_padding_width 6 17 | 18 | modify_font cell_height 120% 19 | -------------------------------------------------------------------------------- /nix/user/kitty/kitty.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | home.file.".config/kitty".source = ./.; 4 | home.file.".config/kitty".recursive = true; 5 | } 6 | -------------------------------------------------------------------------------- /nix/user/shell/.gitconfig: -------------------------------------------------------------------------------- 1 | [credential] 2 | helper = store 3 | [alias] 4 | co = "!f() { git branch -a | awk '{gsub(\"remotes/origin/\", \"\", $1); print $1}' | sort -u | fzf-tmux -p --reverse | xargs git checkout; }; f" 5 | squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; }; f" 6 | gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f" 7 | ll = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' 8 | root = rev-parse --show-toplevel 9 | [core] 10 | pager = delta 11 | [interactive] 12 | diffFilter = delta --color-only 13 | [add.interactive] 14 | useBuiltin = false 15 | [delta] 16 | navigate = true 17 | light = false 18 | side-by-side = false 19 | 20 | blame-palette = "#1e1e2e #181825 #11111b #313244 #45475a" 21 | commit-decoration-style = "#6c7086" bold box ul 22 | dark = true 23 | file-decoration-style = "#6c7086" 24 | file-style = "#cdd6f4" 25 | hunk-header-decoration-style = "#6c7086" box ul 26 | hunk-header-file-style = bold 27 | hunk-header-line-number-style = bold "#a6adc8" 28 | hunk-header-style = file line-number syntax 29 | line-numbers-left-style = "#6c7086" 30 | line-numbers-minus-style = bold "#f38ba8" 31 | line-numbers-plus-style = bold "#a6e3a1" 32 | line-numbers-right-style = "#6c7086" 33 | line-numbers-zero-style = "#6c7086" 34 | minus-emph-style = bold syntax "#53394c" 35 | minus-style = syntax "#34293a" 36 | plus-emph-style = bold syntax "#404f4a" 37 | plus-style = syntax "#2c3239" 38 | map-styles = \ 39 | bold purple => syntax "#494060", \ 40 | bold blue => syntax "#384361", \ 41 | bold cyan => syntax "#384d5d", \ 42 | bold yellow => syntax "#544f4e" 43 | [merge] 44 | conflictstyle = diff3 45 | [diff] 46 | colorMoved = default 47 | [init] 48 | defaultBranch = main 49 | [push] 50 | autoSetupRemote = true 51 | [rerere] 52 | enabled = true 53 | -------------------------------------------------------------------------------- /nix/user/shell/bin.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | { 3 | home.file.".local/bin/bare-clone".source = ./bin/bare-clone; 4 | home.file.".local/bin/gca".source = ./bin/gca; 5 | home.file.".local/bin/ghpr".source = ./bin/ghpr; 6 | home.file.".local/bin/kill-other-windows".source = ./bin/kill-other-windows; 7 | home.file.".local/bin/switch-session".source = ./bin/switch-session; 8 | home.file.".local/bin/tmss".source = ./bin/tmss; 9 | home.file.".local/bin/update-pio".source = ./bin/update-pio; 10 | home.file.".local/bin/update-wanted".source = ./bin/update-wanted; 11 | } 12 | -------------------------------------------------------------------------------- /nix/user/shell/bin/bare-clone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -Eeuo pipefail 4 | trap cleanup SIGINT SIGTERM ERR EXIT 5 | 6 | usage() { 7 | cat << EOF # remove the space between << and EOF, this is due to web plugin issue 8 | Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-l] repository 9 | 10 | Clone a bare git repo and set up environment for working comfortably and exclusively from worktrees. 11 | 12 | Available options: 13 | 14 | -h, --help Print this help and exit 15 | -v, --verbose Print script debug info 16 | -l, --location Location where the repo will be cloned 17 | EOF 18 | exit 19 | } 20 | 21 | cleanup() { 22 | trap - SIGINT SIGTERM ERR EXIT 23 | } 24 | 25 | setup_colors() { 26 | if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then 27 | NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m' 28 | else 29 | NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW='' 30 | fi 31 | } 32 | 33 | msg() { 34 | echo >&2 -e "${1-}" 35 | } 36 | 37 | die() { 38 | local msg=$1 39 | local code=${2-1} # default exit status 1 40 | msg "$msg" 41 | exit "$code" 42 | } 43 | 44 | parse_params() { 45 | bare_location='.bare' 46 | 47 | while :; do 48 | case "${1-}" in 49 | -h | --help) usage ;; 50 | -v | --verbose) set -x ;; 51 | --no-color) NO_COLOR=1 ;; 52 | -l | --location) 53 | reponame="${2-}" 54 | shift 55 | ;; 56 | -?*) die "Unknown option: $1" ;; 57 | *) break ;; 58 | esac 59 | shift 60 | done 61 | 62 | args=("$@") 63 | 64 | if [ -z "$reponame" ]; then 65 | reponame=$(echo "${args[@]}" | awk -F/ '{print $NF}') 66 | fi 67 | location="${reponame}/${bare_location}" 68 | 69 | # check required params and arguments 70 | # [[ -z "${param-}" ]] && die "Missing required parameter: param" 71 | [[ ${#args[@]} -eq 0 ]] && die "Missing script arguments" 72 | 73 | return 0 74 | } 75 | 76 | 77 | parse_params "$@" 78 | setup_colors 79 | 80 | msg "${YELLOW}Cloning bare repository to $location...${NOFORMAT}" 81 | git clone --bare "${args[@]}" "$location" 82 | pushd "$location" > /dev/null 83 | msg "${YELLOW}Adjusting origin fetch locations...${NOFORMAT}" 84 | git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" 85 | popd > /dev/null 86 | msg "${YELLOW}Setting .git file contents...${NOFORMAT}" 87 | echo "gitdir: ./$bare_location" > ${reponame}/.git 88 | msg "${GREEN}Success.${NOFORMAT}" 89 | -------------------------------------------------------------------------------- /nix/user/shell/bin/gca: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | IS_BARE=$(git rev-parse --is-bare-repository) 4 | ROOT_DIR=$(git rev-parse --path-format=absolute --git-common-dir) 5 | 6 | switch_worktree() { 7 | WORKTREE_DIR=$(git worktree list | awk -v root_dir="$ROOT_DIR" '{gsub(root_dir "/?", "", $1); print $1}' | fzf-tmux -p --reverse) 8 | 9 | if [ -z "$WORKTREE_DIR" ]; then 10 | echo "No worktree selected." 11 | return 1 12 | fi 13 | 14 | echo "cd $ROOT_DIR/$WORKTREE_DIR" | pbcopy 15 | echo "command copied to clipboard" 16 | } 17 | 18 | add_worktree() { 19 | git branch -a | fzf-tmux -p --reverse | awk '{gsub("remotes/origin/", "", $1); print $1}' | xargs git worktree add > /dev/null 2>&1 20 | switch_worktree 21 | } 22 | 23 | remove_worktree() { 24 | WORKTREE_DIR=$(git worktree list | awk -v root_dir="$ROOT_DIR" '{gsub(root_dir "/?", "", $1); print $1}' | fzf-tmux -p --reverse) 25 | 26 | if [ "$WORKTREE_DIR" == "$ROOT_DIR" ]; then 27 | echo "Cannot remove bare repo." 28 | return 1 29 | fi 30 | 31 | git worktree remove $WORKTREE_DIR 32 | rm -rf $ROOT_DIR/$WORKTREE_DIR 33 | 34 | echo "Worktree removed." 35 | } 36 | 37 | if [ "$IS_BARE" == "true" ]; then 38 | ACTION=$(echo -e "add\nswitch\nremove" | fzf-tmux -p --reverse | awk '{print $1}') 39 | if [ "$ACTION" == "add" ]; then 40 | add_worktree 41 | elif [ "$ACTION" == "switch" ]; then 42 | switch_worktree 43 | elif [ "$ACTION" == "remove" ]; then 44 | remove_worktree 45 | fi 46 | else 47 | git branch -a | fzf-tmux -p --reverse | awk '{gsub("remotes/origin/", "", $1); print $1}' | xargs git checkout > /dev/null 2>&1 48 | fi 49 | 50 | -------------------------------------------------------------------------------- /nix/user/shell/bin/ghpr: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _branch=$(git branch -a | fzf-tmux -p --reverse | awk '{gsub("remotes/origin/", "", $1); print $1}') 4 | echo "gh pr create --base $_branch" | pbcopy > /dev/null 5 | echo "Command has been copued to clipboard" 6 | -------------------------------------------------------------------------------- /nix/user/shell/bin/kill-other-windows: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | current_window=$(tmux display-message -p '#I') 4 | 5 | all_windows=$(tmux list-windows -F '#I') 6 | 7 | for window in $all_windows; do 8 | if [ "$window" -ne "$current_window" ]; then 9 | tmux kill-window -t $window 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /nix/user/shell/bin/switch-session: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tmux list-sessions -F "#{session_name}" | grep -v "^$(tmux display-message -p '#S')$" | fzf-tmux -p --reverse | xargs tmux switch-client -t 4 | -------------------------------------------------------------------------------- /nix/user/shell/bin/tmss: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | switch_to() { 4 | if [[ -z $TMUX ]]; then 5 | tmux attach-session -t $1 6 | else 7 | tmux switch-client -t $1 8 | fi 9 | } 10 | 11 | has_session() { 12 | tmux list-sessions | grep -q "^$1:" 13 | } 14 | 15 | hydrate() { 16 | if [ -f $2/.tmux-sessionizer ]; then 17 | tmux send-keys -t $1 "source $2/.tmux-sessionizer" c-M 18 | elif [ -f $HOME/.tmux-sessionizer ]; then 19 | tmux send-keys -t $1 "source $HOME/.tmux-sessionizer" c-M 20 | fi 21 | } 22 | 23 | if [[ $# -eq 1 ]]; then 24 | selected=$1 25 | else 26 | # If someone wants to make this extensible, i'll accept 27 | # PR 28 | selected=$(find ~/Documents/codes ~/Documents/fgi ~/dotfiles -mindepth 1 -maxdepth 1 -type d | fzf) 29 | fi 30 | 31 | if [[ -z $selected ]]; then 32 | exit 0 33 | fi 34 | 35 | selected_name=$(basename "$selected" | tr . _) 36 | tmux_running=$(pgrep tmux) 37 | 38 | if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then 39 | tmux new-session -s $selected_name -c $selected 40 | hydrate $selected_name $selected 41 | exit 0 42 | fi 43 | 44 | if ! has_session $selected_name; then 45 | tmux new-session -ds $selected_name -c $selected 46 | hydrate $selected_name $selected 47 | fi 48 | 49 | switch_to $selected_name 50 | -------------------------------------------------------------------------------- /nix/user/shell/bin/update-pio: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require("child_process"); 4 | const { writeFileSync } = require("fs"); 5 | 6 | const clangdContent = (paths) => `CompileFlags: 7 | Add: [ 8 | -I${paths} 9 | ] 10 | `; 11 | 12 | function runCommand(cmd, args) { 13 | return new Promise((resolve, reject) => { 14 | const child = spawn(cmd, args); 15 | 16 | let output = ''; 17 | 18 | child.stdout.on('data', (data) => { 19 | process.stdout.write(data); 20 | output += data.toString(); 21 | }); 22 | 23 | child.stderr.on('data', (data) => { 24 | process.stderr.write(data); 25 | }); 26 | 27 | child.on('close', (code) => { 28 | if (code !== 0) { 29 | reject(new Error(`Command failed with exit code ${code}`)); 30 | } else { 31 | resolve(output); 32 | } 33 | }); 34 | }); 35 | } 36 | 37 | const main = async () => { 38 | console.log("Getting idestate..."); 39 | const raw = await runCommand('pio', ['-f', '-c', 'vim', 'run', '-t', 'idedata', '-d', process.cwd()]); 40 | const out = raw.split("\n").filter((l) => Boolean(l) && l.startsWith("{")); 41 | 42 | if (out.length <= 0) { 43 | console.log("ERROR: json object not found"); 44 | return process.exit(1); 45 | } 46 | 47 | const json = JSON.parse(out[0]); 48 | const paths = []; 49 | 50 | if (json.libsource_dirs) { 51 | for (line of json.libsource_dirs) paths.push(line); 52 | } 53 | 54 | if (json.includes.build) { 55 | for (line of json.includes.build) paths.push(line); 56 | } 57 | 58 | if (json.includes.compatlib) { 59 | for (line of json.includes.compatlib) paths.push(line); 60 | } 61 | 62 | if (json.includes.toolchain) { 63 | for (line of json.includes.toolchain) paths.push(line); 64 | } 65 | 66 | const str = paths.join(",\n -I"); 67 | writeFileSync(".clangd", clangdContent(str)); 68 | }; 69 | 70 | main().catch((e) => { 71 | console.error(e); 72 | process.exit(1); 73 | }); 74 | -------------------------------------------------------------------------------- /nix/user/shell/bin/update-wanted: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { execSync } = require("child_process"); 4 | const { existsSync } = require("fs"); 5 | const path = require("path"); 6 | const { cwd } = require("process"); 7 | 8 | const main = async () => { 9 | console.log("Fetching wanted version..."); 10 | const out = execSync(`npm outdated | awk 'NR > 1 {print $1 "@" $3}'`) 11 | .toString() 12 | .split("\n") 13 | .filter(Boolean); 14 | 15 | const yarnLock = path.join(cwd(), "yarn.lock"); 16 | const pnpmLock = path.join(cwd(), "pnpm-lock.yaml"); 17 | const packages = out.length > 0 ? out.join(" ") : null; 18 | 19 | const pm = process.argv[2]; 20 | 21 | if (packages === null) { 22 | console.log("All packages up to date!"); 23 | process.exit(0); 24 | } 25 | 26 | if (pm === "show") { 27 | console.log("Packages to update:"); 28 | out.forEach((e) => console.log(` - ${e}`)); 29 | process.exit(0); 30 | } 31 | 32 | console.log("\nUpdating packages:"); 33 | out.forEach((e) => console.log(` - ${e}`)); 34 | 35 | if (existsSync(pnpmLock) || pm === "pnpm") { 36 | const installCommand = `pnpm i ${packages}`; 37 | console.log("\nUsing pnpm"); 38 | console.log(`\n${installCommand}\n`); 39 | execSync(installCommand, { stdio: "inherit" }); 40 | } else if (existsSync(yarnLock) || pm === "yarn") { 41 | const installCommand = `yarn add ${packages}`; 42 | console.log("\nUsing yarn"); 43 | console.log(`\n${installCommand}\n`); 44 | execSync(installCommand, { stdio: "inherit" }); 45 | } else { 46 | const installCommand = `npm install ${packages}`; 47 | console.log("\nUsing npm"); 48 | console.log(`\n${installCommand}\n`); 49 | execSync(installCommand, { stdio: "inherit" }); 50 | } 51 | 52 | console.log("Finished updating packages!"); 53 | }; 54 | 55 | main().catch((e) => { 56 | console.error(e); 57 | process.exit(1); 58 | }); 59 | -------------------------------------------------------------------------------- /nix/user/shell/starship.toml: -------------------------------------------------------------------------------- 1 | format = """ 2 | (#a6adc8)\ 3 | [ 󰘧 ](bg:#a6adc8 fg:#11111b)\ 4 | [](bg:#89b4fa fg:#a6adc8)\ 5 | $directory\ 6 | [](fg:#89b4fa bg:#313244)\ 7 | $git_branch\ 8 | $git_status\ 9 | [](fg:#313244 bg:#181825)\ 10 | $nodejs\ 11 | $python\ 12 | $rust\ 13 | $golang\ 14 | $php\ 15 | [ ](fg:#181825)\ 16 | \n$character""" 17 | 18 | [directory] 19 | style = "fg:#15161E bg:#89b4fa" 20 | format = "[ $path ]($style)" 21 | truncation_length = 3 22 | truncation_symbol = "…/" 23 | 24 | [git_branch] 25 | symbol = "" 26 | style = "bg:#313244" 27 | format = '[[ $symbol $branch ](fg:#89b4fa bg:#313244)]($style)' 28 | 29 | [git_status] 30 | style = "bg:#313244" 31 | format = '[[($all_status$ahead_behind)](fg:#89b4fa bg:#313244)]($style)' 32 | ahead = '⇡${count} ' 33 | diverged = '⇕⇡${ahead_count}⇣${behind_count} ' 34 | behind = '⇣${count} ' 35 | modified = '!${count} ' 36 | staged = '+${count} ' 37 | stashed = '*${count} ' 38 | untracked = '?${count} ' 39 | renamed = '»${count} ' 40 | deleted = '✘${count} ' 41 | 42 | [nodejs] 43 | symbol = "" 44 | style = "bg:#181825" 45 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 46 | 47 | [rust] 48 | symbol = "" 49 | style = "bg:#181825" 50 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 51 | 52 | [python] 53 | symbol = " " 54 | detect_extensions = [] 55 | detect_files = [] 56 | style = "bg:#181825" 57 | format = '[[ $symbol ($version) ($virtualenv)](fg:#89b4fa bg:#181825)]($style)' 58 | 59 | [golang] 60 | symbol = "" 61 | style = "bg:#181825" 62 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 63 | 64 | [php] 65 | symbol = "" 66 | style = "bg:#181825" 67 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 68 | -------------------------------------------------------------------------------- /nix/user/shell/zsh.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | awscli2 5 | direnv 6 | ffmpeg 7 | fnm 8 | fzf 9 | gh 10 | lazydocker 11 | rustup 12 | starship 13 | tree 14 | ]; 15 | 16 | programs.direnv = { 17 | enable = true; 18 | enableZshIntegration = true; 19 | }; 20 | 21 | programs.starship = { 22 | enable = true; 23 | enableZshIntegration = true; 24 | }; 25 | home.file.".config/starship.toml".source = ./starship.toml; 26 | home.file.".tmux.conf".source = ./.tmux.conf; 27 | home.file.".gitconfig".source = ./.gitconfig; 28 | 29 | programs.zsh = { 30 | enable = true; 31 | enableCompletion = true; 32 | autosuggestion.enable = true; 33 | syntaxHighlighting.enable = true; 34 | 35 | oh-my-zsh = { 36 | enable = true; 37 | plugins = [ 38 | "z" 39 | "aws" 40 | "fnm" 41 | "git" 42 | "tmux" 43 | "docker" 44 | "vi-mode" 45 | ]; 46 | }; 47 | 48 | shellAliases = { 49 | cls = "clear"; 50 | so = "source"; 51 | x = "exit"; 52 | G = "git"; 53 | t = "tmux"; 54 | lta = "ls -lta --human-readable"; 55 | pip = "pip3"; 56 | }; 57 | 58 | initContent= '' 59 | export DISABLE_AUTO_UPDATE="true" 60 | 61 | bindkey -M viins jj vi-cmd-mode 62 | export VI_MODE_SET_CURSOR=true 63 | # oh-my-zsh end 64 | 65 | # options 66 | setopt HIST_IGNORE_ALL_DUPS 67 | setopt HIST_FIND_NO_DUPS 68 | setopt HIST_SAVE_NO_DUPS 69 | setopt SHARE_HISTORY 70 | setopt INC_APPEND_HISTORY 71 | # options end 72 | 73 | # variables 74 | # export TERM=xterm-256color 75 | export EDITOR=nvim 76 | export MANPAGER='nvim +Man!' 77 | export PATH=$PATH:/opt/homebrew/bin 78 | export PATH=$PATH:$HOME/.cargo/bin 79 | export PATH=$PATH:$HOME/.local/bin 80 | export PATH=$PATH:$HOME/.local/share/fnm 81 | export PATH=$PATH:$HOME/.local/custom/bin 82 | export PATH=$PATH:$HOME/.local/share/bob/nvim-bin 83 | export PATH=$PATH:$HOME/.duckdb/cli/latest 84 | export PATH=$PATH:/opt/homebrew/opt/libpq/bin 85 | 86 | if [[ -f "$HOME/.private.sh" ]]; then 87 | source "$HOME/.private.sh" 88 | fi 89 | # variables end 90 | 91 | # fnm 92 | eval "$(fnm env --use-on-cd --shell zsh)" 93 | # fnm end 94 | 95 | # uv 96 | if [[ -x "$(command -v uv)" ]]; then 97 | eval "$(uv generate-shell-completion zsh)" 98 | fi 99 | 100 | if [[ -x "$(command -v uvx)" ]]; then 101 | eval "$(uvx --generate-shell-completion zsh)" 102 | fi 103 | # uv end 104 | 105 | # direnv 106 | if [[ -x "$(command -v direnv)" ]]; then 107 | eval "$(direnv hook zsh)" 108 | fi 109 | # direnv end 110 | 111 | # bun 112 | [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" 113 | export BUN_INSTALL="$HOME/.bun" 114 | export PATH="$BUN_INSTALL/bin:$PATH" 115 | # bun end 116 | ''; 117 | }; 118 | } 119 | 120 | -------------------------------------------------------------------------------- /nix/user/vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "alt+k", 4 | "command": "-keybindings.editor.recordSearchKeys", 5 | "when": "inKeybindings && inKeybindingsSearch" 6 | }, 7 | { 8 | "key": "alt+j", 9 | "command": "editor.action.moveLinesDownAction", 10 | "when": "editorTextFocus && !editorReadonly" 11 | }, 12 | { 13 | "key": "alt+down", 14 | "command": "-editor.action.moveLinesDownAction", 15 | "when": "editorTextFocus && !editorReadonly" 16 | }, 17 | { 18 | "key": "alt+k", 19 | "command": "editor.action.moveLinesUpAction", 20 | "when": "editorTextFocus && !editorReadonly" 21 | }, 22 | { 23 | "key": "alt+up", 24 | "command": "-editor.action.moveLinesUpAction", 25 | "when": "editorTextFocus && !editorReadonly" 26 | }, 27 | { 28 | "key": "ctrl+\\", 29 | "command": "-workbench.action.splitEditor" 30 | }, 31 | { 32 | "key": "ctrl+\\", 33 | "command": "workbench.action.terminal.toggleTerminal", 34 | "when": "terminal.active" 35 | }, 36 | { 37 | "key": "ctrl+`", 38 | "command": "-workbench.action.terminal.toggleTerminal", 39 | "when": "terminal.active" 40 | }, 41 | { 42 | "key": "ctrl+f", 43 | "command": "-actions.find", 44 | "when": "editorFocus || editorIsOpen" 45 | }, 46 | { 47 | "key": "ctrl+f", 48 | "command": "-settings.action.search", 49 | "when": "inSettingsEditor" 50 | }, 51 | { 52 | "key": "ctrl+f", 53 | "command": "-extension.vim_ctrl+f", 54 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" 55 | }, 56 | { 57 | "key": "ctrl+f", 58 | "command": "-keybindings.editor.searchKeybindings", 59 | "when": "inKeybindings" 60 | }, 61 | { 62 | "key": "ctrl+f", 63 | "command": "workbench.action.findInFiles" 64 | }, 65 | { 66 | "key": "ctrl+shift+f", 67 | "command": "-workbench.action.findInFiles" 68 | }, 69 | { 70 | "key": "ctrl+f", 71 | "command": "workbench.action.terminal.searchWorkspace", 72 | "when": "terminalFocus && terminalProcessSupported && terminalTextSelected" 73 | }, 74 | { 75 | "key": "ctrl+shift+f", 76 | "command": "-workbench.action.terminal.searchWorkspace", 77 | "when": "terminalFocus && terminalProcessSupported && terminalTextSelected" 78 | }, 79 | { 80 | "key": "ctrl+f", 81 | "command": "workbench.view.search", 82 | "when": "workbench.view.search.active && neverMatch =~ /doesNotMatch/" 83 | }, 84 | { 85 | "key": "ctrl+shift+f", 86 | "command": "-workbench.view.search", 87 | "when": "workbench.view.search.active && neverMatch =~ /doesNotMatch/" 88 | }, 89 | { 90 | "key": "ctrl+p", 91 | "command": "-extension.vim_ctrl+p", 92 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl || vim.active && vim.use && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use && !inDebugRepl && vim.mode == 'SearchInProgressMode'" 93 | } 94 | ] 95 | -------------------------------------------------------------------------------- /nix/user/vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.settings.editor": "json", 3 | 4 | "editor.fontFamily": "FiraCode Nerd Font", 5 | "scm.inputFontFamily": "FiraCode Nerd Font", 6 | "terminal.integrated.fontFamily": "FiraCode Nerd Font", 7 | "chat.editor.fontFamily": "FiraCode Nerd Font", 8 | "debug.console.fontFamily": "FiraCode Nerd Font", 9 | "editor.codeLensFontFamily": "FiraCode Nerd Font", 10 | "notebook.output.fontFamily": "FiraCode Nerd Font", 11 | "markdown.preview.fontFamily": "FiraCode Nerd Font", 12 | "editor.inlayHints.fontFamily": "FiraCode Nerd Font", 13 | 14 | "editor.fontSize": 14, 15 | "terminal.integrated.fontSize": 14, 16 | 17 | "editor.minimap.enabled": false, 18 | "editor.scrollbar.vertical": "auto", 19 | "editor.scrollbar.horizontal": "auto", 20 | "editor.inlineSuggest.enabled": true, 21 | "editor.mouseWheelZoom": true, 22 | "editor.wordWrap": "on", 23 | "editor.lineNumbers": "relative", 24 | 25 | "apc.activityBar": { 26 | "position": "bottom", 27 | "hideSettings": true, 28 | "size": 28 29 | }, 30 | "apc.electron": { 31 | "titleBarStyle": "hiddenInset", 32 | "trafficLightPosition": { 33 | "x": 12, 34 | "y": 10 35 | } 36 | }, 37 | "apc.font.family": "FiraCode Nerd Font", 38 | "apc.monospace.font.family": "FiraCode Nerd Font", 39 | "apc.statusBar": { 40 | "position": "editor-bottom", 41 | "height": 28, 42 | "fontSize": 12 43 | }, 44 | "apc.stylesheet": { 45 | ".sidebar > .composite": "height: 12px !important", 46 | ".title-label": "display: none !important", 47 | ".title-actions": "display: none !important", 48 | ".tabs-and-actions-container > .editor-actions": "display: none !important", 49 | ".titlebar-center": "display: none !important", 50 | ".titlebar-right": "display: none !important", 51 | ".inline-tabs-placeholder": "display: none !important", 52 | ".split-view-view .visible": "background-color: #110f17 !important" 53 | }, 54 | "workbench.colorCustomizations": { 55 | "[Aura Dark]": { 56 | "editor.background": "#110f17", 57 | "terminal.background": "#110f17", 58 | "activityBar.background": "#110f17", 59 | "statusBar.background": "#110f17", 60 | "editorGroupHeader.tabsBackground": "#110f17", 61 | "tab.inactiveBackground": "#110f17" 62 | } 63 | }, 64 | "vim.enableNeovim": true, 65 | "vim.hlsearch": true, 66 | "vim.incsearch": true, 67 | "vim.ignorecase": true, 68 | "vim.insertModeKeyBindings": [ 69 | { 70 | "before": ["j", "j"], 71 | "after": [""] 72 | } 73 | ], 74 | "vim.normalModeKeyBindings": [ 75 | { 76 | "before": [""], 77 | "commands": [":noh"] 78 | }, 79 | { 80 | "before": [""], 81 | "commands": ["workbench.action.quickOpenNavigateNextInFilePicker"] 82 | }, 83 | { 84 | "before": [""], 85 | "commands": ["workbench.action.toggleSidebarVisibility"] 86 | }, 87 | { 88 | "before": ["g", "r"], 89 | "commands": ["editor.action.goToReferences"] 90 | }, 91 | { 92 | "before": ["", "p"], 93 | "commands": ["editor.action.formatDocument"] 94 | }, 95 | { 96 | "before": ["K"], 97 | "commands": ["editor.action.showHover"] 98 | }, 99 | { 100 | "before": ["", "c", "a"], 101 | "commands": ["editor.action.codeAction"] 102 | }, 103 | { 104 | "before": ["", "r", "n"], 105 | "commands": ["editor.action.rename"] 106 | }, 107 | { 108 | "before": ["", "d", "j"], 109 | "commands": ["editor.action.marker.nextInFiles"] 110 | }, 111 | { 112 | "before": ["", "d", "k"], 113 | "commands": ["editor.action.marker.prevInFiles"] 114 | } 115 | ], 116 | "vim.visualModeKeyBindings": [ 117 | { 118 | "before": [">"], 119 | "commands": ["editor.action.indentLines"] 120 | }, 121 | { 122 | "before": ["<"], 123 | "commands": ["editor.action.outdentLines"] 124 | }, 125 | { 126 | "before": ["", "p"], 127 | "commands": ["editor.action.formatSelection"] 128 | } 129 | ], 130 | "[jsonc]": { 131 | "editor.defaultFormatter": "esbenp.prettier-vscode" 132 | }, 133 | "vim.leader": " ", 134 | "files.associations": { 135 | "*.rmd": "markdown" 136 | }, 137 | "[typescriptreact]": { 138 | "editor.defaultFormatter": "esbenp.prettier-vscode" 139 | }, 140 | "[typescript]": { 141 | "editor.defaultFormatter": "esbenp.prettier-vscode" 142 | }, 143 | "workbench.iconTheme": "moxer-icons", 144 | "workbench.colorTheme": "Aura Dark", 145 | "window.zoomLevel": 1, 146 | "breadcrumbs.enabled": false, 147 | "files.trimTrailingWhitespace": true, 148 | "catppuccin.italicComments": false, 149 | "catppuccin.italicKeywords": false, 150 | "window.commandCenter": false, 151 | "[javascript]": { 152 | "editor.defaultFormatter": "esbenp.prettier-vscode" 153 | }, 154 | "[css]": { 155 | "editor.defaultFormatter": "esbenp.prettier-vscode" 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /nix/user/vscode/vscode.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | vscode 5 | ]; 6 | home.file."/Library/Application Support/Code/User".source = ./.; 7 | home.file."/Library/Application Support/Code/User".recursive = true; 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/ftplugin/oil.lua: -------------------------------------------------------------------------------- 1 | vim.keymap.set("n", "oi", "lua require('oil').close()", { buffer = true }) 2 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/ftplugin/qf.lua: -------------------------------------------------------------------------------- 1 | vim.keymap.set("n", "dd", function() 2 | local qf_list = vim.fn.getqflist() 3 | local curqfidx = nil 4 | 5 | if #qf_list > 0 then 6 | curqfidx = vim.fn.line(".") - 1 7 | table.remove(qf_list, curqfidx + 1) 8 | vim.fn.setqflist(qf_list, "r") 9 | end 10 | 11 | if #qf_list > 0 then 12 | vim.cmd((curqfidx + 1) .. "cfirst") 13 | vim.cmd("copen") 14 | else 15 | vim.cmd("cclose") 16 | end 17 | end, { buffer = true, desc = "Delete item from quickfix list" }) 18 | 19 | vim.keymap.set("n", "w", function() 20 | local qflist = vim.fn.getqflist() 21 | if not qflist or #qflist == 0 then 22 | vim.notify("No quickfix items available", vim.log.levels.WARN) 23 | return 24 | end 25 | 26 | local idx = vim.fn.line(".") - 1 27 | if idx < 0 or idx >= #qflist then 28 | vim.notify("No quickfix item under cursor", vim.log.levels.WARN) 29 | return 30 | end 31 | 32 | local current_item = qflist[idx + 1] 33 | if not current_item or not current_item.bufnr then 34 | vim.notify("Invalid quickfix item", vim.log.levels.WARN) 35 | return 36 | end 37 | 38 | local success, window_id = pcall(require("window-picker").pick_window) 39 | 40 | if not success then 41 | vim.notify("Window picker not available", vim.log.levels.WARN) 42 | return 43 | end 44 | 45 | if not window_id then 46 | return 47 | end 48 | 49 | local filepath = vim.fn.bufname(current_item.bufnr) 50 | 51 | vim.api.nvim_set_current_win(window_id) 52 | vim.cmd("edit " .. vim.fn.fnameescape(filepath)) 53 | vim.fn.cursor(current_item.lnum, current_item.col) 54 | end, { buffer = true, desc = "Open item in a specific window" }) 55 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/lsp/.gitkeep: -------------------------------------------------------------------------------- 1 | put your lsp configs here 2 | e.g. 3 | 4 | eslint.lua 5 | biome.lua 6 | ... 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/queries/javascript/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ;; Inject markdown into template strings with /* md */ or /* markdown */ comment 4 | ((comment) @_lang 5 | . 6 | (template_string 7 | (string_fragment) @injection.content) 8 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 9 | (#set! injection.language "markdown")) 10 | 11 | ;; Markdown injection for template strings with substitutions 12 | ((comment) @_lang 13 | . 14 | (template_string) @injection.content 15 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 16 | (#set! injection.language "markdown") 17 | (#set! injection.include-children)) 18 | 19 | ;; SQL injection 20 | ((comment) @_lang 21 | . 22 | (template_string 23 | (string_fragment) @injection.content) 24 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 25 | (#set! injection.language "sql")) 26 | 27 | ;; SQL injection for template strings with substitutions 28 | ((comment) @_lang 29 | . 30 | (template_string) @injection.content 31 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 32 | (#set! injection.language "sql") 33 | (#set! injection.include-children)) 34 | 35 | ;; HTML injection 36 | ((comment) @_lang 37 | . 38 | (template_string 39 | (string_fragment) @injection.content) 40 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 41 | (#set! injection.language "html")) 42 | 43 | ;; HTML injection for template strings with substitutions 44 | ((comment) @_lang 45 | . 46 | (template_string) @injection.content 47 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 48 | (#set! injection.language "html") 49 | (#set! injection.include-children)) 50 | 51 | ;; CSS injection 52 | ((comment) @_lang 53 | . 54 | (template_string 55 | (string_fragment) @injection.content) 56 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 57 | (#set! injection.language "css")) 58 | 59 | ;; CSS injection for template strings with substitutions 60 | ((comment) @_lang 61 | . 62 | (template_string) @injection.content 63 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 64 | (#set! injection.language "css") 65 | (#set! injection.include-children)) 66 | 67 | ;; GraphQL injection 68 | ((comment) @_lang 69 | . 70 | (template_string 71 | (string_fragment) @injection.content) 72 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 73 | (#set! injection.language "graphql")) 74 | 75 | ;; GraphQL injection for template strings with substitutions 76 | ((comment) @_lang 77 | . 78 | (template_string) @injection.content 79 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 80 | (#set! injection.language "graphql") 81 | (#set! injection.include-children)) 82 | 83 | ;; JSON injection 84 | ((comment) @_lang 85 | . 86 | (template_string 87 | (string_fragment) @injection.content) 88 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 89 | (#set! injection.language "json")) 90 | 91 | ;; JSON injection for template strings with substitutions 92 | ((comment) @_lang 93 | . 94 | (template_string) @injection.content 95 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 96 | (#set! injection.language "json") 97 | (#set! injection.include-children)) 98 | 99 | ;; YAML injection 100 | ((comment) @_lang 101 | . 102 | (template_string 103 | (string_fragment) @injection.content) 104 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 105 | (#set! injection.language "yaml")) 106 | 107 | ;; YAML injection for template strings with substitutions 108 | ((comment) @_lang 109 | . 110 | (template_string) @injection.content 111 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 112 | (#set! injection.language "yaml") 113 | (#set! injection.include-children)) 114 | 115 | ;; Bash/Shell injection 116 | ((comment) @_lang 117 | . 118 | (template_string 119 | (string_fragment) @injection.content) 120 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 121 | (#set! injection.language "bash")) 122 | 123 | ;; Bash/Shell injection for template strings with substitutions 124 | ((comment) @_lang 125 | . 126 | (template_string) @injection.content 127 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 128 | (#set! injection.language "bash") 129 | (#set! injection.include-children)) 130 | 131 | ;; Python injection 132 | ((comment) @_lang 133 | . 134 | (template_string 135 | (string_fragment) @injection.content) 136 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 137 | (#set! injection.language "python")) 138 | 139 | ;; Python injection for template strings with substitutions 140 | ((comment) @_lang 141 | . 142 | (template_string) @injection.content 143 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 144 | (#set! injection.language "python") 145 | (#set! injection.include-children)) 146 | 147 | ;; Regex injection 148 | ((comment) @_lang 149 | . 150 | (template_string 151 | (string_fragment) @injection.content) 152 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 153 | (#set! injection.language "regex")) 154 | 155 | ;; Regex injection for template strings with substitutions 156 | ((comment) @_lang 157 | . 158 | (template_string) @injection.content 159 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 160 | (#set! injection.language "regex") 161 | (#set! injection.include-children)) 162 | 163 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/queries/javascriptreact/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ;; Inject markdown into template strings with /* md */ or /* markdown */ comment 4 | ((comment) @_lang 5 | . 6 | (template_string 7 | (string_fragment) @injection.content) 8 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 9 | (#set! injection.language "markdown")) 10 | 11 | ;; Markdown injection for template strings with substitutions 12 | ((comment) @_lang 13 | . 14 | (template_string) @injection.content 15 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 16 | (#set! injection.language "markdown") 17 | (#set! injection.include-children)) 18 | 19 | ;; SQL injection 20 | ((comment) @_lang 21 | . 22 | (template_string 23 | (string_fragment) @injection.content) 24 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 25 | (#set! injection.language "sql")) 26 | 27 | ;; SQL injection for template strings with substitutions 28 | ((comment) @_lang 29 | . 30 | (template_string) @injection.content 31 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 32 | (#set! injection.language "sql") 33 | (#set! injection.include-children)) 34 | 35 | ;; HTML injection 36 | ((comment) @_lang 37 | . 38 | (template_string 39 | (string_fragment) @injection.content) 40 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 41 | (#set! injection.language "html")) 42 | 43 | ;; HTML injection for template strings with substitutions 44 | ((comment) @_lang 45 | . 46 | (template_string) @injection.content 47 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 48 | (#set! injection.language "html") 49 | (#set! injection.include-children)) 50 | 51 | ;; CSS injection 52 | ((comment) @_lang 53 | . 54 | (template_string 55 | (string_fragment) @injection.content) 56 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 57 | (#set! injection.language "css")) 58 | 59 | ;; CSS injection for template strings with substitutions 60 | ((comment) @_lang 61 | . 62 | (template_string) @injection.content 63 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 64 | (#set! injection.language "css") 65 | (#set! injection.include-children)) 66 | 67 | ;; GraphQL injection 68 | ((comment) @_lang 69 | . 70 | (template_string 71 | (string_fragment) @injection.content) 72 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 73 | (#set! injection.language "graphql")) 74 | 75 | ;; GraphQL injection for template strings with substitutions 76 | ((comment) @_lang 77 | . 78 | (template_string) @injection.content 79 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 80 | (#set! injection.language "graphql") 81 | (#set! injection.include-children)) 82 | 83 | ;; JSON injection 84 | ((comment) @_lang 85 | . 86 | (template_string 87 | (string_fragment) @injection.content) 88 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 89 | (#set! injection.language "json")) 90 | 91 | ;; JSON injection for template strings with substitutions 92 | ((comment) @_lang 93 | . 94 | (template_string) @injection.content 95 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 96 | (#set! injection.language "json") 97 | (#set! injection.include-children)) 98 | 99 | ;; YAML injection 100 | ((comment) @_lang 101 | . 102 | (template_string 103 | (string_fragment) @injection.content) 104 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 105 | (#set! injection.language "yaml")) 106 | 107 | ;; YAML injection for template strings with substitutions 108 | ((comment) @_lang 109 | . 110 | (template_string) @injection.content 111 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 112 | (#set! injection.language "yaml") 113 | (#set! injection.include-children)) 114 | 115 | ;; Bash/Shell injection 116 | ((comment) @_lang 117 | . 118 | (template_string 119 | (string_fragment) @injection.content) 120 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 121 | (#set! injection.language "bash")) 122 | 123 | ;; Bash/Shell injection for template strings with substitutions 124 | ((comment) @_lang 125 | . 126 | (template_string) @injection.content 127 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 128 | (#set! injection.language "bash") 129 | (#set! injection.include-children)) 130 | 131 | ;; Python injection 132 | ((comment) @_lang 133 | . 134 | (template_string 135 | (string_fragment) @injection.content) 136 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 137 | (#set! injection.language "python")) 138 | 139 | ;; Python injection for template strings with substitutions 140 | ((comment) @_lang 141 | . 142 | (template_string) @injection.content 143 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 144 | (#set! injection.language "python") 145 | (#set! injection.include-children)) 146 | 147 | ;; Regex injection 148 | ((comment) @_lang 149 | . 150 | (template_string 151 | (string_fragment) @injection.content) 152 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 153 | (#set! injection.language "regex")) 154 | 155 | ;; Regex injection for template strings with substitutions 156 | ((comment) @_lang 157 | . 158 | (template_string) @injection.content 159 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 160 | (#set! injection.language "regex") 161 | (#set! injection.include-children)) 162 | 163 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/queries/typescript/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ;; Inject markdown into template strings with /* md */ or /* markdown */ comment 4 | ((comment) @_lang 5 | . 6 | (template_string 7 | (string_fragment) @injection.content) 8 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 9 | (#set! injection.language "markdown")) 10 | 11 | ;; Markdown injection for template strings with substitutions 12 | ((comment) @_lang 13 | . 14 | (template_string) @injection.content 15 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 16 | (#set! injection.language "markdown") 17 | (#set! injection.include-children)) 18 | 19 | ;; SQL injection 20 | ((comment) @_lang 21 | . 22 | (template_string 23 | (string_fragment) @injection.content) 24 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 25 | (#set! injection.language "sql")) 26 | 27 | ;; SQL injection for template strings with substitutions 28 | ((comment) @_lang 29 | . 30 | (template_string) @injection.content 31 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 32 | (#set! injection.language "sql") 33 | (#set! injection.include-children)) 34 | 35 | ;; HTML injection 36 | ((comment) @_lang 37 | . 38 | (template_string 39 | (string_fragment) @injection.content) 40 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 41 | (#set! injection.language "html")) 42 | 43 | ;; HTML injection for template strings with substitutions 44 | ((comment) @_lang 45 | . 46 | (template_string) @injection.content 47 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 48 | (#set! injection.language "html") 49 | (#set! injection.include-children)) 50 | 51 | ;; CSS injection 52 | ((comment) @_lang 53 | . 54 | (template_string 55 | (string_fragment) @injection.content) 56 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 57 | (#set! injection.language "css")) 58 | 59 | ;; CSS injection for template strings with substitutions 60 | ((comment) @_lang 61 | . 62 | (template_string) @injection.content 63 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 64 | (#set! injection.language "css") 65 | (#set! injection.include-children)) 66 | 67 | ;; GraphQL injection 68 | ((comment) @_lang 69 | . 70 | (template_string 71 | (string_fragment) @injection.content) 72 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 73 | (#set! injection.language "graphql")) 74 | 75 | ;; GraphQL injection for template strings with substitutions 76 | ((comment) @_lang 77 | . 78 | (template_string) @injection.content 79 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 80 | (#set! injection.language "graphql") 81 | (#set! injection.include-children)) 82 | 83 | ;; JSON injection 84 | ((comment) @_lang 85 | . 86 | (template_string 87 | (string_fragment) @injection.content) 88 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 89 | (#set! injection.language "json")) 90 | 91 | ;; JSON injection for template strings with substitutions 92 | ((comment) @_lang 93 | . 94 | (template_string) @injection.content 95 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 96 | (#set! injection.language "json") 97 | (#set! injection.include-children)) 98 | 99 | ;; YAML injection 100 | ((comment) @_lang 101 | . 102 | (template_string 103 | (string_fragment) @injection.content) 104 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 105 | (#set! injection.language "yaml")) 106 | 107 | ;; YAML injection for template strings with substitutions 108 | ((comment) @_lang 109 | . 110 | (template_string) @injection.content 111 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 112 | (#set! injection.language "yaml") 113 | (#set! injection.include-children)) 114 | 115 | ;; Bash/Shell injection 116 | ((comment) @_lang 117 | . 118 | (template_string 119 | (string_fragment) @injection.content) 120 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 121 | (#set! injection.language "bash")) 122 | 123 | ;; Bash/Shell injection for template strings with substitutions 124 | ((comment) @_lang 125 | . 126 | (template_string) @injection.content 127 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 128 | (#set! injection.language "bash") 129 | (#set! injection.include-children)) 130 | 131 | ;; Python injection 132 | ((comment) @_lang 133 | . 134 | (template_string 135 | (string_fragment) @injection.content) 136 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 137 | (#set! injection.language "python")) 138 | 139 | ;; Python injection for template strings with substitutions 140 | ((comment) @_lang 141 | . 142 | (template_string) @injection.content 143 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 144 | (#set! injection.language "python") 145 | (#set! injection.include-children)) 146 | 147 | ;; Regex injection 148 | ((comment) @_lang 149 | . 150 | (template_string 151 | (string_fragment) @injection.content) 152 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 153 | (#set! injection.language "regex")) 154 | 155 | ;; Regex injection for template strings with substitutions 156 | ((comment) @_lang 157 | . 158 | (template_string) @injection.content 159 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 160 | (#set! injection.language "regex") 161 | (#set! injection.include-children)) 162 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/queries/typescriptreact/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ;; Inject markdown into template strings with /* md */ or /* markdown */ comment 4 | ((comment) @_lang 5 | . 6 | (template_string 7 | (string_fragment) @injection.content) 8 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 9 | (#set! injection.language "markdown")) 10 | 11 | ;; Markdown injection for template strings with substitutions 12 | ((comment) @_lang 13 | . 14 | (template_string) @injection.content 15 | (#match? @_lang "/\\*\\s*(md|markdown)\\s*\\*/") 16 | (#set! injection.language "markdown") 17 | (#set! injection.include-children)) 18 | 19 | ;; SQL injection 20 | ((comment) @_lang 21 | . 22 | (template_string 23 | (string_fragment) @injection.content) 24 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 25 | (#set! injection.language "sql")) 26 | 27 | ;; SQL injection for template strings with substitutions 28 | ((comment) @_lang 29 | . 30 | (template_string) @injection.content 31 | (#match? @_lang "/\\*\\s*sql\\s*\\*/") 32 | (#set! injection.language "sql") 33 | (#set! injection.include-children)) 34 | 35 | ;; HTML injection 36 | ((comment) @_lang 37 | . 38 | (template_string 39 | (string_fragment) @injection.content) 40 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 41 | (#set! injection.language "html")) 42 | 43 | ;; HTML injection for template strings with substitutions 44 | ((comment) @_lang 45 | . 46 | (template_string) @injection.content 47 | (#match? @_lang "/\\*\\s*html\\s*\\*/") 48 | (#set! injection.language "html") 49 | (#set! injection.include-children)) 50 | 51 | ;; CSS injection 52 | ((comment) @_lang 53 | . 54 | (template_string 55 | (string_fragment) @injection.content) 56 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 57 | (#set! injection.language "css")) 58 | 59 | ;; CSS injection for template strings with substitutions 60 | ((comment) @_lang 61 | . 62 | (template_string) @injection.content 63 | (#match? @_lang "/\\*\\s*css\\s*\\*/") 64 | (#set! injection.language "css") 65 | (#set! injection.include-children)) 66 | 67 | ;; GraphQL injection 68 | ((comment) @_lang 69 | . 70 | (template_string 71 | (string_fragment) @injection.content) 72 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 73 | (#set! injection.language "graphql")) 74 | 75 | ;; GraphQL injection for template strings with substitutions 76 | ((comment) @_lang 77 | . 78 | (template_string) @injection.content 79 | (#match? @_lang "/\\*\\s*(gql|graphql)\\s*\\*/") 80 | (#set! injection.language "graphql") 81 | (#set! injection.include-children)) 82 | 83 | ;; JSON injection 84 | ((comment) @_lang 85 | . 86 | (template_string 87 | (string_fragment) @injection.content) 88 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 89 | (#set! injection.language "json")) 90 | 91 | ;; JSON injection for template strings with substitutions 92 | ((comment) @_lang 93 | . 94 | (template_string) @injection.content 95 | (#match? @_lang "/\\*\\s*json\\s*\\*/") 96 | (#set! injection.language "json") 97 | (#set! injection.include-children)) 98 | 99 | ;; YAML injection 100 | ((comment) @_lang 101 | . 102 | (template_string 103 | (string_fragment) @injection.content) 104 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 105 | (#set! injection.language "yaml")) 106 | 107 | ;; YAML injection for template strings with substitutions 108 | ((comment) @_lang 109 | . 110 | (template_string) @injection.content 111 | (#match? @_lang "/\\*\\s*(yaml|yml)\\s*\\*/") 112 | (#set! injection.language "yaml") 113 | (#set! injection.include-children)) 114 | 115 | ;; Bash/Shell injection 116 | ((comment) @_lang 117 | . 118 | (template_string 119 | (string_fragment) @injection.content) 120 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 121 | (#set! injection.language "bash")) 122 | 123 | ;; Bash/Shell injection for template strings with substitutions 124 | ((comment) @_lang 125 | . 126 | (template_string) @injection.content 127 | (#match? @_lang "/\\*\\s*(bash|sh|shell)\\s*\\*/") 128 | (#set! injection.language "bash") 129 | (#set! injection.include-children)) 130 | 131 | ;; Python injection 132 | ((comment) @_lang 133 | . 134 | (template_string 135 | (string_fragment) @injection.content) 136 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 137 | (#set! injection.language "python")) 138 | 139 | ;; Python injection for template strings with substitutions 140 | ((comment) @_lang 141 | . 142 | (template_string) @injection.content 143 | (#match? @_lang "/\\*\\s*(python|py)\\s*\\*/") 144 | (#set! injection.language "python") 145 | (#set! injection.include-children)) 146 | 147 | ;; Regex injection 148 | ((comment) @_lang 149 | . 150 | (template_string 151 | (string_fragment) @injection.content) 152 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 153 | (#set! injection.language "regex")) 154 | 155 | ;; Regex injection for template strings with substitutions 156 | ((comment) @_lang 157 | . 158 | (template_string) @injection.content 159 | (#match? @_lang "/\\*\\s*(regex|regexp)\\s*\\*/") 160 | (#set! injection.language "regex") 161 | (#set! injection.include-children)) 162 | 163 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | 3 | if not vim.loop.fs_stat(lazypath) then 4 | vim.fn.system({ 5 | "git", 6 | "clone", 7 | "--filter=blob:none", 8 | "https://github.com/folke/lazy.nvim.git", 9 | "--branch=stable", 10 | lazypath, 11 | }) 12 | end 13 | 14 | vim.opt.rtp:prepend(lazypath) 15 | 16 | require("joogie") 17 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/autocmds/init.lua: -------------------------------------------------------------------------------- 1 | require("joogie.autocmds.node-exec") 2 | require("joogie.autocmds.super-zen") 3 | require("joogie.autocmds.opencode") 4 | 5 | local function augroup(name) 6 | return vim.api.nvim_create_augroup("joogie_" .. name, { clear = true }) 7 | end 8 | 9 | -- Check if we need to reload the file when it changed 10 | vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { 11 | group = augroup("checktime"), 12 | callback = function() 13 | if vim.o.buftype ~= "nofile" then 14 | vim.cmd("checktime") 15 | end 16 | end, 17 | }) 18 | 19 | -- Highlight on yank 20 | vim.api.nvim_create_autocmd("TextYankPost", { 21 | group = augroup("highlight_yank"), 22 | callback = function() 23 | vim.highlight.on_yank() 24 | end, 25 | }) 26 | 27 | -- resize splits if window got resized 28 | vim.api.nvim_create_autocmd({ "VimResized" }, { 29 | group = augroup("resize_splits"), 30 | callback = function() 31 | local current_tab = vim.fn.tabpagenr() 32 | vim.cmd("tabdo wincmd =") 33 | vim.cmd("tabnext " .. current_tab) 34 | end, 35 | }) 36 | 37 | -- go to last loc when opening a buffer 38 | vim.api.nvim_create_autocmd("BufReadPost", { 39 | group = augroup("last_loc"), 40 | callback = function(event) 41 | local exclude = { "gitcommit" } 42 | local buf = event.buf 43 | if vim.tbl_contains(exclude, vim.bo[buf].filetype) or vim.b[buf].lazyvim_last_loc then 44 | return 45 | end 46 | vim.b[buf].lazyvim_last_loc = true 47 | local mark = vim.api.nvim_buf_get_mark(buf, '"') 48 | local lcount = vim.api.nvim_buf_line_count(buf) 49 | if mark[1] > 0 and mark[1] <= lcount then 50 | pcall(vim.api.nvim_win_set_cursor, 0, mark) 51 | end 52 | end, 53 | }) 54 | 55 | -- make it easier to close man-files when opened inline 56 | vim.api.nvim_create_autocmd("FileType", { 57 | group = augroup("man_unlisted"), 58 | pattern = { "man" }, 59 | callback = function(event) 60 | vim.bo[event.buf].buflisted = false 61 | end, 62 | }) 63 | 64 | -- wrap and check for spell in text filetypes 65 | vim.api.nvim_create_autocmd("FileType", { 66 | group = augroup("wrap_spell"), 67 | pattern = { "gitcommit", "markdown" }, 68 | callback = function() 69 | vim.opt_local.wrap = true 70 | vim.opt_local.spell = true 71 | end, 72 | }) 73 | 74 | -- Auto create dir when saving a file, in case some intermediate directory does not exist 75 | vim.api.nvim_create_autocmd({ "BufWritePre" }, { 76 | group = augroup("auto_create_dir"), 77 | callback = function(event) 78 | if event.match:match("^%w%w+://") then 79 | return 80 | end 81 | local file = vim.loop.fs_realpath(event.match) or event.match 82 | vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") 83 | end, 84 | }) 85 | 86 | local progress = vim.defaulttable() 87 | vim.api.nvim_create_autocmd("LspProgress", { 88 | group = augroup("lsp_progress"), 89 | callback = function(ev) 90 | local client = vim.lsp.get_client_by_id(ev.data.client_id) 91 | local value = ev.data.params.value --[[@as {percentage?: number, title?: string, message?: string, kind: "begin" | "report" | "end"}]] 92 | if not client or type(value) ~= "table" then 93 | return 94 | end 95 | local p = progress[client.id] 96 | 97 | for i = 1, #p + 1 do 98 | if i == #p + 1 or p[i].token == ev.data.params.token then 99 | p[i] = { 100 | token = ev.data.params.token, 101 | msg = ("[%3d%%] %s%s"):format( 102 | value.kind == "end" and 100 or value.percentage or 100, 103 | value.title or "", 104 | value.message and (" **%s**"):format(value.message) or "" 105 | ), 106 | done = value.kind == "end", 107 | } 108 | break 109 | end 110 | end 111 | 112 | local msg = {} ---@type string[] 113 | progress[client.id] = vim.tbl_filter(function(v) 114 | return table.insert(msg, v.msg) or not v.done 115 | end, p) 116 | 117 | local spinner = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" } 118 | vim.notify(table.concat(msg, "\n"), "info", { 119 | id = "lsp_progress", 120 | title = client.name, 121 | opts = function(notif) 122 | notif.icon = #progress[client.id] == 0 and " " 123 | or spinner[math.floor(vim.uv.hrtime() / (1e6 * 80)) % #spinner + 1] 124 | end, 125 | }) 126 | end, 127 | }) 128 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/autocmds/node-exec.lua: -------------------------------------------------------------------------------- 1 | local RunningIcon = "" 2 | 3 | local function find_project_root(start_path) 4 | local current_dir = vim.fn.fnamemodify(start_path, ":h") 5 | while true do 6 | if vim.fn.filereadable(current_dir .. "/package.json") == 1 then 7 | return current_dir 8 | end 9 | local parent_dir = vim.fn.fnamemodify(current_dir, ":h") 10 | if parent_dir == current_dir then 11 | return nil 12 | end 13 | current_dir = parent_dir 14 | end 15 | end 16 | 17 | local function simple_exec(commands, msg, cwd) 18 | local id = table.concat(commands, " ") 19 | local _msg = msg or id 20 | local success_msg = "" 21 | local error_msg = "" 22 | 23 | vim.notify(RunningIcon .. " " .. _msg, vim.log.levels.INFO, { 24 | title = "NodeExec Running", 25 | id = id, 26 | }) 27 | 28 | local command_str = commands[1] 29 | local cmd_parts = vim.fn.has("win32") == 1 and { "cmd.exe", "/c", command_str } or { "/bin/sh", "-c", command_str } 30 | 31 | local job_opts = { 32 | stdout_buffered = true, 33 | stderr_buffered = true, 34 | cwd = cwd, 35 | on_stdout = function(_, data) 36 | if data and #data > 0 and data[1] ~= "" then 37 | local output = table.concat(data, "\n") 38 | output = output:gsub("^%s+", ""):gsub("%s+$", "") 39 | success_msg = output 40 | end 41 | end, 42 | on_stderr = function(_, err) 43 | if err and #err > 0 and err[1] ~= "" then 44 | local error_output = table.concat(err, "\n") 45 | error_output = error_output:gsub("^%s+", ""):gsub("%s+$", "") 46 | error_msg = error_output 47 | end 48 | end, 49 | on_exit = function(_, code) 50 | vim.schedule(function() 51 | if code ~= 0 then 52 | vim.notify(error_msg, vim.log.levels.ERROR, { 53 | id = id, 54 | title = "NodeExec Error", 55 | }) 56 | else 57 | vim.notify(success_msg, vim.log.levels.INFO, { 58 | id = id, 59 | title = "NodeExec Success", 60 | }) 61 | end 62 | end) 63 | end, 64 | } 65 | 66 | vim.fn.jobstart(cmd_parts, job_opts) 67 | end 68 | 69 | local function run_node_code() 70 | local file_to_run = vim.api.nvim_buf_get_name(0) 71 | if file_to_run == "" then 72 | vim.notify("Cannot execute unsaved buffer.", vim.log.levels.WARN, { title = "NodeExec" }) 73 | return 74 | end 75 | file_to_run = vim.fn.expand(file_to_run) 76 | 77 | local project_root = find_project_root(file_to_run) 78 | local execution_cwd = project_root or vim.fn.fnamemodify(file_to_run, ":h") 79 | 80 | local quoted_file_to_run = '"' .. file_to_run .. '"' 81 | local command = "npx tsx " .. quoted_file_to_run 82 | local msg = " Executing " .. vim.fn.fnamemodify(file_to_run, ":t") 83 | 84 | simple_exec({ command }, msg, execution_cwd) 85 | end 86 | 87 | vim.api.nvim_create_user_command("NodeExec", run_node_code, { 88 | nargs = 0, 89 | desc = "Execute current file with npx tsx", 90 | }) 91 | 92 | vim.keymap.set("n", "ne", "NodeExec", { desc = "Execute current file with npx tsx" }) 93 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/autocmds/opencode.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.send_highlighted_to_opencode = function() 4 | local vstart = vim.fn.getpos("'<") 5 | local vend = vim.fn.getpos("'>") 6 | 7 | local line_start = vstart[2] 8 | local line_end = vend[2] 9 | 10 | if line_start == 0 or line_end == 0 then 11 | vim.notify("No text selected 1", vim.log.levels.WARN) 12 | return 13 | end 14 | 15 | local lines = vim.fn.getline(line_start, line_end) 16 | 17 | local selected_text = table.concat(lines, "\n") 18 | 19 | vim.fn.setreg("+", selected_text) 20 | 21 | local current_session = vim.fn.system("tmux display-message -p '#S'"):gsub("\n", "") 22 | 23 | local panes_info = vim.fn 24 | .system("tmux list-panes -F '#{session_name}:#{window_index}.#{pane_index} #{pane_current_command}' -a") 25 | :gsub("\n$", "") 26 | 27 | local opencode_target = nil 28 | for line in panes_info:gmatch("[^\n]+") do 29 | if line:match("opencode") and line:match("^" .. current_session .. ":") then 30 | opencode_target = line:match("^([^%s]+)") 31 | break 32 | end 33 | end 34 | 35 | if not opencode_target then 36 | vim.notify("`opencode` not found in current session", vim.log.levels.WARN) 37 | return 38 | end 39 | 40 | vim.fn.system(string.format("tmux send-keys -t '%s' C-x e", opencode_target)) 41 | 42 | vim.defer_fn(function() 43 | vim.fn.system(string.format("tmux send-keys -t '%s' p", opencode_target)) 44 | 45 | local window_target = opencode_target:match("^([^%.]+)") 46 | vim.fn.system(string.format("tmux select-window -t '%s'", window_target)) 47 | vim.fn.system(string.format("tmux select-pane -t '%s'", opencode_target)) 48 | end, 100) 49 | end 50 | 51 | vim.api.nvim_create_user_command("OpencodeSend", M.send_highlighted_to_opencode, { 52 | nargs = 0, 53 | range = true, 54 | desc = "Send highlighted text to opencode", 55 | }) 56 | 57 | vim.keymap.set("v", "os", ":OpencodeSend", { desc = "Send highlighted text to opencode" }) 58 | 59 | return M 60 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/autocmds/super-zen.lua: -------------------------------------------------------------------------------- 1 | local is_super_zen = false 2 | 3 | local function super_zen_toggle() 4 | if not is_super_zen then 5 | vim.opt.laststatus = 0 6 | vim.opt.number = false 7 | vim.opt.relativenumber = false 8 | vim.cmd("lua Snacks.indent.disable()") 9 | vim.cmd("TSContext disable") 10 | os.execute("tmux set status off") 11 | is_super_zen = true 12 | else 13 | vim.opt.laststatus = 3 14 | vim.opt.number = true 15 | vim.opt.relativenumber = true 16 | vim.cmd("lua Snacks.indent.enable()") 17 | vim.cmd("TSContext enable") 18 | os.execute("tmux set status on") 19 | is_super_zen = false 20 | end 21 | end 22 | 23 | vim.api.nvim_create_user_command("SuperZenToggle", super_zen_toggle, { 24 | nargs = 0, 25 | desc = "Enable super zen mode", 26 | }) 27 | 28 | vim.keymap.set("n", "sm", "SuperZenToggle", { desc = "Toggle super zen mode" }) 29 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = " " 2 | 3 | require("joogie.autocmds") 4 | require("joogie.options") 5 | require("lazy").setup("joogie.plugins", { ui = { border = "rounded" }, }) 6 | require("joogie.keymaps") 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/keymaps/init.lua: -------------------------------------------------------------------------------- 1 | local cmd = require("joogie.utils").cmd 2 | local Util = require("joogie.utils") 3 | 4 | local keymap = vim.keymap.set 5 | 6 | -- General Editing 7 | keymap("n", "", "ggVG", { desc = "Select all" }) 8 | keymap("i", "", "", { desc = "Delete word back" }) 9 | keymap("i", "", "ldwi", { desc = "Delete word front" }) 10 | keymap({ "n", "v" }, "$", "g$", { desc = "Move to end of visual line" }) 11 | keymap({ "n", "v" }, "0", "g0", { desc = "Move to start of visual line" }) 12 | keymap("n", "Q", "@q", { desc = "Repeat macro from q register" }) 13 | keymap({ "t", "i" }, "jj", "", { desc = "Exit insert mode" }) 14 | keymap({ "t", "i" }, "JJ", "", { desc = "Exit insert mode" }) 15 | keymap({ "i", "v" }, "", "", { desc = "Esc" }) 16 | keymap("n", "n", "nzz", { desc = "Match next" }) 17 | keymap("n", "N", "Nzz", { desc = "Match previous" }) 18 | keymap("n", "", "zz", { desc = "Scroll down" }) 19 | keymap("n", "", "zz", { desc = "Scroll up" }) 20 | keymap("x", "d", '"_d', { desc = "Delete without putting to register" }) 21 | keymap("n", "dm", function() 22 | vim.cmd("delmarks a-z") 23 | vim.cmd("delmarks A-Z") 24 | end, { desc = "Delete all marks" }) 25 | keymap("x", "p", '"_dP', { desc = "Paste yanked text" }) 26 | keymap({ "i", "x", "n", "s" }, "", cmd("w"), { desc = "Save file" }) 27 | keymap("n", "ss", ":%s//", { desc = "Replace instances" }) 28 | vim.cmd([[ 29 | nnoremap k v:count == 0 ? 'gk' : 'k' 30 | nnoremap j v:count == 0 ? 'gj' : 'j' 31 | vnoremap k v:count == 0 ? 'gk' : 'k' 32 | vnoremap j v:count == 0 ? 'gj' : 'j' 33 | ]]) 34 | 35 | -- Buffer and Tab Management 36 | keymap("n", "q", cmd("q"), { desc = "Close buffer" }) 37 | keymap("n", "Q", cmd("qa!"), { desc = "Quit neovim without saving" }) 38 | keymap("n", "W", cmd("wqa"), { desc = "Quit neovim and save" }) 39 | keymap("n", "z", cmd("tab split"), { desc = "Open buffer in new Tab" }) 40 | keymap("n", "", cmd("tabnext"), { desc = "Next Tab" }) 41 | keymap("n", "", cmd("tabprevious"), { desc = "Previous Tab" }) 42 | 43 | keymap("n", "]q", cmd("Cnext"), { desc = "Next quickfix" }) 44 | keymap("n", "[q", cmd("Cprev"), { desc = "Previous quickfix" }) 45 | 46 | keymap("n", "", cmd("noh"), { desc = "Clear search highlights" }) 47 | keymap("n", "cp", [[:let @+=expand('%:~:.')]], { desc = "Copy relative path" }) 48 | 49 | -- Dadbob 50 | keymap("n", "db", cmd("DBUIToggle"), { desc = "Toggle DBUI" }) 51 | 52 | -- Fugitive 53 | keymap("n", "Ga", cmd("Git add ."), { desc = "Fugitive: add all" }) 54 | keymap("n", "Gc", cmd("Git commit"), { desc = "Fugitive: commit" }) 55 | keymap("n", "Gp", cmd("Git push"), { desc = "Fugitive: push" }) 56 | keymap("n", "GP", cmd("Git push --force-with-lease"), { desc = "Fugitive: push force" }) 57 | keymap("n", "G!", function() 58 | Util.exec({ "git add .", "git commit -m 'commit'", "git push" }) 59 | end, { desc = "Fugitive: push yolo" }) 60 | keymap("n", "gf", cmd("diffget //2"), { desc = "Diff get Current" }) 61 | keymap("n", "gh", cmd("diffget //3"), { desc = "Diff get Head" }) 62 | keymap("n", "dv", cmd("Gvdiffsplit"), { desc = "Diff Vertical" }) 63 | keymap("n", "co", cmd("!git co"), { desc = "Git Checkout" }) 64 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/options/init.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | opt.laststatus = 3 4 | opt.showmode = false 5 | opt.clipboard = "unnamedplus" 6 | opt.cursorline = true 7 | opt.ch = 0 8 | opt.sessionoptions = "buffers,curdir,folds,help,tabpages,winsize,terminal" 9 | 10 | -- Indenting 11 | opt.expandtab = true 12 | opt.smartindent = true 13 | opt.autoindent = true 14 | opt.shiftwidth = 2 15 | opt.tabstop = 2 16 | opt.softtabstop = 2 17 | opt.fillchars = { eob = " " } 18 | opt.ignorecase = true 19 | opt.smartcase = true 20 | opt.mouse = "a" 21 | 22 | -- Numbers 23 | opt.number = true 24 | opt.numberwidth = 2 25 | opt.ruler = false 26 | opt.nu = true 27 | opt.rnu = true 28 | opt.scrolloff = 10 29 | opt.swapfile = false 30 | opt.writebackup = false 31 | 32 | -- disable nvim intro 33 | opt.shortmess:append("sI") 34 | opt.signcolumn = "yes" 35 | opt.splitbelow = true 36 | opt.splitright = true 37 | opt.termguicolors = true 38 | opt.timeoutlen = 300 39 | opt.undofile = true 40 | opt.wrap = true 41 | 42 | -- interval for writing swap file to disk, also used by gitsigns 43 | opt.updatetime = 150 44 | 45 | -- go to previous/next line with h,l,left arrow and right arrow 46 | -- when cursor reaches end/beginning of line 47 | opt.whichwrap:append("<>[]hl") 48 | 49 | -- disable some default providers 50 | for _, provider in ipairs({ "node", "perl", "python3", "ruby" }) do 51 | vim.g["loaded_" .. provider .. "_provider"] = 0 52 | end 53 | 54 | -- add binaries installed by mason.nvim to path 55 | local is_windows = vim.loop.os_uname().sysname == "Windows_NT" 56 | vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath("data") .. "/mason/bin" 57 | 58 | if os.getenv("CONDA_PREFIX") then 59 | vim.g.python3_host_prog = os.getenv("CONDA_PREFIX") .. "/bin/python" 60 | end 61 | 62 | -- allow looping back in qf list 63 | vim.cmd([[ 64 | command! Cnext try | cnext | catch | cfirst | catch | endtry 65 | command! Cprev try | cprev | catch | clast | catch | endtry 66 | command! Lnext try | lnext | catch | lfirst | catch | endtry 67 | command! Lprev try | lprev | catch | llast | catch | endtry 68 | 69 | cabbrev cnext Cnext 70 | cabbrev cprev CPrev 71 | cabbrev lnext Lnext 72 | cabbrev lprev Lprev 73 | ]]) 74 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/diffview.lua: -------------------------------------------------------------------------------- 1 | local utils = require("joogie.utils") 2 | local toggle_diffview = utils.toggle_diffview 3 | local cmd = utils.cmd 4 | 5 | return { 6 | "sindrets/diffview.nvim", 7 | keys = { 8 | { 9 | "dO", 10 | function() 11 | local first_branch = nil 12 | 13 | vim.ui.select(utils.git.branches(), { 14 | prompt = "Select first branch:", 15 | }, function(branch) 16 | if not branch then 17 | return 18 | end 19 | 20 | first_branch = branch 21 | 22 | vim.ui.select(utils.git.branches(), { 23 | prompt = "Select second branch:", 24 | }, function(second_branch) 25 | if not second_branch then 26 | return 27 | end 28 | 29 | if first_branch == "HEAD" and second_branch == "HEAD" then 30 | return vim.cmd("DiffviewOpen") 31 | end 32 | 33 | if second_branch == first_branch then 34 | return vim.notify("Please select different branches", vim.log.levels.ERROR) 35 | end 36 | 37 | vim.cmd("DiffviewOpen " .. first_branch .. ".." .. second_branch) 38 | end) 39 | end) 40 | end, 41 | desc = "Diffview: on two branches", 42 | }, 43 | { 44 | "do", 45 | function() 46 | vim.ui.select(utils.git.branches(), { 47 | prompt = "Select first branch:", 48 | }, function(branch) 49 | if not branch then 50 | return 51 | end 52 | vim.cmd("DiffviewOpen " .. (branch == "HEAD" and "" or branch)) 53 | end) 54 | end, 55 | desc = "Diffview: on a branch", 56 | }, 57 | { 58 | "dc", 59 | function() 60 | local first_commit = nil 61 | 62 | vim.ui.select(utils.git.commits(), { 63 | prompt = "Select first commit:", 64 | }, function(commit) 65 | if not commit then 66 | return 67 | end 68 | 69 | first_commit = vim.split(commit, " ")[1] 70 | 71 | vim.ui.select(utils.git.commits(), { 72 | prompt = "Select second commit:", 73 | }, function(second_commit) 74 | if not second_commit then 75 | return 76 | end 77 | 78 | second_commit = vim.split(second_commit, " ")[1] 79 | 80 | if second_commit == first_commit then 81 | return vim.notify("Please select different commits", vim.log.levels.ERROR) 82 | end 83 | 84 | vim.cmd("DiffviewOpen " .. first_commit .. ".." .. second_commit) 85 | end) 86 | end) 87 | end, 88 | desc = "Diffview: on two commits", 89 | }, 90 | { 91 | "dh", 92 | function() 93 | toggle_diffview("DiffviewFileHistory") 94 | end, 95 | desc = "Diffview: on all commits", 96 | }, 97 | { 98 | "df", 99 | function() 100 | toggle_diffview("DiffviewFileHistory %") 101 | end, 102 | desc = "Diffview: on current file history", 103 | }, 104 | { "dq", cmd("tabc"), desc = "Close Tab" }, 105 | }, 106 | } 107 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/formatter.lua: -------------------------------------------------------------------------------- 1 | local find_git_root = require("joogie.utils").find_git_root 2 | local eval_parser = require("joogie.utils").eval_parser 3 | 4 | return { 5 | "stevearc/conform.nvim", 6 | opts = {}, 7 | config = function() 8 | local is_biome_present = vim.uv.fs_stat(find_git_root() .. "/biome.json") and true or false 9 | local conform = require("conform") 10 | local fs = require("conform.fs") 11 | local util = require("conform.util") 12 | 13 | conform.setup({ 14 | formatters_by_ft = { 15 | cpp = { "clang-format" }, 16 | lua = { "stylua" }, 17 | python = { "isort", "black" }, 18 | javascript = { "prettier", "eslint_d", "biome" }, 19 | typescript = { "prettier", "eslint_d", "biome" }, 20 | javascriptreact = { "prettier", "eslint_d", "biome" }, 21 | typescriptreact = { "prettier", "eslint_d", "biome" }, 22 | svelte = { "prettier" }, 23 | css = { "prettier", "biome" }, 24 | html = { "prettier", "biome" }, 25 | json = { "prettier", "biome" }, 26 | yaml = { "prettier" }, 27 | markdown = { "prettier" }, 28 | graphql = { "prettier" }, 29 | sql = { "sqlfmt" }, 30 | nix = { "nixpkgs-fmt" }, 31 | zsh = { "shfmt" }, 32 | sh = { "shfmt" }, 33 | }, 34 | formatters = { 35 | shfmt = { 36 | args = { "-i", "2", "-filename", "$FILENAME" }, 37 | }, 38 | prettier = { 39 | command = util.from_node_modules(fs.is_windows and "prettier.cmd" or "prettier"), 40 | args = function(self, ctx) 41 | return eval_parser(self, ctx) or { "--stdin-filepath", "$FILENAME" } 42 | end, 43 | range_args = function(self, ctx) 44 | local start_offset, end_offset = util.get_offsets_from_range(ctx.buf, ctx.range) 45 | local args = eval_parser(self, ctx) or { "--stdin-filepath", "$FILENAME" } 46 | return vim.list_extend(args, { "--range-start=" .. start_offset, "--range-end=" .. end_offset }) 47 | end, 48 | condition = function() 49 | return not is_biome_present 50 | end, 51 | }, 52 | eslint_d = { 53 | command = util.from_node_modules("eslint_d"), 54 | args = { "--fix-to-stdout", "--stdin", "--stdin-filename", "$FILENAME" }, 55 | condition = function() 56 | return not is_biome_present 57 | end, 58 | }, 59 | biome = { 60 | command = util.from_node_modules("biome"), 61 | stdin = true, 62 | args = { "check", "--write", "--stdin-file-path", "$FILENAME" }, 63 | condition = function() 64 | return is_biome_present 65 | end, 66 | }, 67 | }, 68 | }) 69 | 70 | vim.keymap.set({ "n", "v" }, "p", function() 71 | local opts = { 72 | bufnr = 0, 73 | lsp_format = "fallback", 74 | async = true, 75 | } 76 | 77 | if vim.fn.mode() == "v" then 78 | local start_pos = vim.fn.getpos("'<") 79 | local end_pos = vim.fn.getpos("'>") 80 | opts.range = { 81 | start = { row = start_pos[2], col = start_pos[3] }, 82 | end_pos = { row = end_pos[2], col = end_pos[3] }, 83 | } 84 | end 85 | 86 | conform.format(opts) 87 | end, { desc = "Format file or range" }) 88 | end, 89 | } 90 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lewis6991/gitsigns.nvim", 3 | lazy = false, 4 | opts = { 5 | on_attach = function(bufnr) 6 | local gitsigns = require("gitsigns") 7 | 8 | local function map(mode, l, r, opts) 9 | opts = opts or {} 10 | opts.buffer = bufnr 11 | vim.keymap.set(mode, l, r, opts) 12 | end 13 | 14 | -- Navigation 15 | map("n", "]c", function() 16 | if vim.wo.diff then 17 | vim.cmd.normal({ "]c", bang = true }) 18 | else 19 | gitsigns.nav_hunk("next") 20 | end 21 | end) 22 | 23 | map("n", "[c", function() 24 | if vim.wo.diff then 25 | vim.cmd.normal({ "[c", bang = true }) 26 | else 27 | gitsigns.nav_hunk("prev") 28 | end 29 | end, { desc = "Navigate to next hunk" }) 30 | 31 | -- Actions 32 | map("n", "hs", gitsigns.stage_hunk, { desc = "Toggle Stage Hunk" }) 33 | map("n", "hr", gitsigns.reset_hunk, { desc = "Reset Hunk" }) 34 | 35 | map("v", "hs", function() 36 | gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) 37 | end, { desc = "Reset Hunk (Visual)" }) 38 | 39 | map("n", "hS", gitsigns.stage_buffer, { desc = "Stage Buffer" }) 40 | map("n", "hR", gitsigns.reset_buffer, { desc = "Reset Buffer" }) 41 | map("n", "hp", gitsigns.preview_hunk, { desc = "Preview Hunk" }) 42 | map("n", "hi", gitsigns.preview_hunk_inline, { desc = "Preview Hunk Inline" }) 43 | 44 | map("n", "hd", gitsigns.diffthis, { desc = "Diff This" }) 45 | 46 | map("n", "hD", function() 47 | gitsigns.diffthis("~") 48 | end, { desc = "Diff This ~" }) 49 | 50 | map("n", "hQ", function() 51 | gitsigns.setqflist("all") 52 | end, { desc = "Set Quickfix List (All)" }) 53 | map("n", "hq", gitsigns.setqflist, { desc = "Set Quickfix List" }) 54 | 55 | -- Toggles 56 | map("n", "tb", gitsigns.toggle_current_line_blame, { desc = "Toggle Current Line Blame" }) 57 | map("n", "td", gitsigns.toggle_deleted, { desc = "Toggle Deleted" }) 58 | map("n", "tw", gitsigns.toggle_word_diff, { desc = "Toggle Word Diff" }) 59 | 60 | -- Text object 61 | map({ "o", "x" }, "ih", gitsigns.select_hunk, { desc = "inner Hunk" }) 62 | end, 63 | }, 64 | keys = { 65 | { "h", function() end, desc = "Gitsigns" }, 66 | { "t", function() end, desc = "Toggle" }, 67 | }, 68 | } 69 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/local.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "princejoogie/duckdb.nvim", 3 | ft = { "csv" }, 4 | opts = { 5 | rows_per_page = 50, 6 | }, 7 | keys = { 8 | { "pn", "DuckView next", desc = "Duck: Next page", ft = "duck_view" }, 9 | { "pp", "DuckView prev", desc = "Duck: Previous page", ft = "duck_view" }, 10 | { "pf", "DuckView first", desc = "Duck: First page", ft = "duck_view" }, 11 | { "pl", "DuckView last", desc = "Duck: Last page", ft = "duck_view" }, 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | ---@param client vim.lsp.Client 2 | ---@param method vim.lsp.protocol.Method 3 | ---@param bufnr? integer some lsp support methods only in specific files 4 | ---@return boolean 5 | ---@diagnostic disable-next-line: unused-local, unused-function 6 | local function client_supports_method(client, method, bufnr) 7 | if vim.fn.has("nvim-0.11") == 1 then 8 | return client:supports_method(method, bufnr) 9 | else 10 | ---@diagnostic disable-next-line: param-type-mismatch 11 | return client.supports_method(method, { bufnr = bufnr }) 12 | end 13 | end 14 | 15 | local setup_defaults = function() 16 | local icons = require("joogie.utils").icons 17 | 18 | local signs = { 19 | { name = "DiagnosticSignError", text = icons.Error }, 20 | { name = "DiagnosticSignWarn", text = icons.Warn }, 21 | { name = "DiagnosticSignInfo", text = icons.Info }, 22 | { name = "DiagnosticSignHint", text = icons.Hint }, 23 | } 24 | 25 | for _, sign in ipairs(signs) do 26 | vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) 27 | end 28 | 29 | vim.diagnostic.config({ 30 | virtual_text = false, 31 | -- virtual_lines = true, 32 | float = { border = "rounded" }, 33 | }) 34 | end 35 | 36 | local setup_autocmds = function() 37 | vim.api.nvim_create_autocmd("LspAttach", { 38 | group = vim.api.nvim_create_augroup("joogie-lsp-attach", { clear = true }), 39 | callback = function(event) 40 | -- local client = vim.lsp.get_client_by_id(event.data.client_id) 41 | local map = function(keys, func, desc, mode) 42 | mode = mode or "n" 43 | vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) 44 | end 45 | 46 | map("K", vim.lsp.buf.hover, "Hover Action") 47 | map("rn", vim.lsp.buf.rename, "[R]e[n]ame") 48 | map("ca", vim.lsp.buf.code_action, "[C]ode [A]ctions", { "n", "x" }) 49 | map("e", vim.diagnostic.open_float, "Open float") 50 | map("[d", function() 51 | vim.diagnostic.jump({ count = -1, float = true }) 52 | end, "[D]iagnostic Prev") 53 | map("]d", function() 54 | vim.diagnostic.jump({ count = 1, float = true }) 55 | end, "[D]iagnostic Next") 56 | end, 57 | }) 58 | end 59 | 60 | return { 61 | { 62 | "neovim/nvim-lspconfig", 63 | dependencies = { 64 | { "mason-org/mason.nvim", opts = {} }, 65 | "mason-org/mason-lspconfig.nvim", 66 | "j-hui/fidget.nvim", 67 | }, 68 | config = function() 69 | setup_autocmds() 70 | setup_defaults() 71 | 72 | local mlsp = require("mason-lspconfig") 73 | 74 | require("lspconfig.ui.windows").default_options.border = "rounded" 75 | require("mason").setup({ ui = { border = "rounded" } }) 76 | 77 | mlsp.setup({ 78 | automatic_enable = true, 79 | ensure_installed = { 80 | "biome", 81 | "bashls", 82 | "cssls", 83 | "dockerls", 84 | "eslint", 85 | "html", 86 | "jsonls", 87 | "lua_ls", 88 | "prismals", 89 | "tailwindcss", 90 | "ts_ls", 91 | "yamlls", 92 | }, 93 | }) 94 | 95 | local capabilities = vim.lsp.protocol.make_client_capabilities() 96 | capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) 97 | vim.lsp.config("*", { capabilities = capabilities }) 98 | end, 99 | }, 100 | } 101 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/neo-test.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-neotest/neotest", 4 | dependencies = { 5 | "nvim-neotest/nvim-nio", 6 | "nvim-lua/plenary.nvim", 7 | "nvim-treesitter/nvim-treesitter", 8 | "marilari88/neotest-vitest", 9 | }, 10 | config = function() 11 | require("neotest").setup({ 12 | adapters = { 13 | require("neotest-vitest")({ 14 | vitestCommand = "npx vitest", 15 | }), 16 | }, 17 | }) 18 | end, 19 | keys = { 20 | { ",", function() end, desc = "NeoTest" }, 21 | { 22 | ",s", 23 | function() 24 | require("neotest").summary.toggle() 25 | end, 26 | desc = "NeoTest: Toggle summary", 27 | }, 28 | { 29 | ",e", 30 | function() 31 | require("neotest").output.open() 32 | end, 33 | desc = "NeoTest: Output open", 34 | }, 35 | { 36 | ",r", 37 | function() 38 | require("neotest").run.run() 39 | end, 40 | desc = "NeoTest: Run nearest", 41 | }, 42 | { 43 | ",w", 44 | function() 45 | require("neotest").watch.toggle(vim.fn.expand("%")) 46 | end, 47 | desc = "NeoTest: Watch file", 48 | }, 49 | { 50 | ",f", 51 | function() 52 | require("neotest").run.run(vim.fn.expand("%")) 53 | end, 54 | desc = "NeoTest: Run file", 55 | }, 56 | }, 57 | }, 58 | } 59 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/nvim-cmp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "hrsh7th/nvim-cmp", 4 | dependencies = { 5 | "hrsh7th/cmp-buffer", 6 | "hrsh7th/cmp-cmdline", 7 | "hrsh7th/cmp-nvim-lsp", 8 | "hrsh7th/cmp-nvim-lua", 9 | "hrsh7th/cmp-path", 10 | "onsails/lspkind.nvim", 11 | "kristijanhusak/vim-dadbod-completion", 12 | }, 13 | opts = function() 14 | local cmp = require("cmp") 15 | local lspkind = require("lspkind") 16 | 17 | return { 18 | mapping = { 19 | [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), 20 | [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), 21 | [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), 22 | [""] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }), 23 | [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), 24 | [""] = cmp.config.disable, 25 | [""] = cmp.mapping({ 26 | i = cmp.mapping.abort(), 27 | c = cmp.mapping.close(), 28 | }), 29 | [""] = cmp.mapping.confirm({ select = true }), 30 | }, 31 | sources = cmp.config.sources({ 32 | { name = "vim-dadbod-completion" }, 33 | { name = "git" }, 34 | { name = "path" }, 35 | { name = "nvim_lsp" }, 36 | { name = "nvim_lua" }, 37 | { name = "lazydev", group_index = 0 }, 38 | }, { 39 | { name = "buffer" }, 40 | { name = "spell" }, 41 | }), 42 | formatting = { 43 | fields = { "kind", "abbr", "menu" }, 44 | format = lspkind.cmp_format({ 45 | mode = "symbol", 46 | preset = "codicons", 47 | maxwidth = 50, 48 | before = function(entry, vim_item) 49 | vim_item.menu = ({ 50 | nvim_lsp = "[LSP ]", 51 | buffer = "[Buf ]", 52 | path = "[Path]", 53 | luasnip = "[Snip]", 54 | git = "[Git ]", 55 | ["vim-dadbod-completion"] = "[DB ]", 56 | })[entry.source.name] 57 | 58 | return vim_item 59 | end, 60 | }), 61 | }, 62 | window = { 63 | completion = cmp.config.window.bordered(), 64 | documentation = cmp.config.window.bordered(), 65 | }, 66 | } 67 | end, 68 | config = function(_, opts) 69 | local cmp = require("cmp") 70 | 71 | cmp.setup.filetype("sql", { 72 | sources = cmp.config.sources({ 73 | { name = "vim-dadbod-completion" }, 74 | }, { 75 | { name = "buffer" }, 76 | }), 77 | }) 78 | 79 | cmp.setup.filetype("gitcommit", { 80 | sources = cmp.config.sources({ 81 | { name = "git" }, 82 | }, { 83 | { name = "buffer" }, 84 | }), 85 | }) 86 | 87 | cmp.setup.cmdline({ "/", "?" }, { 88 | mapping = cmp.mapping.preset.cmdline(), 89 | sources = { 90 | { name = "buffer" }, 91 | }, 92 | }) 93 | 94 | cmp.setup.cmdline(":", { 95 | mapping = cmp.mapping.preset.cmdline(), 96 | sources = cmp.config.sources({ 97 | { name = "path" }, 98 | }, { 99 | { name = "cmdline" }, 100 | }), 101 | }) 102 | 103 | for _, source in ipairs(opts.sources) do 104 | source.group_index = source.group_index or 1 105 | end 106 | 107 | cmp.setup(opts) 108 | end, 109 | }, 110 | { 111 | "L3MON4D3/LuaSnip", 112 | dependencies = { 113 | { 114 | "rafamadriz/friendly-snippets", 115 | config = function() 116 | require("luasnip.loaders.from_vscode").lazy_load() 117 | end, 118 | }, 119 | { 120 | "nvim-cmp", 121 | dependencies = { 122 | "saadparwaiz1/cmp_luasnip", 123 | }, 124 | opts = function(_, opts) 125 | opts.snippet = { 126 | expand = function(args) 127 | require("luasnip").lsp_expand(args.body) 128 | end, 129 | } 130 | table.insert(opts.sources, { name = "luasnip" }) 131 | end, 132 | }, 133 | }, 134 | opts = { 135 | history = true, 136 | delete_check_events = "TextChanged", 137 | }, 138 | }, 139 | { 140 | "folke/lazydev.nvim", 141 | ft = "lua", 142 | opts = { 143 | library = { 144 | { path = "${3rd}/luv/library", words = { "vim%.uv" } }, 145 | }, 146 | }, 147 | }, 148 | { 149 | "petertriho/cmp-git", 150 | dependencies = { "hrsh7th/nvim-cmp" }, 151 | opts = {}, 152 | init = function() 153 | table.insert(require("cmp").get_config().sources, { name = "git" }) 154 | end, 155 | }, 156 | { 157 | "princejoogie/supermaven-nvim", 158 | config = function() 159 | require("supermaven-nvim").setup({}) 160 | end, 161 | }, 162 | { 163 | "copilotlsp-nvim/copilot-lsp", 164 | enabled = false, 165 | init = function() 166 | vim.g.copilot_nes_debounce = 300 167 | vim.lsp.enable("copilot_ls") 168 | vim.keymap.set({ "n", "v" }, "", function() 169 | local _ = (require("copilot-lsp.nes").apply_pending_nes() and require("copilot-lsp.nes").walk_cursor_end_edit()) 170 | end) 171 | end, 172 | }, 173 | } 174 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/theme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "catppuccin/nvim", 4 | enabled = true, 5 | name = "catppuccin", 6 | priority = 1000, 7 | opts = { 8 | transparent_background = true, 9 | float = { transparent = true, }, 10 | no_italic = true, 11 | integrations = { 12 | harpoon = true, 13 | snacks = { enabled = true, indent_scope_color = "surface2" }, 14 | }, 15 | custom_highlights = function(colors) 16 | return { 17 | Folded = { fg = colors.overlay2, bg = colors.base }, 18 | NesDelete = { cterm = { strikethrough = true }, strikethrough = true, bg = "#443245" }, 19 | } 20 | end, 21 | }, 22 | init = function() 23 | vim.cmd([[colorscheme catppuccin-mocha]]) 24 | end, 25 | }, 26 | } 27 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/joogie/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | local cmd = require("joogie.utils").cmd 2 | 3 | return { 4 | "nvim-treesitter/nvim-treesitter", 5 | dependencies = { 6 | { 7 | "nvim-treesitter/nvim-treesitter-context", 8 | opts = { enable = true }, 9 | -- stylua: ignore 10 | keys = { 11 | { mode = { "n", "v" }, "k", function() require("treesitter-context").go_to_context(vim.v.count1) end, desc = "Go to context", }, 12 | {"tc", cmd("TSContext toggle"), desc = "Toggle Treesitter Context"}, 13 | }, 14 | }, 15 | { 16 | "nvim-treesitter/nvim-treesitter-textobjects", 17 | config = function() 18 | local move = require("nvim-treesitter.textobjects.move") ---@type table 19 | local configs = require("nvim-treesitter.configs") 20 | for name, fn in pairs(move) do 21 | if name:find("goto") == 1 then 22 | move[name] = function(q, ...) 23 | if vim.wo.diff then 24 | local config = configs.get_module("textobjects.move")[name] ---@type table 25 | for key, query in pairs(config or {}) do 26 | if q == query and key:find("[%]%[][cC]") then 27 | vim.cmd("normal! " .. key) 28 | return 29 | end 30 | end 31 | end 32 | return fn(q, ...) 33 | end 34 | end 35 | end 36 | end, 37 | }, 38 | }, 39 | opts = { 40 | autotag = { 41 | enable = true, 42 | filetypes = { 43 | "html", 44 | "javascript", 45 | "javascriptreact", 46 | "jsx", 47 | "markdown", 48 | "tsx", 49 | "typescript", 50 | "typescriptreact", 51 | "prisma", 52 | }, 53 | }, 54 | ensure_installed = { 55 | "css", 56 | "dockerfile", 57 | "html", 58 | "javascript", 59 | "jsdoc", 60 | "json", 61 | "latex", 62 | "lua", 63 | "markdown", 64 | "norg", 65 | "prisma", 66 | "python", 67 | "query", 68 | "regex", 69 | "scss", 70 | "sql", 71 | "svelte", 72 | "tsx", 73 | "typescript", 74 | "typst", 75 | "vue", 76 | "yaml", 77 | }, 78 | highlight = { enable = true, additional_vim_regex_highlighting = false }, 79 | indent = { enable = true }, 80 | textobjects = { 81 | move = { 82 | enable = true, 83 | goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, 84 | goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, 85 | goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, 86 | goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, 87 | }, 88 | }, 89 | }, 90 | config = function(_, opts) 91 | if type(opts.ensure_installed) == "table" then 92 | ---@type table 93 | local added = {} 94 | opts.ensure_installed = vim.tbl_filter(function(lang) 95 | if added[lang] then 96 | return false 97 | end 98 | added[lang] = true 99 | return true 100 | end, opts.ensure_installed) 101 | end 102 | require("nvim-treesitter.configs").setup(opts) 103 | end, 104 | build = ":TSUpdate", 105 | cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, 106 | keys = { 107 | { "", desc = "Decrement selection", mode = "x" }, 108 | }, 109 | } 110 | -------------------------------------------------------------------------------- /old/bspwm/.config/bspwm/bspwmrc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | pgrep -x sxhkd > /dev/null || sxhkd & 4 | 5 | bspc monitor -d I II III IV V VI VII VIII IX X 6 | 7 | bspc config border_width 3 8 | bspc config focused_border_color "#7199EE" 9 | bspc config window_gap 10 10 | 11 | bspc config split_ratio 0.52 12 | bspc config borderless_monocle true 13 | bspc config gapless_monocle true 14 | 15 | bspc rule -a Gimp desktop='^8' state=floating follow=on 16 | bspc rule -a Chromium desktop='^2' 17 | bspc rule -a mplayer2 state=floating 18 | bspc rule -a Kupfer.py focus=on 19 | bspc rule -a Screenkey manage=off 20 | 21 | bspc config focus_follows_pointer true 22 | bspc config border_width 1 23 | 24 | for window in $(bspc query -N -n .window); do 25 | bspc config -w "$window" border_width 3 26 | done 27 | 28 | xsetroot -cursor_name left_ptr & 29 | feh --bg-fill "$HOME"/dotfiles/wallpapers/d.jpg 30 | "$HOME"/.config/polybar/launch.sh 31 | "$HOME"/.config/picom/launch.sh 32 | -------------------------------------------------------------------------------- /old/bspwm/.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-theme-name=Materia-dark 3 | gtk-icon-theme-name=ePapirus-Dark 4 | gtk-font-name=Cantarell 11 5 | gtk-cursor-theme-name=Adwaita 6 | gtk-cursor-theme-size=0 7 | gtk-toolbar-style=GTK_TOOLBAR_BOTH 8 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR 9 | gtk-button-images=1 10 | gtk-menu-images=1 11 | gtk-enable-event-sounds=1 12 | gtk-enable-input-feedback-sounds=1 13 | gtk-xft-antialias=1 14 | gtk-xft-hinting=1 15 | gtk-xft-hintstyle=hintfull 16 | -------------------------------------------------------------------------------- /old/bspwm/.config/picom/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pkill picom 4 | 5 | sleep 0.2 6 | 7 | picom --config "$HOME"/.config/picom/picom.conf & 8 | -------------------------------------------------------------------------------- /old/bspwm/.config/picom/picom.conf: -------------------------------------------------------------------------------- 1 | backend = "glx"; 2 | glx-no-stencil = true; 3 | glx-no-rebind-pixmap = true; 4 | 5 | opacity-rule = [ 6 | "98:class_g = 'Alacritty'", 7 | "98:class_g = 'polybar'", 8 | "98:class_g = 'kitty'", 9 | "98:class_g = 'discord'", 10 | "98:class_g = 'Spotify'", 11 | "98:class_g = 'Postman'", 12 | "98:class_g = 'Org.gnome.Nautilus'", 13 | "98:class_g = 'beekeeper-studio'", 14 | "98:class_g = 'Rofi'" 15 | ]; 16 | 17 | blur: { 18 | method = "gaussian", 19 | size = 20, 20 | deviation = 10 21 | }; 22 | 23 | # blur-background-exclude = [ 24 | # "class_g = 'Polybar'", 25 | # "class_g = 'Peek'" 26 | # ]; 27 | 28 | shadow = false; 29 | fading = true; 30 | fade-delta = 5; 31 | 32 | corner-radius = 15; 33 | detect-rounded-corners = true; 34 | 35 | rounded-corners-exclude = [ 36 | "window_type = 'desktop'", 37 | "window_type = 'dock'", 38 | "class_g = 'Peek'" 39 | ] 40 | 41 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/config.ini: -------------------------------------------------------------------------------- 1 | [global/wm] 2 | 3 | margin-bottom = 0 4 | margin-top = 0 5 | 6 | include-file = ./scripts/system.ini 7 | include-file = ./scripts/colors.ini 8 | include-file = modules.ini 9 | 10 | [bar/joogie] 11 | 12 | monitor-strict = false 13 | override-redirect = false 14 | 15 | bottom = false 16 | fixed-center = true 17 | 18 | width = 100% 19 | height = 26 20 | 21 | ; offset-x = 5 22 | ; offset-y = 5 23 | 24 | background = ${nabi.bg} 25 | foreground = ${nabi.fg} 26 | 27 | ; radius = 3.0 28 | 29 | line-size = 2 30 | line-color = ${nabi.blue} 31 | 32 | border-size = 8px 33 | border-color = ${nabi.bg} 34 | 35 | padding = 0 36 | 37 | module-margin-left = 0 38 | module-margin-right = 0 39 | 40 | ; Text 41 | font-0 = "JetBrainsMono:style=Bold:pixelsize=9;3" 42 | ; Icons 43 | font-1 = "Font Awesome 6 Free Solid:size=10;3" 44 | font-2 = "Material Design Icons Desktop:size=11;3" 45 | font-3 = "Material Design Icons Desktop:size=15;5" 46 | ; Glyphs 47 | font-4 = "MesloLGS NF:style=Regular:size=15;4" 48 | 49 | modules-left = launcher dots bi bspwm bd 50 | modules-center = xwindow 51 | modules-right = bi cpu_bar bd sep bi memory_bar bd sep bi network bd sep bi pulseaudio bd sep bi date bd 52 | 53 | spacing = 0 54 | separator = 55 | dim-value = 1.0 56 | 57 | tray-position = right 58 | tray-detached = false 59 | tray-maxsize = 16 60 | tray-background = ${nabi.bg} 61 | tray-offset-x = 0 62 | tray-offset-y = 0 63 | tray-padding = 0 64 | tray-scale = 1.0 65 | 66 | wm-restack = bspwm 67 | enable-ipc = true 68 | 69 | cursor-click = pointer 70 | cursor-scroll = 71 | 72 | [settings] 73 | 74 | screenchange-reload = false 75 | 76 | compositing-background = source 77 | compositing-foreground = over 78 | compositing-overline = over 79 | compositing-underline = over 80 | compositing-border = over 81 | 82 | pseudo-transparency = false 83 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | killall -q polybar 4 | 5 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 6 | 7 | polybar joogie -c ~/.config/polybar/config.ini & 8 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/Brightness: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIR="$HOME/.config/bspwm/assets" 4 | BRIGHTNESS_STEPS=5 5 | 6 | function get_brightness { 7 | brightnessctl i | grep -oP '\(\K[^%\)]+' 8 | } 9 | 10 | function send_notification { 11 | icon="$DIR/brightness.svg" 12 | brightness=$(get_brightness) 13 | # Make the bar with the special character ─ (it's not dash -) 14 | # https://en.wikipedia.org/wiki/Box-drawing_character 15 | bar=$(seq -s "─" 0 $((brightness / 5)) | sed 's/[0-9]//g') 16 | # Send the notification 17 | dunstify "Brightness $brightness%" -i $icon -r 5555 -u normal -h int:value:$(($brightness)) 18 | } 19 | 20 | case $1 in 21 | up) 22 | # increase the backlight by 5% 23 | brightnessctl set "${BRIGHTNESS_STEPS:-5}%+" -q 24 | send_notification 25 | ;; 26 | down) 27 | # decrease the backlight by 5% 28 | brightnessctl set "${BRIGHTNESS_STEPS:-5}%-" -q 29 | send_notification 30 | ;; 31 | esac 32 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/ExternalRules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | wid=$1 4 | class=$2 5 | instance=$3 6 | consequences=$4 7 | 8 | main () { 9 | case "$class" in 10 | FloaTerm) 11 | eval "$consequences" 12 | [ "$state" ] || echo "state=floating center=on rectangle=781x451+0+0" 13 | ;; 14 | Updating) 15 | eval "$consequences" 16 | [ "$state" ] || echo "state=floating rectangle=483x190+1090+72" 17 | ;; 18 | Ranger) 19 | eval "$consequences" 20 | [ "$state" ] || echo "state=floating rectangle=811x286+0+0 center=on" 21 | ;; 22 | MusicPlayer) 23 | eval "$consequences" 24 | [ "$state" ] || echo "state=floating rectangle=630x215+0+0 center=on" 25 | ;; 26 | Sysfetch) 27 | eval "$consequences" 28 | [ "$state" ] || echo "border=off state=floating rectangle=352x500+36+115" 29 | ;; 30 | mpv) 31 | eval "$consequences" 32 | [ "$state" ] || echo "state=floating focus=on center=on rectangle=925x519+0+0 border=off" 33 | ;; 34 | Viewnior) 35 | eval "$consequences" 36 | [ "$state" ] || echo "state=floating focus=on center=on border=off" 37 | ;; 38 | whatsapp-nativefier-d40211|TelegramDesktop) 39 | eval "$consequences" 40 | [ "$state" ] || echo "state=pseudo_tiled desktop=^4 center=on follow=on rectangle=930x617+0+0" 41 | ;; 42 | retroarch) 43 | eval "$consequences" 44 | [ "$state" ] || echo "state=pseudo_tiled desktop=^6 center=on follow=on border=off" 45 | ;; 46 | ranger) 47 | eval "$consequences" 48 | [ "$state" ] || echo "state=floating rectangle=811x316+0+0 center=on" 49 | ;; 50 | Pavucontrol) 51 | eval "$consequences" 52 | [ "$state" ] || echo "state=floating follow=on center=on" 53 | ;; 54 | Virt-manager) 55 | eval "$consequences" 56 | [ "$state" ] || echo "state=floating desktop=^5 follow=on center=on" 57 | ;; 58 | Thunar) 59 | eval "$consequences" 60 | [ "$state" ] || echo "state=pseudo_tiled desktop=^2 rectangle=966x576+0+0 follow=on center=on border=off" 61 | ;; 62 | firefox|Navigator) 63 | eval "$consequences" 64 | [ "$state" ] || echo "state=pseudo_tiled desktop=^3 border=off rectangle=1480x820+0+0 center=on follow=on" 65 | ;; 66 | Transmission-gtk) 67 | eval "$consequences" 68 | [ "$state" ] || echo "desktop=^6 follow=on" 69 | ;; 70 | Spotify) 71 | eval "$consequences" 72 | [ "$state" ] || echo "state=pseudo_tiled center=on border=off rectangle=1124x600 desktop=^6 follow=on" 73 | ;; 74 | "") 75 | sleep 0.5 76 | wm_class=($(xprop -id $wid | grep "WM_CLASS" | grep -Po '"\K[^,"]+')) 77 | class=${wm_class[-1]} 78 | [[ ${#wm_class[@]} == "2" ]] && instance=${wm_class[0]} 79 | [[ -n "$class" ]] && main 80 | ;; 81 | esac 82 | } 83 | 84 | main 85 | case "$instance" in 86 | Toolkit) 87 | eval "$consequences" 88 | [ "$state" ] || echo "state=floating sticky=on rectangle=500x290+1054+593" 89 | ;; 90 | esac 91 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/ScreenShoTer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | time=$(date +%Y-%m-%d-%I-%M-%S) 4 | geometry=`xrandr | head -n1 | cut -d',' -f2 | tr -d '[:blank:],current'` 5 | dir="$(xdg-user-dir PICTURES)/ScreenShots" 6 | file="ShoT_${time}_${geometry}.png" 7 | 8 | if ! [ -d "$dir" ]; then 9 | mkdir -p $dir 10 | fi 11 | 12 | function notify_view() { 13 | if [[ -e "$dir/$file" ]]; then 14 | dunstify --replace=699 -i $dir/$file Screenshot "Screenshot Saved" 15 | else 16 | dunstify --replace=699 -i $dir/$file Screenshot "Screenshot Deleted." 17 | fi 18 | } 19 | 20 | function imgtemp() { 21 | if [ "$bytes" ]; then 22 | echo "$bytes" | base64 --decode | tee "$file" 23 | notify_view 24 | else 25 | dunstify -i ~/.config/bspwm/assets/cancel.svg Screenshot "Operation Cancelled." 26 | fi 27 | } 28 | 29 | function countdown() { 30 | for sec in `seq $1 -1 1`; do 31 | dunstify -t 1000 --replace=699 -i ~/.config/bspwm/assets/screenshot.svg "Taking shot in : $sec" 32 | sleep 1 33 | done 34 | } 35 | 36 | function ShotNow() { 37 | 38 | cd "$dir" || return 39 | local bytes 40 | bytes="$(maim -u -o -f png | base64)" 41 | imgtemp 42 | } 43 | 44 | function ShotSelect() { 45 | 46 | cd "$dir" || return 47 | local bytes 48 | bytes="$(maim -u -o -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | base64)" 49 | imgtemp 50 | } 51 | 52 | function Shot10 () { 53 | countdown '10' 54 | sleep 1 55 | cd "$dir" || return 56 | local bytes 57 | bytes="$(maim -u -o -f png | base64)" 58 | imgtemp 59 | } 60 | 61 | if [[ "$1" == "--now" ]]; then 62 | ShotNow 63 | elif [[ "$1" == "--sel" ]]; then 64 | ShotSelect 65 | elif [[ "$1" == "--in10" ]]; then 66 | Shot10 67 | else 68 | echo -e "Available Options : --now --in10" 69 | fi 70 | 71 | exit 0 72 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/Term: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | case "$1" in 4 | --ot) 5 | alacritty;; 6 | --oft) 7 | alacritty --class FloaTerm,Alacritty;; 8 | --ou) 9 | alacritty --hold --class Updating,Alacritty -e yay -Syyu --devel;; 10 | --ocu) 11 | alacritty --hold --class Updating,Alacritty -e checkupdates;; 12 | --or) 13 | alacritty --class Ranger,Alacritty -e ranger;; 14 | --ov) 15 | alacritty -e nvim;; 16 | --om) 17 | alacritty --class MusicPlayer,Alacritty -e ncmpcpp;; 18 | --of) 19 | alacritty --hold --class Sysfetch,Alacritty -e ~/.local/bin/sysfetch ;; 20 | *) 21 | echo "Invalid option";; 22 | esac 23 | 24 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/Updates: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | updates=$(($(checkupdates 2> /dev/null | wc -l || echo 0) + $(yay -Qum 2> /dev/null | wc -l || echo 0))) 4 | echo "${updates:-0}" 5 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/Volume: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Icons 4 | iDIR="$HOME/.config/bspwm/assets" 5 | notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obvolume' 6 | 7 | # Get Volume 8 | get_volume() { 9 | echo "`pamixer --get-volume-human | sed 's/%//'`" 10 | } 11 | 12 | # Get icons 13 | get_icon() { 14 | current="$(get_volume)" 15 | if [[ "$current" -eq "0" ]]; then 16 | icon="$iDIR/mute.png" 17 | elif [[ "$current" == "muted" ]]; then 18 | icon="$iDIR/mute.png" 19 | elif [[ ("$current" -ge "0") && ("$current" -le "150") ]]; then 20 | icon="$iDIR/vol.png" 21 | fi 22 | } 23 | 24 | # Notify 25 | notify_user() { 26 | ${notify_cmd} -i "$icon" "Volume : $(get_volume)%" 27 | } 28 | 29 | # Increase Volume 30 | inc_volume() { 31 | [[ `pamixer --get-mute` == true ]] && pamixer -u 32 | pamixer --allow-boost --set-limit 150 -i 5 && get_icon && notify_user 33 | } 34 | 35 | # Decrease Volume 36 | dec_volume() { 37 | [[ `pamixer --get-mute` == true ]] && pamixer -u 38 | pamixer --allow-boost --set-limit 150 -d 5 && get_icon && notify_user 39 | } 40 | 41 | # Toggle Mute 42 | toggle_mute() { 43 | if [[ `pamixer --get-mute` == false ]]; then 44 | pamixer --toggle-mute && ${notify_cmd} -i "$iDIR/mute.png" "Mute" 45 | else 46 | pamixer --toggle-mute && get_icon && ${notify_cmd} -i "$icon" "Unmute" 47 | fi 48 | } 49 | 50 | # Execute accordingly 51 | if [[ -x `which pamixer` ]]; then 52 | if [[ "$1" == "--get" ]]; then 53 | get_volume 54 | elif [[ "$1" == "--inc" ]]; then 55 | inc_volume 56 | elif [[ "$1" == "--dec" ]]; then 57 | dec_volume 58 | elif [[ "$1" == "--toggle" ]]; then 59 | toggle_mute 60 | else 61 | echo $(get_volume)% 62 | fi 63 | else 64 | ${notify_cmd} "'pamixer' is not installed." 65 | fi 66 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/Weather: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | encode_to_url_format() { 4 | echo "$1" | sed 's/ /%20/g' 5 | } 6 | 7 | check_if_empty() { 8 | [[ -z "$1" ]] && echo "0" || echo "$1" 9 | } 10 | 11 | KEY="1f6e449790b8cf73a3cab8d5715483f8" 12 | CITY="Baguio City" 13 | CITYN=$(encode_to_url_format "$CITY") 14 | UNITS="metric" 15 | WEATHER=$(curl -sf "api.openweathermap.org/data/2.5/weather?q=$CITYN&appid=$KEY&units=$UNITS") 16 | 17 | WEATHER_DESC=$(echo "$WEATHER" | jq -r ".weather[0].main") 18 | WEATHER_TEMP=$(echo "$WEATHER" | jq ".main.temp" | cut -d "." -f 1) 19 | WEATHER_ICON_CODE=$(echo "$WEATHER" | jq -r ".weather[].icon" | head -1) 20 | WEATHER_FEELS_LIKE=$(echo "$WEATHER" | jq ".main.feels_like" | cut -d "." -f 1) 21 | WEATHER_HUMIDITY=$(echo "$WEATHER" | jq ".main.humidity" | cut -d "." -f 1) 22 | WEATHER_ICON="" 23 | WEATHER_HEX="" 24 | 25 | case $WEATHER_ICON_CODE in 26 | "01d") 27 | WEATHER_ICON="" 28 | WEATHER_HEX="#ffd86b" 29 | ;; 30 | "01n") 31 | WEATHER_ICON="" 32 | WEATHER_HEX="#fcdcf6" 33 | ;; 34 | "02d") 35 | WEATHER_ICON="" 36 | WEATHER_HEX="#adadff" 37 | ;; 38 | "02n") 39 | WEATHER_ICON="" 40 | WEATHER_HEX="#adadff" 41 | ;; 42 | "03d") 43 | WEATHER_ICON="" 44 | WEATHER_HEX="#adadff" 45 | ;; 46 | "03n") 47 | WEATHER_ICON="" 48 | WEATHER_HEX="#adadff" 49 | ;; 50 | "04d") 51 | WEATHER_ICON="" 52 | WEATHER_HEX="#adadff" 53 | ;; 54 | "04n") 55 | WEATHER_ICON="" 56 | WEATHER_HEX="#acb0d0" 57 | ;; 58 | "09d") 59 | WEATHER_ICON="" 60 | WEATHER_HEX="#6b95ff" 61 | ;; 62 | "09n") 63 | WEATHER_ICON="" 64 | WEATHER_HEX="#6b95ff" 65 | ;; 66 | "10d") 67 | WEATHER_ICON="" 68 | WEATHER_HEX="#6b95ff" 69 | ;; 70 | "10n") 71 | WEATHER_ICON="" 72 | WEATHER_HEX="#6b95ff" 73 | ;; 74 | "11d") 75 | WEATHER_ICON="" 76 | WEATHER_HEX="#ffeb57" 77 | ;; 78 | "11n") 79 | WEATHER_ICON="" 80 | WEATHER_HEX="#ffeb57" 81 | ;; 82 | "13d") 83 | WEATHER_ICON="" 84 | WEATHER_HEX="#e3e6fc" 85 | ;; 86 | "13n") 87 | WEATHER_ICON="" 88 | WEATHER_HEX="#e3e6fc" 89 | ;; 90 | "40d") 91 | WEATHER_ICON="" 92 | WEATHER_HEX="#84afdb" 93 | ;; 94 | "40n") 95 | WEATHER_ICON="" 96 | WEATHER_HEX="#84afdb" 97 | ;; 98 | *) 99 | WEATHER_ICON="" 100 | WEATHER_HEX="#adadff" 101 | ;; 102 | esac 103 | 104 | case $1 in 105 | "current_temp") 106 | check_if_empty "$WEATHER_TEMP" 107 | ;; 108 | "current_temp_fahrenheit") 109 | WEATHER_TEMP=$((($WEATHER_TEMP * 9 / 5) + 32)) 110 | check_if_empty $WEATHER_TEMP 111 | ;; 112 | "feels_like") 113 | check_if_empty "$WEATHER_FEELS_LIKE" 114 | ;; 115 | "humidity") 116 | check_if_empty "$WEATHER_HUMIDITY" 117 | ;; 118 | "weather_desc") 119 | [[ -z $WEATHER_DESC ]] && echo "Not Available." || echo "$WEATHER_DESC" 120 | ;; 121 | "icon") 122 | echo $WEATHER_ICON 123 | ;; 124 | "hex") 125 | echo $WEATHER_HEX 126 | ;; 127 | "full") 128 | echo "$WEATHER" 129 | ;; 130 | "city") 131 | echo "$CITY" 132 | ;; 133 | "wmodule") 134 | echo $WEATHER_ICON "$WEATHER_TEMP"° 135 | esac 136 | 137 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/colors.ini: -------------------------------------------------------------------------------- 1 | [nabi] 2 | bg = #CC06080A 3 | fg = #F1F1F1 4 | mb = #1A1B2A 5 | 6 | trans = #00000000 7 | white = #FFFFFF 8 | black = #06080A 9 | 10 | red = #FE6D85 11 | pink = #FF0677 12 | purple = #A485DD 13 | blue = #7199EE 14 | blue-arch = #0A9CF5 15 | cyan = #38A89D 16 | teal = #00B19F 17 | green = #95C561 18 | lime = #B9C244 19 | yellow = #D7A65F 20 | amber = #FBC02D 21 | orange = #F6955B 22 | brown = #AC8476 23 | grey = #8C8C8C 24 | indigo = #C678DD 25 | blue-gray = #6D8895 26 | -------------------------------------------------------------------------------- /old/bspwm/.config/polybar/scripts/system.ini: -------------------------------------------------------------------------------- 1 | ; ╔═╗╦ ╦╔═╗╔╦╗╔═╗╔╦╗ ╦ ╦╔═╗╦═╗╦╔═╗╔╗ ╦ ╔═╗╔═╗ 2 | ; ╚═╗╚╦╝╚═╗ ║ ║╣ ║║║ ╚╗╔╝╠═╣╠╦╝║╠═╣╠╩╗║ ║╣ ╚═╗ 3 | ; ╚═╝ ╩ ╚═╝ ╩ ╚═╝╩ ╩ ╚╝ ╩ ╩╩╚═╩╩ ╩╚═╝╩═╝╚═╝╚═╝ 4 | ; The variables for the polybar modules are taken from this file. 5 | 6 | ;; Edit according to your system 7 | ;; Run `ls -1 /sys/class/power_supply/` to list list batteries and adapters. 8 | ;; Run `ls -1 /sys/class/backlight/` to list available graphics cards. 9 | ;; Run `ip link | awk '/state UP/ {print $2}' | tr -d :` to get active network interface. 10 | 11 | [system] 12 | sys_adapter = AC 13 | sys_battery = AC 14 | sys_graphics_card = intel_backlight 15 | sys_network_interface = enp0s3 16 | -------------------------------------------------------------------------------- /old/bspwm/.config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | display-drun: "ﬓ :"; 3 | display-window: "ﬓ :"; 4 | display-run: " :"; 5 | drun-display-format: "{icon} {name}"; 6 | font: "FiraCode Nerd Font 12"; 7 | modi: "window,run,drun"; 8 | show-icons: true; 9 | icon-theme: "tokyonight_dark"; 10 | } 11 | 12 | @theme "/dev/null" 13 | 14 | * { 15 | bg: #1A1B2A; 16 | bg-alt: #353945; 17 | 18 | fg: #FFFFFF; 19 | fg-alt: #787c99; 20 | 21 | background-color: @bg; 22 | 23 | border: 0; 24 | margin: 0; 25 | padding: 0; 26 | spacing: 0; 27 | } 28 | 29 | window { 30 | width: 30%; 31 | } 32 | 33 | element { 34 | padding: 8 0; 35 | text-color: @fg-alt; 36 | } 37 | 38 | element selected { 39 | text-color: @fg; 40 | } 41 | 42 | element-text { 43 | background-color: inherit; 44 | text-color: inherit; 45 | vertical-align: 0.5; 46 | } 47 | 48 | element-icon { 49 | size: 30; 50 | } 51 | 52 | entry { 53 | background-color: @bg-alt; 54 | padding: 12; 55 | text-color: @fg; 56 | } 57 | 58 | inputbar { 59 | children: [prompt, entry]; 60 | } 61 | 62 | listview { 63 | padding: 8 12; 64 | background-color: @bg; 65 | columns: 1; 66 | lines: 8; 67 | } 68 | 69 | mainbox { 70 | background-color: @bg; 71 | children: [inputbar, listview]; 72 | } 73 | 74 | prompt { 75 | background-color: @bg-alt; 76 | enabled: true; 77 | padding: 12 0 0 12; 78 | text-color: @fg; 79 | } 80 | 81 | /* vim: ft=sass 82 | -------------------------------------------------------------------------------- /old/bspwm/.config/sxhkd/sxhkdrc: -------------------------------------------------------------------------------- 1 | # 2 | # wm independent hotkeys 3 | # 4 | 5 | # terminal emulator 6 | super + Return 7 | alacritty 8 | 9 | # program launcher 10 | super + @space 11 | rofi -show drun 12 | 13 | # make sxhkd reload its configuration files: 14 | super + Escape 15 | pkill -USR1 -x sxhkd 16 | 17 | # 18 | # bspwm hotkeys 19 | # 20 | 21 | # quit/restart bspwm 22 | super + alt + {q,r} 23 | bspc {quit,wm -r} 24 | 25 | # close and kill 26 | super + {_,shift + }w 27 | bspc node -{c,k} 28 | 29 | # alternate between the tiled and monocle layout 30 | super + m 31 | bspc desktop -l next 32 | 33 | # send the newest marked node to the newest preselected node 34 | super + y 35 | bspc node newest.marked.local -n newest.!automatic.local 36 | 37 | # swap the current node and the biggest window 38 | super + g 39 | bspc node -s biggest.window 40 | 41 | # 42 | # state/flags 43 | # 44 | 45 | # set the window state 46 | super + {t,shift + t,s,f} 47 | bspc node -t {tiled,pseudo_tiled,floating,fullscreen} 48 | 49 | # set the node flags 50 | super + ctrl + {m,x,y,z} 51 | bspc node -g {marked,locked,sticky,private} 52 | 53 | # 54 | # focus/swap 55 | # 56 | 57 | # focus the node in the given direction 58 | super + {_,shift + }{h,j,k,l} 59 | bspc node -{f,s} {west,south,north,east} 60 | 61 | # focus the node for the given path jump 62 | super + {p,b,comma,period} 63 | bspc node -f @{parent,brother,first,second} 64 | 65 | # focus the next/previous window in the current desktop 66 | super + {_,shift + }c 67 | bspc node -f {next,prev}.local.!hidden.window 68 | 69 | # focus the next/previous desktop in the current monitor 70 | super + bracket{left,right} 71 | bspc desktop -f {prev,next}.local 72 | 73 | # focus the last node/desktop 74 | super + {grave,Tab} 75 | bspc {node,desktop} -f last 76 | 77 | # focus the older or newer node in the focus history 78 | super + {o,i} 79 | bspc wm -h off; \ 80 | bspc node {older,newer} -f; \ 81 | bspc wm -h on 82 | 83 | # focus or send to the given desktop 84 | super + {_,shift + }{1-9,0} 85 | bspc {desktop -f,node -d} '^{1-9,10}' 86 | 87 | # 88 | # preselect 89 | # 90 | 91 | # preselect the direction 92 | super + ctrl + {h,j,k,l} 93 | bspc node -p {west,south,north,east} 94 | 95 | # preselect the ratio 96 | super + ctrl + {1-9} 97 | bspc node -o 0.{1-9} 98 | 99 | # cancel the preselection for the focused node 100 | super + ctrl + space 101 | bspc node -p cancel 102 | 103 | # cancel the preselection for the focused desktop 104 | super + ctrl + shift + space 105 | bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel 106 | 107 | # 108 | # move/resize 109 | # 110 | 111 | # expand a window by moving one of its side outward 112 | super + alt + {h,j,k,l} 113 | bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} 114 | 115 | # contract a window by moving one of its side inward 116 | super + alt + shift + {h,j,k,l} 117 | bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} 118 | 119 | # move a floating window 120 | super + {Left,Down,Up,Right} 121 | bspc node -v {-20 0,0 20,0 -20,20 0} 122 | -------------------------------------------------------------------------------- /old/scripts/config-terminal.sh: -------------------------------------------------------------------------------- 1 | export INSTALL_DIR=$HOME/.apps 2 | 3 | echo "[⌛] - Configuring terminal..." 4 | 5 | . /etc/os-release 6 | 7 | case $ID in 8 | ubuntu) 9 | sudo apt install tmux zsh -y 10 | ;; 11 | arch) 12 | yes | sudo pacman -S tmux zsh 13 | ;; 14 | *) 15 | echo "[❌] - Unsupported OS" 16 | exit 1 17 | ;; 18 | esac 19 | 20 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 21 | 22 | export CHSH=no 23 | export RUNZSH=no 24 | export KEEP_ZSHRC=yes 25 | 26 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 27 | 28 | curl -sS https://starship.rs/install.sh | sh -s -- -y 29 | git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"/plugins/zsh-autosuggestions 30 | 31 | rm -rf ~/.bashrc ~/.zshrc 32 | 33 | stow zsh 34 | stow bin 35 | 36 | echo "[✅] - Configuration done." 37 | echo " Restart your terminal and run" 38 | echo " $(pwd)/scripts/post-install.sh" 39 | -------------------------------------------------------------------------------- /old/scripts/install-bspwm.sh: -------------------------------------------------------------------------------- 1 | echo "[⌛] - Installing dependencies for bspwm and sxhkd..." 2 | sudo apt-get install libxcb-xinerama0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-util0-dev libxcb-ewmh-dev libxcb-keysyms1-dev libxcb-shape0-dev -y 3 | echo "[✅] - Dependencies for bspwm and sxhkd installed." 4 | 5 | echo "[⌛] - Installing bspwm..." 6 | git clone https://github.com/baskerville/bspwm.git "$INSTALL_DIR"/bspwm 7 | cd "$INSTALL_DIR"/bspwm && make && sudo make install 8 | echo "[✅] - Installed bspwm." 9 | 10 | echo "[⌛] - Installing sxhkd..." 11 | git clone https://github.com/baskerville/sxhkd.git "$INSTALL_DIR"/sxhkd 12 | cd "$INSTALL_DIR"/sxhkd && make && sudo make install 13 | echo "[✅] - Installed sxhkd." 14 | -------------------------------------------------------------------------------- /old/scripts/install-fonts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | FONT_DIR="$HOME/.local/share/fonts" 4 | 5 | if ! [ -d "$FONT_DIR" ]; then 6 | mkdir -p "$FONT_DIR" 7 | fi 8 | 9 | . /etc/os-release 10 | 11 | case $ID in 12 | ubuntu) 13 | if ! [ -d "$FONT_DIR"/firacode ]; then 14 | sudo mkdir "$FONT_DIR"/firacode 15 | sudo cp ./fonts/firacode/* "$FONT_DIR"/firacode 16 | fc-cache -v 17 | echo "[✅] - firacode installed." 18 | else 19 | echo "[ ] - firacode already installed, skipping." 20 | fi 21 | ;; 22 | arch) 23 | yes | sudo pacman -S ttf-fira-code 24 | ;; 25 | *) 26 | ;; 27 | esac 28 | 29 | 30 | if ! [ -d "$FONT_DIR"/fontawesome ]; then 31 | sudo mkdir "$FONT_DIR"/fontawesome 32 | sudo cp ./fonts/fontawesome/* "$FONT_DIR"/fontawesome 33 | fc-cache -v 34 | echo "[✅] - fontawesome installed." 35 | else 36 | echo "[ ] - fontawesome already installed, skipping." 37 | fi 38 | 39 | if ! [ -d "$FONT_DIR"/helvetica ]; then 40 | sudo mkdir "$FONT_DIR"/helvetica 41 | sudo cp ./fonts/helvetica/* "$FONT_DIR"/helvetica 42 | fc-cache -v 43 | echo "[✅] - helvetica installed." 44 | else 45 | echo "[ ] - helvetica already installed, skipping." 46 | fi 47 | 48 | if ! [ -f "$FONT_DIR"/MaterialDesignIconsDesktop.ttf ]; then 49 | sudo cp ./fonts/MaterialDesignIconsDesktop.ttf "$FONT_DIR"/ 50 | fc-cache -v 51 | echo "[✅] - material installed." 52 | else 53 | echo "[ ] - material already installed, skipping." 54 | fi 55 | 56 | if ! [ -f "$FONT_DIR"/MesloLGSNF.ttf ]; then 57 | sudo cp ./fonts/MesloLGSNF.ttf "$FONT_DIR"/ 58 | fc-cache -v 59 | echo "[✅] - meslo installed." 60 | else 61 | echo "[ ] - meslo already installed, skipping." 62 | fi 63 | -------------------------------------------------------------------------------- /old/scripts/install-picom.sh: -------------------------------------------------------------------------------- 1 | echo "[⌛] - Installing dependencies for picom..." 2 | sudo apt install libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl-dev libegl-dev libpcre2-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev meson -y 3 | echo "[✅] - Dependencies for picom installed." 4 | 5 | 6 | echo "[⌛] - Installing picom..." 7 | git clone https://github.com/yshui/picom "$INSTALL_DIR"/picom 8 | cd "$INSTALL_DIR"/picom || exit 9 | git submodule update --init --recursive 10 | meson setup --buildtype=release . build 11 | ninja -C build 12 | sudo ninja -C build install 13 | echo "[✅] - Installed picom." 14 | -------------------------------------------------------------------------------- /old/scripts/install-polybar.sh: -------------------------------------------------------------------------------- 1 | echo "[⌛] - Installing dependencies for polybar..." 2 | sudo apt install build-essential git cmake cmake-data pkg-config python3-sphinx python3-packaging libuv1-dev libcairo2-dev libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-composite0-dev python3-xcbgen xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-xkb-dev libxcb-xrm-dev libxcb-cursor-dev libasound2-dev libpulse-dev libjsoncpp-dev libmpdclient-dev libcurl4-openssl-dev libnl-genl-3-dev -y 3 | echo "[✅] - Dependencies for polybar installed." 4 | 5 | 6 | echo "[⌛] - Installing polybar..." 7 | git clone --recursive https://github.com/polybar/polybar "$INSTALL_DIR"/polybar 8 | cd "$INSTALL_DIR"/polybar || exit 9 | mkdir build && cd build || exit 10 | cmake .. && make -j"$(nproc)" 11 | sudo make install 12 | echo "[✅] - Installed polybar." 13 | -------------------------------------------------------------------------------- /old/scripts/install-rofi.sh: -------------------------------------------------------------------------------- 1 | echo "[⌛] - Installing rofi..." 2 | sudo apt install rofi -y 3 | echo "[✅] - Installed rofi." 4 | -------------------------------------------------------------------------------- /old/scripts/post-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cargo install tree-sitter-cli fnm bob-nvim git-delta 4 | 5 | echo "[⌛] - Configuring fnm..." 6 | fnm install 20 7 | fnm use 20 8 | 9 | echo "[⌛] - Configuring bob..." 10 | bob install stable 11 | bob use stable 12 | 13 | . /etc/os-release 14 | 15 | case $ID in 16 | arch) 17 | if ! [ -x "$(command -v yay)" ]; then 18 | YAY_DIR="$HOME"/yay 19 | git clone https://aur.archlinux.org/yay.git "$YAY_DIR" 20 | cd "$YAY_DIR" || exit 21 | makepkg -si 22 | fi 23 | 24 | yes | yay -S google-chrome --noconfirm 25 | yes | sudo pacman -S materia-theme papirus-icon-theme 26 | ;; 27 | ubuntu) 28 | # echo that this is a todo 29 | echo "[❌] - Ubuntu is not supported yet" 30 | ;; 31 | *) 32 | echo "[❌] - Unsupported OS" 33 | exit 1 34 | ;; 35 | esac 36 | 37 | echo "[✅] - Post install done." 38 | echo " Restart your terminal and you're good to go." 39 | -------------------------------------------------------------------------------- /old/scripts/raycast/vpn-connect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title VPN Connect 6 | # @raycast.mode compact 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🤖 10 | 11 | # Documentation: 12 | # @raycast.description connect to tunnelblick vpn 13 | 14 | osascript -e 'tell application "Tunnelblick" to connect "new-config"' 15 | echo "🔒 Tunnelblick VPN Connecting..." 16 | -------------------------------------------------------------------------------- /old/scripts/raycast/vpn-disconnect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title VPN Disconnect 6 | # @raycast.mode compact 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🤖 10 | 11 | # Documentation: 12 | # @raycast.description disconnect tunnelblick vpn 13 | 14 | osascript -e 'tell application "Tunnelblick" to disconnect "new-config"' 15 | echo "🔓 Tunnelblick VPN Disconnecting..." 16 | -------------------------------------------------------------------------------- /old/win/.joogie.omp.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", 3 | "version": 2, 4 | "blocks": [ 5 | { 6 | "type": "prompt", 7 | "alignment": "left", 8 | "segments": [ 9 | { 10 | "type": "python", 11 | "style": "powerline", 12 | "powerline_symbol": "\ue0b0", 13 | "foreground": "#F3F4F6", 14 | "background": "#336895", 15 | "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", 16 | "properties": { 17 | "display_default": false, 18 | "display_mode": "environment", 19 | "fetch_virtual_env": true 20 | } 21 | }, 22 | { 23 | "type": "dotnet", 24 | "style": "powerline", 25 | "powerline_symbol": "\ue0b0", 26 | "foreground": "#F3F4F6", 27 | "background": "#67217A", 28 | "template": " \ue77f {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }} " 29 | }, 30 | { 31 | "type": "go", 32 | "style": "powerline", 33 | "powerline_symbol": "\ue0b0", 34 | "foreground": "#ffffff", 35 | "background": "#00A3CC", 36 | "template": " \ufcd1{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " 37 | }, 38 | { 39 | "type": "node", 40 | "style": "powerline", 41 | "powerline_symbol": "\ue0b0", 42 | "foreground": "#ffffff", 43 | "background": "#C13534", 44 | "template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} " 45 | } 46 | ] 47 | }, 48 | { 49 | "type": "prompt", 50 | "alignment": "left", 51 | "segments": [ 52 | { 53 | "type": "path", 54 | "style": "powerline", 55 | "powerline_symbol": "\ue0b0", 56 | "foreground": "#F3F4F6", 57 | "background": "#262626", 58 | "template": " {{ .Path }} ", 59 | "properties": { 60 | "folder_icon": "..", 61 | "folder_separator_icon": "/", 62 | "home_icon": "~" 63 | } 64 | } 65 | ] 66 | }, 67 | { 68 | "type": "prompt", 69 | "alignment": "left", 70 | "segments": [ 71 | { 72 | "type": "git", 73 | "style": "powerline", 74 | "powerline_symbol": "\ue0b0", 75 | "foreground": "#000000", 76 | "background": "#FFC09F", 77 | "background_templates": [ 78 | "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", 79 | "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}", 80 | "{{ if gt .Ahead 0 }}#B388FF{{ end }}", 81 | "{{ if gt .Behind 0 }}#B388FF{{ end }}" 82 | ], 83 | "template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ", 84 | "properties": { 85 | "fetch_stash_count": true, 86 | "fetch_status": true, 87 | "fetch_upstream_icon": true 88 | } 89 | }, 90 | { 91 | "type": "exit", 92 | "style": "powerline", 93 | "powerline_symbol": "\ue0b0", 94 | "foreground": "#ffffff", 95 | "background": "#059669", 96 | "background_templates": ["{{ if gt .Code 0 }}#EF4444{{ end }}"], 97 | "template": " \ue23a{{ if gt .Code 0 }}\uf00d{{ else }}\uf42e{{ end }} ", 98 | "properties": { 99 | "always_enabled": true 100 | } 101 | } 102 | ] 103 | }, 104 | { 105 | "type": "prompt", 106 | "alignment": "left", 107 | "segments": [ 108 | { 109 | "type": "text", 110 | "style": "plain", 111 | "template": "\n" 112 | } 113 | ] 114 | }, 115 | { 116 | "type": "prompt", 117 | "alignment": "left", 118 | "segments": [ 119 | { 120 | "type": "text", 121 | "style": "plain", 122 | "foreground": "#34D399", 123 | "template": "=> " 124 | } 125 | ] 126 | } 127 | ] 128 | } 129 | -------------------------------------------------------------------------------- /old/win/profile.ps1: -------------------------------------------------------------------------------- 1 | oh-my-posh init pwsh --config "~\\Documents\\PowerShell\\.joogie.omp.json" | Invoke-Expression 2 | 3 | function which ($command) { 4 | Get-Command -name $command -ErrorAction SilentlyContinue | 5 | Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue 6 | } 7 | 8 | Remove-Alias rm 9 | Remove-Alias cp 10 | Remove-Alias mv 11 | Remove-Alias kill 12 | 13 | Set-PSReadLineOption -PredictionSource History 14 | Set-PSReadLineOption -EditMode vi 15 | Set-PSReadLineOption -BellStyle None 16 | Set-PSReadLineOption -ViModeIndicator Cursor 17 | -------------------------------------------------------------------------------- /old/win/scoop.json: -------------------------------------------------------------------------------- 1 | { 2 | "buckets": [ 3 | { 4 | "Name": "extras", 5 | "Source": "https://github.com/ScoopInstaller/Extras", 6 | "Updated": "2022-09-08T12:52:21+08:00", 7 | "Manifests": 1676 8 | }, 9 | { 10 | "Name": "main", 11 | "Source": "https://github.com/ScoopInstaller/Main", 12 | "Updated": "2022-09-08T12:53:28+08:00", 13 | "Manifests": 1073 14 | } 15 | ], 16 | "apps": [ 17 | { 18 | "Source": "main", 19 | "Updated": "2022-08-15T13:51:51.4666128+08:00", 20 | "Info": "", 21 | "Version": "22.01", 22 | "Name": "7zip" 23 | }, 24 | { 25 | "Source": "extras", 26 | "Updated": "2022-08-15T14:02:17.8212066+08:00", 27 | "Info": "", 28 | "Version": "0.10.1", 29 | "Name": "alacritty" 30 | }, 31 | { 32 | "Source": "main", 33 | "Updated": "2022-08-15T14:03:05.6432731+08:00", 34 | "Info": "", 35 | "Version": "1.36.0-1", 36 | "Name": "aria2" 37 | }, 38 | { 39 | "Source": "main", 40 | "Updated": "2022-08-15T13:51:51.894235+08:00", 41 | "Info": "", 42 | "Version": "2022-07-19", 43 | "Name": "cacert" 44 | }, 45 | { 46 | "Source": "main", 47 | "Updated": "2022-08-15T13:52:04.5008948+08:00", 48 | "Info": "", 49 | "Version": "5.97.3", 50 | "Name": "coreutils" 51 | }, 52 | { 53 | "Source": "extras", 54 | "Updated": "2022-08-18T03:32:18.3290637+08:00", 55 | "Info": "", 56 | "Version": "12.1.0", 57 | "Name": "flameshot" 58 | }, 59 | { 60 | "Source": "main", 61 | "Updated": "2022-08-15T13:53:03.4944079+08:00", 62 | "Info": "", 63 | "Version": "11.2.0", 64 | "Name": "gcc" 65 | }, 66 | { 67 | "Source": "main", 68 | "Updated": "2022-09-08T13:15:36.2170048+08:00", 69 | "Info": "", 70 | "Version": "2.37.3.windows.1", 71 | "Name": "git" 72 | }, 73 | { 74 | "Source": "main", 75 | "Updated": "2022-08-15T13:53:22.7890313+08:00", 76 | "Info": "", 77 | "Version": "3.7", 78 | "Name": "grep" 79 | }, 80 | { 81 | "Source": "main", 82 | "Updated": "2022-09-08T13:17:01.3536847+08:00", 83 | "Info": "", 84 | "Version": "15.0.0", 85 | "Name": "llvm" 86 | }, 87 | { 88 | "Source": "main", 89 | "Updated": "2022-08-15T13:54:30.2088727+08:00", 90 | "Info": "", 91 | "Version": "0.7.2", 92 | "Name": "neovim" 93 | }, 94 | { 95 | "Source": "main", 96 | "Updated": "2022-08-26T02:42:08.0919805+08:00", 97 | "Info": "", 98 | "Version": "3.0.7", 99 | "Name": "ngrok" 100 | }, 101 | { 102 | "Source": "main", 103 | "Updated": "2022-08-17T02:42:39.3912169+08:00", 104 | "Info": "", 105 | "Version": "16.17.0", 106 | "Name": "nodejs-lts" 107 | }, 108 | { 109 | "Source": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json", 110 | "Updated": "2022-09-08T13:17:14.6766833+08:00", 111 | "Info": "", 112 | "Version": "9.0.0", 113 | "Name": "oh-my-posh" 114 | }, 115 | { 116 | "Source": "main", 117 | "Updated": "2022-08-15T13:54:58.060241+08:00", 118 | "Info": "", 119 | "Version": "13.0.0", 120 | "Name": "ripgrep" 121 | }, 122 | { 123 | "Source": "main", 124 | "Updated": "2022-09-08T13:17:16.5557203+08:00", 125 | "Info": "", 126 | "Version": "0.20.7", 127 | "Name": "tree-sitter" 128 | }, 129 | { 130 | "Source": "main", 131 | "Updated": "2022-08-15T13:54:59.761118+08:00", 132 | "Info": "", 133 | "Version": "6.00", 134 | "Name": "unzip" 135 | }, 136 | { 137 | "Source": "main", 138 | "Updated": "2022-08-15T13:55:03.5424753+08:00", 139 | "Info": "", 140 | "Version": "1.21.3", 141 | "Name": "wget" 142 | }, 143 | { 144 | "Source": "main", 145 | "Updated": "2022-08-15T13:55:37.9594554+08:00", 146 | "Info": "", 147 | "Version": "0.9.1", 148 | "Name": "zig" 149 | }, 150 | { 151 | "Source": "main", 152 | "Updated": "2022-08-15T13:55:38.4943445+08:00", 153 | "Info": "", 154 | "Version": "3.0", 155 | "Name": "zip" 156 | } 157 | ] 158 | } 159 | -------------------------------------------------------------------------------- /sddm/etc/sddm.conf: -------------------------------------------------------------------------------- 1 | [Theme] 2 | Current=macos 3 | -------------------------------------------------------------------------------- /sddm/install-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo pacman -Syu qt6-svg qt6-declarative qt5-quickcontrols2 4 | -------------------------------------------------------------------------------- /sddm/link.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo mkdir -p /usr/share/sddm/themes/macos 4 | sudo cp -r sddm/macos/* /usr/share/sddm/themes/macos 5 | sudo cp sddm/etc/sddm.conf /etc/sddm.conf 6 | -------------------------------------------------------------------------------- /sddm/macos/UserModel.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2 | 3 | Item { 4 | property alias usersList: usersList 5 | property string lastNameUser: userModel.lastUser 6 | property string finalLoginUserName 7 | property url lastUrlAvatar 8 | 9 | property bool fullChargeModel: customUserModel.count === userModel.count 10 | 11 | function updateOrdenModel(name){ 12 | 13 | if (fullChargeModel) { 14 | 15 | var index 16 | for (var a = 0; a < customUserModel.count; a++){ 17 | if (customUserModel.get(a).name === name) { 18 | index = a 19 | lastUrlAvatar = customUserModel.get(a).icon 20 | } 21 | } 22 | 23 | usersList.clear() 24 | 25 | for (var u = index; u < (index + customUserModel.count); u++) { 26 | var newIndex = u % (customUserModel.count) 27 | usersList.append({ name: customUserModel.get(newIndex).name, icon: customUserModel.get(newIndex).icon, }); 28 | } 29 | } 30 | } 31 | Repeater { 32 | model: userModel 33 | delegate: Item { 34 | Component.onCompleted: { 35 | customUserModel.append({ name: model.name, icon: model.icon }); 36 | if(model.lastUser) { 37 | lastNameUser = model.lastUser 38 | } 39 | } 40 | } 41 | } 42 | 43 | onLastNameUserChanged: { 44 | finalLoginUserName = lastNameUser || customUserModel.get(0).name 45 | updateOrdenModel(lastNameUser || customUserModel.get(0).name) 46 | } 47 | 48 | onFullChargeModelChanged: { 49 | 50 | updateOrdenModel(lastNameUser || customUserModel.get(0).name) 51 | } 52 | 53 | ListModel { 54 | id: customUserModel 55 | } 56 | 57 | ListModel { 58 | id: usersList 59 | } 60 | Component.onCompleted: { 61 | finalLoginUserName = lastNameUser || customUserModel.get(0).name 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /sddm/macos/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/sddm/macos/background.png -------------------------------------------------------------------------------- /sddm/macos/components/Clock.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2 | import QtQuick.Layouts 3 | import QtQuick.Controls 4 | 5 | ColumnLayout { 6 | spacing: 2 7 | 8 | FontLoader { 9 | id: fontbold 10 | source: "../fonts/SFUIText-Semibold.otf" 11 | } 12 | readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software 13 | Label { 14 | text: Qt.formatDateTime(new Date(), "dddd, MMMM d") 15 | color: "white" 16 | opacity: 0.5 17 | style: softwareRendering ? Text.Outline : Text.Normal 18 | styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter 19 | font.pointSize: 20 20 | font.weight: Font.DemiBold 21 | font.capitalization: Font.Capitalize 22 | Layout.alignment: Qt.AlignHCenter 23 | font.family: fontbold.name 24 | 25 | } 26 | Label { 27 | text: Qt.formatDateTime(new Date(), "h:mm") 28 | color: "white" 29 | opacity: 0.5 30 | style: softwareRendering ? Text.Outline : Text.Normal 31 | styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter 32 | font.pointSize: 100 33 | font.bold: true 34 | Layout.alignment: Qt.AlignHCenter 35 | font.family: fontbold.name 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /sddm/macos/components/RebootToolTip.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2 | import Qt5Compat.GraphicalEffects 3 | 4 | Rectangle { 5 | color:"transparent" 6 | width:130 7 | height: 32 8 | border.width: 0 9 | 10 | Text { 11 | id: text 12 | color: "#ffffff" 13 | font.pixelSize : 14 14 | text: textConstants.reboot 15 | anchors.fill: parent 16 | verticalAlignment: Text.AlignVCenter 17 | horizontalAlignment: Text.AlignHCenter 18 | } 19 | DropShadow { 20 | anchors.fill: parent 21 | horizontalOffset: 1 22 | verticalOffset: 1 23 | radius: 2.0 24 | samples: 4 25 | color: "#60000000" 26 | source: text 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /sddm/macos/components/ShutdownToolTip.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.8 2 | import Qt5Compat.GraphicalEffects 3 | 4 | Rectangle { 5 | color:"transparent" 6 | width:130 7 | height: 32 8 | border.width: 0 9 | 10 | Text { 11 | id: text 12 | color: "#ffffff" 13 | font.pixelSize : 14 14 | text: textConstants.shutdown 15 | anchors.fill: parent 16 | verticalAlignment: Text.AlignVCenter 17 | horizontalAlignment: Text.AlignHCenter 18 | } 19 | DropShadow { 20 | anchors.fill: parent 21 | horizontalOffset: 1 22 | verticalOffset: 1 23 | radius: 2.0 24 | samples: 4 25 | color: "#60000000" 26 | source: text 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /sddm/macos/components/TextConstants.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2 | 3 | QtObject { 4 | readonly property string capslockWarning: qsTr("Warning, Caps Lock is ON!") 5 | readonly property string layout: qsTr("Layout") 6 | readonly property string login: qsTr("Login") 7 | readonly property string loginFailed: qsTr("Login failed") 8 | readonly property string loginSucceeded: qsTr("Login succeeded") 9 | readonly property string password: qsTr("Password") 10 | readonly property string emptyPassword: qsTr("Please enter a password!") 11 | readonly property string passwordChange: qsTr("Change password") 12 | readonly property string prompt: qsTr("Enter your username and password") 13 | readonly property string promptSelectUser: qsTr("Select your user and enter password") 14 | readonly property string promptUser: qsTr("Enter your username") 15 | readonly property string promptPassword: qsTr("Enter your password") 16 | readonly property string emptyPrompt: qsTr("Password:") 17 | readonly property string showPasswordPrompt:qsTr("Show password") 18 | readonly property string hidePasswordPrompt:qsTr("Hide password") 19 | readonly property string reboot: qsTr("Reboot") 20 | readonly property string session: qsTr("Session") 21 | readonly property string shutdown: qsTr("Shutdown") 22 | readonly property string suspend: qsTr("Suspend") 23 | readonly property string hibernate: qsTr("Hibernate") 24 | readonly property string userName: qsTr("Username") 25 | readonly property string welcomeText: qsTr("Welcome to %1") 26 | readonly property string pamMaxtriesError: qsTr("Password change aborted because maximum tries reached") 27 | readonly property string pamMaxtriesInfo: qsTr("New password change round! Please input current password again!") 28 | } 29 | 30 | -------------------------------------------------------------------------------- /sddm/macos/components/VirtualKeyboard.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2 | import QtQuick.VirtualKeyboard 2.15 3 | import QtQuick.VirtualKeyboard.Styles 2.15 4 | import QtQuick.VirtualKeyboard.Settings 2.15 5 | 6 | InputPanel { 7 | id: inputPanel 8 | property bool activated: false 9 | active: activated && Qt.inputMethod.visible 10 | visible: active 11 | width: parent.width 12 | } 13 | -------------------------------------------------------------------------------- /sddm/macos/faces/.face.icon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/sddm/macos/faces/.face.icon -------------------------------------------------------------------------------- /sddm/macos/fonts/SFUIText-Semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/sddm/macos/fonts/SFUIText-Semibold.otf -------------------------------------------------------------------------------- /sddm/macos/images/.face.icon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/sddm/macos/images/.face.icon -------------------------------------------------------------------------------- /sddm/macos/images/capslock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /sddm/macos/images/conf.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 33 | 37 | 38 | -------------------------------------------------------------------------------- /sddm/macos/images/go-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sddm/macos/images/login.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sddm/macos/images/system-reboot-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-reboot-pressed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-shutdown-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-shutdown-pressed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-shutdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sddm/macos/images/system-suspend-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-suspend-pressed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/images/system-suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sddm/macos/metadata.desktop: -------------------------------------------------------------------------------- 1 | [SddmGreeterTheme] 2 | Name=macos 3 | Description=apple like style 4 | Author=princejoogie 5 | Copyright=(c) 2025, princejoogie 6 | License=gpl3.0 7 | Type=sddm-theme 8 | Version=1.0 9 | MainScript=Main.qml 10 | ConfigFile=theme.conf 11 | Theme-Id=macos 12 | QtVersion=6 13 | -------------------------------------------------------------------------------- /sddm/macos/theme.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | background=background.png 3 | type=image 4 | -------------------------------------------------------------------------------- /sddm/macos/theme.conf.user: -------------------------------------------------------------------------------- 1 | [General] 2 | background=background.png 3 | type=image 4 | -------------------------------------------------------------------------------- /shell/.config/kitty/current-theme.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Mocha 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | # The basic colors 10 | foreground #cdd6f4 11 | # background #1e1e2e 12 | background #000000 13 | selection_foreground #1e1e2e 14 | selection_background #f5e0dc 15 | 16 | # Cursor colors 17 | cursor #f5e0dc 18 | cursor_text_color #1e1e2e 19 | 20 | # URL underline color when hovering with mouse 21 | url_color #f5e0dc 22 | 23 | # Kitty window border colors 24 | active_border_color #b4befe 25 | inactive_border_color #6c7086 26 | bell_border_color #f9e2af 27 | 28 | # OS Window titlebar colors 29 | wayland_titlebar_color system 30 | macos_titlebar_color system 31 | 32 | # Tab bar colors 33 | active_tab_foreground #11111b 34 | active_tab_background #cba6f7 35 | inactive_tab_foreground #cdd6f4 36 | inactive_tab_background #181825 37 | tab_bar_background #11111b 38 | 39 | # Colors for marks (marked text in the terminal) 40 | mark1_foreground #1e1e2e 41 | mark1_background #b4befe 42 | mark2_foreground #1e1e2e 43 | mark2_background #cba6f7 44 | mark3_foreground #1e1e2e 45 | mark3_background #74c7ec 46 | 47 | # The 16 terminal colors 48 | 49 | # black 50 | color0 #45475a 51 | color8 #585b70 52 | 53 | # red 54 | color1 #f38ba8 55 | color9 #f38ba8 56 | 57 | # green 58 | color2 #a6e3a1 59 | color10 #a6e3a1 60 | 61 | # yellow 62 | color3 #f9e2af 63 | color11 #f9e2af 64 | 65 | # blue 66 | color4 #89b4fa 67 | color12 #89b4fa 68 | 69 | # magenta 70 | color5 #f5c2e7 71 | color13 #f5c2e7 72 | 73 | # cyan 74 | color6 #94e2d5 75 | color14 #94e2d5 76 | 77 | # white 78 | color7 #bac2de 79 | color15 #a6adc8 80 | -------------------------------------------------------------------------------- /shell/.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | include current-theme.conf 2 | 3 | enable_audio_bell no 4 | background_opacity 1 5 | background_blur 100 6 | hide_window_decorations yes 7 | cursor_trail 3 8 | 9 | font_family FiraCode Nerd Font Mono 10 | bold_font auto 11 | italic_font auto 12 | bold_italic_font auto 13 | 14 | font_size 12.0 15 | 16 | window_padding_width 6 17 | 18 | modify_font cell_height 120% 19 | -------------------------------------------------------------------------------- /shell/.config/starship.toml: -------------------------------------------------------------------------------- 1 | format = """ 2 | (#a6adc8)\ 3 | [ 󰘧 ](bg:#a6adc8 fg:#11111b)\ 4 | [](bg:#89b4fa fg:#a6adc8)\ 5 | $directory\ 6 | [](fg:#89b4fa bg:#313244)\ 7 | $git_branch\ 8 | $git_status\ 9 | [](fg:#313244 bg:#181825)\ 10 | $nodejs\ 11 | $python\ 12 | $rust\ 13 | $golang\ 14 | $php\ 15 | [ ](fg:#181825)\ 16 | \n$character""" 17 | 18 | [directory] 19 | style = "fg:#15161E bg:#89b4fa" 20 | format = "[ $path ]($style)" 21 | truncation_length = 3 22 | truncation_symbol = "…/" 23 | 24 | [git_branch] 25 | symbol = "" 26 | style = "bg:#313244" 27 | format = '[[ $symbol $branch ](fg:#89b4fa bg:#313244)]($style)' 28 | 29 | [git_status] 30 | style = "bg:#313244" 31 | format = '[[($all_status$ahead_behind)](fg:#89b4fa bg:#313244)]($style)' 32 | ahead = '⇡${count} ' 33 | diverged = '⇕⇡${ahead_count}⇣${behind_count} ' 34 | behind = '⇣${count} ' 35 | modified = '!${count} ' 36 | staged = '+${count} ' 37 | stashed = '*${count} ' 38 | untracked = '?${count} ' 39 | renamed = '»${count} ' 40 | deleted = '✘${count} ' 41 | 42 | [nodejs] 43 | symbol = "" 44 | style = "bg:#181825" 45 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 46 | 47 | [rust] 48 | symbol = "" 49 | style = "bg:#181825" 50 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 51 | 52 | [python] 53 | symbol = " " 54 | detect_extensions = [] 55 | detect_files = [] 56 | style = "bg:#181825" 57 | format = '[[ $symbol ($version) ($virtualenv)](fg:#89b4fa bg:#181825)]($style)' 58 | 59 | [golang] 60 | symbol = "" 61 | style = "bg:#181825" 62 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 63 | 64 | [php] 65 | symbol = "" 66 | style = "bg:#181825" 67 | format = '[[ $symbol ($version) ](fg:#89b4fa bg:#181825)]($style)' 68 | -------------------------------------------------------------------------------- /shell/.gitconfig: -------------------------------------------------------------------------------- 1 | [credential] 2 | helper = store 3 | [alias] 4 | co = "!f() { git branch -a | awk '{gsub(\"remotes/origin/\", \"\", $1); print $1}' | sort -u | fzf-tmux -p --reverse | xargs git checkout; }; f" 5 | squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; }; f" 6 | gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f" 7 | ll = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' 8 | root = rev-parse --show-toplevel 9 | [core] 10 | pager = delta 11 | [interactive] 12 | diffFilter = delta --color-only 13 | [add.interactive] 14 | useBuiltin = false 15 | [delta] 16 | navigate = true 17 | light = false 18 | side-by-side = false 19 | 20 | blame-palette = "#1e1e2e #181825 #11111b #313244 #45475a" 21 | commit-decoration-style = "#6c7086" bold box ul 22 | dark = true 23 | file-decoration-style = "#6c7086" 24 | file-style = "#cdd6f4" 25 | hunk-header-decoration-style = "#6c7086" box ul 26 | hunk-header-file-style = bold 27 | hunk-header-line-number-style = bold "#a6adc8" 28 | hunk-header-style = file line-number syntax 29 | line-numbers-left-style = "#6c7086" 30 | line-numbers-minus-style = bold "#f38ba8" 31 | line-numbers-plus-style = bold "#a6e3a1" 32 | line-numbers-right-style = "#6c7086" 33 | line-numbers-zero-style = "#6c7086" 34 | minus-emph-style = bold syntax "#53394c" 35 | minus-style = syntax "#34293a" 36 | plus-emph-style = bold syntax "#404f4a" 37 | plus-style = syntax "#2c3239" 38 | map-styles = \ 39 | bold purple => syntax "#494060", \ 40 | bold blue => syntax "#384361", \ 41 | bold cyan => syntax "#384d5d", \ 42 | bold yellow => syntax "#544f4e" 43 | [merge] 44 | conflictstyle = diff3 45 | [diff] 46 | colorMoved = default 47 | [init] 48 | defaultBranch = main 49 | [push] 50 | autoSetupRemote = true 51 | [rerere] 52 | enabled = true 53 | [credential "https://github.com"] 54 | helper = 55 | helper = !/usr/bin/gh auth git-credential 56 | [credential "https://gist.github.com"] 57 | helper = 58 | helper = !/usr/bin/gh auth git-credential 59 | [user] 60 | name = princejoogie 61 | email = pjuguilon@solutiondigital.biz 62 | [pull] 63 | rebase = true 64 | -------------------------------------------------------------------------------- /shell/.local/custom/bin/_wt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | # Get the bare repo root (first worktree line) 4 | get_bare_root() { 5 | git worktree list --porcelain | grep '^worktree' | head -1 | cut -d' ' -f2 6 | } 7 | 8 | case "$1" in 9 | list|ls) 10 | BARE_ROOT=$(get_bare_root) 11 | 12 | git worktree list --porcelain | awk -v bare_root="$BARE_ROOT" ' 13 | /^worktree/ { 14 | path = $2 15 | # Make path relative to bare root 16 | gsub("^" bare_root "/", "", path) 17 | gsub("^" bare_root "$", ".", path) 18 | } 19 | /^branch/ { 20 | branch = $2 21 | gsub("refs/heads/", "", branch) 22 | print path " [" branch "]" 23 | } 24 | /^bare$/ { 25 | print path " (bare)" 26 | }' 27 | ;; 28 | cd) 29 | BARE_ROOT=$(get_bare_root) 30 | 31 | # Check if a specific worktree is provided as argument 32 | if [ -n "$2" ]; then 33 | SELECTED="$2" 34 | else 35 | # Get all worktree paths, make them relative to bare root, then fzf and cd 36 | SELECTED=$(git worktree list --porcelain | grep '^worktree' | cut -d' ' -f2 | sed "s|$BARE_ROOT||g" | sed 's|^/||' | sed '/^$/d' | fzf) 37 | fi 38 | 39 | if [ -n "$SELECTED" ]; then 40 | cd "$BARE_ROOT/$SELECTED" 41 | fi 42 | ;; 43 | add) 44 | BARE_ROOT=$(get_bare_root) 45 | 46 | # Check if a specific branch is provided as argument 47 | if [ -n "$2" ]; then 48 | SELECTED_BRANCH="$2" 49 | else 50 | # Get all branches and select one with fzf 51 | SELECTED_BRANCH=$(git branch -a | sed 's/^[* ] //' | sed 's|remotes/origin/||' | sort -u | grep -v '^HEAD' | fzf) 52 | fi 53 | 54 | if [ -n "$SELECTED_BRANCH" ]; then 55 | # Create worktree in bare root directory 56 | if git worktree add "$BARE_ROOT/$SELECTED_BRANCH" "$SELECTED_BRANCH"; then 57 | # Post-add hook: process .wtconfig.yaml if it exists (only if worktree add succeeded) 58 | if [ -f "$BARE_ROOT/.wtconfig.yaml" ]; then 59 | echo "Processing post-add hooks..." 60 | 61 | # Parse YAML and copy files 62 | awk -v bare_root="$BARE_ROOT" -v branch="$SELECTED_BRANCH" ' 63 | BEGIN { in_copy_files = 0 } 64 | /^post-add:/ { in_post_add = 1; next } 65 | /^ copy-files:/ && in_post_add { in_copy_files = 1; next } 66 | /^ - src:/ && in_copy_files { 67 | gsub(/^ - src: /, "") 68 | gsub(/\$BARE_ROOT/, bare_root) 69 | src = $0 70 | getline 71 | gsub(/^ dst: /, "") 72 | dst = bare_root "/" branch "/" $0 73 | 74 | # Create destination directory if it doesn'\''t exist 75 | cmd = "mkdir -p \"" dirname(dst) "\"" 76 | system(cmd) 77 | 78 | # Copy file 79 | cmd = "cp \"" src "\" \"" dst "\"" 80 | print "Copying " src " -> " dst 81 | system(cmd) 82 | } 83 | /^[^ ]/ && !/^post-add:/ { in_post_add = 0; in_copy_files = 0 } 84 | 85 | function dirname(path) { 86 | gsub(/\/[^\/]*$/, "", path) 87 | return path 88 | } 89 | ' "$BARE_ROOT/.wtconfig.yaml" 90 | fi 91 | 92 | # Change to the new worktree directory 93 | cd "$BARE_ROOT/$SELECTED_BRANCH" 94 | fi 95 | fi 96 | ;; 97 | remove|rm) 98 | BARE_ROOT=$(get_bare_root) 99 | 100 | # Check if a specific worktree is provided as argument 101 | if [ -n "$2" ]; then 102 | SELECTED="$2" 103 | else 104 | # Get all worktree paths (excluding bare repo), make them relative, then fzf 105 | SELECTED=$(git worktree list --porcelain | grep '^worktree' | cut -d' ' -f2 | grep -v "^$BARE_ROOT$" | sed "s|$BARE_ROOT||g" | sed 's|^/||' | fzf) 106 | fi 107 | 108 | if [ -n "$SELECTED" ]; then 109 | # Remove the selected worktree 110 | if git worktree remove "$BARE_ROOT/$SELECTED"; then 111 | echo "Worktree '$SELECTED' removed successfully" 112 | fi 113 | fi 114 | ;; 115 | *) 116 | echo "Usage: wt [argument]" 117 | echo "Commands:" 118 | echo " cd [name] Select and switch to a worktree (or specify name directly)" 119 | echo " add [branch] Select a branch and create a new worktree (or specify branch directly)" 120 | echo " remove|rm [name] Select and remove a worktree (or specify name directly)" 121 | echo " list|ls List all worktrees" 122 | ;; 123 | esac 124 | -------------------------------------------------------------------------------- /shell/.local/custom/bin/clone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | limit=999 4 | echo -e " Fetching organizations..." 5 | orgs=$(gh org list) 6 | org_selection=("personal") 7 | 8 | for org in $orgs; do 9 | org_selection+=("$org") 10 | done 11 | 12 | selected_org=$(for org in "${org_selection[@]}"; do 13 | echo "$org" 14 | done | fzf --prompt "Select org: ") 15 | 16 | if [ -z "$selected_org" ]; then 17 | echo "No organization selected. Exiting." 18 | exit 1 19 | fi 20 | 21 | if [ "$selected_org" = "personal" ]; then 22 | echo -e " Fetching personal repositories..." 23 | repos=$(gh repo list --limit $limit) 24 | else 25 | echo -e " Fetching $selected_org repositories..." 26 | repos=$(gh repo list "$selected_org" --limit $limit) 27 | fi 28 | 29 | selected_repo=$(echo "$repos" | fzf --prompt "Select repository: " | awk '{print $1}') 30 | 31 | if [ -z "$selected_repo" ]; then 32 | echo "No repository selected. Exiting." 33 | exit 1 34 | fi 35 | 36 | echo "Cloning $selected_repo..." 37 | gh repo clone "$selected_repo" 38 | -------------------------------------------------------------------------------- /shell/.local/custom/bin/gh-comments: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PR_JSON=$(gh pr list --limit 999 --json number,title,author,headRefName,updatedAt) 4 | 5 | if [ -z "$PR_JSON" ] || [ "$PR_JSON" = "[]" ]; then 6 | echo "No PRs found." 7 | exit 1 8 | fi 9 | 10 | FORMATTED_LIST=$(echo "$PR_JSON" | jq -r '.[] | "\(.number)\t| \(.title)\t| \(.author.login)\t| [\(.headRefName)]"' | column -t -s $'\t') 11 | 12 | SELECTED=$(echo "$FORMATTED_LIST" | fzf --prompt "Select PR: " --height=80% --border --layout=reverse --margin=1,4) 13 | 14 | if [ -z "$SELECTED" ]; then 15 | echo "No PR selected." 16 | exit 1 17 | fi 18 | 19 | PR_NUMBER=$(echo "$SELECTED" | awk '{print $1}') 20 | 21 | if [ -z "$PR_NUMBER" ]; then 22 | echo "Could not extract PR number." 23 | exit 1 24 | fi 25 | 26 | echo "Fetching comments for PR #$PR_NUMBER..." 27 | 28 | # Get current repository 29 | REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner) 30 | 31 | gh api repos/$REPO/pulls/$PR_NUMBER/comments | jq -r '.[] | "📁 **File:** `\(.path // "N/A")\(.line | if . then ":\(.)" else "" end)`\n\n### Diff Context\n````diff\n\(.diff_hunk // "No diff context")\n````\n\n### 💬 @\(.user.login):\n\(.body)\n\n---\n"' | nvim -c "set ft=markdown" -c "set laststatus=0" -c "set nonumber" -c "set norelativenumber" -c "lua Snacks.indent.disable()" -c "TSContext disable" 32 | -------------------------------------------------------------------------------- /shell/.local/custom/bin/lsort: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | sort -n -k1 | awk '{print length, $0}' | sort -n | cut -d" " -f2- 4 | -------------------------------------------------------------------------------- /shell/.local/custom/bin/summarize: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | # Check if URL argument is provided 4 | if [ $# -eq 0 ]; then 5 | echo "Error: No URL provided" 6 | echo "Usage: $0 " 7 | exit 1 8 | fi 9 | 10 | URL="$1" 11 | 12 | echo "Cleaning up..." 13 | rm -rf /tmp/transcript.mp3* 14 | 15 | echo "Downloading audio from: $URL" 16 | yt-dlp --extract-audio --audio-format mp3 --output /tmp/transcript.mp3 "$URL" 17 | 18 | echo "Transcribing audio..." 19 | whisper-cli -otxt -m ~/documents/codes/whisper.cpp/models/ggml-small.bin -l auto /tmp/transcript.mp3 20 | 21 | echo "Generating summary..." 22 | opencode run -m openrouter/anthropic/claude-4-sonnet-20250522 "summarize and provide bullet points on important topics. the file is located at \`/tmp/transcript.mp3.txt\`" 23 | -------------------------------------------------------------------------------- /shell/.zshrc: -------------------------------------------------------------------------------- 1 | # oh-my-zsh 2 | autoload -U compinit 3 | compinit 4 | 5 | export DISABLE_AUTO_UPDATE="true" 6 | 7 | export ZSH="$HOME/.oh-my-zsh" 8 | 9 | plugins=( 10 | z 11 | gh 12 | aws 13 | fnm 14 | git 15 | tmux 16 | docker 17 | vi-mode 18 | zsh-autosuggestions 19 | zsh-syntax-highlighting 20 | fast-syntax-highlighting 21 | ) 22 | 23 | bindkey -M viins jj vi-cmd-mode 24 | export VI_MODE_SET_CURSOR=true 25 | # oh-my-zsh end 26 | 27 | # options 28 | setopt HIST_IGNORE_ALL_DUPS 29 | setopt HIST_FIND_NO_DUPS 30 | setopt HIST_SAVE_NO_DUPS 31 | setopt SHARE_HISTORY 32 | setopt INC_APPEND_HISTORY 33 | # options end 34 | 35 | # aliases 36 | alias cls=clear 37 | alias sl="exa --group-directories-first --icons --time-style=long-iso -la" 38 | alias so=source 39 | alias x=exit 40 | alias G=git 41 | alias t=tmux 42 | alias lta="ls -ltar --human-readable | grep -vE '^\.| \.$| \.\.$'" 43 | alias pip=pip3 44 | alias wt=". _wt" 45 | # alises end 46 | 47 | # variables 48 | export EDITOR=nvim 49 | export TERM=xterm-256color 50 | export MANPAGER='nvim +Man!' 51 | export PATH=$PATH:/opt/homebrew/bin 52 | export PATH=$PATH:$HOME/.cargo/bin 53 | export PATH=$PATH:$HOME/.local/bin 54 | export PATH=$PATH:$HOME/.local/share/fnm 55 | export PATH=$PATH:$HOME/.local/custom/bin 56 | export PATH=$PATH:$HOME/.local/share/bob/nvim-bin 57 | export PATH=$PATH:$HOME/.duckdb/cli/latest 58 | export PATH=$PATH:$HOME/.opencode/bin 59 | export PATH=$PATH:$HOME/.lmstudio/bin 60 | export PATH=$PATH:$HOME/go/bin 61 | 62 | if [[ -f "$HOME/.private.sh" ]]; then 63 | source "$HOME/.private.sh" 64 | fi 65 | # variables end 66 | 67 | # starship 68 | if [[ -x "$(command -v starship)" ]]; then 69 | eval "$(starship init zsh)" 70 | fi 71 | # starship end 72 | 73 | # fnm 74 | if [[ -x "$(command -v fnm)" ]]; then 75 | eval "$(fnm env --use-on-cd --shell zsh)" 76 | fi 77 | # fnm end 78 | 79 | # uv 80 | if [[ -x "$(command -v uv)" ]]; then 81 | eval "$(uv generate-shell-completion zsh)" 82 | fi 83 | 84 | if [[ -x "$(command -v uvx)" ]]; then 85 | eval "$(uvx --generate-shell-completion zsh)" 86 | fi 87 | # uv end 88 | 89 | # direnv 90 | if [[ -x "$(command -v direnv)" ]]; then 91 | eval "$(direnv hook zsh)" 92 | fi 93 | # direnv end 94 | 95 | # bun 96 | [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" 97 | export BUN_INSTALL="$HOME/.bun" 98 | export PATH="$BUN_INSTALL/bin:$PATH" 99 | # bun end 100 | 101 | source $ZSH/oh-my-zsh.sh 102 | # The following lines have been added by Docker Desktop to enable Docker CLI completions. 103 | fpath=(/Users/pjuguilon/.docker/completions $fpath) 104 | autoload -Uz compinit 105 | compinit 106 | # End of Docker CLI completions 107 | -------------------------------------------------------------------------------- /shell/raycast-scripts/timelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title timelog 6 | # @raycast.mode compact 7 | 8 | # Optional parameters: 9 | # @raycast.icon 🤖 10 | 11 | # Documentation: 12 | # @raycast.description Log Timein/Timeout in HRIS 13 | # @raycast.author princejoogie 14 | # @raycast.authorURL https://github.com/princejoogie 15 | 16 | response=$(curl 'http://10.0.1.146:200/Attendance/WebServices/TimeLogsEntry.asmx/TimeLogsEntry_Create' \ 17 | -H 'Content-Type: application/json; charset=UTF-8' \ 18 | -H 'X-Requested-With: XMLHttpRequest' \ 19 | --data-raw '{"remarks":"ManualEntry","employeeID":"867497"}' \ 20 | --insecure) 21 | 22 | if echo "$response" | jq -e '.d == "true"' > /dev/null 2>&1; then 23 | echo "Success" 24 | else 25 | echo "Failure: Unexpected response - $response" 26 | fi 27 | -------------------------------------------------------------------------------- /wallpapers/abstract-swirls.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/abstract-swirls.jpg -------------------------------------------------------------------------------- /wallpapers/alden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/alden.png -------------------------------------------------------------------------------- /wallpapers/cloudsday.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/cloudsday.jpg -------------------------------------------------------------------------------- /wallpapers/evening-sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/evening-sky.png -------------------------------------------------------------------------------- /wallpapers/macos11-night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/macos11-night.jpg -------------------------------------------------------------------------------- /wallpapers/rainnight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/rainnight.jpg -------------------------------------------------------------------------------- /wallpapers/tahoe-beach-night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/tahoe-beach-night.png -------------------------------------------------------------------------------- /wallpapers/windows-11-monochrome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princejoogie/dotfiles/079994b8a6669ab557a673cbb80bd14affa25660/wallpapers/windows-11-monochrome.jpg --------------------------------------------------------------------------------