├── VERSION ├── src ├── config │ ├── gtk-4.0 │ ├── fd │ │ └── ignore │ ├── wezterm │ │ ├── mappings.lua │ │ └── colors │ │ │ ├── cyberdream.lua │ │ │ └── cyberdream.toml │ ├── mpv │ │ ├── mpv.conf │ │ └── scripts │ │ │ ├── mpris.so │ │ │ └── osd.lua │ ├── dinit.d │ │ ├── .env │ │ ├── tmp │ │ ├── ringboard-server │ │ ├── eww │ │ ├── keys │ │ ├── eos │ │ ├── hyprpaper │ │ ├── hyprmon │ │ ├── hyprmon-zoom │ │ └── ringboard-wayland │ ├── yazi │ │ ├── theme.toml │ │ ├── yazi.toml │ │ ├── package.toml │ │ ├── keymap.nuon │ │ └── keymap.toml │ ├── nvim │ │ ├── templates │ │ │ ├── template.sh │ │ │ └── template.html │ │ ├── spell │ │ │ ├── en.utf-8.spl │ │ │ ├── en.utf-8.sug │ │ │ ├── en.utf-8.add.spl │ │ │ └── en.utf-8.add │ │ ├── plugin │ │ │ ├── modules │ │ │ │ ├── packages.lua │ │ │ │ ├── debug.lua │ │ │ │ ├── search.lua │ │ │ │ ├── terminal.lua │ │ │ │ ├── templates.lua │ │ │ │ ├── sync.lua │ │ │ │ ├── windows.lua │ │ │ │ ├── registers.lua │ │ │ │ ├── _.lua │ │ │ │ ├── tabs.lua │ │ │ │ ├── files.lua │ │ │ │ ├── panes.lua │ │ │ │ ├── ui │ │ │ │ │ ├── misc.lua │ │ │ │ │ ├── theme.lua │ │ │ │ │ └── dashboard.lua │ │ │ │ ├── language │ │ │ │ │ ├── parsing.lua │ │ │ │ │ └── code.lua │ │ │ │ └── app.lua │ │ │ ├── _utils.lua │ │ │ ├── _settings.lua │ │ │ ├── ~plugins │ │ │ │ ├── yazi.lua │ │ │ │ └── obsidian.lua │ │ │ └── _functions.lua │ │ ├── snippets │ │ │ ├── lua.lua │ │ │ └── global.lua │ │ └── lsp │ │ │ ├── pylsp.lua │ │ │ └── emmylua_ls.lua │ ├── gtk-3.0 │ │ ├── gtk.css │ │ └── settings.ini │ ├── git │ │ └── ignore │ ├── bat │ │ └── config │ ├── nushell │ │ ├── plugins │ │ │ ├── systemd.nu │ │ │ ├── yazi.nu │ │ │ ├── mod.nu │ │ │ ├── raws.nu │ │ │ ├── zoxide.nu │ │ │ └── gd.nu │ │ ├── plugin.msgpackz │ │ ├── modules │ │ │ ├── alias.nu │ │ │ ├── completions.nu │ │ │ ├── theme.nu │ │ │ └── mappings.nu │ │ ├── config.nu │ │ └── env.nu │ ├── systemd │ │ └── user │ │ │ ├── sockets.target.wants │ │ │ └── pulseaudio.socket │ │ │ ├── graphical.target.wants │ │ │ └── sxhkd.service │ │ │ ├── task.service │ │ │ ├── task.timer │ │ │ ├── keys.service │ │ │ ├── mopidy.service │ │ │ └── sxhkd.service │ ├── ctpv │ │ └── config │ ├── kanata │ │ ├── vars.kbd │ │ ├── settings.kbd │ │ ├── kanata.kbd │ │ ├── layers │ │ │ ├── typing.kbd │ │ │ ├── dvorak.kbd │ │ │ ├── games.kbd │ │ │ ├── numbers.kbd │ │ │ ├── qwerty.kbd │ │ │ ├── macros.kbd │ │ │ ├── controller.kbd │ │ │ ├── capture.kbd │ │ │ ├── layers.kbd │ │ │ ├── media.kbd │ │ │ ├── mouse.kbd │ │ │ ├── super.kbd │ │ │ ├── applications.kbd │ │ │ ├── notify.kbd │ │ │ ├── copypasta.kbd │ │ │ ├── ermak.kbd │ │ │ ├── system.kbd │ │ │ └── blank.kbd │ │ └── source.kbd │ ├── hypr │ │ ├── .reset.conf │ │ ├── hyprland.conf │ │ ├── env.conf │ │ ├── hyprpaper.conf │ │ ├── vars.conf │ │ ├── run.conf │ │ ├── rules.conf │ │ └── settings.conf │ ├── hangups │ │ └── hangups.conf │ ├── zls.json │ ├── tmuxp │ │ └── project.json │ ├── cava │ │ └── shaders │ │ │ ├── pass_through.vert │ │ │ ├── northern_lights.frag │ │ │ ├── spectrogram.frag │ │ │ ├── bar_spectrum.frag │ │ │ └── winamp_line_style_spectrum.frag │ ├── gitui │ │ └── theme.ron │ ├── rofi │ │ └── config.rasi │ ├── eww │ │ └── eww.scss │ ├── yabai │ │ └── yabairc │ ├── lf │ │ └── lfrc │ └── surfingkeys │ │ └── config.js ├── .ignore ├── .terminfo │ ├── 77 │ │ └── wezterm │ ├── w │ │ └── wezterm │ └── t │ │ └── tmux-256color ├── .gtk-modules │ ├── modules │ │ └── libvi.so │ └── 3.0.0 │ │ └── modules │ │ └── libvi.so ├── .vitrc ├── .jsbeautifyrc ├── .editorconfig ├── .Xresources ├── .ncmpcpp │ ├── bindings │ └── config ├── .fehbg ├── .gtkrc-2.0 ├── .taskrc ├── .gntrc ├── .themes │ └── Vi │ │ ├── gtk-2.0-key │ │ └── gtkrc │ │ └── gtk-3.0 │ │ └── gtk-keys.css ├── .hammerspoon │ └── init.lua ├── .mailcap ├── .termux │ └── termux.properties └── .myclirc ├── bin ├── g ├── wez ├── has-pipe ├── wez-osx ├── q ├── typo ├── shlube ├── taglish ├── bars ├── edit-clip ├── godot.bak ├── mute-window ├── copy ├── muse ├── termoil ├── for-of ├── duh ├── locker ├── tp ├── dmenu-uni ├── for-in ├── purple ├── screenshot ├── eos └── diffconflicts ├── .gitignore ├── TODO.norg ├── package.json ├── README.md └── TODO.md /VERSION: -------------------------------------------------------------------------------- 1 | 2.0.0 2 | -------------------------------------------------------------------------------- /src/config/gtk-4.0: -------------------------------------------------------------------------------- 1 | gtk-3.0 -------------------------------------------------------------------------------- /src/config/fd/ignore: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /src/config/wezterm/mappings.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/.ignore: -------------------------------------------------------------------------------- 1 | *.png 2 | *.import 3 | -------------------------------------------------------------------------------- /bin/g: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | git "$@" 4 | -------------------------------------------------------------------------------- /src/config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | osd-font-size=10 2 | -------------------------------------------------------------------------------- /src/config/dinit.d/.env: -------------------------------------------------------------------------------- 1 | WAYLAND_DISPLAY=wayland-1 2 | -------------------------------------------------------------------------------- /src/config/yazi/theme.toml: -------------------------------------------------------------------------------- 1 | [flavor] 2 | dark = "cyberdream" 3 | -------------------------------------------------------------------------------- /src/config/dinit.d/tmp: -------------------------------------------------------------------------------- 1 | type = process 2 | command = mkdir /tmp/ciea 3 | -------------------------------------------------------------------------------- /src/config/nvim/templates/template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/config/gtk-3.0/gtk.css: -------------------------------------------------------------------------------- 1 | VteTerminal, vte-terminal { 2 | padding: 8px; 3 | } 4 | -------------------------------------------------------------------------------- /src/config/git/ignore: -------------------------------------------------------------------------------- 1 | # project 2 | 3 | .ignore 4 | 5 | # vim 6 | 7 | *.swo 8 | *.swp 9 | -------------------------------------------------------------------------------- /src/config/bat/config: -------------------------------------------------------------------------------- 1 | --color=always 2 | --style=numbers 3 | --theme="cyberdream" 4 | --tabs=2 5 | -------------------------------------------------------------------------------- /src/.terminfo/77/wezterm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/.terminfo/77/wezterm -------------------------------------------------------------------------------- /src/.terminfo/w/wezterm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/.terminfo/w/wezterm -------------------------------------------------------------------------------- /src/config/nushell/plugins/systemd.nu: -------------------------------------------------------------------------------- 1 | alias sc = "systemctl" 2 | alias scu = "systemctl --user" 3 | -------------------------------------------------------------------------------- /src/config/systemd/user/sockets.target.wants/pulseaudio.socket: -------------------------------------------------------------------------------- 1 | /usr/lib/systemd/user/pulseaudio.socket -------------------------------------------------------------------------------- /src/config/systemd/user/graphical.target.wants/sxhkd.service: -------------------------------------------------------------------------------- 1 | /home/ross/.config/systemd/user/sxhkd.service -------------------------------------------------------------------------------- /src/.terminfo/t/tmux-256color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/.terminfo/t/tmux-256color -------------------------------------------------------------------------------- /bin/wez: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function main() { 4 | wezterm start -- $(echo "$@") 5 | } 6 | 7 | main "$@" 8 | -------------------------------------------------------------------------------- /src/config/mpv/scripts/mpris.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/config/mpv/scripts/mpris.so -------------------------------------------------------------------------------- /src/.gtk-modules/modules/libvi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/.gtk-modules/modules/libvi.so -------------------------------------------------------------------------------- /src/config/nushell/plugin.msgpackz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/config/nushell/plugin.msgpackz -------------------------------------------------------------------------------- /src/config/nvim/spell/en.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/config/nvim/spell/en.utf-8.spl -------------------------------------------------------------------------------- /src/config/nvim/spell/en.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/config/nvim/spell/en.utf-8.sug -------------------------------------------------------------------------------- /src/config/ctpv/config: -------------------------------------------------------------------------------- 1 | set chafasixel 2 | 3 | preview godot .gd .tscn .godot {{ 4 | highlight -O truecolor "$f" 5 | }} 6 | -------------------------------------------------------------------------------- /src/config/dinit.d/ringboard-server: -------------------------------------------------------------------------------- 1 | type = process 2 | command = ringboard-server 3 | restart = true 4 | env-file = ./.env 5 | -------------------------------------------------------------------------------- /src/config/yazi/yazi.toml: -------------------------------------------------------------------------------- 1 | [mgr] 2 | show_hidden = true 3 | mouse_events = [ "click", "scroll", "touch", "move", "drag" ] 4 | -------------------------------------------------------------------------------- /src/.gtk-modules/3.0.0/modules/libvi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/.gtk-modules/3.0.0/modules/libvi.so -------------------------------------------------------------------------------- /src/config/kanata/vars.kbd: -------------------------------------------------------------------------------- 1 | (defvar 2 | tap-timeout 200 3 | hold-timeout 200 4 | one-shot 400 5 | one-shot-linger 2000 6 | ) 7 | -------------------------------------------------------------------------------- /src/config/nvim/spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosshadden/dotfiles/HEAD/src/config/nvim/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /src/config/dinit.d/eww: -------------------------------------------------------------------------------- 1 | type = process 2 | command = eww daemon 3 | restart = true 4 | logfile = ./logs/eww.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/config/dinit.d/keys: -------------------------------------------------------------------------------- 1 | type = process 2 | command = kanata 3 | restart = true 4 | logfile = ./logs/keys.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/.vitrc: -------------------------------------------------------------------------------- 1 | # easy-mode commands 2 | map ;=: 3 | 4 | # easy-mode quitting 5 | map q=Q 6 | 7 | # sync tasks 8 | map s=:!r task sync 9 | -------------------------------------------------------------------------------- /src/config/dinit.d/eos: -------------------------------------------------------------------------------- 1 | type = process 2 | command = nu -l -c "eos listen" 3 | restart = true 4 | logfile = ./logs/eos.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/config/dinit.d/hyprpaper: -------------------------------------------------------------------------------- 1 | type = process 2 | command = hyprpaper 3 | restart = true 4 | logfile = ./logs/hyprpaper.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/config/hypr/.reset.conf: -------------------------------------------------------------------------------- 1 | bind = SUPER ALT, SPACE, submap, reset 2 | bind = , ESCAPE, submap, reset 3 | bind = , Q, submap, reset 4 | submap = reset 5 | -------------------------------------------------------------------------------- /src/config/mpv/scripts/osd.lua: -------------------------------------------------------------------------------- 1 | mp.set_property('osd-msg3', '${time-pos} / ${time-remaining} (${percent-pos}%) \t [-${playtime-remaining} @ ${speed}x]') 2 | -------------------------------------------------------------------------------- /src/config/dinit.d/hyprmon: -------------------------------------------------------------------------------- 1 | type = process 2 | command = nu -l -c "hyprmon listen" 3 | restart = true 4 | logfile = ./logs/hyprmon.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent_with_tabs": true, 3 | "brace_style": "collapse", 4 | "keep_array_indentation": true, 5 | "break_chained_methods": true 6 | } 7 | -------------------------------------------------------------------------------- /src/config/dinit.d/hyprmon-zoom: -------------------------------------------------------------------------------- 1 | type = process 2 | command = nu -l -c "hyprmon zoom" 3 | restart = true 4 | logfile = ./logs/hyprmon-zoom.log 5 | env-file = ./.env 6 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/packages.lua: -------------------------------------------------------------------------------- 1 | local packages = Module.new("packages", "P") 2 | 3 | -- 4 | -- MAPPINGS 5 | -- 6 | 7 | packages:map("u", vim.pack.update) 8 | -------------------------------------------------------------------------------- /src/config/systemd/user/task.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Sync taskwarrior 3 | 4 | [Service] 5 | ExecStart=/usr/bin/task sync 6 | 7 | [Install] 8 | WantedBy=default.target 9 | -------------------------------------------------------------------------------- /src/config/yazi/package.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | deps = [] 3 | 4 | [[flavor.deps]] 5 | use = "yazi-rs/flavors:dracula" 6 | rev = "9cd2ac4" 7 | hash = "c0bfefbff165007a76c0933ed0432e3f" 8 | -------------------------------------------------------------------------------- /src/config/hypr/hyprland.conf: -------------------------------------------------------------------------------- 1 | source = ./vars.conf 2 | source = ./settings.conf 3 | source = ./mappings.conf 4 | source = ./env.conf 5 | source = ./rules.conf 6 | source = ./run.conf 7 | -------------------------------------------------------------------------------- /src/config/dinit.d/ringboard-wayland: -------------------------------------------------------------------------------- 1 | type = process 2 | command = ringboard-wayland 3 | depends-on = ringboard-server 4 | restart = true 5 | logfile = ./logs/ringboard.log 6 | env-file = ./.env 7 | -------------------------------------------------------------------------------- /bin/has-pipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | main() { 4 | local stdin="$(ls -l /proc/self/fd/0)" 5 | stdin="${stdin/*-> /}" 6 | if [[ "$stdin" =~ /dev/pts ]]; then return 1; fi 7 | } 8 | 9 | main "$@" 10 | -------------------------------------------------------------------------------- /src/config/nvim/snippets/lua.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | { 4 | prefix = "p", 5 | body = "print(${0})", 6 | }, 7 | 8 | { 9 | prefix = "req", 10 | body = "require(${1:module})", 11 | }, 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/debug.lua: -------------------------------------------------------------------------------- 1 | local debug = Module.new("debug", "d") 2 | 3 | local mini_pick = require "mini.pick" 4 | 5 | debug:map("", function() 6 | vim.print(mini_pick.registry) 7 | end) 8 | -------------------------------------------------------------------------------- /src/config/hypr/env.conf: -------------------------------------------------------------------------------- 1 | monitor = DP-1, highrr, 0x0, auto 2 | monitor = DP-3, preferred, 0x1080, auto 3 | monitor = HDMI-A-1, preferred, 3840x1080, auto 4 | # monitor = HDMI-A-1, disable 5 | monitor = , preferred, auto, auto 6 | -------------------------------------------------------------------------------- /src/config/systemd/user/task.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Sync taskwarrior on boot and every 2 hours 3 | 4 | [Timer] 5 | OnBootSec=15 minutes 6 | OnUnitActiveSec=2 hours 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /src/config/hangups/hangups.conf: -------------------------------------------------------------------------------- 1 | col-active-tab-fg: black 2 | col-inactive-tab-fg: black 3 | col-palette-colors: 256 4 | col-scheme: solarized-dark 5 | key-close-tab: meta c 6 | key-next-tab: meta n 7 | key-prev-tab: meta p 8 | key-quit: meta q 9 | -------------------------------------------------------------------------------- /src/config/kanata/settings.kbd: -------------------------------------------------------------------------------- 1 | (defcfg 2 | danger-enable-cmd yes 3 | delegate-to-first-layer yes 4 | process-unmapped-keys yes 5 | linux-dev-names-exclude ( 6 | "Ryan Neff Sofle Pico" 7 | "Ryan Neff Sofle Pico Keyboard" 8 | ) 9 | ) 10 | -------------------------------------------------------------------------------- /src/config/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | preload = ~/Pictures/10590794074_bb0a4a2f36_h.jpg 2 | preload = ~/Pictures/breluv06gbc31.png 3 | 4 | wallpaper = ,~/Pictures/10590794074_bb0a4a2f36_h.jpg 5 | wallpaper = DP-3,~/Pictures/breluv06gbc31.png 6 | 7 | splash = true 8 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/_utils.lua: -------------------------------------------------------------------------------- 1 | pack "waiting-for-dev/ergoterm.nvim" 2 | 3 | -- 4 | -- SETUP 5 | -- 6 | 7 | require("ergoterm").setup() 8 | 9 | -- 10 | -- MODULE 11 | -- 12 | 13 | utils = { 14 | Term = require("ergoterm.terminal").Terminal, 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # apps 2 | 3 | src/.termux/shell/ 4 | src/config/gtk-3.0/bookmarks 5 | src/config/mpv/watch_later 6 | src/config/nushell/history* 7 | src/config/rtv/history.log 8 | src/config/rtv/refresh-token 9 | src/config/yazi/flavors/ 10 | src/config/yazi/theme.toml-* 11 | -------------------------------------------------------------------------------- /src/config/nvim/lsp/pylsp.lua: -------------------------------------------------------------------------------- 1 | --- @type vim.lsp.Config 2 | local result = { 3 | settings = { 4 | pylsp = { 5 | plugins = { 6 | pycodestyle = { 7 | ignore = { 8 | "E111", 9 | "E501", 10 | }, 11 | }, 12 | }, 13 | }, 14 | }, 15 | } 16 | return result 17 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/_settings.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- SETTINGS 3 | -- 4 | 5 | -- take me to your leader 6 | -- for single letter mappings 7 | vim.g.mapleader = vim.keycode "" 8 | 9 | -- take me to your friendly neighborhood leader 10 | -- for language-specific mappings 11 | vim.g.maplocalleader = "-" 12 | -------------------------------------------------------------------------------- /TODO.norg: -------------------------------------------------------------------------------- 1 | * changes 2 | - (x) {https://hyprland.org/}[hyprland] 3 | - (x) {https://github.com/rvaiya/warpd}[warpd] 4 | 5 | * features 6 | - (x) come up with a way to make tofi support desktop actions 7 | 8 | * refactor 9 | - ( ) slim, modular rewrite 10 | 11 | * bugs 12 | - (x) fix weird vim thing 13 | -------------------------------------------------------------------------------- /src/config/nushell/plugins/yazi.nu: -------------------------------------------------------------------------------- 1 | # Yazi wrapper. 2 | export def --env y [...args] { 3 | let tmp = (mktemp -t "yazi-cwd.XXXXXX") 4 | yazi ...$args --cwd-file $tmp 5 | let cwd = (open $tmp) 6 | if $cwd != "" and $cwd != $env.PWD { 7 | cd $cwd 8 | } 9 | rm -fp $tmp 10 | } 11 | 12 | export alias Y = yazi 13 | -------------------------------------------------------------------------------- /src/config/zls.json: -------------------------------------------------------------------------------- 1 | {"zig_exe_path":"/usr/bin/zig","enable_snippets":true,"warn_style":true,"enable_semantic_tokens":true,"operator_completions":true,"include_at_in_builtins":true,"max_detail_length":1048576,"enable_unused_variable_warnings":true,"enable_import_embedfile_argument_completions":true,"enable_inlay_hints":true} 2 | -------------------------------------------------------------------------------- /src/config/hypr/vars.conf: -------------------------------------------------------------------------------- 1 | $menu-all = rofi -drun-show-actions -combi-modi drun,run -show combi 2 | $menu-app = rofi -drun-show-actions -show drun -display-drun launch 3 | $menu-run = rofi -drun-show-actions -show run -sidebar-mode 4 | $menu-window = rofi -drun-show-actions -show window -sidebar-mode 5 | $terminal = wezterm start 6 | -------------------------------------------------------------------------------- /src/config/tmuxp/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "session_name": "project", 3 | "windows": [{ 4 | "window_name": "dev", 5 | "focus": true, 6 | "panes": [ 7 | "nvim" 8 | ] 9 | }, { 10 | "window_name": "sync", 11 | "panes": [ 12 | "tig status" 13 | ] 14 | }, { 15 | "window_name": "run", 16 | "panes": [] 17 | }] 18 | } 19 | -------------------------------------------------------------------------------- /src/config/nvim/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bin/wez-osx: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for socket in /run/user/1000/wezterm/gui-sock-* do 4 | [ -S "$socket" ] && break; 5 | done 6 | 7 | if [ -n "$socket" ] then 8 | env WEZTERM_UNIX_SOCKET="$socket" wezterm cli spawn 9 | else 10 | wezterm-gui start 11 | fi 12 | 13 | # function main() { 14 | # wezterm start -- $(echo "$@") 15 | # } 16 | # 17 | # main "$@" 18 | -------------------------------------------------------------------------------- /src/config/systemd/user/keys.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=keyboard fancifier 3 | # BindsTo=display-manager.service 4 | # After=display-manager.service 5 | 6 | [Service] 7 | ExecStartPre=/usr/bin/sleep 1 8 | ExecStart=/home/ross/.cargo/bin/keys 9 | # ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID 10 | Restart=on-failure 11 | 12 | [Install] 13 | WantedBy=default.target 14 | -------------------------------------------------------------------------------- /src/config/systemd/user/mopidy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Mopidy 3 | After=avahi-daemon.service 4 | After=dbus.service 5 | After=network.target 6 | After=nss-lookup.target 7 | After=pulseaudio.service 8 | After=remote-fs.target 9 | After=sound.target 10 | 11 | [Service] 12 | ; User=mopidy 13 | ExecStart=/usr/bin/mopidy 14 | 15 | [Install] 16 | WantedBy=default.target 17 | -------------------------------------------------------------------------------- /src/config/hypr/run.conf: -------------------------------------------------------------------------------- 1 | exec-once = hyprpm reload -n 2 | exec-once = hyprpaper 3 | exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 4 | 5 | # exec-once = [workspace 1] godot --path ~/dev/games/ref/gdext-v-demos/beeg 6 | # exec-once = [workspace 2] foot --app-id beeg -o colors.alpha=0.0 -o pad=0x28 -- cava 7 | 8 | exec-once = eww daemon 9 | exec-once = nu -l -c "bars" 10 | -------------------------------------------------------------------------------- /bin/q: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | command="$1" 4 | shift 5 | 6 | qDebug() { 7 | for entry in $(ps aux | fzf -m --preview= | awk '{ print $2 }'); do 8 | echo $* "$entry" 9 | done 10 | } 11 | 12 | qKill() { 13 | kill $* $(ps aux | fzf -m --preview= | awk '{ print $2 }') 14 | } 15 | 16 | if [[ "$command" == "debug" ]]; then 17 | qDebug "$*" 18 | elif [[ "$command" == "kill" ]]; then 19 | qKill "$*" 20 | fi 21 | -------------------------------------------------------------------------------- /src/config/nushell/plugins/mod.nu: -------------------------------------------------------------------------------- 1 | use gd.nu 2 | use raws.nu 3 | use yazi.nu * 4 | 5 | # zoxide 6 | const zoxide_plugin = "~/.config/nushell/plugins/zoxide.nu" 7 | if ($zoxide_plugin | path exists | not $in) { 8 | zoxide init nushell | save --force $zoxide_plugin 9 | } 10 | source $zoxide_plugin 11 | 12 | # asdf 13 | source ~/.asdf/completions/nushell.nu 14 | 15 | # systemd 16 | # source ../plugins/systemd.nu 17 | -------------------------------------------------------------------------------- /src/config/nvim/snippets/global.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | date = { 4 | prefix = "date", 5 | body = "${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}", 6 | description = "Date in Y-m-D format" 7 | }, 8 | 9 | diso = { 10 | prefix = "diso", 11 | body = "${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}", 12 | description = "ISO timestamp" 13 | }, 14 | 15 | } 16 | -------------------------------------------------------------------------------- /bin/typo: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | file="$1" 4 | showFile="$2" 5 | showStats="$3" 6 | 7 | typos=$(aspell list --ignore-case < "$file" | cut -d ' ' -f 2 | grep -v '*' | grep -v '^\s*$' | sort) 8 | stats=$(echo "$typos" | uniq -c | sort -nr) 9 | 10 | if [[ $showStats == 1 ]]; then echo "$stats"; fi 11 | 12 | if [[ $showFile == 1 ]]; then 13 | echo "$(echo "$typos" | wc -l) - $file" 14 | else 15 | echo "$typos" | wc -l 16 | fi 17 | -------------------------------------------------------------------------------- /src/config/cava/shaders/pass_through.vert: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | 4 | // Input vertex data, different for all executions of this shader. 5 | layout(location = 0) in vec3 vertexPosition_modelspace; 6 | 7 | // Output data ; will be interpolated for each fragment. 8 | out vec2 fragCoord; 9 | 10 | void main() 11 | { 12 | gl_Position = vec4(vertexPosition_modelspace,1); 13 | fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0; 14 | } 15 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/~plugins/yazi.lua: -------------------------------------------------------------------------------- 1 | local yazi = Module.new("yazi") 2 | 3 | -- 4 | -- EVENTS 5 | -- 6 | 7 | -- generate config files from nuon 8 | vim.api.nvim_create_autocmd("BufWrite", { 9 | group = yazi.group, 10 | pattern = "*/yazi/keymap.nuon", 11 | callback = function(event) 12 | local cmd = "open " .. event.file .. " | to toml | save -f ('" .. event.file .. "' | str replace .nuon .toml)" 13 | run(cmd, "nu") 14 | end, 15 | }) 16 | -------------------------------------------------------------------------------- /src/config/systemd/user/sxhkd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Simple X Hotkey Daemon 3 | Documentation=man:sxhkd(1) 4 | # BindsTo=ly.service 5 | # After=ly.service 6 | 7 | [Service] 8 | ExecStartPre=/usr/bin/systemctl --user import-environment DISPLAY XAUTHORITY 9 | ExecStartPre=/usr/bin/sleep 1 10 | ExecStart=/usr/bin/sxhkd 11 | ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID 12 | 13 | [Install] 14 | # WantedBy=graphical-session.target 15 | WantedBy=graphical.target 16 | -------------------------------------------------------------------------------- /bin/shlube: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## 4 | # Normalizes running shells with a specific command. 5 | # 6 | # TODO: make use parent shell by default 7 | # 8 | # Usage: 9 | # shlube zsh -- echo hi 10 | # echo "echo hi" | shlube nu 11 | ## 12 | function main() { 13 | local shell="$1" 14 | shift 1 15 | if [ "$1" == "--" ]; then shift 1; fi 16 | $shell -c "$(echo "$@")" 17 | } 18 | 19 | if has-pipe; then 20 | main "$1" "$(cat)" 21 | else 22 | main "$@" 23 | fi 24 | -------------------------------------------------------------------------------- /bin/taglish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function taglish() { 4 | local version=$(grep '^\s\s"version"' package.json | sed -r 's;^\s+"version":\s?"(.+)",?;\1;') 5 | 6 | echo "Committing $version..." 7 | git add package.json 8 | git commit -m 'version++' 9 | 10 | echo "Tagging $version..." 11 | git tag "v$version" 12 | 13 | echo "Pushing $version..." 14 | git push --tags 15 | git out 16 | 17 | echo "Publishing $version..." 18 | npm publish 19 | } 20 | 21 | taglish "$@" 22 | -------------------------------------------------------------------------------- /bin/bars: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | def main [] { 4 | let monitors = hyprctl monitors -j | from json | sort-by id 5 | 6 | eww close-all 7 | 8 | $monitors | each {|monitor| 9 | eww open top --id $"top:($monitor.name)" --screen $monitor.name --arg $"monitor=($monitor | to json -r)" 10 | eww open bottom --id $"bottom:($monitor.name)" --screen $monitor.name --arg $"monitor=($monitor | to json -r)" 11 | $monitor 12 | } 13 | 14 | dinitctl start eos 15 | dinitctl start hyprmon 16 | dinitctl start hyprmon-zoom 17 | } 18 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/search.lua: -------------------------------------------------------------------------------- 1 | local search = Module.new("search", "/") 2 | 3 | -- 4 | -- SETTINGS 5 | -- 6 | 7 | -- add the g flag to all searches 8 | vim.opt.gdefault = true 9 | 10 | -- 11 | -- MAPPINGS 12 | -- 13 | 14 | -- toggle highlighting 15 | search:map("", cmd "nohlsearch") 16 | search:map("/", cmd "set hlsearch") 17 | 18 | -- clear highlighting 19 | map("", ":nohlsearch", "c") 20 | 21 | -- search for selection 22 | map("/", [["vy/v]], "v") 23 | map("?", [["vy?v]], "v") 24 | -------------------------------------------------------------------------------- /src/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = tab 8 | insert_final_newline = true 9 | max_line_length = 128 10 | tab_width = 2 11 | trim_trailing_whitespace = true 12 | 13 | [*.{nim,py}] 14 | indent_style = space 15 | 16 | [*.{zig,zon}] 17 | indent_style = space 18 | indent_size = 4 19 | 20 | [*.{yaml,yml,norg,clj,yuck}] 21 | indent_style = space 22 | 23 | [package.json] 24 | indent_style = space 25 | 26 | [*.{diff,md}] 27 | trim_trailing_whitespace = false 28 | -------------------------------------------------------------------------------- /bin/edit-clip: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | # Edits the clipboard with `vipe`. 4 | def main [ 5 | --selection (-s) # use selection buffer 6 | --type (-t) # type result with `wlrctl` 7 | --focus (-f) # focus last window 8 | ] { 9 | if ($selection) { 10 | wl-paste --primary 11 | } else { 12 | wl-paste 13 | } 14 | | vipe 15 | | complete 16 | | if $in.exit_code == 0 { 17 | $in.stdout | str trim 18 | } 19 | | if $type { 20 | if $focus { 21 | hyprctl dispatch focuscurrentorlast 22 | } 23 | wlrctl keyboard type $in 24 | } else {} 25 | } 26 | -------------------------------------------------------------------------------- /src/config/gitui/theme.ron: -------------------------------------------------------------------------------- 1 | ( 2 | selected_tab: Reset, 3 | command_fg: White, 4 | selection_bg: Blue, 5 | cmdbar_extra_lines_bg: Blue, 6 | disabled_fg: DarkGray, 7 | diff_line_add: Green, 8 | diff_line_delete: Red, 9 | diff_file_added: LightGreen, 10 | diff_file_removed: LightRed, 11 | diff_file_moved: LightMagenta, 12 | diff_file_modified: Yellow, 13 | commit_hash: Magenta, 14 | commit_time: LightCyan, 15 | commit_author: Green, 16 | danger_fg: Red, 17 | push_gauge_bg: Blue, 18 | push_gauge_fg: Reset, 19 | ) -------------------------------------------------------------------------------- /bin/godot.bak: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function main() { 4 | local version="4" 5 | local dir="godot" 6 | local target="editor" 7 | local arch="x86_64" 8 | 9 | # support older versions 10 | local platform="linuxbsd" 11 | if [ "$version" == "stable" ]; then 12 | platform="x11" 13 | dir="godot-3" 14 | fi 15 | 16 | local path="$HOME/dev/forks/$dir/bin" 17 | local file="godot.$platform.$target.$arch" 18 | 19 | # prefer llvm 20 | if [ -f "$path/$file.llvm" ]; then 21 | file="$file.llvm" 22 | fi 23 | 24 | echo $path/$file "$@" 25 | } 26 | 27 | main "$@" 28 | -------------------------------------------------------------------------------- /bin/mute-window: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function mute-window() { 4 | local pid="$(xprop | ag '_NET_WM_PID' | awk '{ print $3 }')" 5 | local data="$(pacmd list-sink-inputs | egrep "^\s+index:|^\s+muted:|^\s+application.process.id" | ag -B 2 "$pid")" 6 | local index="$(echo "$data" | head -1 | awk '{ print $2 }')" 7 | local muted="$(echo "$data" | sed -n '2 p' | awk '{ print $2 }')" 8 | 9 | if [ "$muted" = "yes" ]; then 10 | muted="no" 11 | else 12 | muted="yes" 13 | fi 14 | 15 | if [ "$index" ]; then 16 | pacmd set-sink-input-mute "$index" "$muted" 17 | fi 18 | } 19 | 20 | mute-window 21 | -------------------------------------------------------------------------------- /src/config/wezterm/colors/cyberdream.lua: -------------------------------------------------------------------------------- 1 | return { 2 | foreground = "#ffffff", 3 | background = "#16181a", 4 | 5 | cursor_bg = "#ffffff", 6 | cursor_fg = "#16181a", 7 | cursor_border = "#ffffff", 8 | 9 | selection_fg = "#ffffff", 10 | selection_bg = "#3c4048", 11 | 12 | scrollbar_thumb = "#16181a", 13 | split = "#16181a", 14 | 15 | ansi = { "#16181a", "#ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", "#bd5eff", "#5ef1ff", "#ffffff" }, 16 | brights = { "#3c4048", "#ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", "#bd5eff", "#5ef1ff", "#ffffff" }, 17 | indexed = { [16] = "#ffbd5e", [17] = "#ff6e5e" }, 18 | } 19 | -------------------------------------------------------------------------------- /bin/copy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # TODO: add option for removing trailing newline 4 | copy() { 5 | local file="$1" 6 | 7 | if [ "$file" ]; then 8 | if isCommand wl-copy; then 9 | cat "$file" | wl-copy 10 | elif isCommand xsel; then 11 | cat "$file" | xsel -ib 12 | elif isCommand pbcopy; then 13 | cat "$file" | pbcopy 14 | fi 15 | return 16 | fi 17 | 18 | if isCommand wl-copy; then 19 | wl-copy 20 | elif isCommand xsel; then 21 | xsel -ib 22 | elif isCommand pbcopy; then 23 | pbcopy 24 | fi 25 | } 26 | 27 | isCommand() { 28 | command -v "$1" >/dev/null 2>&1 29 | } 30 | 31 | copy "$@" 32 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/terminal.lua: -------------------------------------------------------------------------------- 1 | local terminal = Module.new("terminal", "m") 2 | 3 | -- 4 | -- MAPPINGS 5 | -- 6 | 7 | terminal:map("", function() 8 | utils.Term:new():focus("float") 9 | end) 10 | 11 | terminal:map("j", function() 12 | utils.Term:new():focus("below") 13 | end) 14 | 15 | terminal:map("k", function() 16 | utils.Term:new():focus("above") 17 | end) 18 | 19 | terminal:map("h", function() 20 | utils.Term:new():focus("left") 21 | end) 22 | 23 | terminal:map("l", function() 24 | utils.Term:new():focus("right") 25 | end) 26 | 27 | -- breakout.exe of terminal mode 28 | map("", [[]], "t") 29 | -------------------------------------------------------------------------------- /src/.Xresources: -------------------------------------------------------------------------------- 1 | ! TODO: modularize.exe 2 | 3 | Xft.dpi: 96 4 | 5 | !!!!!!!!!!!!!!!! 6 | !! FONTS 7 | !!!!!!!!!!!!!!!! 8 | 9 | *font: Fira Code 12 10 | *boldFont: Fira Code Bold 12 11 | *italicFont: Fira Code Italic 12 12 | *boldItalicFont: Fira Code Bold Italic 12 13 | *faceName: Fira Code 12 14 | *faceSize: 12 15 | 16 | !!!!!!!!!!!!!!!! 17 | !! THEME 18 | !!!!!!!!!!!!!!!! 19 | 20 | #include "/home/ross/dotfiles/lib/themes/xresources" 21 | 22 | *.highlightbg: #875fd7 23 | *.highlightfg: #ffffff 24 | *.bordercolor: #5f00af 25 | *.opacity: 100 26 | 27 | !!!!!!!!!!!!!!!! 28 | !! CURSOR 29 | !!!!!!!!!!!!!!!! 30 | 31 | Xcursor.theme: Polar 32 | Xcursor.size: 32 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dotfiles", 3 | "version": "0.8.0", 4 | "description": "Ross' dotfiles of epic awesomeness +10", 5 | "repository": { 6 | "type": true, 7 | "url": "https://github.com/rosshadden/dotfiles.git" 8 | }, 9 | "keywords": [ 10 | "dotfiles", 11 | "hyprland", 12 | "neovim", 13 | "wezterm", 14 | "artix linux", 15 | "tig", 16 | "lf", 17 | "fzf" 18 | ], 19 | "author": "Ross Hadden", 20 | "license": "ISC", 21 | "bugs": { 22 | "url": "https://github.com/rosshadden/dotfiles/issues" 23 | }, 24 | "homepage": "https://github.com/rosshadden/dotfiles", 25 | "devDependencies": { 26 | "base16-builder": "^1.3.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | @theme "purple" 2 | 3 | * { 4 | width: 512; 5 | } 6 | 7 | // TEMP: fixes weird prompt display issue 8 | textbox-prompt-colon { 9 | enabled: false; 10 | } 11 | inputbar { 12 | spacing: 4px; 13 | } 14 | 15 | configuration { 16 | modi: "window,run,ssh,drun"; 17 | lines: 16; 18 | font: "Fira Code 10"; 19 | bw: 4; 20 | location: 0; 21 | padding: 32; 22 | fixed-num-lines: true; 23 | show-icons: true; 24 | terminal: "rofi-sensible-terminal"; 25 | sort: false; 26 | eh: 2; 27 | matching: "regex"; 28 | m: "-1"; 29 | line-margin: 4; 30 | separator-style: "solid"; 31 | hide-scrollbar: true; 32 | fullscreen: false; 33 | threads: 0; 34 | window-format: "{w} {c} {n} {t}"; 35 | } 36 | -------------------------------------------------------------------------------- /src/config/nushell/modules/alias.nu: -------------------------------------------------------------------------------- 1 | ## 2 | ## SHORTCUTS 3 | ## 4 | 5 | export alias x = exit 6 | export alias h = help 7 | 8 | ## 9 | ## EDITING 10 | ## 11 | 12 | export alias e = nvim 13 | export alias se = sudo -E nvim 14 | 15 | ## 16 | ## APPS 17 | ## 18 | 19 | # git 20 | export alias g = git 21 | export alias tigs = tig status 22 | export alias tigr = tig $"(git rev-parse HEAD | str trim)..(git rev-parse FETCH_HEAD | str trim)" 23 | 24 | # tmux 25 | export alias tl = tmux list-sessions 26 | 27 | # zoxide 28 | export alias d = zoxide query 29 | 30 | ## 31 | ## ENV 32 | ## 33 | 34 | # TODO: consider migrating to an env 35 | export alias sshc = ssh -i ~/.ssh/cuda 36 | 37 | ## 38 | ## MISC 39 | ## 40 | 41 | export alias dcp = docker-compose 42 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/templates.lua: -------------------------------------------------------------------------------- 1 | local templates = Module.new("templates") 2 | 3 | local conf = vim.fn.stdpath "config" 4 | local function template(kind) 5 | return conf .. "/templates/t." .. kind 6 | end 7 | 8 | -- 9 | -- EVENTS 10 | -- 11 | 12 | -- TODO: check/load templates automatically, based on `event.file` 13 | 14 | vim.api.nvim_create_autocmd("BufNewFile", { 15 | group = templates.group, 16 | pattern = "*.sh", 17 | callback = function(ev) 18 | vim.cmd("0r " .. template("sh") .. " | normal Gdd") 19 | end, 20 | }) 21 | 22 | vim.api.nvim_create_autocmd("BufNewFile", { 23 | group = templates.group, 24 | pattern = "*.html", 25 | callback = function(ev) 26 | vim.cmd("0r " .. template("html") .. " | normal Gdd10G$") 27 | end, 28 | }) 29 | -------------------------------------------------------------------------------- /src/config/wezterm/colors/cyberdream.toml: -------------------------------------------------------------------------------- 1 | [colors] 2 | 3 | foreground = "#ffffff" 4 | background = "#16181a" 5 | 6 | cursor_bg = "#ffffff" 7 | cursor_fg = "#16181a" 8 | cursor_border = "#ffffff" 9 | 10 | selection_fg = "#ffffff" 11 | selection_bg = "#3c4048" 12 | 13 | # scrollbar_thumb = "#16181a" 14 | scrollbar_thumb = "#5ea1ff" 15 | # split = "#16181a" 16 | split = "#5ea1ff" 17 | 18 | compose_cursor = "#ffbd5e" 19 | 20 | ansi = [ 21 | "#16181a", 22 | "#ff6e5e", 23 | "#5eff6c", 24 | "#f1ff5e", 25 | "#5ea1ff", 26 | "#bd5eff", 27 | "#5ef1ff", 28 | "#ffffff", 29 | ] 30 | 31 | brights = [ 32 | "#3c4048", 33 | "#ff6e5e", 34 | "#5eff6c", 35 | "#f1ff5e", 36 | "#5ea1ff", 37 | "#bd5eff", 38 | "#5ef1ff", 39 | "#ffffff", 40 | ] 41 | 42 | [colors.indexed] 43 | 16 = "#ffbd5e" 44 | 17 = "#ff6e5e" 45 | -------------------------------------------------------------------------------- /bin/muse: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ################################ 4 | # Query media 5 | # 6 | # Dependencies: 7 | # - [playerctl](https://github.com/acrisci/playerctl) 8 | ################################ 9 | 10 | function main() { 11 | local players="$(playerctl -l)" 12 | if [[ ! $players ]]; then exit 0; fi 13 | 14 | declare -A icons 15 | icons["Playing"]="" 16 | icons["Paused"]="" 17 | icons["Stopped"]="" 18 | 19 | local artist="$(playerctl --player=%any,chromium metadata artist 2>/dev/null)" 20 | local title="$(playerctl --player=%any,chromium metadata title 2>/dev/null)" 21 | local album="$(playerctl --player=%any,chromium metadata album 2>/dev/null)" 22 | local status="$(playerctl --player=%any,chromium status 2>/dev/null)" 23 | local icon="${icons[$status]}" 24 | 25 | echo "$icon $artist - $title" 26 | } 27 | 28 | main "$@" 29 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/sync.lua: -------------------------------------------------------------------------------- 1 | local sync = Module.new("sync", "s") 2 | 3 | pack "lewis6991/gitsigns.nvim" 4 | 5 | -- 6 | -- SETUP 7 | -- 8 | 9 | require("mini.diff").setup() 10 | require("mini.git").setup() 11 | 12 | -- 13 | -- MAPPINGS 14 | -- 15 | 16 | local tigs = utils.Term:new({ 17 | cmd = "tig status", 18 | persist_mode = true, 19 | }) 20 | 21 | sync:map("", function() 22 | tigs:toggle "float" 23 | end) 24 | 25 | sync:map("t", function() 26 | tigs:toggle "tab" 27 | end) 28 | 29 | sync:map("w", function() 30 | tigs:toggle "window" 31 | end) 32 | 33 | sync:map("j", function() 34 | tigs:toggle "below" 35 | end) 36 | 37 | sync:map("k", function() 38 | tigs:toggle "above" 39 | end) 40 | 41 | sync:map("h", function() 42 | tigs:toggle "left" 43 | end) 44 | 45 | sync:map("l", function() 46 | tigs:toggle "right" 47 | end) 48 | -------------------------------------------------------------------------------- /bin/termoil: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -f "/usr/bin/wezterm" ]; then 4 | export TERMINAL="/home/ross/bin/wez" 5 | # export TERMINAL="/usr/bin/wezterm" 6 | fi 7 | 8 | ## 9 | # Normalizes running terminals with a specific command. 10 | # 11 | # Usage: 12 | # termoil -- echo hi 13 | # echo "echo hi" | termoil 14 | ## 15 | function main() { 16 | local term="i3-sensible-terminal" 17 | 18 | local spec=":t:" 19 | while getopts $spec opt; do 20 | case "$opt" in 21 | t) term="$OPTARG" ;; 22 | :) error "Option '-$OPTARG' requires an argument" ;; 23 | *) error "Invalid option: -$OPTARG" ;; 24 | esac 25 | done 26 | shift $((OPTIND - 1)) 27 | 28 | if [[ "$*" ]]; then 29 | if [ "$term" == "kitty" ]; then 30 | $term -- $(echo "$@") 31 | else 32 | $term -e "$(echo "$@")" 33 | fi 34 | else 35 | $term 36 | fi 37 | } 38 | 39 | main "${@:-$(cat)}" 40 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/~plugins/obsidian.lua: -------------------------------------------------------------------------------- 1 | local obsidian = Module.new("obsidian") 2 | 3 | pack("obsidian-nvim/obsidian.nvim", { 4 | "MeanderingProgrammer/render-markdown.nvim", 5 | { src = "nvim-treesitter/nvim-treesitter", version = "main" }, 6 | }) 7 | 8 | pack "oflisback/obsidian-bridge.nvim" 9 | 10 | require("render-markdown").setup({ 11 | completions = { lsp = { enabled = true } }, 12 | 13 | render_modes = true, 14 | 15 | heading = { 16 | border = true, 17 | }, 18 | 19 | code = { 20 | border = "thick", 21 | }, 22 | }) 23 | 24 | require("obsidian").setup({ 25 | legacy_commands = false, 26 | 27 | workspaces = { 28 | { 29 | name = "main", 30 | path = "~/notes/main", 31 | }, 32 | { 33 | name = "cuda", 34 | path = "~/notes/cuda", 35 | }, 36 | }, 37 | 38 | ui = { enable = false }, 39 | }) 40 | 41 | require("obsidian-bridge").setup() 42 | -------------------------------------------------------------------------------- /src/config/nushell/config.nu: -------------------------------------------------------------------------------- 1 | use alias.nu * 2 | use completions.nu * 3 | use functions.nu * 4 | 5 | use mappings.nu 6 | use menus.nu 7 | use theme.nu 8 | 9 | use bin/eos 10 | use bin/hyprmon 11 | 12 | source plugins/mod.nu 13 | 14 | $env.config.float_precision = 4 15 | $env.config.buffer_editor = "nvim" 16 | $env.config.edit_mode = "vi" 17 | $env.config.show_banner = false 18 | $env.config.use_kitty_protocol = true 19 | $env.config.highlight_resolved_externals = true 20 | 21 | $env.config.history.file_format = "sqlite" 22 | $env.config.history.max_size = 5_000_000 23 | $env.config.history.isolation = true 24 | 25 | $env.config.completions = (completions) 26 | $env.config.keybindings = (mappings) 27 | $env.config.menus = (menus) 28 | $env.config.color_config = (theme) 29 | 30 | $env.config.hooks.env_change.PWD = [ 31 | {|before, after| 32 | zoxide add . 33 | } 34 | ] 35 | 36 | export use ~/local/config.nu * 37 | -------------------------------------------------------------------------------- /src/.ncmpcpp/bindings: -------------------------------------------------------------------------------- 1 | def_key "j" 2 | scroll_down 3 | def_key "k" 4 | scroll_up 5 | 6 | def_key "h" 7 | previous_column 8 | def_key "l" 9 | next_column 10 | 11 | def_key "ctrl-u" 12 | page_up 13 | #push_characters "kkkkkkkkkkkkkkk" 14 | def_key "ctrl-d" 15 | page_down 16 | #push_characters "jjjjjjjjjjjjjjj" 17 | 18 | def_key "ctrl-b" 19 | page_up 20 | #push_characters "kkkkkkkkkkkkkkk" 21 | def_key "ctrl-f" 22 | page_down 23 | #push_characters "jjjjjjjjjjjjjjj" 24 | 25 | def_key "space" 26 | toggle_visualization_type 27 | 28 | def_key "." 29 | show_lyrics 30 | 31 | def_key "n" 32 | next_found_item 33 | def_key "N" 34 | previous_found_item 35 | 36 | def_key "J" 37 | move_sort_order_down 38 | def_key "K" 39 | move_sort_order_up 40 | def_key "J" 41 | move_selected_items_down 42 | def_key "K" 43 | move_selected_items_up 44 | 45 | def_key "g" 46 | move_home 47 | def_key "G" 48 | move_end 49 | 50 | def_key "t" 51 | select_item 52 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/windows.lua: -------------------------------------------------------------------------------- 1 | local windows = Module.new("windows", "w") 2 | 3 | -- 4 | -- SETTINGS 5 | -- 6 | 7 | -- window title 8 | vim.opt.title = true 9 | 10 | -- 11 | -- MAPPINGS 12 | -- 13 | 14 | -- navigation 15 | windows:map("n", cmd "wnext") 16 | windows:map("p", cmd "wprevious") 17 | 18 | -- split [j, k, h, l] 19 | windows:map("j", cmd "botright new") 20 | windows:map("k", cmd "topleft new") 21 | windows:map("h", cmd "topleft vnew") 22 | windows:map("l", cmd "botright vnew") 23 | 24 | -- move window [H, J, K, L] 25 | -- NOTE: this is not expected, but all vim can natively do 26 | windows:map("J", "J") 27 | windows:map("K", "K") 28 | windows:map("H", "H") 29 | windows:map("L", "L") 30 | 31 | -- close 32 | windows:map("c", cmd "close") 33 | windows:map("C", cmd "close!") 34 | 35 | -- close all other windows 36 | windows:map("o", "O") 37 | 38 | -- move window to a new tab 39 | windows:map("t", "T") 40 | -------------------------------------------------------------------------------- /src/config/nushell/modules/completions.nu: -------------------------------------------------------------------------------- 1 | export def main [] { 2 | let zoxide_completer = {|spans: list| 3 | $spans | skip 1 | zoxide query -l ...$in | lines | where {|x| $x != $env.PWD} 4 | } 5 | 6 | let carapace_completer = {|spans: list| 7 | carapace $spans.0 nushell ...$spans | from json 8 | } 9 | 10 | let completer = {|spans: list| 11 | let expanded_alias = (scope aliases | where name == $spans.0 | get -o 0 | get -o expansion) 12 | 13 | let spans = ( 14 | if $expanded_alias != null { 15 | # put the first word of the expanded alias first in the span 16 | $spans | skip 1 | prepend ($expanded_alias | split row " " | take 1) 17 | } else { $spans } 18 | ) 19 | 20 | match $spans.0 { 21 | __zoxide_z => $zoxide_completer 22 | __zoxide_zi => $zoxide_completer 23 | _ => $carapace_completer 24 | } | do $in $spans 25 | } 26 | 27 | { 28 | external: { 29 | enable: true 30 | completer: $completer 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /bin/for-of: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## 4 | # Run a given command from within each directory in a given list. 5 | # If a list is piped to the function, uses this instead of the list of files in the current directory. 6 | # 7 | # Dependencies: 8 | # - for-in 9 | # 10 | # @method for-of 11 | # @param {Command} cmd - The command to run 12 | # @param {Array} [...list=*] - The list to use 13 | # May be globs or space-separated values. 14 | ## 15 | function for-of() { 16 | local options 17 | local condition="[[ -d {1} ]]" 18 | 19 | local spec="$(for-in --spec)" 20 | while getopts $spec opt; do 21 | case "$opt" in 22 | c) condition="$condition && $OPTARG" ;; 23 | *) 24 | if [[ "$options" ]]; then options="$options "; fi 25 | options="$options-$opt$OPTARG" 26 | ;; 27 | esac 28 | done 29 | shift $((OPTIND - 1)) 30 | 31 | local cmd="$1" 32 | local wrapper="cd {1} && $cmd" 33 | shift 34 | 35 | for-in $options -c "$condition" "$wrapper" "$@" 36 | } 37 | 38 | for-of "$@" 39 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/registers.lua: -------------------------------------------------------------------------------- 1 | local registers = Module.new("registers", "r") 2 | 3 | -- 4 | -- MAPPINGS 5 | -- 6 | 7 | -- add to the `gp` and `gy` from mini.basics 8 | map("gP", [["+P]]) 9 | map("gY", [["+Y]], { "n", "x" }, { remap = true }) 10 | 11 | -- system clipboard [CLIPBOARD] 12 | registers:map("", [["+]]) 13 | 14 | -- selection clipboard [PRIMARY] 15 | registers:map("s", [["*]]) 16 | 17 | -- blackhole register 18 | registers:map("b", [["_]]) 19 | 20 | -- yank register 21 | registers:map("y", [["0]]) 22 | 23 | -- delete register 24 | registers:map("d", [["1]]) 25 | 26 | -- small-delete register 27 | registers:map("D", [["-]]) 28 | 29 | -- search register 30 | registers:map("/", [["/]]) 31 | 32 | -- expression register 33 | registers:map("=", [["=]]) 34 | 35 | -- read-only 36 | 37 | -- insert register 38 | registers:map("i", [[".]]) 39 | 40 | -- command register 41 | registers:map(";", [[":]]) 42 | 43 | -- file register 44 | registers:map("f", [["%]]) 45 | 46 | -- alt-file register 47 | registers:map("F", [["#]]) 48 | -------------------------------------------------------------------------------- /src/config/nvim/lsp/emmylua_ls.lua: -------------------------------------------------------------------------------- 1 | --- Get lib paths for input packages. 2 | --- @param pkgs string[] 3 | local function libs(pkgs) 4 | for p, pkg in ipairs(pkgs) do 5 | pkgs[p] = vim.fn.stdpath "data" .. "/site/pack/core/opt/" .. pkg 6 | end 7 | return pkgs 8 | end 9 | 10 | --- @type vim.lsp.Config 11 | local result = { 12 | settings = { 13 | Lua = { 14 | runtime = { 15 | version = "LuaJIT", 16 | requirePattern = { 17 | "lua/?.lua", 18 | "lua/?/init.lua", 19 | "plugin/?.lua", 20 | "plugin/?/init.lua", 21 | } 22 | }, 23 | workspace = { 24 | checkThirdParty = false, 25 | library = { 26 | "/usr/share/nvim/runtime/lua", 27 | vim.env.VIMRUNTIME .. "/lua", 28 | vim.env.VIMRUNTIME .. "/plugin", 29 | unpack(libs({ 30 | "dial.nvim", 31 | "hop.nvim", 32 | "mini.nvim", 33 | "nvim-treesitter", 34 | "nvim-treesitter-textobjects", 35 | "persistence.nvim", 36 | "snacks.nvim", 37 | })), 38 | }, 39 | }, 40 | }, 41 | }, 42 | } 43 | return result 44 | -------------------------------------------------------------------------------- /bin/duh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## 4 | # Runs `du -h | sort -h` to a given depth, at a specified directory 5 | # 6 | # @method duh 7 | # @param {Number} [depth=0] - Depth 8 | # @param {String} [dir=.] - Directory 9 | ## 10 | duh() { 11 | local options="" 12 | 13 | local spec=":f" 14 | while getopts $spec opt; do 15 | case "$opt" in 16 | f) options="-a" ;; 17 | :) error "Option '-$OPTARG' requires an argument" ;; 18 | *) error "Invalid option: -$OPTARG" ;; 19 | esac 20 | done 21 | shift $((OPTIND - 1)) 22 | 23 | local depth=$1 dir=$2 24 | 25 | local temp 26 | if [[ "$dir" =~ ^[0-9]+$ ]]; then 27 | temp=$depth 28 | depth=$dir 29 | dir=$temp 30 | fi 31 | if ! [[ "$depth" =~ ^[0-9]+$ ]]; then 32 | temp=$dir 33 | dir=$depth 34 | depth=$temp 35 | fi 36 | 37 | if [[ -z "$depth" ]]; then depth=1; fi 38 | if [[ -z "$dir" ]]; then dir=.; fi 39 | 40 | if [ "$options" != "" ]; then 41 | du -h --max-depth=$depth "$options" "$dir" | sort -h 42 | else 43 | du -h --max-depth=$depth "$dir" | sort -h 44 | fi 45 | } 46 | 47 | duh "$@" 48 | -------------------------------------------------------------------------------- /src/.fehbg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | feh --no-fehbg --bg-scale '/home/ross/Dropbox/media/images/wallpaper/glitch/58827_photo_manipulation_image_glitch_landscape_glitch.jpg' '/home/ross/Dropbox/media/images/wallpaper/vaporwave/wp1895653-vaporwave-wallpapers.jpg' '/home/ross/Dropbox/media/images/wallpaper/glitch/leAODsm.jpg' '/home/ross/Dropbox/media/images/wallpaper/pixels/cyberpunk.png' '/home/ross/Dropbox/media/images/wallpaper/glitch/9c283430f603c4423932b0b4d6157ae6.png' '/home/ross/Dropbox/media/images/wallpaper/glitch/47948_1_miscellaneous_digital_art_image_glitch.jpg' '/home/ross/Dropbox/media/images/wallpaper/glitch/fZ0LFeM.jpg' '/home/ross/Dropbox/media/images/wallpaper/vaporwave/62379_photo_manipulation_vaporwave.jpg' '/home/ross/Dropbox/media/images/wallpaper/vaporwave/61736_1_miscellaneous_digital_art_vaporwave_vaporwave_sunset.jpg' '/home/ross/Dropbox/media/images/wallpaper/vaporwave/62380_photo_manipulation_vaporwave.jpg' '/home/ross/Dropbox/media/images/wallpaper/pixels/night-city-pixel.png' '/home/ross/Dropbox/media/images/wallpaper/vaporwave/wp1895635-vaporwave-wallpapers.jpg' 3 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/_.lua: -------------------------------------------------------------------------------- 1 | pack "nvim-mini/mini.nvim" 2 | 3 | -- 4 | -- CLASSES 5 | -- 6 | 7 | --- Struct allowing mode-specific keymaps. 8 | --- @class Module 9 | --- @field name string Name of the module. 10 | --- @field seq string Entrypoint key sequence. 11 | --- @field prefix string Mapping prefix. 12 | --- @field group int augroup 13 | Module = {} 14 | Module.__index = Module 15 | 16 | --- Create a Mode. 17 | --- @param name string Name of the module. 18 | --- @param seq string? Entrypoint key sequence. 19 | --- @return Module 20 | function Module.new(name, seq) 21 | local self = setmetatable({}, Module) 22 | self.name = name 23 | self.seq = seq or "" 24 | self.prefix = "(" .. self.name .. ")" 25 | self.group = vim.api.nvim_create_augroup(self.name, {}) 26 | 27 | if seq ~= nil then 28 | map(self.seq, self.prefix, { "x", "n", "o" }, { desc = self.name .. " module" }) 29 | end 30 | 31 | return self 32 | end 33 | 34 | --- Map key in mode. 35 | function Module:map(seq, action, modes, cfg) 36 | map(self.prefix .. seq, action, modes, cfg) 37 | end 38 | -------------------------------------------------------------------------------- /src/.gtkrc-2.0: -------------------------------------------------------------------------------- 1 | ################ 2 | # SETTINGS 3 | ################ 4 | 5 | include "/home/ross/dotfiles/lib/themes/gtk-2.0" 6 | gtk-font-name = "Fairfax Hax HD 12" 7 | gtk-theme-name = "Catppuccin-Mocha-Standard-Lavender-Dark" 8 | gtk-key-theme-name = "Vi" 9 | 10 | ################ 11 | # APPS 12 | ################ 13 | 14 | # pidgin 15 | 16 | binding "mappings" { 17 | # Ctrl-v to paste as plain text 18 | bind "v" { "paste" ("text") } 19 | 20 | # Ctrl-Shift-v for normal 'Paste' 21 | bind "v" { "paste" ("html") } 22 | } 23 | 24 | widget "*pidgin_conv_entry" binding "mappings" 25 | 26 | # This lets you edit your Pidgin key bindings from within Pidgin, 27 | # by hovering over a menu item and hitting a key combo. 28 | gtk-can-change-accels = 1 29 | 30 | ################ 31 | # STYLES 32 | ################ 33 | 34 | # # Create a style called "inverted" where the text and base (the base color behind the widget) are the reverse of typical. 35 | # style "main" { 36 | # text[NORMAL] = "#d0d0d0" 37 | # base[NORMAL] = "#151515" 38 | # bg[NORMAL] = "#202020" 39 | # } 40 | 41 | 42 | # everything ever 43 | # widget "*" style "main" 44 | -------------------------------------------------------------------------------- /src/config/eww/eww.scss: -------------------------------------------------------------------------------- 1 | * { 2 | // all: unset; 3 | font-family: "Fairfax Hax HD"; 4 | font-family: "Monocraft"; 5 | font-size: 14px; 6 | color: #ffffff; 7 | } 8 | 9 | button { 10 | background: rgba(0, 0, 0, 0.0); 11 | padding: 0px 10px; 12 | 13 | &.active { 14 | background: red; 15 | } 16 | } 17 | 18 | @mixin bar() { 19 | background-color: #000000; 20 | border-radius: 8px; 21 | border: 1px solid #ffffff; 22 | } 23 | 24 | @mixin top() { 25 | border-radius: 0 0 8px 8px; 26 | border-top: 0; 27 | } 28 | 29 | @mixin bottom() { 30 | border-radius: 8px 8px 0 0; 31 | border-bottom: 0; 32 | } 33 | 34 | .top { 35 | @include bar; 36 | @include top; 37 | 38 | button.ws { 39 | @include top; 40 | 41 | border: 1px solid rgba(0, 0, 0, 0.0); 42 | border-top: 0; 43 | padding: 0px; 44 | 45 | &.current { 46 | background: purple; 47 | border: 1px solid #ffffff; 48 | border-top: 0; 49 | } 50 | } 51 | } 52 | 53 | .bottom { 54 | @include bar; 55 | @include bottom; 56 | 57 | .abnormal { 58 | background-color: red; 59 | } 60 | } 61 | 62 | label.active { 63 | background-color: green; 64 | } 65 | 66 | .raws { 67 | @include bar; 68 | } 69 | -------------------------------------------------------------------------------- /src/.taskrc: -------------------------------------------------------------------------------- 1 | # PATHS 2 | 3 | data.location=~/.task 4 | 5 | 6 | # SERVER 7 | 8 | taskd.certificate=~/.task/private.certificate.pem 9 | taskd.key=~/.task/private.key.pem 10 | taskd.ca=~/.task/ca.cert.pem 11 | taskd.server=taskwarrior.inthe.am:53589 12 | taskd.credentials=inthe_am/rosshadden/1068ab37-e9e8-4718-b64c-fd1ce54ab0f5 13 | 14 | taskd.trust=ignore hostname 15 | 16 | 17 | # THEME 18 | 19 | # include /usr/share/doc/task/rc/light-16.theme 20 | # include /usr/share/doc/task/rc/light-256.theme 21 | # include /usr/share/doc/task/rc/dark-16.theme 22 | include /usr/share/doc/task/rc/dark-256.theme 23 | # include /usr/share/doc/task/rc/dark-red-256.theme 24 | # include /usr/share/doc/task/rc/dark-green-256.theme 25 | # include /usr/share/doc/task/rc/dark-blue-256.theme 26 | # include /usr/share/doc/task/rc/dark-violets-256.theme 27 | # include /usr/share/doc/task/rc/dark-yellow-green.theme 28 | # include /usr/share/doc/task/rc/dark-gray-256.theme 29 | # include /usr/share/doc/task/rc/dark-gray-blue-256.theme 30 | # include /usr/share/doc/task/rc/solarized-dark-256.theme 31 | # include /usr/share/doc/task/rc/solarized-light-256.theme 32 | # include /usr/share/doc/task/rc/no-color.theme 33 | -------------------------------------------------------------------------------- /src/config/cava/shaders/northern_lights.frag: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragCoord; 4 | out vec4 fragColor; 5 | 6 | // bar values. defaults to left channels first (low to high), then right (high to low). 7 | uniform float bars[512]; 8 | 9 | uniform int bars_count; // number of bars (left + right) (configurable) 10 | 11 | uniform vec3 u_resolution; // window resolution, not used here 12 | 13 | //colors, configurable in cava config file 14 | uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here 15 | uniform vec3 fg_color; // foreground color, not used here 16 | 17 | void main() 18 | { 19 | // find which bar to use based on where we are on the x axis 20 | int bar = int(bars_count * fragCoord.x); 21 | 22 | float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0; 23 | float y = (bars[bar]) * bar_y; 24 | 25 | float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count; 26 | float bar_r = 1.0 - abs((bar_x - 0.5)) * 2; 27 | 28 | bar_r = bar_r * bar_r * 2; 29 | 30 | // set color 31 | fragColor.r = fg_color.x * y * bar_r; 32 | fragColor.g = fg_color.y * y * bar_r; 33 | fragColor.b = fg_color.z * y * bar_r; 34 | } 35 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/tabs.lua: -------------------------------------------------------------------------------- 1 | local tabs = Module.new("tabs", "t") 2 | 3 | -- 4 | -- MAPPINGS 5 | -- 6 | 7 | -- relatave navigation 8 | local next_tab = cmd [[execute (v:count == 0) ? "tabnext" : "tabnext " . (v:count1 + 2)]] 9 | local prev_tab = cmd [[execute (v:count == 0) ? "tabprevious" : "tabprevious " . v:count1]] 10 | tabs:map("h", prev_tab) 11 | tabs:map("l", next_tab) 12 | 13 | -- absolute navigation 14 | map("", cmd "tabfirst") 15 | map("", cmd "tablast") 16 | 17 | -- direct navigation 18 | for i = 1, 9, 1 do 19 | map("", i .. "gt") 20 | end 21 | 22 | -- alt-tab (pun) 23 | map("", "g") 24 | 25 | -- move [±n:1] tabs 26 | tabs:map("H", cmd [[execute "tabmove -" . v:count1]]) 27 | tabs:map("L", cmd [[execute "tabmove +" . v:count1]]) 28 | 29 | -- split ("zoom" current buffer) 30 | tabs:map("s", cmd "tab split") 31 | 32 | -- new 33 | tabs:map("n", cmd "tabedit") 34 | tabs:map("N", cmd "tabedit %") 35 | tabs:map("p", cmd "-tabedit") 36 | tabs:map("P", cmd "tabedit %") 37 | 38 | -- close 39 | tabs:map("c", cmd "tabclose") 40 | tabs:map("C", cmd "tabclose!") 41 | 42 | -- close others 43 | tabs:map("o", cmd "tabonly") 44 | tabs:map("O", cmd "tabonly!") 45 | -------------------------------------------------------------------------------- /src/config/kanata/kanata.kbd: -------------------------------------------------------------------------------- 1 | ;; settings 2 | 3 | (include ./settings.kbd) 4 | (include ./vars.kbd) 5 | (include ./source.kbd) 6 | 7 | ;; main 8 | 9 | (include ./layers/ermak.kbd) 10 | 11 | ;; modules 12 | 13 | (include ./layers/applications.kbd) 14 | (include ./layers/capture.kbd) 15 | (include ./layers/controller.kbd) 16 | (include ./layers/copypasta.kbd) 17 | (include ./layers/dvorak.kbd) 18 | (include ./layers/games.kbd) 19 | (include ./layers/macros.kbd) 20 | (include ./layers/media.kbd) 21 | (include ./layers/mouse.kbd) 22 | (include ./layers/notify.kbd) 23 | (include ./layers/numbers.kbd) 24 | (include ./layers/qwerty.kbd) 25 | (include ./layers/super.kbd) 26 | (include ./layers/system.kbd) 27 | (include ./layers/typing.kbd) 28 | 29 | ;; meta 30 | 31 | (include ./layers/layers.kbd) 32 | 33 | ;; TODO: 34 | ;; - make L and R super both hold layers 35 | ;; - dynamic macros 36 | ;; - mashing keys/mouse 37 | ;; -? wm 38 | ;; -? terminal 39 | ;; - symbols (greek, math, programming, eng) 40 | ;; - arrows / vim-ish 41 | ;; - generate help for current layer or something 42 | ;; - services (restart logid for example) 43 | ;; - starting/restarting/killing common processes (ex: killing zoom, restarting steam) 44 | ;; - pass 45 | ;; - fuzz (rofi/dmenu kind of stuff) 46 | -------------------------------------------------------------------------------- /src/.gntrc: -------------------------------------------------------------------------------- 1 | ################ 2 | # SETTINGS 3 | ################ 4 | 5 | [Finch] 6 | 7 | # mouse 8 | mouse = 1 9 | 10 | # window manager 11 | # wm = /usr/lib/gnt/s.so 12 | wm = /usr/lib/gnt/irssi.so 13 | 14 | # UI 15 | shadow = 0 16 | remember_position = 1 17 | small-button = true 18 | 19 | # colors 20 | color-available = green; black 21 | color-away = blue; black 22 | color-idle = gray; black 23 | color-offline = red; black 24 | color-message-sent = cyan; default 25 | color-message-received = red; default 26 | color-message-highlight = black; green 27 | color-message-action = yellow; default 28 | color-timestamp = blue; default 29 | 30 | ################ 31 | # MAPPINGS 32 | ################ 33 | 34 | [GntEntry::remap] 35 | 36 | [GntWM::binding] 37 | a-l = window-next 38 | a-h = window-prev 39 | a-N = shift-right 40 | a-P = shift-left 41 | a-c = window-close 42 | a-r = refresh-screen 43 | c-r = refresh-screen 44 | a-C = toggle-clipboard 45 | 46 | [GntWidget::binding] 47 | 48 | [Irssi::binding] 49 | a-l = move-right 50 | a-h = move-left 51 | a-j = move-down 52 | a-k = move-up 53 | 54 | [GntTree::binding] 55 | l = move-right 56 | h = move-left 57 | j = move-down 58 | k = move-up 59 | 60 | ################ 61 | # COLORS 62 | ################ 63 | 64 | [colors] 65 | white = 1000; 1000; 1000 66 | -------------------------------------------------------------------------------- /src/config/kanata/layers/typing.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | typ (layer-switch typing) 3 | ) 4 | 5 | (deflayer typing 6 | _ _ _ _ _ _ _ _ _ _ _ _ _ @xss _ @gam 7 | [ _ _ _ _ _ _ _ _ _ _ ] ` _ _ _ _ _ _ _ _ 8 | _ b y o u ' S-' l d w v z S-3 S-/ _ _ _ _ _ _ _ 9 | @xcp c i e a , . h t s n q _ _ _ _ 10 | @lsft g x j k - / r m f p @rsft _ _ _ _ _ 11 | _ @lyr _ _ @xsu _ @spr @xtp _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | -------------------------------------------------------------------------------- /src/config/kanata/layers/dvorak.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | dvk (layer-switch dvorak) 3 | ) 4 | 5 | (deflayer dvorak 6 | _ _ _ _ _ _ _ _ _ _ _ _ _ @xss _ @gam 7 | _ _ _ _ _ _ _ _ _ _ _ [ ] _ _ _ _ _ _ _ _ 8 | _ ' , . p y f g c r l / = _ _ _ _ _ _ _ _ 9 | @xcp a o e u i d h t n s - _ _ _ _ 10 | lsft ; q j k x b m w v z rsft _ _ _ _ _ 11 | _ @lyr _ _ @xsu _ @spr @xtp _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | -------------------------------------------------------------------------------- /src/config/kanata/layers/games.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | gam (layer-switch games) 3 | ) 4 | 5 | (deflayer games 6 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @erm 7 | _ _ _ _ _ _ _ _ _ _ _ - = _ _ _ _ _ _ _ _ 8 | _ ] q w e r t y u i o p [ _ _ _ _ _ _ _ _ 9 | _ ' a s d f g h j k l ; _ _ _ _ 10 | lsft / z x c v b n m , . rsft _ _ _ _ _ 11 | _ _ _ _ _ _ _ _ _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | -------------------------------------------------------------------------------- /src/config/kanata/layers/numbers.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | num (layer-switch numbers) 3 | ) 4 | 5 | (deflayer numbers 6 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 7 | _ _ _ _ _ _ _ nlck kp/ kp* = _ _ _ _ _ _ _ _ _ _ 8 | _ _ _ _ _ _ _ kp7 kp8 kp9 kp- _ _ _ _ _ _ _ _ _ _ 9 | @erm _ _ _ _ _ _ kp4 kp5 kp6 kp+ _ _ _ _ _ 10 | _ _ _ _ _ _ kp0 kp1 kp2 kp3 kprt _ _ _ _ _ _ 11 | _ _ _ _ kp0 kp. kp. kp. _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | -------------------------------------------------------------------------------- /src/config/kanata/layers/qwerty.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | qwr (layer-switch qwerty) 3 | ) 4 | 5 | (deflayer qwerty 6 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @erm 7 | _ _ _ _ _ _ _ _ _ _ _ - = _ _ _ _ _ _ _ _ 8 | _ q w e r t y u i o p [ ] _ _ _ _ _ _ _ _ 9 | _ a s d f g h j k l ; ' _ _ _ _ 10 | lsft z x c v b n m , . / rsft _ _ _ _ _ 11 | _ _ _ _ _ _ _ _ _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | -------------------------------------------------------------------------------- /bin/locker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function lock() { 4 | local args="" 5 | 6 | local blur=false 7 | local color 8 | local image 9 | local random=false 10 | local screen=false 11 | 12 | local server="$(loginctl show-session $(awk '/tty/ { print $1 }' <(loginctl)) -p Type | awk -F= '{ print $2 }')" 13 | 14 | local spec=":bc:i:rsSH" 15 | while getopts $spec opt; do 16 | case "$opt" in 17 | b) blur=true ;; 18 | c) color="$OPTARG" ;; 19 | i) image="$OPTARG" ;; 20 | r) random=true ;; 21 | s) 22 | image=/tmp/lockscreen.png 23 | escrotum $image 24 | ;; 25 | S) screen=true ;; 26 | H) echo "spec: $spec"; exit ;; 27 | :) error "Option '-$OPTARG' requires an argument" ;; 28 | *) error "Invalid option: -$OPTARG" ;; 29 | esac 30 | done 31 | shift $((OPTIND - 1)) 32 | 33 | if [[ $screen == true ]]; then 34 | xset dpms force off 35 | exit 0 36 | fi 37 | 38 | if [[ $blur == true ]]; then 39 | i3lock-wrapper 40 | exit 0 41 | fi 42 | 43 | if [[ $image ]]; then 44 | args="${args} -i $image" 45 | fi 46 | 47 | if [[ $random == true ]]; then 48 | color=$(openssl rand -hex 3) 49 | fi 50 | 51 | if [[ $color ]]; then 52 | args="${args} --color $color" 53 | fi 54 | 55 | if [[ $server == "wayland" ]]; then 56 | swaylock $args 57 | else 58 | i3lock $args 59 | fi 60 | } 61 | 62 | lock "$@" 63 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/files.lua: -------------------------------------------------------------------------------- 1 | local files = Module.new("files", "f") 2 | 3 | pack("mikavilpas/yazi.nvim", { "nvim-lua/plenary.nvim" }) 4 | 5 | local yazi = require "yazi" 6 | local mini_pick = require "mini.pick" 7 | 8 | -- 9 | -- SETTINGS 10 | -- 11 | 12 | vim.g.loaded_netrwPlugin = 1 13 | 14 | -- 15 | -- SETUP 16 | -- 17 | 18 | yazi.setup({ 19 | open_for_directories = true, 20 | keymaps = { 21 | show_help = "", 22 | open_file_in_vertical_split = "", 23 | open_file_in_horizontal_split = "", 24 | open_file_in_tab = "", 25 | }, 26 | }) 27 | 28 | -- 29 | -- MAPPINGS 30 | -- 31 | 32 | -- choose 33 | files:map("c", function() mini_pick.registry.files({ tool = "fd" }) end) 34 | files:map("C", function() 35 | mini_pick.registry.cli({ 36 | command = { "fd", "--hidden", "--type", "f" }, 37 | }) 38 | end) 39 | 40 | -- git 41 | files:map("g", mini_pick.registry.git_files) 42 | 43 | -- open explorer at file's cwd 44 | files:map("", yazi.yazi) 45 | -- open explorer at git root dir 46 | files:map("", call(yazi.yazi, nil, vim.fn.getcwd())) 47 | 48 | -- recents 49 | files:map("r", call(mini_pick.registry.oldfiles, { current_dir = true })) 50 | files:map("R", mini_pick.registry.oldfiles) 51 | 52 | -- search 53 | files:map("s", mini_pick.registry.grep_live) 54 | files:map("S", mini_pick.registry.grep) 55 | -------------------------------------------------------------------------------- /src/config/kanata/layers/macros.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | mcr (layer-switch macros) 3 | 4 | mi2 (fork (macro i 2 i) i (lctl rctl)) 5 | ) 6 | 7 | (deflayer macros 8 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 9 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 10 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 11 | _ _ _ _ _ @mi2 _ _ _ _ _ _ _ _ _ _ 12 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 13 | _ _ _ _ _ _ _ _ _ _ _ _ _ 14 | 15 | #| mute |# _ 16 | #| volu |# _ 17 | #| vold |# _ 18 | #| brup |# _ 19 | #| brdn |# _ 20 | #| blup |# _ 21 | #| bldn |# _ 22 | #| next |# _ 23 | #| pp |# _ 24 | #| prev |# _ 25 | #| plyr |# _ 26 | #| power |# _ 27 | #| sleep |# _ 28 | #| f13 |# _ 29 | #| f14 |# _ 30 | #| f15 |# _ 31 | #| f16 |# _ 32 | #| f17 |# _ 33 | #| f18 |# _ 34 | #| f19 |# _ 35 | #| f20 |# _ 36 | #| f21 |# _ 37 | #| f22 |# _ 38 | #| f23 |# _ 39 | #| f24 |# _ 40 | #| mlft |# _ 41 | #| mrgt |# _ 42 | #| mmid |# _ 43 | #| mfwd |# _ 44 | #| mbck |# _ 45 | ) 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | A collection of dotfiles and scripts that I use between computers. 4 | 5 | See the [TODO](TODO.md) for things I have in mind. 6 | See the [newer TODO](TODO.norg) for a newer list. 7 | 8 | ## My environment 9 | 10 | - [Artix Linux](https://artixlinux.org/) 11 | - [hyprland](https://hyprland.org/) 12 | - [neovim](https://neovim.io/) 13 | - [nushell](https://nushell.sh/) 14 | - [wezterm](https://wezfurlong.org/wezterm/) 15 | 16 | ## Dependencies 17 | 18 | - `nushell` 19 | - `hyprland` 20 | - `wlrctl` 21 | - `vipe` 22 | - `eww` 23 | - `playerctl` 24 | - `rofi-lbonn-wayland` 25 | - [`rofimoji`](https://github.com/fdw/rofimoji) 26 | - `uni` 27 | - `neovim` 28 | - [`tig`](https://github.com/jonas/tig) 29 | - [`fzf`](https://github.com/junegunn/fzf) 30 | - [`lf`](https://github.com/gokcehan/lf) 31 | - installed optional dependencies: 32 | - `atool` 33 | - `bat` 34 | - `highlight` 35 | - `libcaca` 36 | - `mediainfo` 37 | - `poppler` 38 | - `python-chardet` 39 | - `w3m` 40 | - fonts 41 | - `ttf-fairfax-hd` - main font 42 | 43 | ## Optional 44 | 45 | - `fd` 46 | - `rg` 47 | - `jq` 48 | - `jo` 49 | - `xh` 50 | 51 | ## Vim stuff 52 | 53 | - text objects 54 | - uris [ au, iu ] 55 | - pasted text [ gb ] 56 | - variable segment [ iv, av ] 57 | - entire buffer [ ie, ae ] 58 | - lines [ ir, ar ] 59 | - indents [ ii, ai ] 60 | -------------------------------------------------------------------------------- /src/config/nushell/plugins/raws.nu: -------------------------------------------------------------------------------- 1 | # Stuff about my various game personas. 2 | export def main [] {} 3 | 4 | # Query slippi.gg to get Melee data. 5 | export def slippi [] { 6 | const api = "https://gql-gateway-2-dot-slippi.uc.r.appspot.com/graphql" 7 | const payload = { 8 | operationName: "AccountManagementPageQuery", 9 | variables: { 10 | cc: "RAWS#790", 11 | uid: "RAWS#790", 12 | }, 13 | query: ` 14 | fragment profileFieldsV2 on NetplayProfileV2 { 15 | id 16 | ratingOrdinal 17 | ratingUpdateCount 18 | wins 19 | losses 20 | dailyGlobalPlacement 21 | dailyRegionalPlacement 22 | continent 23 | characters { 24 | id 25 | character 26 | gameCount 27 | } 28 | } 29 | 30 | fragment userProfilePage on User { 31 | displayName 32 | connectCode { 33 | code 34 | } 35 | status 36 | activeSubscription { 37 | level 38 | hasGiftSub 39 | } 40 | rankedNetplayProfile { 41 | ...profileFields 42 | } 43 | } 44 | 45 | query AccountManagementPageQuery($cc: String!, $uid: String!) { 46 | getUser(fbUid: $uid) { 47 | ...userProfilePage 48 | } 49 | getConnectCode(code: $cc) { 50 | user { 51 | ...userProfilePage 52 | } 53 | } 54 | } 55 | ` 56 | } 57 | 58 | # $payload | http post -t application/json $api | get data.getConnectCode.user 59 | $payload 60 | } 61 | -------------------------------------------------------------------------------- /src/.themes/Vi/gtk-2.0-key/gtkrc: -------------------------------------------------------------------------------- 1 | # vi-like mappings 2 | # (from http://vim.wikia.com/wiki/Vi_key_bindings_in_gtk) 3 | 4 | binding "gtk-vi-text-view" { 5 | bind "d" { "move-cursor" (display-lines, 5, 0) } 6 | bind "f" { "move-cursor" (display-lines, 5, 0) } 7 | bind "u" { "move-cursor" (display-lines, -5, 0) } 8 | bind "b" { "move-cursor" (display-lines, -5, 0) } 9 | bind "e" { "move-cursor" (display-lines, -1, 0) } 10 | bind "y" { "move-cursor" (display-lines, 1, 0) } 11 | } 12 | 13 | binding "gtk-vi-text-entry" { 14 | bind "h" { "delete-from-cursor" (chars, -1) } 15 | bind "u" { "delete-from-cursor" (paragraph-ends, -1) } 16 | bind "w" { "delete-from-cursor" (word-ends, -1) } 17 | } 18 | 19 | binding "gtk-vi-tree-view" { 20 | bind "j" { "move-cursor" (display-lines, 1) } 21 | bind "k" { "move-cursor" (display-lines, -1) } 22 | bind "l" { "move-cursor" (logical-positions, 1) } 23 | bind "h" { "move-cursor" (logical-positions, -1) } 24 | } 25 | 26 | binding "gtk-binding-menu" { 27 | bind "j" { "move-current" (next) } 28 | bind "k" { "move-current" (prev) } 29 | bind "h" { "move-current" (parent) } 30 | bind "l" { "move-current" (child) } 31 | } 32 | 33 | class "GtkEntry" binding "gtk-vi-text-entry" 34 | class "GtkMenuShell" binding "gtk-binding-menu" 35 | class "GtkTextView" binding "gtk-vi-text-view" 36 | class "GtkTreeView" binding "gtk-vi-tree-view" 37 | -------------------------------------------------------------------------------- /bin/tp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # @depends tmux 4 | # @depends tmuxp 5 | # @depends zoxide 6 | 7 | # TODO: [handle options](http://www.bahmanm.com/blogs/command-line-options-how-to-parse-in-bash-using-getopt) 8 | # TODO: make a "kill" or "clean" project, which kills tmux sessions 9 | # TODO: support "filling" current session, instead of making a new session 10 | 11 | name=${1:-$(basename "$PWD" | sed 's;\.;-;g')} 12 | 13 | # Rename session if already in a tmux session 14 | if [ -n "$TMUX" ]; then 15 | echo "Already in tmux, nerd." 16 | echo "Renaming session to: $name" 17 | tmux rename-session "$name" 18 | exit 19 | fi 20 | 21 | # Join existing session if it already exists 22 | if tmux list-sessions | grep "^${name}:"; then 23 | echo "Session already exists, nerd." 24 | echo "Attaching to: $name" 25 | tmux attach -t "$name" 26 | exit 27 | fi 28 | 29 | path=${2:-$(zoxide query "$name")} 30 | path=${path:-.} 31 | 32 | # start in target dir 33 | if [[ $1 ]]; then cd "$path" || exit; fi 34 | 35 | # create session 36 | # TODO: allow per-project window list overrides 37 | # TODO: allow per-project windows/panes/commands (basically arbitrary json config) 38 | tmuxp load -d ~/.config/tmuxp/project.json 39 | 40 | # configure session 41 | tmux rename-session -t project "$name" 42 | # tmux set -t $name set-remain-on-exit on 43 | 44 | # attach to session 45 | # TODO: make optional 46 | tmux -u attach-session -t "$name" 47 | -------------------------------------------------------------------------------- /src/config/kanata/layers/controller.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | cnt (layer-switch controller) 3 | ) 4 | 5 | (deflocalkeys-linux 6 | start 314 7 | select 315 8 | btn_z 315 9 | dup 544 10 | ddown 545 11 | dleft 546 12 | dright 547 13 | ) 14 | 15 | (deflayer controller 16 | @erm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 17 | select _ _ _ _ _ _ _ _ _ _ start _ _ _ _ _ _ _ _ _ 18 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 19 | @erm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 20 | _ _ dleft ddown dup dright _ _ _ _ _ _ _ _ _ _ _ 21 | _ _ _ _ _ _ _ _ _ _ _ _ _ 22 | 23 | #| mute |# _ 24 | #| volu |# _ 25 | #| vold |# _ 26 | #| brup |# _ 27 | #| brdn |# _ 28 | #| blup |# _ 29 | #| bldn |# _ 30 | #| next |# _ 31 | #| pp |# _ 32 | #| prev |# _ 33 | #| plyr |# _ 34 | #| power |# _ 35 | #| sleep |# _ 36 | #| f13 |# _ 37 | #| f14 |# _ 38 | #| f15 |# _ 39 | #| f16 |# _ 40 | #| f17 |# _ 41 | #| f18 |# _ 42 | #| f19 |# _ 43 | #| f20 |# _ 44 | #| f21 |# _ 45 | #| f22 |# _ 46 | #| f23 |# _ 47 | #| f24 |# _ 48 | #| mlft |# _ 49 | #| mrgt |# _ 50 | #| mmid |# _ 51 | #| mfwd |# _ 52 | #| mbck |# _ 53 | ) 54 | -------------------------------------------------------------------------------- /src/config/kanata/layers/capture.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | cpt (layer-switch capture) 3 | 4 | s (multi (cmd nu -c "~/bin/screenshot select") @erm) 5 | s (multi (cmd nu -c "~/bin/screenshot window") @erm) 6 | s (multi (cmd nu -c "~/bin/screenshot screen") @erm) 7 | s (multi (cmd nu -c "~/bin/screenshot full") @erm) 8 | ) 9 | 10 | (deflayer capture 11 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 12 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 13 | _ _ _ _ _ _ @s _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14 | @erm _ _ _ _ _ _ _ _ _ @s _ _ _ _ _ 15 | _ _ _ _ _ _ _ _ @s _ _ _ _ _ _ _ _ 16 | _ _ _ @s _ _ _ _ _ _ _ _ _ 17 | 18 | #| mute |# _ 19 | #| volu |# _ 20 | #| vold |# _ 21 | #| brup |# _ 22 | #| brdn |# _ 23 | #| blup |# _ 24 | #| bldn |# _ 25 | #| next |# _ 26 | #| pp |# _ 27 | #| prev |# _ 28 | #| plyr |# _ 29 | #| power |# _ 30 | #| sleep |# _ 31 | #| f13 |# _ 32 | #| f14 |# _ 33 | #| f15 |# _ 34 | #| f16 |# _ 35 | #| f17 |# _ 36 | #| f18 |# _ 37 | #| f19 |# _ 38 | #| f20 |# _ 39 | #| f21 |# _ 40 | #| f22 |# _ 41 | #| f23 |# _ 42 | #| f24 |# _ 43 | #| mlft |# _ 44 | #| mrgt |# _ 45 | #| mmid |# _ 46 | #| mfwd |# _ 47 | #| mbck |# _ 48 | ) 49 | -------------------------------------------------------------------------------- /src/config/hypr/rules.conf: -------------------------------------------------------------------------------- 1 | # workspaces 2 | 3 | workspace = 4, on-created-empty:$terminal --cwd ~/dotfiles 4 | workspace = 5, on-created-empty:obsidian 5 | workspace = 7, on-created-empty:gtk-launch ytmusic 6 | workspace = 9, on-created-empty:$terminal yazi 7 | workspace = 8, on-created-empty:zoom 8 | workspace = 12, on-created-empty:steam-native -console 9 | 10 | workspace = special:term, on-created-empty:[float] $terminal --class quake --cwd /tmp/ciea 11 | workspace = special:math, on-created-empty:[float] qalculate-qt 12 | workspace = special:pasta, on-created-empty:[float] ringboard-egui 13 | workspace = special:scratch, on-created-empty:[float] heynote 14 | 15 | windowrulev2 = workspace 8, class:Zoom 16 | windowrulev2 = workspace 10, class:Slack 17 | windowrulev2 = workspace name:games, title:^(ELDEN RING™)$ 18 | 19 | # generic 20 | 21 | windowrulev2 = float, title:^.*_float_.*$ 22 | windowrulev2 = float, class:^.*_float_.*$ 23 | 24 | # apps 25 | 26 | windowrulev2 = float, class:ringboard-egui 27 | windowrulev2 = float, class:Zoom title:^(zoom|menu window)$ 28 | windowrulev2 = tile, class:^(Godot)$ title:^(Godot)$ 29 | 30 | windowrulev2 = float, class:org.pulseaudio.pavucontrol title:^Volume Control$ 31 | windowrulev2 = pin, class:org.pulseaudio.pavucontrol title:^Volume Control$ 32 | 33 | ## quake 34 | windowrulev2 = float, class:^(quake)$ 35 | windowrulev2 = opacity 0.75 override 0.75 override, class:^(quake)$ 36 | windowrulev2 = animation slidefade, class:^(quake)$ 37 | # windowrulev2 = move 70 37, class:^(quake)$ 38 | windowrulev2 = size 1280 800, class:^(quake)$ 39 | -------------------------------------------------------------------------------- /bin/dmenu-uni: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # https://github.com/arp242/uni 4 | # 5 | # Usage: 6 | # 7 | # dmenu-uni all All codepoints, won't include ZWJ emoji sequences. 8 | # dmenu-uni emoji All emojis. 9 | # dmenu-uni emoji-common Common emojis 10 | # 11 | # NOTE: dmenu will *crash* when using a colour emoji font, this is a bug in Xft: 12 | # https://bugs.freedesktop.org/show_bug.cgi?id=107534 13 | 14 | # dmenu="dmenu -i" # Command to use 15 | #dmenu="dmenu -x -i -l 20 -fn monospace:size=20" # Adding some options 16 | dmenu="rofi -dmenu" # Use Rofi instead 17 | #dmenu="fzf" # Use fzf instead 18 | 19 | # Command to copy to clipboard: 20 | # copy="xclip -rmlastnl -selection clipboard" 21 | copy="wl-copy" 22 | 23 | # Common emojis I use >99% of the time: 24 | common="-or g:smileys g:hand-fingers-open g:hand-fingers-partial g:hand-single-finger g:hand-fingers-closed g:hands g:body-parts g:person-gesture" 25 | 26 | # Display onlt the male variants: 27 | #common="$common -gender male" 28 | 29 | # Set skin tone: 30 | #common="$common -tone mediumdark" 31 | 32 | case "${1:-all}" in 33 | all) uni -c p all | $dmenu | grep -o "^'.'" | tr -d "'" | $copy ;; 34 | emoji) uni -c e all | $dmenu | cut -d ' ' -f1 | $copy ;; 35 | emoji-common) uni -c e $common | $dmenu | cut -d ' ' -f1 | $copy ;; 36 | *) uni -c e $@ | $dmenu | cut -d ' ' -f1 | $copy ;; 37 | #*) echo >&2 "dmenu-uni: unknown '$1'" ;; 38 | esac 39 | -------------------------------------------------------------------------------- /src/config/hypr/settings.conf: -------------------------------------------------------------------------------- 1 | general { 2 | layout = hy3 3 | } 4 | 5 | input { 6 | follow_mouse = 2 7 | numlock_by_default = true 8 | } 9 | 10 | binds { 11 | allow_workspace_cycles = true 12 | scroll_event_delay = 0 13 | workspace_back_and_forth = true 14 | } 15 | 16 | decoration { 17 | # rounding = 4 18 | # rounding_power = 4 19 | } 20 | 21 | cursor { 22 | no_warps = true 23 | default_monitor = DP-1 24 | } 25 | 26 | debug { 27 | disable_logs = true 28 | # TEMP 29 | suppress_errors = true 30 | } 31 | 32 | misc { 33 | key_press_enables_dpms = true 34 | mouse_move_focuses_monitor = false 35 | new_window_takes_over_fullscreen = 2 36 | vrr = 1 37 | } 38 | 39 | # layouts 40 | 41 | dwindle { 42 | smart_split = true 43 | } 44 | 45 | # plugins 46 | 47 | plugin { 48 | hyprbars { 49 | bar_height = 16 50 | bar_color = rgb(815ba4) 51 | bar_text_size = 12 52 | 53 | # hyprbars-button = color, size, icon, command 54 | hyprbars-button = rgb(ff4040), 16, 󰖭, hyprctl dispatch killactive 55 | hyprbars-button = rgb(eeee11), 16, , hyprctl dispatch fullscreen 1 56 | hyprbars-button = rgb(004040), 16, ↗️, hyprctl dispatch fullscreenstate -1 2 57 | hyprbars-button = rgb(004040), 16, 🎈, hyprctl dispatch togglefloating 58 | hyprbars-button = rgb(004040), 16, 🪡, hyprctl dispatch pin 59 | hyprbars-button = rgb(eeee11), 16, ➡️, hyprctl dispatch hy3:makegroup h 60 | hyprbars-button = rgb(eeee11), 16, ⬇️, hyprctl dispatch hy3:makegroup v 61 | } 62 | 63 | hyprwinwrap { 64 | class = beeg 65 | } 66 | 67 | easymotion { 68 | motionkeys = cnisetahywodulxfjmkr 69 | textsize = 32 70 | textpadding = 8 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-font-name = Fairfax Hax HD 12 3 | gtk-theme-name = Catppuccin-Mocha-Standard-Lavender-Dark 4 | gtk-icon-theme-name = Catppuccin-Mocha-Standard-Lavender-Dark 5 | gtk-cursor-theme-name = Catppuccin-Mocha-Lavender-Cursors 6 | gtk-application-prefer-dark-theme = 1 7 | gtk-key-theme-name = Vi 8 | # gtk-key-theme-name = Emacs 9 | 10 | /* 11 | * Paraiso scheme 12 | * by Jan T. Sott 13 | * 14 | * GTK 3.0 template 15 | * by Jonn Mostovoy - https://github.com/manpages 16 | * 17 | * Generated 18 | * by base16-builder - https://github.com/base16-builder/base16-builder 19 | */ 20 | 21 | @define-color theme_base_color #2f1e2e; 22 | @define-color theme_fg_color #8d8687; 23 | @define-color theme_active_color #4f424c; 24 | @define-color theme_insensitive_color #8d8687; 25 | @define-color theme_insensitive_bg #2f1e2e; 26 | 27 | @define-color theme_cursor_color #06b6ef; 28 | 29 | /* fallback mode */ 30 | @define-color os_chrome_bg_color #2f1e2e; 31 | @define-color os_chrome_fg_color #8d8687; 32 | @define-color os_chrome_selected_bg_color #b9b6b0; 33 | @define-color os_chrome_selected_fg_color #4f424c; 34 | 35 | * { 36 | /* Pidgin */ 37 | -GtkIMHtml-hyperlink-color: #06b6ef; 38 | -GtkIMHtml-hyperlink-visited-color: #815ba4; 39 | -GtkIMHtml-hyperlink-prelight-color: #e7e9db; 40 | 41 | /* Evolution */ 42 | -GtkHTML-link-color: #06b6ef; 43 | -GtkHTML-vlink-color: #815ba4; 44 | -GtkHTML-cite-color: #48b685; 45 | 46 | -GtkWidget-link-color: #06b6ef; 47 | -GtkWidget-visited-link-color: #815ba4; 48 | } 49 | 50 | @import url("resource:///org/gnome/HighContrastInverse/a11y.css"); 51 | -------------------------------------------------------------------------------- /src/config/kanata/layers/layers.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | lyr (tap-hold-release $tap-timeout $hold-timeout @erm (layer-toggle layers)) 3 | 4 | lcc (fork @cnt @cpt (lalt ralt)) 5 | lmm (fork @med @mse (lalt ralt)) 6 | lnn (fork @num @nfy (lalt ralt)) 7 | 8 | baf (cmd nu -c "ls /run/user/1000/sway-ipc.* | sort-by modified | last | get name | $env.SWAYSOCK = $in; /usr/bin/swaymsg workspace back_and_forth") 9 | ;; baf (cmd swaymsg workspace back_and_forth) 10 | 11 | tst (cmd nu -l -c "notify-send debug ($env.WAYLAND_DISPLAY)") 12 | ) 13 | 14 | (deflayer layers 15 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 16 | _ _ _ _ _ _ _ _ _ _ _ _ _ lrld _ _ _ _ _ _ _ 17 | _ _ @cpp _ _ _ _ _ @dvk _ _ _ _ @tst _ _ _ _ _ _ _ 18 | caps @lcc @mcr @erm @app _ _ @baf @typ @sys @lnn @qwr _ _ _ _ 19 | _ @gam _ _ _ _ _ _ @lmm _ _ _ _ _ _ _ _ 20 | _ _ _ _ _ _ _ _ _ _ _ _ _ 21 | 22 | #| mute |# _ 23 | #| volu |# _ 24 | #| vold |# _ 25 | #| brup |# _ 26 | #| brdn |# _ 27 | #| blup |# _ 28 | #| bldn |# _ 29 | #| next |# _ 30 | #| pp |# _ 31 | #| prev |# _ 32 | #| plyr |# _ 33 | #| power |# _ 34 | #| sleep |# _ 35 | #| f13 |# _ 36 | #| f14 |# _ 37 | #| f15 |# _ 38 | #| f16 |# _ 39 | #| f17 |# _ 40 | #| f18 |# _ 41 | #| f19 |# _ 42 | #| f20 |# _ 43 | #| f21 |# _ 44 | #| f22 |# _ 45 | #| f23 |# _ 46 | #| f24 |# _ 47 | #| mlft |# _ 48 | #| mrgt |# _ 49 | #| mmid |# _ 50 | #| mfwd |# _ 51 | #| mbck |# _ 52 | ) 53 | -------------------------------------------------------------------------------- /src/.ncmpcpp/config: -------------------------------------------------------------------------------- 1 | mpd_music_dir = ~/Music 2 | 3 | visualizer_fifo_path = /tmp/mpd.fifo 4 | visualizer_output_name = Visualizer feed 5 | visualizer_in_stereo = yes 6 | visualizer_type = spectrum 7 | 8 | song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9} 9 | song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} 10 | song_library_format = {%n - }{%t}|{%f} 11 | 12 | alternative_header_first_line_format = $b$1$aqqu$/a$3 {%t}|{%f} $1$atqq$/a$9$/b 13 | 14 | now_playing_suffix = $/b 15 | 16 | song_columns_list_format = (20)[red]{a} (6f)[green]{NE} (50)[blue]{t|f:Title} (20)[yellow]{b} (7f)[magenta]{l} 17 | 18 | browser_display_mode = columns 19 | search_engine_display_mode = columns 20 | playlist_editor_display_mode = columns 21 | incremental_seeking = yes 22 | autocenter_mode = yes 23 | centered_cursor = yes 24 | 25 | # progressbar_look = "◾◾◽" 26 | # progressbar_boldness = yes 27 | 28 | user_interface = alternative 29 | 30 | header_visibility = yes 31 | statusbar_visibility = yes 32 | titles_visibility = yes 33 | header_text_scrolling = yes 34 | 35 | startup_screen = playlist 36 | 37 | display_volume_level = yes 38 | display_bitrate = yes 39 | 40 | mouse_support = yes 41 | mouse_list_scroll_whole_page = no 42 | 43 | search_engine_default_search_mode = 1 44 | external_editor = nvim 45 | use_console_editor = yes 46 | 47 | colors_enabled = yes 48 | header_window_color = white 49 | volume_color = green 50 | state_line_color = red 51 | main_window_color = magenta 52 | color1 = green 53 | color2 = red 54 | # main_window_highlight_color = green 55 | progressbar_color = black 56 | progressbar_elapsed_color = green 57 | statusbar_color = green 58 | alternative_ui_separator_color = black 59 | # active_column_color = red 60 | window_border_color = magenta 61 | active_window_border = green 62 | -------------------------------------------------------------------------------- /src/config/yabai/yabairc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release) 4 | sudo yabai --load-sa 5 | yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" 6 | 7 | # global settings 8 | yabai -m config mouse_follows_focus off 9 | yabai -m config focus_follows_mouse off 10 | yabai -m config window_origin_display default 11 | yabai -m config window_placement second_child 12 | yabai -m config window_topmost off 13 | yabai -m config window_shadow on 14 | yabai -m config window_opacity off 15 | yabai -m config window_opacity_duration 0.0 16 | yabai -m config active_window_opacity 1.0 17 | yabai -m config normal_window_opacity 0.90 18 | yabai -m config window_border off 19 | yabai -m config window_border_width 6 20 | yabai -m config active_window_border_color 0xff775759 21 | yabai -m config normal_window_border_color 0xff555555 22 | yabai -m config insert_feedback_color 0xffd75f5f 23 | yabai -m config split_ratio 0.50 24 | yabai -m config auto_balance off 25 | yabai -m config mouse_modifier fn 26 | yabai -m config mouse_action1 move 27 | yabai -m config mouse_action2 resize 28 | yabai -m config mouse_drop_action swap 29 | 30 | # general space settings 31 | yabai -m config layout bsp 32 | yabai -m config top_padding 00 33 | yabai -m config bottom_padding 00 34 | yabai -m config left_padding 00 35 | yabai -m config right_padding 00 36 | yabai -m config window_gap 02 37 | 38 | echo "yabai configuration loaded.." 39 | -------------------------------------------------------------------------------- /src/config/kanata/layers/media.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | med (one-shot $one-shot-linger (layer-toggle media)) 3 | 4 | mut (cmd nu -c "~/bin/cfg volume !") 5 | mic (cmd nu -c "~/bin/cfg mic !") 6 | v+ (cmd nu -c "~/bin/cfg volume +5") 7 | v- (cmd nu -c "~/bin/cfg volume -5") 8 | p▶️ (cmd playerctl --player=%any,chromium play-pause) 9 | p (cmd playerctl --player=%any,chromium play-pause) 10 | p (cmd playerctl --player=%any,chromium next) 11 | p (cmd playerctl --player=%any,chromium previous) 12 | p (cmd playerctl --player=%any,chromium position 0) 13 | 14 | mtw (cmd nu -c "~/bin/mute-window") 15 | ) 16 | 17 | (deflayer media 18 | @erm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 19 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 20 | _ _ _ _ _ _ _ _ _ _ @p _ _ _ _ _ _ _ _ _ _ 21 | @erm _ _ _ _ @mic _ @p _ _ @p _ _ _ _ _ 22 | _ _ _ @v- @v+ _ @p @mut @mtw _ _ _ _ _ _ _ _ 23 | _ _ _ @p▶️ _ _ _ _ _ _ _ _ _ 24 | 25 | #| mute |# _ 26 | #| volu |# _ 27 | #| vold |# _ 28 | #| brup |# _ 29 | #| brdn |# _ 30 | #| blup |# _ 31 | #| bldn |# _ 32 | #| next |# _ 33 | #| pp |# _ 34 | #| prev |# _ 35 | #| plyr |# _ 36 | #| power |# _ 37 | #| sleep |# _ 38 | #| f13 |# _ 39 | #| f14 |# _ 40 | #| f15 |# _ 41 | #| f16 |# _ 42 | #| f17 |# _ 43 | #| f18 |# _ 44 | #| f19 |# _ 45 | #| f20 |# _ 46 | #| f21 |# _ 47 | #| f22 |# _ 48 | #| f23 |# _ 49 | #| f24 |# _ 50 | #| mlft |# _ 51 | #| mrgt |# _ 52 | #| mmid |# _ 53 | #| mfwd |# _ 54 | #| mbck |# _ 55 | ) 56 | -------------------------------------------------------------------------------- /src/.themes/Vi/gtk-3.0/gtk-keys.css: -------------------------------------------------------------------------------- 1 | /* 2 | * vi-like mappings 3 | * (from http://vim.wikia.com/wiki/Vi_key_bindings_in_gtk) 4 | */ 5 | 6 | @binding-set gtk-vi-text-entry { 7 | bind "u" { "delete-from-cursor" (paragraph-ends, -1) }; 8 | bind "h" { "delete-from-cursor" (chars, -1) }; 9 | bind "w" { "delete-from-cursor" (word-ends, -1) }; /* delete word */ 10 | } 11 | 12 | @binding-set gtk-vi-text-view { 13 | bind "d" { "move-cursor" (display-lines, 5, 0); } /* 5 lines down */ 14 | bind "f" { "move-cursor" (display-lines, 5, 0); } /* 5 lines down */ 15 | bind "u" { "move-cursor" (display-lines, -5, 0); } /* 5 lines up */ 16 | bind "b" { "move-cursor" (display-lines, -5, 0); } /* 5 lines up */ 17 | bind "e" { "move-cursor" (display-lines, -1, 0); } /* down */ 18 | bind "y" { "move-cursor" (display-lines, 1, 0); } /* up */ 19 | bind "j" { "move-cursor" (display-lines, 1, 0); } /* down */ 20 | bind "k" { "move-cursor" (display-lines, -1, 0); } /* up */ 21 | bind "l" { "move-cursor" (logical-positions, 1, 0); } /* right */ 22 | bind "h" { "move-cursor" (logical-positions, -1, 0); } /* left */ 23 | } 24 | 25 | @binding-set gtk-vi-tree-view { 26 | bind "j" { "move-cursor" (display-lines, 1); } /* selection down */ 27 | bind "k" { "move-cursor" (display-lines, -1); } /* selection up */ 28 | bind "l" { "move-cursor" (logical-positions, 1); } /* selection right */ 29 | bind "h" { "move-cursor" (logical-positions, -1); } /* selection left */ 30 | } 31 | 32 | GtkEntry { 33 | gtk-key-bindings: gtk-vi-text-entry; 34 | } 35 | 36 | GtkTextView { 37 | gtk-key-bindings: gtk-vi-text-entry, gtk-vi-text-view; 38 | } 39 | 40 | GtkTreeView { 41 | gtk-key-bindings: gtk-vi-tree-view; 42 | } 43 | -------------------------------------------------------------------------------- /src/config/cava/shaders/spectrogram.frag: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragCoord; 4 | out vec4 fragColor; 5 | 6 | // bar values. defaults to left channels first (low to high), then right (high 7 | // to low). 8 | uniform float bars[512]; 9 | 10 | uniform int bars_count; // number of bars (left + right) (configurable) 11 | uniform int bar_width; // bar width (configurable), not used here 12 | uniform int bar_spacing; // space bewteen bars (configurable) 13 | 14 | uniform vec3 u_resolution; // window resolution 15 | 16 | // colors, configurable in cava config file (r,g,b) (0.0 - 1.0) 17 | uniform vec3 bg_color; // background color 18 | uniform vec3 fg_color; // foreground color 19 | 20 | uniform int gradient_count; 21 | uniform vec3 gradient_colors[8]; // gradient colors 22 | 23 | uniform sampler2D inputTexture; // Texture from the first render pass 24 | 25 | vec3 normalize_C(float y, vec3 col_1, vec3 col_2, float y_min, float y_max) { 26 | // create color based on fraction of this color and next color 27 | float yr = (y - y_min) / (y_max - y_min); 28 | return col_1 * (1.0 - yr) + col_2 * yr; 29 | } 30 | 31 | void main() { 32 | // find which bar to use based on where we are on the y axis 33 | int bar = int(bars_count * fragCoord.y); 34 | float y = bars[bar]; 35 | float band_size = 1.0 / float(bars_count); 36 | float current_band_min = bar * band_size; 37 | float current_band_max = (bar + 1) * band_size; 38 | 39 | int hist_length = 512; 40 | float win_size = 1.0 / hist_length; 41 | 42 | if (fragCoord.x > 1.0 - win_size) { 43 | 44 | if (fragCoord.y > current_band_min && fragCoord.y < current_band_max) { 45 | 46 | fragColor = vec4(fg_color * y, 1.0); 47 | } 48 | } else { 49 | vec2 offsetCoord = fragCoord; 50 | offsetCoord.x += float(win_size); 51 | fragColor = texture(inputTexture, offsetCoord); 52 | } 53 | } -------------------------------------------------------------------------------- /src/config/nvim/spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | metadata 2 | workflow 3 | fallback 4 | transpile 5 | transpiles 6 | transpiling 7 | chainable 8 | composable 9 | plugin 10 | middleware 11 | JavaScript 12 | WebSocket 13 | Hadden 14 | stylesheets 15 | APIs 16 | ECMAScript 17 | ES6 18 | TODO 19 | walkthrough 20 | workflows 21 | WebSockets 22 | refactored 23 | hyperlink 24 | hyperlinks 25 | wildcard 26 | namespace 27 | toFixed 28 | refactor 29 | Mozilla 30 | Firefox 31 | filesystem 32 | plugins 33 | functionless 34 | JSON 35 | memetic 36 | hostname 37 | unascertained 38 | hardcoded 39 | vim 40 | prioritization 41 | online 42 | screenshots 43 | symlink 44 | config 45 | labyrinthic 46 | gameplay 47 | modding 48 | moddable 49 | IP 50 | naïve 51 | hardcoding 52 | offline 53 | smartphones 54 | webcam 55 | geocode 56 | plaintext 57 | Maineville 58 | tradeoff 59 | inline 60 | aoeu 61 | interoperations 62 | multiplayer 63 | plugins 64 | architecting 65 | laggy 66 | Architected 67 | make 68 | timestamp 69 | middlewares 70 | truthy 71 | mongo 72 | api 73 | subtask 74 | parsable 75 | backfill 76 | disjunction 77 | CRUELTY/! 78 | submodules 79 | Zipscene 80 | linter 81 | zipscene 82 | profiler 83 | aggregators 84 | proxied 85 | body/! 86 | emo 87 | admin 88 | admins 89 | performant 90 | loop/! 91 | 0/! 92 | loop 93 | Tenprint 94 | Ridgeology 95 | Defibrillation 96 | Videography 97 | Whitebox 98 | whitelist 99 | middleware 100 | #oreach/! 101 | foreach/! 102 | screenshot 103 | refactors 104 | reimplement 105 | scriptable 106 | codebase 107 | homoiconic 108 | homoiconicity 109 | multiline 110 | ascii/! 111 | const 112 | stick/! 113 | end/! 114 | rp2040 115 | KC_S/! 116 | struct 117 | auth_results 118 | get_settings 119 | SendConfigCheck/! 120 | unconfigured 121 | repurposed 122 | components 123 | Elasticsearch 124 | -------------------------------------------------------------------------------- /src/config/kanata/layers/mouse.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | mse (layer-switch mouse) 3 | 4 | clk (fork 5 | (fork mlft mmid (lsft rsft)) 6 | mrgt 7 | (lalt ralt) 8 | ) 9 | 10 | ms↑ (fork (movemouse-up 1 1) (movemouse-up 2 1) (lsft rsft)) 11 | ms↓ (fork (movemouse-down 1 1) (movemouse-down 2 1) (lsft rsft)) 12 | ms← (fork (movemouse-left 1 1) (movemouse-left 2 1) (lsft rsft)) 13 | ms→ (fork (movemouse-right 1 1) (movemouse-right 2 1) (lsft rsft)) 14 | 15 | mw↑ (mwheel-up 50 120) 16 | mw↓ (mwheel-down 50 120) 17 | mw← (mwheel-left 50 120) 18 | mw→ (mwheel-right 50 120) 19 | 20 | wpg (cmd warpd --grid) 21 | wph (cmd warpd --hint) 22 | wpn (cmd warpd --normal) 23 | ) 24 | 25 | (deflayer mouse 26 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 27 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 28 | _ _ _ _ _ _ @mw→ _ _ _ @ms→ _ _ _ _ _ _ _ _ _ _ 29 | @erm _ _ _ @mw↑ _ @mw↓ @ms← _ _ _ _ _ _ _ _ 30 | _ _ _ @ms↓ @ms↑ _ @mw← _ @wph _ _ _ _ _ _ _ _ 31 | _ _ _ @clk _ _ _ _ _ _ _ _ _ 32 | 33 | #| mute |# _ 34 | #| volu |# _ 35 | #| vold |# _ 36 | #| brup |# _ 37 | #| brdn |# _ 38 | #| blup |# _ 39 | #| bldn |# _ 40 | #| next |# _ 41 | #| pp |# _ 42 | #| prev |# _ 43 | #| plyr |# _ 44 | #| power |# _ 45 | #| sleep |# _ 46 | #| f13 |# _ 47 | #| f14 |# _ 48 | #| f15 |# _ 49 | #| f16 |# _ 50 | #| f17 |# _ 51 | #| f18 |# _ 52 | #| f19 |# _ 53 | #| f20 |# _ 54 | #| f21 |# _ 55 | #| f22 |# _ 56 | #| f23 |# _ 57 | #| f24 |# _ 58 | #| mlft |# _ 59 | #| mrgt |# _ 60 | #| mmid |# _ 61 | #| mfwd |# _ 62 | #| mbck |# _ 63 | ) 64 | -------------------------------------------------------------------------------- /src/config/yazi/keymap.nuon: -------------------------------------------------------------------------------- 1 | # open keymap.nuon | to toml | save -f keymap.toml 2 | 3 | { 4 | mgr: { 5 | prepend_keymap: [ 6 | [ on run desc ]; 7 | 8 | # select 9 | [ t toggle "Toggle the current selection state" ] 10 | [ T [ toggle "arrow next" ] "Toggle the current selection state" ] 11 | 12 | # create 13 | [ o "create" "Create a file (ends with / for directories)" ] 14 | 15 | # copy 16 | [ [y d] "copy dirname" "Copy the directory path" ] 17 | [ [y f] "copy filename" "Copy the filename" ] 18 | [ [y n] "copy name_without_ext" "Copy the filename without extension" ] 19 | [ [y p] "copy path" "Copy the file path" ] 20 | [ [y y] "yank" "Yank selected files (copy)" ] 21 | 22 | # delete 23 | [ [d D] "remove --permanently" "Permanently delete selected files" ] 24 | [ [d d] "yank --cut" "Yank selected files (cut)" ] 25 | [ [d t] "remove" "Trash selected files" ] 26 | 27 | # rename 28 | [ A "rename --cursor=after_ext" "Rename selected file(s)" ] 29 | [ C "rename --empty=dot_ext" "Rename selected file(s)" ] 30 | [ I "rename --cursor=start" "Rename selected file(s)" ] 31 | [ [c c] "rename --empty=all" "Rename selected file(s)" ] 32 | [ [c e] "rename --empty=ext" "Rename selected file(s)" ] 33 | [ [c w] "rename --empty=stem --cursor=start" "Rename selected file(s)" ] 34 | [ a "rename --cursor=before_ext" "Rename selected file(s)" ] 35 | [ i "rename --cursor=start" "Rename selected file(s)" ] 36 | 37 | # tabs 38 | [ "" "tab_create --current" "Create a new tab with CWD" ] 39 | [ "" "close" "Close the current tab, or quit if it's last" ] 40 | [ "" "tab_switch -1 --relative" "Switch to previous tab" ] 41 | [ "" "tab_switch 1 --relative" "Switch to next tab" ] 42 | 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/config/nushell/modules/theme.nu: -------------------------------------------------------------------------------- 1 | export def main [] { 2 | { 3 | # color for nushell primitives 4 | separator: white 5 | leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off 6 | header: green_bold 7 | empty: blue 8 | # Closures can be used to choose colors for specific values. 9 | # The value (in this case, a bool) is piped into the closure. 10 | # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } } 11 | bool: light_cyan 12 | int: white 13 | filesize: cyan 14 | duration: white 15 | date: purple 16 | range: white 17 | float: white 18 | string: {|x| if $x =~ "^#[a-fA-F\\d]+" { $x } else { "white" } } 19 | nothing: white 20 | binary: white 21 | cellpath: white 22 | row_index: green_bold 23 | record: white 24 | list: white 25 | block: white 26 | hints: dark_gray 27 | search_result: {bg: red fg: white} 28 | shape_and: purple_bold 29 | shape_binary: purple_bold 30 | shape_block: blue_bold 31 | shape_bool: light_cyan 32 | shape_closure: green_bold 33 | shape_custom: green 34 | shape_datetime: cyan_bold 35 | shape_directory: cyan 36 | shape_external: cyan 37 | shape_externalarg: green_bold 38 | shape_filepath: cyan 39 | shape_flag: blue_bold 40 | shape_float: purple_bold 41 | # shapes are used to change the cli syntax highlighting 42 | shape_garbage: { fg: white bg: red attr: b} 43 | shape_globpattern: cyan_bold 44 | shape_int: purple_bold 45 | shape_internalcall: cyan_bold 46 | shape_list: cyan_bold 47 | shape_literal: blue 48 | shape_match_pattern: green 49 | shape_matching_brackets: { attr: u } 50 | shape_nothing: light_cyan 51 | shape_operator: yellow 52 | shape_or: purple_bold 53 | shape_pipe: purple_bold 54 | shape_range: yellow_bold 55 | shape_record: cyan_bold 56 | shape_redirection: purple_bold 57 | shape_signature: green_bold 58 | shape_string: green 59 | shape_string_interpolation: cyan_bold 60 | shape_table: blue_bold 61 | shape_variable: purple 62 | shape_vardecl: purple 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/panes.lua: -------------------------------------------------------------------------------- 1 | local panes = Module.new("panes", "p") 2 | 3 | local mini_pick = require "mini.pick" 4 | 5 | -- 6 | -- SETTINGS 7 | -- 8 | 9 | -- vim.o.switchbuf = "usetab" 10 | 11 | -- 12 | -- MAPPINGS 13 | -- 14 | 15 | -- choose 16 | panes:map("", mini_pick.registry.buffers) 17 | 18 | -- relative nav 19 | map("", function() pcall(vim.cmd, "wincmd j") end, { "n", "v", "o", "t" }) 20 | map("", function() pcall(vim.cmd, "wincmd k") end, { "n", "v", "o", "t" }) 21 | map("", function() pcall(vim.cmd, "wincmd h") end, { "n", "v", "o", "t" }) 22 | map("", function() pcall(vim.cmd, "wincmd l") end, { "n", "v", "o", "t" }) 23 | map("", cmd "bnext") 24 | map("", cmd "bprevious") 25 | 26 | -- stack nav 27 | panes:map("n", cmd "bnext") 28 | panes:map("p", cmd "bprevious") 29 | panes:map("N", cmd "blast") 30 | panes:map("P", cmd "bfirst") 31 | 32 | -- switch to alternate buffer 33 | panes:map("a", "") 34 | 35 | -- split [wasd] 36 | panes:map("j", cmd "rightbelow new") 37 | panes:map("k", cmd "leftabove new") 38 | panes:map("h", cmd "leftabove vnew") 39 | panes:map("l", cmd "rightbelow vnew") 40 | 41 | -- clone [wasd] 42 | panes:map("J", cmd "rightbelow split") 43 | panes:map("K", cmd "leftabove split") 44 | panes:map("H", cmd "leftabove vsplit") 45 | panes:map("L", cmd "rightbelow vsplit") 46 | 47 | -- close 48 | map("", cmd "bdelete") 49 | panes:map("c", cmd "bdelete") 50 | panes:map("C", cmd "bdelete!") 51 | panes:map("d", cmd "bdelete") 52 | panes:map("D", cmd "bdelete!") 53 | 54 | -- quit 55 | panes:map("q", cmd "quit") 56 | panes:map("Q", cmd "quit!") 57 | 58 | -- write 59 | map("", cmd "write") 60 | panes:map("w", cmd "write") 61 | panes:map("W", cmd "write!") 62 | 63 | -- save 64 | panes:map("S", cmd "update!") 65 | panes:map("s", cmd "update") 66 | 67 | -- exit 68 | panes:map("x", cmd "exit") 69 | panes:map("X", cmd "exit!") 70 | 71 | -- reload 72 | panes:map("r", cmd "edit") 73 | panes:map("R", cmd "edit!") 74 | 75 | -- source 76 | panes:map("u", cmd "source") 77 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/_functions.lua: -------------------------------------------------------------------------------- 1 | --- Map wrapper. 2 | --- FIX: these should be passing "" to map, not "n". map needs to check for nil or something 3 | --- @param seq string 4 | --- @param action string|function 5 | --- @param mode? string|string[] 6 | --- @param cfg? string|table 7 | function map(seq, action, mode, cfg) 8 | mode = mode or "n" 9 | cfg = cfg or {} 10 | 11 | if cfg.silent == nil then cfg.silent = true end 12 | 13 | vim.keymap.set(mode, seq, action, cfg) 14 | end 15 | 16 | --- Helper function to make nvim commands for mapping. 17 | --- @return string :name 18 | function cmd(name) 19 | return ":" .. name .. "" 20 | end 21 | 22 | --- Process and flatten plugin specs. 23 | local function process(v, result) 24 | if type(v) == "table" and not v.src and #v > 0 then 25 | for _, item in ipairs(v) do process(item, result) end 26 | else 27 | if type(v) == "string" and not v:match("^https?:") then 28 | v = "https://github.com/" .. v 29 | elseif type(v) == "table" and v.src and not v.src:match("^https?:") then 30 | v.src = "https://github.com/" .. v.src 31 | end 32 | table.insert(result, v) 33 | end 34 | end 35 | 36 | --- Add packages. 37 | function pack(...) 38 | local specs = {} 39 | for _, arg in ipairs({ ... }) do process(arg, specs) end 40 | return vim.pack.add(specs, { load = true, confirm = false }) 41 | end 42 | 43 | --- Wrap a function call with args, making mappings easier. 44 | function call(fn, ...) 45 | local args = { ... } 46 | return function() fn(unpack(args)) end 47 | end 48 | 49 | --- For replacing certain ... keymaps. 50 | --- @param keys string 51 | function feedkeys(keys) 52 | vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(keys, true, false, true), "n", true) 53 | end 54 | 55 | --- Is the completion menu open? 56 | function pumvisible() 57 | return tonumber(vim.fn.pumvisible()) ~= 0 58 | end 59 | 60 | --- Run command with shell. 61 | --- @param cmd string The command to run. 62 | --- @param shell string? Shell override. 63 | --- @return vim.SystemObj 64 | function run(cmd, shell) 65 | if shell == nil then shell = vim.o.shell end 66 | return vim.system({ shell, vim.o.shellcmdflag, cmd }) 67 | end 68 | 69 | -- TODO: make a helper for toggling settings 70 | -------------------------------------------------------------------------------- /bin/for-in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function error() { 4 | echo "$1" 1>&2 5 | exit 1 6 | } 7 | 8 | ## 9 | # Run a given command for each item in a given list. 10 | # If a list is piped to the function, uses this instead of the list of files in the current directory. 11 | # 12 | # Dependencies: 13 | # - [parallel](https://www.gnu.org/software/parallel/) 14 | # 15 | # @method for-in 16 | # @param {Command} cmd - The command to run 17 | # It uses the `parallel` spec. 18 | # @param {Array} [...list=*] - The list to use 19 | # May be globs or space-separated values. 20 | ## 21 | function for-in() { 22 | local headers=false 23 | local options 24 | local dry=false 25 | local condition 26 | 27 | local spec=":c:hj:nsS-:" 28 | while getopts $spec option; do 29 | local value="${OPTARG#*=}" 30 | 31 | case "$option" in 32 | -) 33 | option="${OPTARG%=*}" 34 | 35 | case "$OPTARG" in 36 | condition=*) condition="$value" ;; 37 | headers) headers=true ;; 38 | jobs=*) options="-j$value" ;; 39 | dry-run) dry=true ;; 40 | single-job) options="-j1" ;; 41 | spec) echo $spec; exit ;; 42 | *) error "Invalid option: --$value" ;; 43 | esac 44 | ;; 45 | c) condition="$value" ;; 46 | h) headers=true ;; 47 | j) options="-j$value" ;; 48 | n) dry=true ;; 49 | s) options="-j1" ;; 50 | :) error "Option '-$value' requires an argument" ;; 51 | *) error "Invalid option: -$value" ;; 52 | esac 53 | done 54 | shift $((OPTIND - 1)) 55 | 56 | local cmd="$1" 57 | shift 58 | local args=( "$@" ) 59 | local len="${#args[@]}" 60 | local list=( * ) 61 | 62 | if [ "$headers" = true ]; then 63 | local section='\\n################\\n# {1}\\n################' 64 | cmd="echo -e $section; $cmd" 65 | fi 66 | 67 | if [[ $len -gt 0 ]]; then 68 | list=( "${args[@]}" ) 69 | fi 70 | 71 | if [ "$dry" = true ]; then 72 | cmd="echo $cmd" 73 | fi 74 | 75 | if [ "$condition" ]; then 76 | cmd="$condition && ($cmd)" 77 | fi 78 | 79 | parallel $options "$cmd" ::: "${list[@]}" 80 | } 81 | 82 | hasPipe() { 83 | stdin="$(ls -l /proc/self/fd/0)" 84 | stdin="${stdin/*-> /}" 85 | if [[ "$stdin" =~ /dev/pts ]]; then return 1; fi 86 | } 87 | 88 | if hasPipe; then 89 | for-in "$@" $(cat) 90 | else 91 | for-in "$@" 92 | fi 93 | -------------------------------------------------------------------------------- /src/config/nushell/plugins/zoxide.nu: -------------------------------------------------------------------------------- 1 | # Code generated by zoxide. DO NOT EDIT. 2 | 3 | # ============================================================================= 4 | # 5 | # Hook configuration for zoxide. 6 | # 7 | 8 | # Initialize hook to add new entries to the database. 9 | export-env { 10 | $env.config = ( 11 | $env.config? 12 | | default {} 13 | | upsert hooks { default {} } 14 | | upsert hooks.env_change { default {} } 15 | | upsert hooks.env_change.PWD { default [] } 16 | ) 17 | let __zoxide_hooked = ( 18 | $env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } } 19 | ) 20 | if not $__zoxide_hooked { 21 | $env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append { 22 | __zoxide_hook: true, 23 | code: {|_, dir| zoxide add -- $dir} 24 | }) 25 | } 26 | } 27 | 28 | # ============================================================================= 29 | # 30 | # When using zoxide with --no-cmd, alias these internal functions as desired. 31 | # 32 | 33 | # Jump to a directory using only keywords. 34 | def --env --wrapped __zoxide_z [...rest: string] { 35 | let path = match $rest { 36 | [] => {'~'}, 37 | [ '-' ] => {'-'}, 38 | [ $arg ] if ($arg | path type) == 'dir' => {$arg} 39 | _ => { 40 | zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n" 41 | } 42 | } 43 | cd $path 44 | } 45 | 46 | # Jump to a directory using interactive search. 47 | def --env --wrapped __zoxide_zi [...rest:string] { 48 | cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")' 49 | } 50 | 51 | # ============================================================================= 52 | # 53 | # Commands for zoxide. Disable these using --no-cmd. 54 | # 55 | 56 | alias z = __zoxide_z 57 | alias zi = __zoxide_zi 58 | 59 | # ============================================================================= 60 | # 61 | # Add this to your env file (find it by running `$nu.env-path` in Nushell): 62 | # 63 | # zoxide init nushell | save -f ~/.zoxide.nu 64 | # 65 | # Now, add this to the end of your config file (find it by running 66 | # `$nu.config-path` in Nushell): 67 | # 68 | # source ~/.zoxide.nu 69 | # 70 | # Note: zoxide only supports Nushell v0.89.0+. 71 | -------------------------------------------------------------------------------- /src/.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | local hyper = { 2 | "cmd", 3 | "alt", 4 | "ctrl", 5 | } 6 | 7 | local log = hs.logger.new("foo", "debug") 8 | 9 | local home = function(cmd) return "/Users/ross/bin/" .. cmd end 10 | local brew = function(cmd) return "/opt/homebrew/bin/" .. cmd end 11 | 12 | local yabai = function(msg, text) 13 | local cmd = brew "yabai -m " .. msg 14 | if text then return cmd end 15 | hs.execute(cmd) 16 | end 17 | 18 | -- hs.ipc.cliInstall() 19 | -- hs.loadSpoon("EmmyLua") 20 | 21 | -- 22 | -- spaces 23 | -- 24 | 25 | hs.hotkey.bind(hyper, "p", function() 26 | hs.execute(yabai("space --focus prev", true) .. " || " .. yabai("space --focus last", true)) 27 | end) 28 | 29 | hs.hotkey.bind(hyper, "n", function() 30 | hs.execute(yabai("space --focus next", true) .. " || " .. yabai("space --focus first", true)) 31 | end) 32 | 33 | -- TODO: ??? 34 | hs.hotkey.bind(hyper, "tab", function() 35 | yabai("window --focus recent") 36 | end) 37 | 38 | -- TODO: ??? 39 | for i = 1, 10, 1 do 40 | hs.hotkey.bind(hyper, i, function() 41 | yabai("space --focus " .. i) 42 | end) 43 | end 44 | 45 | -- 46 | -- windows 47 | -- 48 | 49 | -- cardinal 50 | hs.hotkey.bind(hyper, "h", function() yabai("window --focus west") end) 51 | hs.hotkey.bind(hyper, "l", function() yabai("window --focus east") end) 52 | hs.hotkey.bind(hyper, "j", function() yabai("window --focus south") end) 53 | hs.hotkey.bind(hyper, "k", function() yabai("window --focus north") end) 54 | 55 | hs.hotkey.bind(hyper, "b", function() 56 | yabai("window --focus prev") 57 | end) 58 | 59 | hs.hotkey.bind(hyper, "f", function() 60 | yabai("window --focus next") 61 | end) 62 | 63 | -- 64 | -- apps 65 | -- 66 | 67 | hs.hotkey.bind(hyper, "return", function() 68 | -- hs.execute(home "wez") 69 | -- hs.execute(brew "wezterm cli spawn --new-window zsh") 70 | hs.execute(brew "wezterm start") 71 | end) 72 | 73 | -- 74 | -- meta 75 | -- 76 | 77 | hs.hotkey.bind(hyper, "r", function() 78 | hs.reload() 79 | end) 80 | local reloadConfig = function(files) 81 | local doReload = false 82 | for _,file in pairs(files) do 83 | if file:sub(-4) == ".lua" then 84 | doReload = true 85 | end 86 | end 87 | if doReload then 88 | hs.reload() 89 | end 90 | end 91 | 92 | local watcher = hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reloadConfig):start() 93 | 94 | hs.alert.show("config loaded") 95 | -------------------------------------------------------------------------------- /bin/purple: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys, operator 4 | from collections import OrderedDict 5 | import dbus 6 | 7 | 8 | """ 9 | @depends python-dbus 10 | """ 11 | 12 | 13 | bus = dbus.SessionBus() 14 | obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject") 15 | purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface") 16 | 17 | # get list of accounts 18 | accounts = purple.PurpleAccountsGetAllActive() 19 | 20 | users = [] 21 | userMap = OrderedDict() 22 | 23 | for accountId in accounts: 24 | connectionId = purple.PurpleAccountGetConnection(accountId) 25 | accountName = purple.PurpleAccountGetUsername(accountId) 26 | protocolName = purple.PurpleAccountGetProtocolName(accountId) 27 | connectionName = purple.PurpleConnectionGetDisplayName(connectionId) 28 | protocol = purple.PurpleConnectionGetDisplayName(connectionId) 29 | 30 | if not connectionId: continue 31 | 32 | # get list of users for an account 33 | userIds = purple.PurpleFindBuddies(accountId, "") 34 | 35 | for userId in userIds: 36 | user = { 37 | "id": userId, 38 | "name": purple.PurpleBuddyGetName(userId), 39 | "alias": purple.PurpleBuddyGetAlias(userId), 40 | "accountId": accountId, 41 | "account": accountName, 42 | "protocol": protocolName, 43 | "connectionName": connectionName 44 | } 45 | user["score"] = purple.PurpleLogGetActivityScore(1, user["name"], accountId) 46 | users.append(user) 47 | 48 | users = sorted(users, key = operator.itemgetter('score'), reverse = True) 49 | for user in users: 50 | userMap[user["alias"] + " \t\t\t[" + user["protocol"] + "] [" + user["account"] + "] [" + user["name"] + "]"] = user 51 | 52 | 53 | def getUser(userHash): return userMap[userHash] 54 | 55 | 56 | # Send a message to `user`, which is some entry in `users` 57 | def sendIm(userHash, message = ""): 58 | if isinstance(userHash, str): user = getUser(userHash) 59 | if message is None: message = "" 60 | 61 | # First we make a new conversation 62 | # (I think the `1` in the first arg is "IM", and a 2 would be "chat"...? 63 | conversationId = purple.PurpleConversationNew(1, user["accountId"], user["name"]) 64 | 65 | # Next we make a new IM out of the conversation (yep...) 66 | imId = purple.PurpleConvIm(conversationId) 67 | 68 | # Finally we send the IM 69 | purple.PurpleConvImSend(imId, message) 70 | 71 | 72 | if len(sys.argv) > 1: 73 | username = sys.argv[1] 74 | message = sys.argv[2] if len(sys.argv) > 2 else None 75 | 76 | sendIm(username, message) 77 | else: 78 | for userHash in userMap: 79 | print(userHash) 80 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/ui/misc.lua: -------------------------------------------------------------------------------- 1 | local folds = Module.new("folds", "z") 2 | local ui = Module.new("ui") 3 | 4 | -- 5 | -- SETTINGS 6 | -- 7 | 8 | -- folds 9 | vim.opt.foldenable = false 10 | 11 | -- concealment 12 | vim.opt.conceallevel = 2 13 | 14 | -- scroll offset 15 | vim.o.scrolloff = 8 16 | 17 | -- 18 | -- SETUP 19 | -- 20 | 21 | require("mini.cursorword").setup() 22 | require("mini.notify").setup() 23 | require("mini.statusline").setup() 24 | require("mini.tabline").setup() 25 | 26 | -- clues 27 | local mini_clue = require "mini.clue" 28 | mini_clue.setup({ 29 | triggers = { 30 | -- follow the leader 31 | { mode = "n", keys = "" }, 32 | { mode = "x", keys = "" }, 33 | 34 | -- `[` and `]` keys 35 | { mode = 'n', keys = '[' }, 36 | { mode = 'n', keys = ']' }, 37 | 38 | -- completions 39 | { mode = "i", keys = "" }, 40 | 41 | -- goto 42 | { mode = "n", keys = "g" }, 43 | { mode = "x", keys = "g" }, 44 | 45 | -- marks 46 | { mode = "n", keys = "'" }, 47 | { mode = "n", keys = "`" }, 48 | { mode = "x", keys = "'" }, 49 | { mode = "x", keys = "`" }, 50 | 51 | -- registers 52 | { mode = "n", keys = '"' }, 53 | { mode = "x", keys = '"' }, 54 | { mode = "i", keys = "" }, 55 | { mode = "c", keys = "" }, 56 | 57 | -- windows 58 | { mode = "n", keys = "" }, 59 | 60 | -- folds 61 | { mode = "n", keys = "z" }, 62 | { mode = "x", keys = "z" }, 63 | 64 | -- modes 65 | { mode = "n", keys = "" }, 66 | }, 67 | 68 | clues = { 69 | mini_clue.gen_clues.square_brackets(), 70 | mini_clue.gen_clues.builtin_completion(), 71 | mini_clue.gen_clues.g(), 72 | mini_clue.gen_clues.marks(), 73 | mini_clue.gen_clues.registers(), 74 | mini_clue.gen_clues.windows(), 75 | mini_clue.gen_clues.z(), 76 | 77 | -- modes 78 | { mode = "n", keys = "", desc = "+Modules" }, 79 | }, 80 | }) 81 | 82 | -- 83 | -- MAPPINGS 84 | -- 85 | 86 | -- folds 87 | 88 | -- toggle folds 89 | folds:map("", "za") 90 | 91 | -- create fold 92 | folds:map("c", "zf") 93 | 94 | -- fold levels 95 | folds:map("[", cmd "set foldlevel=0") 96 | folds:map("0", cmd "set foldlevel=128") 97 | for i = 1, 9, 1 do 98 | folds:map(i, cmd "set foldlevel=" .. i) 99 | end 100 | 101 | -- 102 | -- EVENTS 103 | -- 104 | 105 | -- automatically resize windows 106 | vim.api.nvim_create_autocmd("VimResized", { 107 | group = ui.group, 108 | callback = function() 109 | vim.cmd("wincmd =") 110 | end, 111 | }) 112 | -------------------------------------------------------------------------------- /src/config/kanata/source.kbd: -------------------------------------------------------------------------------- 1 | (defsrc 2 | esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck brk 3 | grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup nlck kp/ kp* kp- 4 | tab q w e r t y u i o p [ ] \ del end pgdn kp7 kp8 kp9 kp+ 5 | caps a s d f g h j k l ; ' ret kp4 kp5 kp6 6 | lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt 7 | lctl lmet lalt spc ralt rmet menu rctl left down rght kp0 kp. 8 | 9 | mute volu vold brup brdn blup bldn 10 | next pp prev plyr power sleep 11 | f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 f24 12 | mlft mrgt mmid mfwd mbck 13 | ) 14 | 15 | ;; (defsrc 16 | ;; esc 17 | ;; f1 18 | ;; f2 19 | ;; f3 20 | ;; f4 21 | ;; f5 22 | ;; f6 23 | ;; f7 24 | ;; f8 25 | ;; f9 26 | ;; f10 27 | ;; f11 28 | ;; f12 29 | ;; ssrq 30 | ;; slck 31 | ;; pause 32 | ;; grv 33 | ;; 1 34 | ;; 2 35 | ;; 3 36 | ;; 4 37 | ;; 5 38 | ;; 6 39 | ;; 7 40 | ;; 8 41 | ;; 9 42 | ;; 0 43 | ;; - 44 | ;; = 45 | ;; bspc 46 | ;; ins 47 | ;; home 48 | ;; pgup 49 | ;; nlck 50 | ;; kp/ 51 | ;; kp* 52 | ;; kp- 53 | ;; tab 54 | ;; q 55 | ;; w 56 | ;; e 57 | ;; r 58 | ;; t 59 | ;; y 60 | ;; u 61 | ;; i 62 | ;; o 63 | ;; p 64 | ;; [ 65 | ;; ] 66 | ;; \ 67 | ;; del 68 | ;; end 69 | ;; pgdn 70 | ;; kp7 71 | ;; kp8 72 | ;; kp9 73 | ;; kp+ 74 | ;; caps 75 | ;; a 76 | ;; s 77 | ;; d 78 | ;; f 79 | ;; g 80 | ;; h 81 | ;; j 82 | ;; k 83 | ;; l 84 | ;; ; 85 | ;; ' 86 | ;; enter 87 | ;; kp4 88 | ;; kp5 89 | ;; kp6 90 | ;; lsft 91 | ;; z 92 | ;; x 93 | ;; c 94 | ;; v 95 | ;; b 96 | ;; n 97 | ;; m 98 | ;; , 99 | ;; . 100 | ;; / 101 | ;; rsft 102 | ;; up 103 | ;; kp1 104 | ;; kp2 105 | ;; kp3 106 | ;; kprt 107 | ;; lctrl 108 | ;; lmeta 109 | ;; lalt 110 | ;; spc 111 | ;; ralt 112 | ;; rmeta 113 | ;; menu 114 | ;; rctrl 115 | ;; left 116 | ;; down 117 | ;; rght 118 | ;; kp0 119 | ;; kp. 120 | ;; mute 121 | ;; volu 122 | ;; vold 123 | ;; brup 124 | ;; brdn 125 | ;; blup 126 | ;; bldn 127 | ;; next 128 | ;; pp 129 | ;; prev 130 | ;; plyr 131 | ;; power 132 | ;; sleep 133 | ;; f13 134 | ;; f14 135 | ;; f15 136 | ;; f16 137 | ;; f17 138 | ;; f18 139 | ;; f19 140 | ;; f20 141 | ;; f21 142 | ;; f22 143 | ;; f23 144 | ;; f24 145 | ;; mlft 146 | ;; mrgt 147 | ;; mmid 148 | ;; mfwd 149 | ;; mbck 150 | ;; ) 151 | -------------------------------------------------------------------------------- /src/config/cava/shaders/bar_spectrum.frag: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragCoord; 4 | out vec4 fragColor; 5 | 6 | // bar values. defaults to left channels first (low to high), then right (high to low). 7 | uniform float bars[512]; 8 | 9 | uniform int bars_count; // number of bars (left + right) (configurable) 10 | uniform int bar_width; // bar width (configurable), not used here 11 | uniform int bar_spacing; // space bewteen bars (configurable) 12 | 13 | uniform vec3 u_resolution; // window resolution 14 | 15 | //colors, configurable in cava config file (r,g,b) (0.0 - 1.0) 16 | uniform vec3 bg_color; // background color 17 | uniform vec3 fg_color; // foreground color 18 | 19 | uniform int gradient_count; 20 | uniform vec3 gradient_colors[8]; // gradient colors 21 | 22 | vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max) 23 | { 24 | //create color based on fraction of this color and next color 25 | float yr = (y - y_min) / (y_max - y_min); 26 | return col_1 * (1.0 - yr) + col_2 * yr; 27 | } 28 | 29 | void main() 30 | { 31 | // find which bar to use based on where we are on the x axis 32 | float x = u_resolution.x * fragCoord.x; 33 | int bar = int(bars_count * fragCoord.x); 34 | 35 | //calculate a bar size 36 | float bar_size = u_resolution.x / bars_count; 37 | 38 | //the y coordinate and bar values are the same 39 | float y = bars[bar]; 40 | 41 | // make sure there is a thin line at bottom 42 | if (y * u_resolution.y < 1.0) 43 | { 44 | y = 1.0 / u_resolution.y; 45 | } 46 | 47 | //draw the bar up to current height 48 | if (y > fragCoord.y) 49 | { 50 | //make some space between bars basen on settings 51 | if (x > (bar + 1) * (bar_size) - bar_spacing) 52 | { 53 | fragColor = vec4(bg_color,1.0); 54 | } 55 | else 56 | { 57 | if (gradient_count == 0) 58 | { 59 | fragColor = vec4(fg_color,1.0); 60 | } 61 | else 62 | { 63 | //find which color in the configured gradient we are at 64 | int color = int((gradient_count - 1) * fragCoord.y); 65 | 66 | //find where on y this and next color is supposed to be 67 | float y_min = color / (gradient_count - 1.0); 68 | float y_max = (color + 1.0) / (gradient_count - 1.0); 69 | 70 | //make color 71 | fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0); 72 | } 73 | } 74 | } 75 | else 76 | { 77 | fragColor = vec4(bg_color,1.0); 78 | } 79 | } -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/ui/theme.lua: -------------------------------------------------------------------------------- 1 | local theme = Module.new("theme", "H") 2 | 3 | pack "scottmckendry/cyberdream.nvim" 4 | 5 | local mini_base16 = require "mini.base16" 6 | 7 | -- 8 | -- SETTINGS 9 | -- 10 | 11 | -- invisibles 12 | local space = "·" 13 | vim.opt.list = true 14 | vim.opt.listchars = { 15 | extends = ">", 16 | lead = space, 17 | multispace = space, 18 | nbsp = "_", 19 | precedes = "<", 20 | tab = "│─", 21 | trail = space, 22 | } 23 | 24 | -- status 25 | vim.opt.laststatus = 3 26 | vim.opt.winbar = "%=%m %f" 27 | 28 | -- dialogs 29 | vim.opt.winborder = "rounded" 30 | 31 | -- 32 | -- SETUP 33 | -- 34 | 35 | require("mini.icons").setup() 36 | require("mini.trailspace").setup() 37 | 38 | -- colors 39 | require("cyberdream").setup({ 40 | transparent = true, 41 | italic_comments = true, 42 | 43 | highlights = { 44 | Search = { link = "MiniHipatternsNote" }, 45 | IncSearch = { link = "MiniHipatternsTodo" }, 46 | CurSearch = { link = "IncSearch" }, 47 | CursorLine = { bg = "#1e2124" }, 48 | }, 49 | }) 50 | vim.cmd.colorscheme "cyberdream" 51 | 52 | -- highlights 53 | local mini_hipatterns = require "mini.hipatterns" 54 | local mini_hiwords = require("mini.extra").gen_highlighter.words 55 | mini_hipatterns.setup({ 56 | highlighters = { 57 | hex_color = mini_hipatterns.gen_highlighter.hex_color(), 58 | fix = mini_hiwords({ "FIX", "TEMP" }, "MiniHipatternsFixme"), 59 | hack = mini_hiwords({ "HACK" }, "MiniHipatternsHack"), 60 | note = mini_hiwords({ "NOTE" }, "MiniHipatternsNote"), 61 | todo = mini_hiwords({ "TODO" }, "MiniHipatternsTodo"), 62 | }, 63 | }) 64 | 65 | -- 66 | -- FUNCTIONS 67 | -- 68 | 69 | function theme:swap() 70 | if vim.g.colors_name == "cyberdream" then 71 | mini_base16.setup({ 72 | palette = mini_base16.mini_palette("#2b1a33", "#c9c5cb", 128), 73 | -- palette = { 74 | -- base00 = "#100323", 75 | -- base01 = "#271C3A", 76 | -- base02 = "#3E2D5C", 77 | -- base03 = "#5D5766", 78 | -- base04 = "#BEBCBF", 79 | -- base05 = "#DEDCDF", 80 | -- base06 = "#EDEAEF", 81 | -- base07 = "#BBAADD", 82 | -- base08 = "#A92258", 83 | -- base09 = "#918889", 84 | -- base0A = "#804ead", 85 | -- base0B = "#C6914B", 86 | -- base0C = "#7263AA", 87 | -- base0D = "#8E7DC6", 88 | -- base0E = "#953B9D", 89 | -- base0F = "#e96ba8", 90 | -- }, 91 | use_cterm = true, 92 | }) 93 | else 94 | vim.cmd.colorscheme "cyberdream" 95 | end 96 | end 97 | 98 | -- 99 | -- MAPPINGS 100 | -- 101 | 102 | theme:map("", function() 103 | theme:swap() 104 | end) 105 | 106 | -- 107 | -- EVENTS 108 | -- 109 | 110 | vim.api.nvim_create_autocmd("User", { 111 | group = theme.group, 112 | pattern = "SnacksDashboardOpened", 113 | callback = function(args) 114 | vim.b[args.buf].minitrailspace_disable = true 115 | end, 116 | }) 117 | -------------------------------------------------------------------------------- /src/config/kanata/layers/super.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | ;; spr (layer-switch super) 3 | spr (tap-hold-release $tap-timeout $hold-timeout menu (layer-toggle super)) 4 | ) 5 | 6 | (deflayer super 7 | #| esc |# _ 8 | #| f1 |# _ 9 | #| f2 |# _ 10 | #| f3 |# _ 11 | #| f4 |# _ 12 | #| f5 |# _ 13 | #| f6 |# _ 14 | #| f7 |# _ 15 | #| f8 |# _ 16 | #| f9 |# _ 17 | #| f10 |# _ 18 | #| f11 |# _ 19 | #| f12 |# _ 20 | #| ssrq |# _ 21 | #| slck |# _ 22 | #| pause |# _ 23 | #| grv |# _ 24 | #| 1 |# _ 25 | #| 2 |# _ 26 | #| 3 |# _ 27 | #| 4 |# _ 28 | #| 5 |# _ 29 | #| 6 |# _ 30 | #| 7 |# _ 31 | #| 8 |# _ 32 | #| 9 |# _ 33 | #| 0 |# _ 34 | #| [ |# _ 35 | #| ] |# _ 36 | #| bspc |# _ 37 | #| ins |# _ 38 | #| home |# _ 39 | #| pgup |# _ 40 | #| nlck |# _ 41 | #| kp/ |# _ 42 | #| kp* |# _ 43 | #| kp- |# _ 44 | #| tab |# _ 45 | #| ' |# _ 46 | #| , |# _ 47 | #| . |# _ 48 | #| p |# _ 49 | #| y |# _ 50 | #| f |# _ 51 | #| g |# _ 52 | #| c |# _ 53 | #| r |# _ 54 | #| l |# _ 55 | #| / |# _ 56 | #| = |# _ 57 | #| \ |# _ 58 | #| del |# _ 59 | #| end |# _ 60 | #| pgdn |# _ 61 | #| kp7 |# _ 62 | #| kp8 |# _ 63 | #| kp9 |# _ 64 | #| kp+ |# _ 65 | #| caps |# @erm 66 | #| a |# _ 67 | #| o |# (cmd nu -c "rofi -drun-show-actions -show drun -display-drun launch") 68 | #| e |# _ 69 | #| u |# _ 70 | #| i |# _ 71 | #| d |# _ 72 | #| h |# _ 73 | #| t |# _ 74 | #| n |# _ 75 | #| s |# _ 76 | #| - |# _ 77 | #| enter |# _ 78 | #| kp4 |# _ 79 | #| kp5 |# _ 80 | #| kp6 |# _ 81 | #| lsft |# _ 82 | #| ; |# _ 83 | #| q |# _ 84 | #| j |# _ 85 | #| k |# _ 86 | #| x |# _ 87 | #| b |# _ 88 | #| m |# _ 89 | #| w |# _ 90 | #| v |# _ 91 | #| z |# _ 92 | #| rsft |# _ 93 | #| up |# _ 94 | #| kp1 |# _ 95 | #| kp2 |# _ 96 | #| kp3 |# _ 97 | #| kprt |# _ 98 | #| lctrl |# _ 99 | #| lmeta |# _ 100 | #| lalt |# _ 101 | #| spc |# _ 102 | #| ralt |# _ 103 | #| rmeta |# _ 104 | #| menu |# _ 105 | #| rctrl |# _ 106 | #| left |# _ 107 | #| down |# _ 108 | #| rght |# _ 109 | #| kp0 |# _ 110 | #| kp. |# _ 111 | #| mute |# _ 112 | #| volu |# _ 113 | #| vold |# _ 114 | #| brup |# _ 115 | #| brdn |# _ 116 | #| blup |# _ 117 | #| bldn |# _ 118 | #| next |# _ 119 | #| pp |# _ 120 | #| prev |# _ 121 | #| plyr |# _ 122 | #| power |# _ 123 | #| sleep |# _ 124 | #| f13 |# _ 125 | #| f14 |# _ 126 | #| f15 |# _ 127 | #| f16 |# _ 128 | #| f17 |# _ 129 | #| f18 |# _ 130 | #| f19 |# _ 131 | #| f20 |# _ 132 | #| f21 |# _ 133 | #| f22 |# _ 134 | #| f23 |# _ 135 | #| f24 |# _ 136 | #| mlft |# _ 137 | #| mrgt |# _ 138 | #| mmid |# _ 139 | #| mfwd |# _ 140 | #| mbck |# _ 141 | ) 142 | -------------------------------------------------------------------------------- /bin/screenshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ################ 4 | # Take screenshots and copy path to clipboard. 5 | # Optionally move to public Dropbox folder and copy public URL. 6 | # 7 | # Dependencies: 8 | ################ 9 | 10 | function get-screen-geometry() { 11 | # Get the location of the mouse 12 | local XMOUSE=$(xdotool getmouselocation | awk -F "[: ]" '{print $2}') 13 | local YMOUSE=$(xdotool getmouselocation | awk -F "[: ]" '{print $4}') 14 | 15 | # TODO: get focused screen 16 | # local coords="$(xdotool getwindowgeometry $(xdotool getactivewindow) | grep Position | awk '{print $2}')" 17 | # local XMOUSE=$(echo $coords | awk -F "[,]" '{print $1}') 18 | # local YMOUSE=$(echo $coords | awk -F "[,]" '{print $2}') 19 | 20 | local MONITORS=$(xrandr | grep -o '[0-9]*x[0-9]*[+-][0-9]*[+-][0-9]*') 21 | for mon in ${MONITORS}; do 22 | # Parse the geometry of the monitor 23 | local MONW=$(echo ${mon} | awk -F "[x+]" '{print $1}') 24 | local MONH=$(echo ${mon} | awk -F "[x+]" '{print $2}') 25 | local MONX=$(echo ${mon} | awk -F "[x+]" '{print $3}') 26 | local MONY=$(echo ${mon} | awk -F "[x+]" '{print $4}') 27 | 28 | # Use a simple collision check 29 | if (( ${XMOUSE} >= ${MONX} )); then 30 | if (( ${XMOUSE} <= ${MONX}+${MONW} )); then 31 | if (( ${YMOUSE} >= ${MONY} )); then 32 | if (( ${YMOUSE} <= ${MONY}+${MONH} )); then 33 | # We have found our monitor! 34 | echo "${MONW}x${MONH}+${MONX}+${MONY}" 35 | exit 0 36 | fi 37 | fi 38 | fi 39 | fi 40 | done 41 | 42 | echo "Oh no the mouse is in the void!" 43 | exit 1 44 | } 45 | 46 | function screenshot-x() { 47 | local type="${1:-select}" 48 | local copy="/usr/bin/xclip -selection clipboard -target image/png" 49 | 50 | case "${type}" in 51 | full) 52 | maim | $copy 53 | ;; 54 | screen) 55 | # TODO: get focused screen 56 | maim --geometry="$(get-screen-geometry)" | $copy 57 | ;; 58 | window) 59 | maim --window=$(xdotool getactivewindow) | $copy 60 | ;; 61 | select) 62 | maim --select | ${copy} 63 | ;; 64 | select-window) 65 | maim --select --tolerance=9999999 | $copy 66 | ;; 67 | *) 68 | echo "screenshot type not supported: ${type}" 69 | exit 1 70 | ;; 71 | esac 72 | } 73 | 74 | function screenshot-wayland() { 75 | local type="${1:-select}" 76 | local copy="wl-copy" 77 | 78 | case "${type}" in 79 | full) 80 | maim | $copy 81 | ;; 82 | screen) 83 | # TODO: get focused screen 84 | maim --geometry="$(get-screen-geometry)" | $copy 85 | ;; 86 | window) 87 | maim --window=$(xdotool getactivewindow) | $copy 88 | ;; 89 | select) 90 | grim -g "$(slurp)" - | $copy 91 | ;; 92 | select-window) 93 | maim --select --tolerance=9999999 | $copy 94 | ;; 95 | *) 96 | echo "screenshot type not supported: ${type}" 97 | exit 1 98 | ;; 99 | esac 100 | } 101 | 102 | function screenshot() { 103 | screenshot-wayland 104 | } 105 | 106 | screenshot "$@" 107 | -------------------------------------------------------------------------------- /src/config/nushell/plugins/gd.nu: -------------------------------------------------------------------------------- 1 | def args [args: list] { 2 | $args | compact --empty 3 | } 4 | 5 | # Open neovim in server mode. 6 | export def edit [] { 7 | nvim 8 | } 9 | 10 | # Godot binray. 11 | export def --wrapped bin [...args] { 12 | godot ...$args 13 | } 14 | 15 | # Open project in Godot. 16 | export def open [] { 17 | godot --editor 18 | } 19 | 20 | # Open project picker. 21 | export def projects [] { 22 | godot --project-manager 23 | } 24 | 25 | # Run project. 26 | export def run [ 27 | --headless (-H) # Run in headless mode. 28 | ] { 29 | godot ...(args [ 30 | (if $headless { "--headless" } else { "" }) 31 | ]) . 32 | } 33 | 34 | # Compile source files. 35 | export def build [ 36 | ] { 37 | cargo build 38 | gdextwiz build 39 | tsc 40 | swift build 41 | } 42 | 43 | # Watch to compile source files. 44 | export def watcher [ 45 | ] { 46 | watch src {|op, path, new_path| 47 | let ext = $path | path parse | get extension 48 | if $ext in [ rs nim ts swift v vsh ] { 49 | print ([ 50 | "" 51 | "################" 52 | $"## ($op) ($path)(if $new_path != "" { $' -> ($new_path)' })" 53 | "################" 54 | "" 55 | ] | str join (char newline)) 56 | } 57 | 58 | try { 59 | match $ext { 60 | rs => { 61 | cargo build 62 | } 63 | nim => { 64 | gdextwiz build 65 | } 66 | ts => { 67 | tsc 68 | } 69 | swift => { 70 | swift build 71 | } 72 | v | vsh => { 73 | ./bin/build.vsh 74 | } 75 | } 76 | } 77 | } 78 | } 79 | 80 | # Run tests using GUT. 81 | export def test [ 82 | --gui (-g) # Run in headlessless mode. 83 | --debug (-d) # Run in debug mode. 84 | --verbose (-v) # Run in verbose mode. 85 | ] { 86 | godot ...(args [ 87 | (if $debug { "--debug" } else { "" }) 88 | (if $gui { "" } else { "--headless" }) 89 | (if $verbose { "--verbose" } else { "" }) 90 | -s addons/gut/gut_cmdln.gd 91 | ]) 92 | } 93 | 94 | # Run tests when updated. 95 | # TODO: support flags 96 | export def "test watch" [] { 97 | watch test { 98 | test --debug | tee {} 99 | } 100 | } 101 | 102 | # Create default test config. 103 | # TODO: use actual values 104 | export def "test config" [] { 105 | {} | to json | save .gutconfig.json 106 | } 107 | 108 | # Open tabs and panes in my usual layout. 109 | # TODO: deprecate in favor of making the original `pj` more versatile 110 | export def --env dev [ 111 | query?: string # Zoxide query 112 | ] { 113 | if $query != null { zoxide query $query | cd $in } 114 | 115 | wezterm cli spawn --cwd . -- nu -e "gd edit" 116 | wezterm cli spawn --cwd . -- nu 117 | | wezterm cli split-pane --cwd . --pane-id $in --left -- nu -e "tigs" 118 | wezterm cli activate-pane-direction left 119 | wezterm cli spawn --cwd . -- nu -e "gd open" 120 | | wezterm cli split-pane --cwd . --pane-id $in --bottom -- nu 121 | wezterm cli activate-tab --tab-index 0 122 | wezterm cli kill-pane 123 | } 124 | 125 | export def main [] {} 126 | -------------------------------------------------------------------------------- /src/config/kanata/layers/applications.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | app (one-shot $one-shot (layer-toggle applications)) 3 | ) 4 | 5 | ;; TODO: utilize sequences? 6 | ;; TODO: chrome, vivaldi, slack, discord, chatGPT, music player, google messages, calculator, steam 7 | 8 | (deflayer applications 9 | #| esc |# @erm 10 | #| f1 |# _ 11 | #| f2 |# _ 12 | #| f3 |# _ 13 | #| f4 |# _ 14 | #| f5 |# _ 15 | #| f6 |# _ 16 | #| f7 |# _ 17 | #| f8 |# _ 18 | #| f9 |# _ 19 | #| f10 |# _ 20 | #| f11 |# _ 21 | #| f12 |# _ 22 | #| ssrq |# _ 23 | #| slck |# _ 24 | #| pause |# _ 25 | #| grv |# _ 26 | #| 1 |# _ 27 | #| 2 |# _ 28 | #| 3 |# _ 29 | #| 4 |# _ 30 | #| 5 |# _ 31 | #| 6 |# _ 32 | #| 7 |# _ 33 | #| 8 |# _ 34 | #| 9 |# _ 35 | #| 0 |# _ 36 | #| [ |# _ 37 | #| ] |# _ 38 | #| bspc |# _ 39 | #| ins |# _ 40 | #| home |# _ 41 | #| pgup |# _ 42 | #| nlck |# _ 43 | #| kp/ |# _ 44 | #| kp* |# _ 45 | #| kp- |# _ 46 | #| tab |# _ 47 | #| ' |# _ 48 | #| , |# _ 49 | #| . |# _ 50 | #| p |# _ 51 | #| y |# (cmd copyq toggle) 52 | #| f |# _ 53 | #| g |# _ 54 | #| c |# _ 55 | #| r |# _ 56 | #| l |# _ 57 | #| / |# _ 58 | #| = |# _ 59 | #| \ |# _ 60 | #| del |# _ 61 | #| end |# _ 62 | #| pgdn |# _ 63 | #| kp7 |# _ 64 | #| kp8 |# _ 65 | #| kp9 |# _ 66 | #| kp+ |# _ 67 | #| caps |# @erm 68 | #| a |# _ 69 | #| o |# _ 70 | #| e |# _ 71 | #| u |# _ 72 | #| i |# _ 73 | #| d |# (cmd devdocs-desktop) 74 | #| h |# _ 75 | #| t |# _ 76 | #| n |# _ 77 | #| s |# _ 78 | #| - |# _ 79 | #| enter |# _ 80 | #| kp4 |# _ 81 | #| kp5 |# _ 82 | #| kp6 |# _ 83 | #| lsft |# _ 84 | #| ; |# _ 85 | #| q |# _ 86 | #| j |# _ 87 | #| k |# _ 88 | #| x |# _ 89 | #| b |# _ 90 | #| m |# (cmd gtk-launch ytmdesktop) 91 | #| w |# _ 92 | #| v |# _ 93 | #| z |# _ 94 | #| rsft |# _ 95 | #| up |# _ 96 | #| kp1 |# _ 97 | #| kp2 |# _ 98 | #| kp3 |# _ 99 | #| kprt |# _ 100 | #| lctrl |# _ 101 | #| lmeta |# _ 102 | #| lalt |# _ 103 | #| spc |# _ 104 | #| ralt |# _ 105 | #| rmeta |# _ 106 | #| menu |# _ 107 | #| rctrl |# _ 108 | #| left |# _ 109 | #| down |# _ 110 | #| rght |# _ 111 | #| kp0 |# _ 112 | #| kp. |# _ 113 | #| mute |# _ 114 | #| volu |# _ 115 | #| vold |# _ 116 | #| brup |# _ 117 | #| brdn |# _ 118 | #| blup |# _ 119 | #| bldn |# _ 120 | #| next |# _ 121 | #| pp |# _ 122 | #| prev |# _ 123 | #| plyr |# _ 124 | #| power |# _ 125 | #| sleep |# _ 126 | #| f13 |# _ 127 | #| f14 |# _ 128 | #| f15 |# _ 129 | #| f16 |# _ 130 | #| f17 |# _ 131 | #| f18 |# _ 132 | #| f19 |# _ 133 | #| f20 |# _ 134 | #| f21 |# _ 135 | #| f22 |# _ 136 | #| f23 |# _ 137 | #| f24 |# _ 138 | #| mlft |# _ 139 | #| mrgt |# _ 140 | #| mmid |# _ 141 | #| mfwd |# _ 142 | #| mbck |# _ 143 | ) 144 | -------------------------------------------------------------------------------- /src/config/kanata/layers/notify.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | nfy (one-shot $one-shot (layer-toggle notify)) 3 | ) 4 | 5 | (deflayer notify 6 | #| esc |# @erm 7 | #| f1 |# _ 8 | #| f2 |# _ 9 | #| f3 |# _ 10 | #| f4 |# _ 11 | #| f5 |# _ 12 | #| f6 |# _ 13 | #| f7 |# _ 14 | #| f8 |# _ 15 | #| f9 |# _ 16 | #| f10 |# _ 17 | #| f11 |# _ 18 | #| f12 |# _ 19 | #| ssrq |# _ 20 | #| slck |# _ 21 | #| pause |# _ 22 | #| grv |# _ 23 | #| 1 |# _ 24 | #| 2 |# _ 25 | #| 3 |# _ 26 | #| 4 |# _ 27 | #| 5 |# _ 28 | #| 6 |# _ 29 | #| 7 |# _ 30 | #| 8 |# _ 31 | #| 9 |# _ 32 | #| 0 |# _ 33 | #| [ |# _ 34 | #| ] |# _ 35 | #| bspc |# _ 36 | #| ins |# _ 37 | #| home |# _ 38 | #| pgup |# _ 39 | #| nlck |# _ 40 | #| kp/ |# _ 41 | #| kp* |# _ 42 | #| kp- |# _ 43 | #| tab |# _ 44 | #| ' |# _ 45 | #| , |# _ 46 | #| . |# _ 47 | #| p |# (cmd dunstctl set-paused toggle) 48 | #| y |# _ 49 | #| f |# _ 50 | #| g |# _ 51 | #| c |# (cmd dunstctl close-all) 52 | #| r |# _ 53 | #| l |# _ 54 | #| / |# (cmd nu -c "dunstctl is-paused | notify-send 'notify paused:' $in") 55 | #| = |# _ 56 | #| \ |# _ 57 | #| del |# _ 58 | #| end |# _ 59 | #| pgdn |# _ 60 | #| kp7 |# _ 61 | #| kp8 |# _ 62 | #| kp9 |# _ 63 | #| kp+ |# _ 64 | #| caps |# @erm 65 | #| a |# _ 66 | #| o |# _ 67 | #| e |# _ 68 | #| u |# _ 69 | #| i |# _ 70 | #| d |# _ 71 | #| h |# _ 72 | #| t |# (cmd nu -c "dunstctl count | notify-send 'notify count:' $in") 73 | #| n |# _ 74 | #| s |# _ 75 | #| - |# _ 76 | #| enter |# _ 77 | #| kp4 |# _ 78 | #| kp5 |# _ 79 | #| kp6 |# _ 80 | #| lsft |# _ 81 | #| ; |# _ 82 | #| q |# _ 83 | #| j |# (cmd dunstctl history-pop) 84 | #| k |# (cmd dunstctl close) 85 | #| x |# _ 86 | #| b |# _ 87 | #| m |# _ 88 | #| w |# _ 89 | #| v |# _ 90 | #| z |# _ 91 | #| rsft |# _ 92 | #| up |# _ 93 | #| kp1 |# _ 94 | #| kp2 |# _ 95 | #| kp3 |# _ 96 | #| kprt |# _ 97 | #| lctrl |# _ 98 | #| lmeta |# _ 99 | #| lalt |# _ 100 | #| spc |# (cmd dunstctl context) 101 | #| ralt |# _ 102 | #| rmeta |# _ 103 | #| menu |# _ 104 | #| rctrl |# _ 105 | #| left |# _ 106 | #| down |# _ 107 | #| rght |# _ 108 | #| kp0 |# _ 109 | #| kp. |# _ 110 | #| mute |# _ 111 | #| volu |# _ 112 | #| vold |# _ 113 | #| brup |# _ 114 | #| brdn |# _ 115 | #| blup |# _ 116 | #| bldn |# _ 117 | #| next |# _ 118 | #| pp |# _ 119 | #| prev |# _ 120 | #| plyr |# _ 121 | #| power |# _ 122 | #| sleep |# _ 123 | #| f13 |# _ 124 | #| f14 |# _ 125 | #| f15 |# _ 126 | #| f16 |# _ 127 | #| f17 |# _ 128 | #| f18 |# _ 129 | #| f19 |# _ 130 | #| f20 |# _ 131 | #| f21 |# _ 132 | #| f22 |# _ 133 | #| f23 |# _ 134 | #| f24 |# _ 135 | #| mlft |# _ 136 | #| mrgt |# _ 137 | #| mmid |# _ 138 | #| mfwd |# _ 139 | #| mbck |# _ 140 | ) 141 | -------------------------------------------------------------------------------- /src/config/lf/lfrc: -------------------------------------------------------------------------------- 1 | ## 2 | ## settings 3 | ## 4 | 5 | # files 6 | set hidden 7 | set shellopts "-eu" 8 | set hiddenfiles ".*:*.uid" 9 | 10 | set shell bash 11 | 12 | # ui 13 | set number 14 | set drawbox 15 | set sixel 16 | 17 | # preview 18 | set previewer ctpv 19 | set cleaner ctpvclear 20 | &ctpv -s $id 21 | &ctpvquit $id 22 | 23 | ## 24 | ## mappings 25 | ## 26 | 27 | # unmap 28 | map , 29 | map c 30 | map y 31 | map d 32 | map 33 | 34 | # shortcuts 35 | # map quit 36 | map ; read 37 | map C clear 38 | 39 | # navigation 40 | map t :toggle; down 41 | map T :toggle; up 42 | map gt :tag-toggle; down 43 | map gT :tag-toggle; up 44 | map gn :{{ 45 | tag-toggle 46 | down 47 | tag-toggle 48 | }} 49 | 50 | # create 51 | map O push $mkdir-p 52 | map o push $touch 53 | 54 | # delete 55 | map dd cut 56 | map dD delete 57 | map dt trash-put 58 | 59 | # rename 60 | map cc :rename; cmd-end; cmd-delete-home 61 | map ce :rename; cmd-end; cmd-word-back; cmd-delete-word 62 | map cb :rename; cmd-word-back; cmd-delete-word 63 | map I :rename; cmd-home 64 | map a :rename 65 | map A :rename; cmd-end 66 | 67 | # copy 68 | map yy copy 69 | map yp ${{ echo -n $f | copy }} 70 | map yf ${{ nu -c "basename -- $f | str trim | copy" }} 71 | map yc ${{ cat $f | copy }} 72 | 73 | # open 74 | map open 75 | map L rifle 76 | map x $$f 77 | map X !$f 78 | 79 | # toggle previews 80 | cmd togglePreview ${{ 81 | if [ $lf_preview == true ]; then 82 | lf -remote "send $id set nopreview" 83 | lf -remote "send $id set ratios 1" 84 | lf -remote "send $id set info size:time" 85 | else 86 | lf -remote "send $id set ratios 1:2:3" 87 | lf -remote "send $id set info" 88 | lf -remote "send $id set preview" 89 | fi 90 | }} 91 | map ~ togglePreview 92 | 93 | # refresh 94 | map r reload 95 | 96 | # reload config 97 | map ,r source ~/.config/lf/lfrc 98 | 99 | # integrations 100 | 101 | # fuzz 102 | map fc fzf_select 103 | map fd fzf_cd 104 | 105 | ## 106 | ## functions 107 | ## 108 | 109 | cmd open ${{ 110 | case $(file --mime-type -Lb $f) in 111 | text/*) $EDITOR $fx ;; 112 | *) for f in $fx; do mimeo $f > /dev/null 2> /dev/null & done ;; 113 | esac 114 | }} 115 | 116 | cmd pack ${{ 117 | apack $1 $fx 118 | }} 119 | 120 | cmd unpack ${{ 121 | aunpack $f 122 | }} 123 | 124 | ## integrations 125 | 126 | # trash 127 | cmd trash-put %trash-put $fx 128 | 129 | # fzf 130 | 131 | cmd fzf_select ${{ 132 | list="$(fzf)" 133 | lf -remote "send $id select \"$list\"" 134 | }} 135 | 136 | cmd fzf_cd ${{ 137 | list="$(fd --type d --hidden | fzf)" 138 | lf -remote "send $id cd \"$list\"" 139 | }} 140 | 141 | # ranger 142 | cmd rifle ${{ 143 | set -f 144 | rifle -l "$f" 145 | read -p "Select runner: " runner 146 | rifle -p "$runner" "$f" 147 | }} 148 | 149 | # get config value 150 | cmd get ${{ 151 | option="lf_${1}" 152 | value="${!option}" 153 | lf -remote "send $id echo $value" 154 | }} 155 | 156 | # debug 157 | cmd debug ${{ 158 | lf -remote "send $id echo $1" 159 | }} 160 | 161 | # vim: ft=bash 162 | -------------------------------------------------------------------------------- /src/config/surfingkeys/config.js: -------------------------------------------------------------------------------- 1 | function alias(key, target, replace = false) { 2 | api.map(key, target); 3 | if (replace) api.unmap(target); 4 | } 5 | 6 | function addProvider(key, name, url, ...args) { 7 | api.addSearchAlias(key, name, url, ...args); 8 | api.mapkey( 9 | `o${key}`, 10 | `#8Open Search with alias ${key}`, 11 | () => api.Front.openOmnibar({ type: "SearchEngine", extra: key }) 12 | ); 13 | } 14 | 15 | function scroll(amount = 0) { 16 | window.scrollTo(0, window.pageYOffset + amount); 17 | } 18 | 19 | function options() { 20 | api.Hints.setCharacters("cnisetahywodulxfjmkr"); 21 | // chrome.storage.local.set({ "noPdfViewer": 1 }); 22 | settings.smartCase = true; 23 | } 24 | 25 | function mappings() { 26 | // DEBUG 27 | api.mapkey("", "#0 debug", () => { 28 | console.log("api", api); 29 | console.log("settings", settings); 30 | }); 31 | 32 | // HISTORY 33 | alias("H", "S", true); 34 | alias("L", "D", true); 35 | 36 | // TABS 37 | 38 | // reopen 39 | alias("u", "X", true); 40 | // mute 41 | alias("gM", "", true); 42 | // pin 43 | alias("gp", "", true); 44 | // alt-tab (pun) 45 | alias("", "gt"); 46 | 47 | api.mapkey(",r", "#4 Reload the page uncached", () => api.RUNTIME("reloadTab", { nocache: true })); 48 | 49 | api.mapkey("p", "#7 Paste URL in current tab", () => { 50 | api.Clipboard.read(({ data }) => (window.location.href = data)); 51 | }); 52 | api.mapkey("P", "#7 Paste URL in new tab", () => { 53 | api.Clipboard.read(({ data }) => api.tabOpenLink(data)); 54 | }); 55 | 56 | // SCROLLING 57 | api.mapkey("", "#2 page up", () => scroll(-1 * 0.9 * window.innerHeight)); 58 | api.mapkey("", "#2 page down", () => scroll(1 * 0.9 * window.innerHeight)); 59 | api.mapkey("", "#2 half page up", () => scroll(-1 * 0.45 * window.innerHeight)); 60 | api.mapkey("", "#2 half page down", () => scroll(1 * 0.45 * window.innerHeight)); 61 | 62 | // INPUT 63 | api.mapkey("ga", "#1 Go to last input", () => api.Hints.create("input[type=text]:last-of-type", api.Hints.dispatchMouseClick)); 64 | } 65 | 66 | function unmappings() { 67 | api.unmap("C"); 68 | api.unmap("d"); 69 | api.unmap("D"); 70 | 71 | // disable emojis 72 | api.iunmap(":"); 73 | api.iunmap(""); 74 | } 75 | 76 | function providers() { 77 | addProvider("D", "dota", "https://liquipedia.net/dota2/", "s", "https://liquipedia.net/dota2/api.php?action=opensearch&format=json&search=", (res) => { 78 | const [ query, titles, , urls ] = JSON.parse(res.text); 79 | return titles; 80 | }); 81 | addProvider("G", "godot", "https://docs.godotengine.org/en/latest/search.html?q="); 82 | addProvider("r", "reddit", "https://www.reddit.com/r/"); 83 | addProvider("S", "slippi", "https://slippi.gg/user/"); 84 | addProvider("T", "twitch", "https://twitch.tv/"); 85 | addProvider("w", "wikipedia", "https://en.wikipedia.org/wiki/", "s", "https://en.wikipedia.org/w/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=40&search=", (res) => { 86 | return JSON.parse(res.text)[1]; 87 | }); 88 | } 89 | 90 | (() => { 91 | options(); 92 | mappings(); 93 | unmappings(); 94 | providers(); 95 | })(); 96 | -------------------------------------------------------------------------------- /bin/eos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nu 2 | 3 | const api = "http://haus.lan:8123/api" 4 | 5 | def request [endpoint: string, payload?: record] { 6 | let headers = [ Authorization $"Bearer ($env.HASS_API_KEY?)" ] 7 | let res = if $payload == null { 8 | http get -H $headers $"($api)($endpoint)" 9 | } else { 10 | http post -t application/json -H $headers $"($api)($endpoint)" $payload 11 | } 12 | $res | to json -r | eww update $"eos=($in)" 13 | $res 14 | } 15 | 16 | def "get window" [addr: string] { 17 | hyprctl clients -j 18 | | from json 19 | | where address == $"0x($addr)" 20 | | get -o 0 21 | | default {} 22 | } 23 | 24 | def process [ 25 | line: string 26 | addr? 27 | ] { 28 | let event = $line | parse "{type}>>{data}" | first 29 | let data = $event.data | split row ',' 30 | match $event.type { 31 | openwindow => { 32 | print $event $data 33 | if ($addr != null or $data.2 != "Zoom") { return $addr } 34 | sleep 2sec 35 | 36 | let window = get window $data.0 37 | if ($window == {}) { return $addr } 38 | 39 | if ($window.title == "Zoom Meeting") { 40 | print $window 41 | eos busy | print $in 42 | return $window.address 43 | } 44 | } 45 | closewindow => { 46 | echo $addr $data 47 | if ($addr == $data.0) { 48 | eos free | print $in 49 | return null 50 | } 51 | } 52 | } 53 | return $addr 54 | } 55 | 56 | export def states []: nothing -> list { 57 | [ off free focus busy ] 58 | } 59 | 60 | export def main [ 61 | state?: string@states 62 | --format (-f): string 63 | ] { 64 | const entity = "select.eos_status" 65 | mut res = null 66 | 67 | if $state == null { 68 | return (request $"/states/($entity)" | match $format { 69 | json => { $in | to json -r } 70 | _ => {} 71 | }) 72 | } 73 | 74 | if not ($state in [off free focus busy]) { 75 | error make { msg: "invalid state" } 76 | } 77 | 78 | request $"/states/($entity)" { 79 | state: $state 80 | } | match $format { 81 | json => { $in | to json -r } 82 | nuon => { $in | to nuon } 83 | _ => {} 84 | } 85 | } 86 | 87 | export def led [ 88 | color?: string 89 | --format (-f): string 90 | ] { 91 | const entity = "light.eos_rgb_led" 92 | mut res = null 93 | 94 | if $color == null { 95 | return (request $"/states/($entity)" | match $format { 96 | json => { $in | to json -r } 97 | _ => {} 98 | }) 99 | } 100 | 101 | request $"/services/light/turn_on" { 102 | entity_id: $entity 103 | color_name: $color 104 | } | match $format { 105 | json => { $in | to json -r } 106 | _ => {} 107 | } 108 | } 109 | 110 | export def socket []: nothing -> string { 111 | $"UNIX:($env | get -o XDG_RUNTIME_DIR | default tmp)/hypr/($env.HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock" 112 | } 113 | 114 | # Set state based on entering and exiting zoom meetings. 115 | export def listen [] { 116 | if not ("HYPRLAND_INSTANCE_SIGNATURE" in $env) { 117 | load-env { 118 | HYPRLAND_INSTANCE_SIGNATURE: (hyprctl instances -j | from json | get 0.instance) 119 | } 120 | } 121 | socat -u (socket) - 122 | | lines -s 123 | | reduce -f null {|line, addr| 124 | process $line $addr 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/config/yazi/keymap.toml: -------------------------------------------------------------------------------- 1 | [[mgr.prepend_keymap]] 2 | on = "t" 3 | run = "toggle" 4 | desc = "Toggle the current selection state" 5 | 6 | [[mgr.prepend_keymap]] 7 | on = "T" 8 | run = [ 9 | "toggle", 10 | "arrow next", 11 | ] 12 | desc = "Toggle the current selection state" 13 | 14 | [[mgr.prepend_keymap]] 15 | on = "o" 16 | run = "create" 17 | desc = "Create a file (ends with / for directories)" 18 | 19 | [[mgr.prepend_keymap]] 20 | on = [ 21 | "y", 22 | "d", 23 | ] 24 | run = "copy dirname" 25 | desc = "Copy the directory path" 26 | 27 | [[mgr.prepend_keymap]] 28 | on = [ 29 | "y", 30 | "f", 31 | ] 32 | run = "copy filename" 33 | desc = "Copy the filename" 34 | 35 | [[mgr.prepend_keymap]] 36 | on = [ 37 | "y", 38 | "n", 39 | ] 40 | run = "copy name_without_ext" 41 | desc = "Copy the filename without extension" 42 | 43 | [[mgr.prepend_keymap]] 44 | on = [ 45 | "y", 46 | "p", 47 | ] 48 | run = "copy path" 49 | desc = "Copy the file path" 50 | 51 | [[mgr.prepend_keymap]] 52 | on = [ 53 | "y", 54 | "y", 55 | ] 56 | run = "yank" 57 | desc = "Yank selected files (copy)" 58 | 59 | [[mgr.prepend_keymap]] 60 | on = [ 61 | "d", 62 | "D", 63 | ] 64 | run = "remove --permanently" 65 | desc = "Permanently delete selected files" 66 | 67 | [[mgr.prepend_keymap]] 68 | on = [ 69 | "d", 70 | "d", 71 | ] 72 | run = "yank --cut" 73 | desc = "Yank selected files (cut)" 74 | 75 | [[mgr.prepend_keymap]] 76 | on = [ 77 | "d", 78 | "t", 79 | ] 80 | run = "remove" 81 | desc = "Trash selected files" 82 | 83 | [[mgr.prepend_keymap]] 84 | on = "A" 85 | run = "rename --cursor=after_ext" 86 | desc = "Rename selected file(s)" 87 | 88 | [[mgr.prepend_keymap]] 89 | on = "C" 90 | run = "rename --empty=dot_ext" 91 | desc = "Rename selected file(s)" 92 | 93 | [[mgr.prepend_keymap]] 94 | on = "I" 95 | run = "rename --cursor=start" 96 | desc = "Rename selected file(s)" 97 | 98 | [[mgr.prepend_keymap]] 99 | on = [ 100 | "c", 101 | "c", 102 | ] 103 | run = "rename --empty=all" 104 | desc = "Rename selected file(s)" 105 | 106 | [[mgr.prepend_keymap]] 107 | on = [ 108 | "c", 109 | "e", 110 | ] 111 | run = "rename --empty=ext" 112 | desc = "Rename selected file(s)" 113 | 114 | [[mgr.prepend_keymap]] 115 | on = [ 116 | "c", 117 | "w", 118 | ] 119 | run = "rename --empty=stem --cursor=start" 120 | desc = "Rename selected file(s)" 121 | 122 | [[mgr.prepend_keymap]] 123 | on = "a" 124 | run = "rename --cursor=before_ext" 125 | desc = "Rename selected file(s)" 126 | 127 | [[mgr.prepend_keymap]] 128 | on = "i" 129 | run = "rename --cursor=start" 130 | desc = "Rename selected file(s)" 131 | 132 | [[mgr.prepend_keymap]] 133 | on = "" 134 | run = "tab_create --current" 135 | desc = "Create a new tab with CWD" 136 | 137 | [[mgr.prepend_keymap]] 138 | on = "" 139 | run = "close" 140 | desc = "Close the current tab, or quit if it's last" 141 | 142 | [[mgr.prepend_keymap]] 143 | on = "" 144 | run = "tab_switch -1 --relative" 145 | desc = "Switch to previous tab" 146 | 147 | [[mgr.prepend_keymap]] 148 | on = "" 149 | run = "tab_switch 1 --relative" 150 | desc = "Switch to next tab" 151 | -------------------------------------------------------------------------------- /src/config/kanata/layers/copypasta.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | cpp (one-shot $one-shot (layer-toggle copypasta)) 3 | ) 4 | 5 | (deflayer copypasta 6 | #| esc |# @erm 7 | #| f1 |# _ 8 | #| f2 |# _ 9 | #| f3 |# _ 10 | #| f4 |# _ 11 | #| f5 |# _ 12 | #| f6 |# _ 13 | #| f7 |# _ 14 | #| f8 |# _ 15 | #| f9 |# _ 16 | #| f10 |# _ 17 | #| f11 |# _ 18 | #| f12 |# _ 19 | #| ssrq |# _ 20 | #| slck |# _ 21 | #| pause |# _ 22 | #| grv |# _ 23 | #| 1 |# _ 24 | #| 2 |# _ 25 | #| 3 |# _ 26 | #| 4 |# _ 27 | #| 5 |# _ 28 | #| 6 |# _ 29 | #| 7 |# _ 30 | #| 8 |# _ 31 | #| 9 |# _ 32 | #| 0 |# _ 33 | #| [ |# _ 34 | #| ] |# _ 35 | #| bspc |# _ 36 | #| ins |# _ 37 | #| home |# _ 38 | #| pgup |# _ 39 | #| nlck |# _ 40 | #| kp/ |# _ 41 | #| kp* |# _ 42 | #| kp- |# _ 43 | #| tab |# _ 44 | #| ' |# _ 45 | #| , |# _ 46 | #| . |# _ 47 | #| p |# (cmd nu -c "xsel --output | xdotool type --clearmodifiers --delay 0 -- $in") 48 | #| y |# _ 49 | #| f |# _ 50 | #| g |# (cmd nu -c "~/bin/purple | rofi -dmenu -p "IM:" -i | ~/bin/purple $in") 51 | #| c |# (cmd nu -c "xsel --output --clipboard | xdotool type --clearmodifiers --delay 0 -- $in") 52 | #| r |# _ 53 | #| l |# _ 54 | #| / |# _ 55 | #| = |# _ 56 | #| \ |# _ 57 | #| del |# _ 58 | #| end |# _ 59 | #| pgdn |# _ 60 | #| kp7 |# _ 61 | #| kp8 |# _ 62 | #| kp9 |# _ 63 | #| kp+ |# _ 64 | #| caps |# @erm 65 | #| a |# _ 66 | #| o |# (cmd nu -c "hyprpicker -a") 67 | #| e |# (cmd rofimoji --action=copy --skin-tone=neutral) 68 | #| u |# (cmd nu -c "~/bin/dmenu-uni all") 69 | #| i |# _ 70 | #| d |# _ 71 | #| h |# _ 72 | #| t |# _ 73 | #| n |# _ 74 | #| s |# _ 75 | #| - |# _ 76 | #| enter |# _ 77 | #| kp4 |# _ 78 | #| kp5 |# _ 79 | #| kp6 |# _ 80 | #| lsft |# _ 81 | #| ; |# _ 82 | #| q |# _ 83 | #| j |# _ 84 | #| k |# _ 85 | #| x |# _ 86 | #| b |# _ 87 | #| m |# (cmd passmenu) 88 | #| w |# _ 89 | #| v |# _ 90 | #| z |# _ 91 | #| rsft |# _ 92 | #| up |# _ 93 | #| kp1 |# _ 94 | #| kp2 |# _ 95 | #| kp3 |# _ 96 | #| kprt |# _ 97 | #| lctrl |# _ 98 | #| lmeta |# _ 99 | #| lalt |# _ 100 | #| spc |# (cmd copyq toggle) 101 | #| ralt |# _ 102 | #| rmeta |# _ 103 | #| menu |# _ 104 | #| rctrl |# _ 105 | #| left |# _ 106 | #| down |# _ 107 | #| rght |# _ 108 | #| kp0 |# _ 109 | #| kp. |# _ 110 | #| mute |# _ 111 | #| volu |# _ 112 | #| vold |# _ 113 | #| brup |# _ 114 | #| brdn |# _ 115 | #| blup |# _ 116 | #| bldn |# _ 117 | #| next |# _ 118 | #| pp |# _ 119 | #| prev |# _ 120 | #| plyr |# _ 121 | #| power |# _ 122 | #| sleep |# _ 123 | #| f13 |# _ 124 | #| f14 |# _ 125 | #| f15 |# _ 126 | #| f16 |# _ 127 | #| f17 |# _ 128 | #| f18 |# _ 129 | #| f19 |# _ 130 | #| f20 |# _ 131 | #| f21 |# _ 132 | #| f22 |# _ 133 | #| f23 |# _ 134 | #| f24 |# _ 135 | #| mlft |# _ 136 | #| mrgt |# _ 137 | #| mmid |# _ 138 | #| mfwd |# _ 139 | #| mbck |# _ 140 | ) 141 | 142 | ;; TODO: copypasta with vim registers 143 | -------------------------------------------------------------------------------- /src/config/cava/shaders/winamp_line_style_spectrum.frag: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Emulate the "line style" spectrum analyzer from Winamp 2. 4 | // Try this config for a demonstration: 5 | 6 | /* 7 | [general] 8 | bar_width = 2 9 | bar_spacing = 0 10 | higher_cutoff_freq = 22000 11 | 12 | [output] 13 | method = sdl_glsl 14 | channels = mono 15 | fragment_shader = winamp_line_style_spectrum.frag 16 | 17 | [color] 18 | background = '#000000' 19 | gradient = 1 20 | gradient_color_1 = '#319C08' 21 | gradient_color_2 = '#29CE10' 22 | gradient_color_3 = '#BDDE29' 23 | gradient_color_4 = '#DEA518' 24 | gradient_color_5 = '#D66600' 25 | gradient_color_6 = '#CE2910' 26 | 27 | [smoothing] 28 | noise_reduction = 10 29 | */ 30 | 31 | in vec2 fragCoord; 32 | out vec4 fragColor; 33 | 34 | // bar values. defaults to left channels first (low to high), then right (high to low). 35 | uniform float bars[512]; 36 | 37 | uniform int bars_count; // number of bars (left + right) (configurable) 38 | uniform int bar_width; // bar width (configurable), not used here 39 | uniform int bar_spacing; // space bewteen bars (configurable) 40 | 41 | uniform vec3 u_resolution; // window resolution 42 | 43 | //colors, configurable in cava config file (r,g,b) (0.0 - 1.0) 44 | uniform vec3 bg_color; // background color 45 | uniform vec3 fg_color; // foreground color 46 | 47 | uniform int gradient_count; 48 | uniform vec3 gradient_colors[8]; // gradient colors 49 | 50 | vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max) 51 | { 52 | //create color based on fraction of this color and next color 53 | float yr = (y - y_min) / (y_max - y_min); 54 | return col_1 * (1.0 - yr) + col_2 * yr; 55 | } 56 | 57 | void main() 58 | { 59 | // find which bar to use based on where we are on the x axis 60 | float x = u_resolution.x * fragCoord.x; 61 | int bar = int(bars_count * fragCoord.x); 62 | 63 | //calculate a bar size 64 | float bar_size = u_resolution.x / bars_count; 65 | 66 | //the y coordinate is stretched by 4X to resemble Winamp 67 | float y = min(bars[bar] * 4.0, 1.0); 68 | 69 | // make sure there is a thin line at bottom 70 | if (y * u_resolution.y < 1.0) 71 | { 72 | y = 1.0 / u_resolution.y; 73 | } 74 | 75 | vec4 bar_color; 76 | 77 | if (gradient_count == 0) 78 | { 79 | bar_color = vec4(fg_color,1.0); 80 | } 81 | else 82 | { 83 | //find color in the configured gradient for the top of the bar 84 | int color = int((gradient_count - 1) * y); 85 | 86 | //find where on y this and next color is supposed to be 87 | float y_min = float(color) / (gradient_count - 1.0); 88 | float y_max = float(color + 1) / (gradient_count - 1.0); 89 | 90 | //make a solid color for the entire bar 91 | bar_color = vec4(normalize_C(y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0); 92 | } 93 | 94 | 95 | //draw the bar up to current height 96 | if (y > fragCoord.y) 97 | { 98 | //make some space between bars based on settings 99 | if (x > (bar + 1) * (bar_size) - bar_spacing) 100 | { 101 | fragColor = vec4(bg_color,1.0); 102 | } 103 | else 104 | { 105 | fragColor = bar_color; 106 | } 107 | } 108 | else 109 | { 110 | fragColor = vec4(bg_color,1.0); 111 | } 112 | } -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/ui/dashboard.lua: -------------------------------------------------------------------------------- 1 | pack "https://github.com/folke/snacks.nvim" 2 | 3 | local persist = require "persistence" 4 | 5 | -- 6 | -- FUNCTIONS 7 | -- 8 | 9 | --- Creates a dashboard section config. 10 | --- 11 | --- - `section("name")` → `{ section = "name" }` 12 | --- - `section({ ... })` → `{ ... }` 13 | --- - `section(fn)` → `fn` 14 | --- - `section("name", { ... })` → `{ section = "name", ... }` 15 | --- 16 | --- @param a string|table Section name or config table. 17 | --- @param b? table Optional config table. 18 | --- @return table Normalized section config. 19 | local section = function(a, b) 20 | if b ~= nil then 21 | b.section = a 22 | return b 23 | end 24 | if type(a) == "string" then 25 | return { section = a } 26 | end 27 | return a 28 | end 29 | 30 | --- Whether the current project has an existing session. 31 | local has_session = function() 32 | return vim.tbl_contains(persist.list(), persist.current()) 33 | end 34 | 35 | -- 36 | -- SETUP 37 | -- 38 | 39 | local version = vim.version() 40 | local header = [[ 41 | ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓ 42 | ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒ 43 | ▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░ 44 | ▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ 45 | ▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒ 46 | ░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░ 47 | ░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░ 48 | ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ 49 | ░ ░ ░ ░ ░ ░ ░ ░ 50 | ░ 51 | ]] 52 | 53 | local snacks = require "snacks" 54 | snacks.setup({ 55 | dashboard = { 56 | preset = { 57 | keys = { 58 | { icon = " ", key = "f", desc = "Find File", action = call(snacks.dashboard.pick, "files") }, 59 | { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, 60 | { icon = " ", key = "g", desc = "Find Text", action = call(snacks.dashboard.pick, "live_grep") }, 61 | { icon = " ", key = "r", desc = "Recent Files", action = call(snacks.dashboard.pick, "oldfiles") }, 62 | { icon = " ", key = "c", desc = "Config", action = call(snacks.dashboard.pick, "files", { cwd = vim.fn.stdpath "config" }) }, 63 | { icon = " ", key = "s", desc = "Restore Session", action = persist.load, enabled = has_session }, 64 | { icon = " ", key = "q", desc = "Quit", action = ":qa" }, 65 | }, 66 | header = header, 67 | }, 68 | sections = { 69 | section("header"), 70 | section("terminal", { 71 | pane = 2, 72 | cmd = "chafa --probe off --stretch ~/Pictures/ermak.png", 73 | padding = 1, 74 | }), 75 | section("keys", { 76 | gap = 1, 77 | padding = 1, 78 | }), 79 | section("recent_files", { 80 | icon = " ", 81 | title = "Recent Files", 82 | limit = 16, 83 | cwd = true, 84 | indent = 2, 85 | padding = 1, 86 | pane = 2, 87 | }), 88 | section("terminal", { 89 | icon = " ", 90 | title = "Git Status", 91 | enabled = function() 92 | return snacks.git.get_root() ~= nil 93 | end, 94 | cmd = "git status --short --branch", 95 | padding = 1, 96 | ttl = 5 * 32, 97 | indent = 4, 98 | pane = 2, 99 | }), 100 | -- section("startup", { 101 | -- indent = 32, 102 | -- padding = 1 103 | -- }), 104 | section({ 105 | align = 'center', 106 | text = "  v" .. version.major .. "." .. version.minor .. "." .. version.patch, 107 | padding = 1, 108 | indent = 32, 109 | }), 110 | }, 111 | }, 112 | }) 113 | -------------------------------------------------------------------------------- /src/.mailcap: -------------------------------------------------------------------------------- 1 | # Example mailcap file for Reddit Terminal Viewer 2 | # https://github.com/michael-lazar/rtv/ 3 | # 4 | # Copy the contents of this file to {HOME}/.mailcap, or point to using $MAILCAPS 5 | # Then launch RTV using the --enable-media flag. All shell commands defined in 6 | # this file depend on external programs that must be installed on your system. 7 | # 8 | # HELP REQUESTED! If you come up with your own commands (especially for OS X) 9 | # and would like to share, please post an issue on the GitHub tracker and we 10 | # can get them added to this file as references. 11 | # 12 | # 13 | # Mailcap 101 14 | # - The first entry with a matching MIME type will be executed, * is a wildcard 15 | # - %s will be replaced with the image or video url 16 | # - Add ``test=test -n "$DISPLAY"`` if your command opens a new window 17 | # - Add ``needsterminal`` for commands that use the terminal 18 | # - Add ``copiousoutput`` for commands that dump text to stdout 19 | 20 | ############################################################################### 21 | # Commands below this point will open media in a separate window without 22 | # pausing execution of RTV. 23 | ############################################################################### 24 | 25 | # Feh is a simple and effective image viewer 26 | # Note that rtv returns a list of urls for imgur albums, so we don't put quotes 27 | # around the `%s` 28 | image/x-imgur-album; curl -o /tmp/rtv %s && vimiv /tmp/rtv && rm /tmp/rtv; test=test -n "$DISPLAY" 29 | image/*; curl -o /tmp/rtv '%s' && vimiv /tmp/rtv && rm /tmp/rtv; test=test -n "$DISPLAY" 30 | 31 | # Youtube videos are assigned a custom mime-type, which can be streamed with 32 | # vlc or youtube-dl. 33 | video/x-youtube; vlc '%s' --width 640 --height 480; test=test -n "$DISPLAY" 34 | video/x-youtube; youtube-dl -q -o - '%s' | mpv - --autofit 640x480; test=test -n "$DISPLAY" 35 | 36 | # Mpv is a simple and effective video streamer 37 | video/webm; mpv '%s' --autofit 640x480 --loop=inf; test=test -n "$DISPLAY" 38 | video/*; mpv '%s' --autofit 640x480 --loop=inf; test=test -n "$DISPLAY" 39 | 40 | ############################################################################### 41 | # Commands below this point will attempt to display media directly in the 42 | # terminal when X is not available. 43 | ############################################################################### 44 | 45 | # View images directly in your terminal with iTerm2 46 | # curl -L https://iterm2.com/misc/install_shell_integration_and_utilities.sh | bash 47 | # image/*; curl -s %s | ~/.iterm2/imgcat && read -n 1; needsterminal 48 | 49 | # View true images in the terminal, supported by rxvt-unicode, xterm and st 50 | # Requires the w3m-img package 51 | # image/*; w3m -o 'ext_image_viewer=off' '%s'; needsterminal 52 | 53 | # Don't have a solution for albums yet 54 | image/x-imgur-album; echo 55 | 56 | # 256 color images using half-width unicode characters 57 | # Much higher quality that img2txt, but must be built from source 58 | # https://github.com/rossy/img2xterm 59 | image/*; curl -s '%s' | convert -resize 80x80 - jpg:/tmp/rtv.jpg && img2xterm /tmp/rtv.jpg; needsterminal; copiousoutput 60 | 61 | # Display images in classic ascii using img2txt and lib-caca 62 | image/*; curl -s '%s' | convert - jpg:/tmp/rtv.jpg && img2txt -f utf8 /tmp/rtv.jpg; needsterminal; copiousoutput 63 | 64 | # Full motion videos - requires a framebuffer to view 65 | video/x-youtube; mpv -vo drm -quiet '%s'; needsterminal 66 | video/*; mpv -vo drm -quiet '%s'; needsterminal 67 | 68 | # Ascii videos 69 | # video/x-youtube; youtube-dl -q -o - '%s' | mplayer -cache 8192 -vo caca -quiet -; needsterminal 70 | # video/*; wget '%s' -O - | mplayer -cache 8192 -vo caca -quiet -; needsterminal 71 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/language/parsing.lua: -------------------------------------------------------------------------------- 1 | local language = Module.new("language", "l") 2 | 3 | pack { src = "nvim-treesitter/nvim-treesitter", version = "main" } 4 | pack { src = "nvim-treesitter/nvim-treesitter-textobjects", version = "main" } 5 | 6 | -- 7 | -- SETTINGS 8 | -- 9 | 10 | vim.opt.foldmethod = "expr" 11 | 12 | -- 13 | -- SETUP 14 | -- 15 | 16 | -- syntax 17 | 18 | vim.filetype.add({ 19 | extension = { 20 | bb = "clojure", 21 | conf = "config", 22 | gdt = "gdscript", 23 | nuon = "nu", 24 | yuck = "clojure", 25 | vtmpl = "v", 26 | zon = "zig", 27 | }, 28 | }) 29 | 30 | local trees = require "nvim-treesitter" 31 | local languages = { 32 | "bash", 33 | "c", 34 | "c_sharp", 35 | "clojure", 36 | "cpp", 37 | "css", 38 | "dockerfile", 39 | "gdscript", 40 | "go", 41 | "godot_resource", 42 | "html", 43 | "janet_simple", 44 | "javascript", 45 | "json", 46 | "julia", 47 | "lua", 48 | "markdown", 49 | "nim", 50 | "nu", 51 | "odin", 52 | "php", 53 | "proto", 54 | "python", 55 | "rust", 56 | "terraform", 57 | "toml", 58 | "tsx", 59 | "typescript", 60 | "v", 61 | "yaml", 62 | "zig", 63 | } 64 | trees.install(languages) 65 | 66 | -- 67 | -- MAPPINGS 68 | -- 69 | 70 | local ts_select = require("nvim-treesitter-textobjects.select").select_textobject 71 | map("aa", call(ts_select, "@parameter.outer", "textobjects"), { "x", "o" }) 72 | map("ia", call(ts_select, "@parameter.inner", "textobjects"), { "x", "o" }) 73 | map("af", call(ts_select, "@function.outer", "textobjects"), { "x", "o" }) 74 | map("if", call(ts_select, "@function.inner", "textobjects"), { "x", "o" }) 75 | map("ac", call(ts_select, "@class.outer", "textobjects"), { "x", "o" }) 76 | map("ic", call(ts_select, "@class.inner", "textobjects"), { "x", "o" }) 77 | map("aC", call(ts_select, "@conditional.outer", "textobjects"), { "x", "o" }) 78 | map("iC", call(ts_select, "@conditional.inner", "textobjects"), { "x", "o" }) 79 | map("aS", call(ts_select, "@local.scope", "locals"), { "x", "o" }) 80 | 81 | local ts_swap = require "nvim-treesitter-textobjects.swap" 82 | language:map("l", call(ts_swap.swap_next, "@parameter.inner")) 83 | language:map("h", call(ts_swap.swap_previous, "@parameter.inner")) 84 | language:map("L", call(ts_swap.swap_next, "@parameter.outer")) 85 | language:map("H", call(ts_swap.swap_previous, "@parameter.outer")) 86 | 87 | local ts_move = require "nvim-treesitter-textobjects.move" 88 | map("[e", call(ts_move.goto_previous_start, { "@loop.inner", "@loop.outer" }, "textobjects"), { "n", "x", "o" }) 89 | map("]e", call(ts_move.goto_next_start, { "@loop.inner", "@loop.outer" }, "textobjects"), { "n", "x", "o" }) 90 | map("[r", call(ts_move.goto_previous_start, "@return.outer", "textobjects"), { "n", "x", "o" }) 91 | map("]r", call(ts_move.goto_next_start, "@return.outer", "textobjects"), { "n", "x", "o" }) 92 | map("[R", call(ts_move.goto_previous_start, "@regex.outer", "textobjects"), { "n", "x", "o" }) 93 | map("]R", call(ts_move.goto_next_start, "@regex.outer", "textobjects"), { "n", "x", "o" }) 94 | map("[s", call(ts_move.goto_previous_start, "@local.scope", "locals"), { "n", "x", "o" }) 95 | map("]s", call(ts_move.goto_next_start, "@local.scope", "locals"), { "n", "x", "o" }) 96 | map("[z", call(ts_move.goto_previous_start, "@fold", "folds"), { "n", "x", "o" }) 97 | map("]z", call(ts_move.goto_next_start, "@fold", "folds"), { "n", "x", "o" }) 98 | 99 | -- 100 | -- EVENTS 101 | -- 102 | 103 | -- enable language features 104 | vim.api.nvim_create_autocmd("FileType", { 105 | group = language.group, 106 | pattern = languages, 107 | callback = function() 108 | vim.treesitter.start() 109 | vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" 110 | vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" 111 | end, 112 | }) 113 | -------------------------------------------------------------------------------- /src/config/kanata/layers/ermak.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | erm (layer-switch ermak) 3 | 4 | lsft (multi lsft (layer-while-held ermak-shifted)) 5 | rsft (multi rsft (layer-while-held ermak-shifted)) 6 | 7 | xcp (tap-hold-release $tap-timeout $hold-timeout esc lctl) 8 | xsu (tap-hold-release $tap-timeout $hold-timeout M-A-spc lmet) 9 | xtp (tap-hold-release $tap-timeout $hold-timeout C-spc ctl) 10 | 11 | xss (fork 12 | (fork 13 | (fork 14 | (cmd nu -c "~/bin/screenshot select") 15 | (cmd nu -c "~/bin/screenshot full") 16 | (lctl rctl) 17 | ) 18 | (cmd nu -c "~/bin/screenshot window") 19 | (lalt ralt) 20 | ) 21 | (cmd nu -c "~/bin/screenshot screen") 22 | (lsft rsft) 23 | ) 24 | 25 | hml (tap-hold-release 200 200 c lmet) 26 | hal (tap-hold-release 200 200 i lalt) 27 | hcl (tap-hold-release 200 200 e lctl) 28 | hsl (tap-hold-release 200 200 a @lsft) 29 | hsr (tap-hold-release 200 200 h @rsft) 30 | hcr (tap-hold-release 200 200 t rctl) 31 | har (tap-hold-release 200 200 s ralt) 32 | hmr (tap-hold-release 200 200 n rmet) 33 | ) 34 | 35 | (deflayer ermak 36 | _ _ _ _ _ _ _ _ _ _ _ _ _ @xss _ @gam 37 | [ _ _ _ _ _ _ _ _ _ _ ] S-3 _ _ _ _ _ _ _ _ 38 | _ b y o u ' S-' l d w v z ` S-/ _ _ _ _ _ _ _ 39 | @xcp @hml @hal @hcl @hsl , . @hsr @hcr @har @hmr q _ _ _ _ 40 | @lsft g x j k - / r m f p @rsft _ _ _ _ _ 41 | _ @lyr _ _ @xsu _ @spr @xtp _ _ _ _ _ 42 | 43 | #| mute |# (cmd nu -c "~/bin/cfg volume !") 44 | #| volu |# (cmd nu -c "~/bin/cfg volume +5") 45 | #| vold |# (cmd nu -c "~/bin/cfg volume -5") 46 | #| brup |# (cmd nu -c "~/bin/cfg brightness +10") 47 | #| brdn |# (cmd nu -c "~/bin/cfg brightness -10") 48 | #| blup |# _ 49 | #| bldn |# _ 50 | #| next |# (cmd playerctl --player=%any,chromium next) 51 | #| pp |# (cmd playerctl --player=%any,chromium play-pause) 52 | #| prev |# (cmd playerctl --player=%any,chromium previous) 53 | #| plyr |# _ 54 | #| power |# _ 55 | #| sleep |# _ 56 | #| f13 |# (cmd rofi -show drun -display-drun launch) 57 | #| f14 |# (cmd notify-send f14) 58 | #| f15 |# _ 59 | #| f16 |# (cmd notify-send f16) 60 | #| f17 |# (fork 61 | (fork 62 | (cmd nu -c "~/bin/locker -rS") 63 | (cmd nu -c "~/bin/locker -b") 64 | (lctl rctl) 65 | ) 66 | (cmd nu -c "~/bin/locker -s") 67 | (lsft rsft) 68 | ) 69 | #| f18 |# (cmd notify-send f18) 70 | #| f19 |# (cmd notify-send f19) 71 | #| f20 |# (cmd notify-send f20) 72 | #| f21 |# (cmd notify-send f21) 73 | #| f22 |# (cmd notify-send f22) 74 | #| f23 |# (cmd notify-send f23) 75 | #| f24 |# (cmd notify-send f24) 76 | #| mlft |# _ 77 | #| mrgt |# _ 78 | #| mmid |# _ 79 | #| mfwd |# _ 80 | #| mbck |# _ 81 | ) 82 | 83 | (deflayer ermak-shifted 84 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 85 | _ (unshift \) (unshift =) ` = , . 6 7 5 8 _ 2 _ _ _ _ _ _ _ _ 86 | _ _ _ _ _ 9 0 _ _ _ _ _ 4 1 _ _ _ _ _ _ _ 87 | _ _ _ _ _ (unshift ;) ; _ _ _ _ _ _ _ _ _ 88 | _ _ _ _ _ - \ _ _ _ _ _ _ _ _ _ _ 89 | _ _ _ _ _ _ _ _ _ _ _ _ _ 90 | 91 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 92 | ) 93 | 94 | ;; TODO: printscreen is its own layer 95 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/app.lua: -------------------------------------------------------------------------------- 1 | local app = Module.new("app", "a") 2 | 3 | pack "folke/persistence.nvim" 4 | 5 | local mini_pick = require "mini.pick" 6 | 7 | -- 8 | -- FUNCTIONS 9 | -- 10 | 11 | -- Helper to input given actions in picker. 12 | local function input_actions(...) 13 | local actions = { ... } 14 | return function() 15 | local mappings = mini_pick.get_picker_opts().mappings 16 | local keys = vim.tbl_map(function(m) return mappings[m] end, actions) 17 | vim.api.nvim_input(vim.keycode(table.concat(keys))) 18 | end 19 | end 20 | 21 | -- 22 | -- SETUP 23 | -- 24 | 25 | require("mini.bracketed").setup() 26 | require("mini.extra").setup() 27 | require("persistence").setup() 28 | 29 | require("mini.basics").setup({ 30 | extra_ui = true, 31 | }) 32 | 33 | mini_pick.setup({ 34 | mappings = { 35 | choose_in_split = "", 36 | choose_in_vsplit = "", 37 | choose_in_tabpage = "", 38 | 39 | refine = "", 40 | refine_marked = "", 41 | 42 | -- TODO: fix focus 43 | choose_left = { 44 | char = "", 45 | func = function() 46 | vim.cmd("leftabove vsplit " .. mini_pick.get_picker_matches().current) 47 | return true 48 | end, 49 | }, 50 | 51 | -- TODO: fix focus 52 | choose_up = { 53 | char = "", 54 | func = function() 55 | vim.cmd("leftabove split " .. mini_pick.get_picker_matches().current) 56 | vim.cmd("wincmd k") 57 | return true 58 | end, 59 | }, 60 | 61 | mark_down = { 62 | char = "", 63 | func = input_actions("mark", "move_down"), 64 | }, 65 | 66 | mark_up = { 67 | char = "", 68 | func = input_actions("mark", "move_up"), 69 | }, 70 | }, 71 | 72 | window = { 73 | -- center 74 | config = function() 75 | local height = math.floor(0.75 * vim.o.lines) 76 | local width = math.floor(0.75 * vim.o.columns) 77 | return { 78 | anchor = 'NW', 79 | height = height, 80 | width = width, 81 | row = math.floor(0.5 * (vim.o.lines - height)), 82 | col = math.floor(0.5 * (vim.o.columns - width)), 83 | } 84 | end, 85 | }, 86 | 87 | }) 88 | 89 | mini_pick.registry.registry = function() 90 | local items = vim.tbl_keys(mini_pick.registry) 91 | table.sort(items) 92 | local source = { items = items, name = 'Registry', choose = function() end } 93 | local chosen_picker_name = mini_pick.start({ source = source }) 94 | if chosen_picker_name == nil then return end 95 | return mini_pick.registry[chosen_picker_name]() 96 | end 97 | 98 | -- 99 | -- FUNCTIONS 100 | -- 101 | 102 | --- Reload config. 103 | --- FIX: not working 104 | local function reload() 105 | for name, _ in pairs(package.loaded) do 106 | if name:match "^core" then 107 | package.loaded[name] = nil 108 | end 109 | end 110 | dofile(vim.env.MYVIMRC) 111 | vim.api.nvim_echo({ { "config reloaded" } }, false, {}) 112 | end 113 | 114 | -- 115 | -- MAPPINGS 116 | -- 117 | 118 | -- HACK: fixes c-i for some reason 119 | map("", "") 120 | 121 | -- quit 122 | app:map("q", cmd "quitall") 123 | app:map("Q", cmd "quitall!") 124 | 125 | -- error 126 | app:map("e", cmd "cquit") 127 | app:map("E", cmd "cquit!") 128 | 129 | -- write 130 | app:map("w", cmd "wall") 131 | app:map("W", cmd "wall!") 132 | 133 | -- exit 134 | app:map("x", cmd "xall") 135 | app:map("X", cmd "xall!") 136 | 137 | -- close 138 | app:map("c", cmd "bufdo bdelete") 139 | app:map("C", cmd "bufdo bdelete!") 140 | 141 | -- reload 142 | -- app:map("r", reload) 143 | app:map("R", cmd "restart") 144 | 145 | -- messages 146 | app:map("m", cmd "messages") 147 | app:map("M", cmd "messages clear") 148 | 149 | -- picker 150 | app:map(".", mini_pick.registry.resume) 151 | app:map(":", mini_pick.registry.commands) 152 | app:map("", mini_pick.registry.registry) 153 | app:map("h", mini_pick.registry.help) 154 | app:map("k", mini_pick.registry.keymaps) 155 | -------------------------------------------------------------------------------- /src/config/kanata/layers/system.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | sys (one-shot $one-shot (layer-toggle system)) 3 | 4 | ;; switch VTs 5 | f1 (cmd xdotool key XF86Switch_VT_1) 6 | f2 (cmd xdotool key XF86Switch_VT_2) 7 | f3 (cmd xdotool key XF86Switch_VT_3) 8 | f4 (cmd xdotool key XF86Switch_VT_4) 9 | f5 (cmd xdotool key XF86Switch_VT_5) 10 | f6 (cmd xdotool key XF86Switch_VT_6) 11 | f7 (cmd xdotool key XF86Switch_VT_7) 12 | f8 (cmd xdotool key XF86Switch_VT_8) 13 | f9 (cmd xdotool key XF86Switch_VT_9) 14 | f10 (cmd xdotool key XF86Switch_VT_10) 15 | ) 16 | 17 | ;; TODO: screen brightness, keyboard brightness 18 | 19 | (deflayer system 20 | #| esc |# @erm 21 | #| f1 |# @f1 22 | #| f2 |# @f2 23 | #| f3 |# @f3 24 | #| f4 |# @f4 25 | #| f5 |# @f5 26 | #| f6 |# @f6 27 | #| f7 |# @f7 28 | #| f8 |# @f8 29 | #| f9 |# @f9 30 | #| f10 |# @f10 31 | #| f11 |# _ 32 | #| f12 |# _ 33 | #| ssrq |# _ 34 | #| slck |# _ 35 | #| pause |# _ 36 | #| grv |# _ 37 | #| 1 |# _ 38 | #| 2 |# _ 39 | #| 3 |# _ 40 | #| 4 |# _ 41 | #| 5 |# _ 42 | #| 6 |# _ 43 | #| 7 |# _ 44 | #| 8 |# _ 45 | #| 9 |# _ 46 | #| 0 |# _ 47 | #| [ |# _ 48 | #| ] |# _ 49 | #| bspc |# _ 50 | #| ins |# _ 51 | #| home |# _ 52 | #| pgup |# _ 53 | #| nlck |# _ 54 | #| kp/ |# _ 55 | #| kp* |# _ 56 | #| kp- |# _ 57 | #| tab |# _ 58 | #| ' |# _ 59 | #| , |# _ 60 | #| . |# _ 61 | #| p |# (fork p (cmd loginctl poweroff) (lsft rsft)) 62 | #| y |# _ 63 | #| f |# _ 64 | #| g |# _ 65 | #| c |# _ 66 | #| r |# (fork r (cmd loginctl reboot) (lsft rsft)) 67 | #| l |# (fork 68 | (fork 69 | (cmd nu -c "~/bin/locker -r") 70 | (cmd nu -c "~/bin/locker -s") 71 | (lalt ralt) 72 | ) 73 | (cmd nu -c "~/bin/locker -rS") 74 | (lsft rsft) 75 | ) 76 | #| / |# _ 77 | #| = |# _ 78 | #| \ |# _ 79 | #| del |# _ 80 | #| end |# _ 81 | #| pgdn |# _ 82 | #| kp7 |# _ 83 | #| kp8 |# _ 84 | #| kp9 |# _ 85 | #| kp+ |# _ 86 | #| caps |# @erm 87 | #| a |# _ 88 | #| o |# _ 89 | #| e |# _ 90 | #| u |# _ 91 | #| i |# _ 92 | #| d |# _ 93 | #| h |# (fork r (cmd loginctl hibernate) (lsft rsft)) 94 | #| t |# _ 95 | #| n |# _ 96 | #| s |# (fork 97 | (cmd xset dpms force off) 98 | (cmd loginctl suspend) 99 | (lsft rsft) 100 | ) 101 | #| - |# _ 102 | #| enter |# _ 103 | #| kp4 |# _ 104 | #| kp5 |# _ 105 | #| kp6 |# _ 106 | #| lsft |# _ 107 | #| ; |# _ 108 | #| q |# _ 109 | #| j |# (cmd nu -c "~/bin/cfg brightness -20") 110 | #| k |# (cmd nu -c "~/bin/cfg brightness +20") 111 | #| x |# _ 112 | #| b |# (cmd nu -c "~/bin/cfg bluetooth") 113 | #| m |# _ 114 | #| w |# (cmd nu -c "~/bin/cfg wifi") 115 | #| v |# _ 116 | #| z |# _ 117 | #| rsft |# _ 118 | #| up |# _ 119 | #| kp1 |# _ 120 | #| kp2 |# _ 121 | #| kp3 |# _ 122 | #| kprt |# _ 123 | #| lctrl |# _ 124 | #| lmeta |# _ 125 | #| lalt |# _ 126 | #| spc |# _ 127 | #| ralt |# _ 128 | #| rmeta |# _ 129 | #| menu |# _ 130 | #| rctrl |# _ 131 | #| left |# _ 132 | #| down |# _ 133 | #| rght |# _ 134 | #| kp0 |# _ 135 | #| kp. |# _ 136 | #| mute |# _ 137 | #| volu |# _ 138 | #| vold |# _ 139 | #| brup |# _ 140 | #| brdn |# _ 141 | #| blup |# _ 142 | #| bldn |# _ 143 | #| next |# _ 144 | #| pp |# _ 145 | #| prev |# _ 146 | #| plyr |# _ 147 | #| power |# _ 148 | #| sleep |# _ 149 | #| f13 |# _ 150 | #| f14 |# _ 151 | #| f15 |# _ 152 | #| f16 |# _ 153 | #| f17 |# _ 154 | #| f18 |# _ 155 | #| f19 |# _ 156 | #| f20 |# _ 157 | #| f21 |# _ 158 | #| f22 |# _ 159 | #| f23 |# _ 160 | #| f24 |# _ 161 | #| mlft |# _ 162 | #| mrgt |# _ 163 | #| mmid |# _ 164 | #| mfwd |# _ 165 | #| mbck |# _ 166 | ) 167 | -------------------------------------------------------------------------------- /src/config/kanata/layers/blank.kbd: -------------------------------------------------------------------------------- 1 | (defalias 2 | blk (layer-switch blank) 3 | ) 4 | 5 | (deflayer blank 6 | @erm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 7 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 8 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 9 | @erm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 10 | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 11 | _ _ _ _ _ _ _ _ _ _ _ _ _ 12 | 13 | #| mute |# _ 14 | #| volu |# _ 15 | #| vold |# _ 16 | #| brup |# _ 17 | #| brdn |# _ 18 | #| blup |# _ 19 | #| bldn |# _ 20 | #| next |# _ 21 | #| pp |# _ 22 | #| prev |# _ 23 | #| plyr |# _ 24 | #| power |# _ 25 | #| sleep |# _ 26 | #| f13 |# _ 27 | #| f14 |# _ 28 | #| f15 |# _ 29 | #| f16 |# _ 30 | #| f17 |# _ 31 | #| f18 |# _ 32 | #| f19 |# _ 33 | #| f20 |# _ 34 | #| f21 |# _ 35 | #| f22 |# _ 36 | #| f23 |# _ 37 | #| f24 |# _ 38 | #| mlft |# _ 39 | #| mrgt |# _ 40 | #| mmid |# _ 41 | #| mfwd |# _ 42 | #| mbck |# _ 43 | ) 44 | 45 | (deflayer blank 46 | #| esc |# @erm 47 | #| f1 |# _ 48 | #| f2 |# _ 49 | #| f3 |# _ 50 | #| f4 |# _ 51 | #| f5 |# _ 52 | #| f6 |# _ 53 | #| f7 |# _ 54 | #| f8 |# _ 55 | #| f9 |# _ 56 | #| f10 |# _ 57 | #| f11 |# _ 58 | #| f12 |# _ 59 | #| ssrq |# _ 60 | #| slck |# _ 61 | #| pause |# _ 62 | #| grv |# _ 63 | #| 1 |# _ 64 | #| 2 |# _ 65 | #| 3 |# _ 66 | #| 4 |# _ 67 | #| 5 |# _ 68 | #| 6 |# _ 69 | #| 7 |# _ 70 | #| 8 |# _ 71 | #| 9 |# _ 72 | #| 0 |# _ 73 | #| [ |# _ 74 | #| ] |# _ 75 | #| bspc |# _ 76 | #| ins |# _ 77 | #| home |# _ 78 | #| pgup |# _ 79 | #| nlck |# _ 80 | #| kp/ |# _ 81 | #| kp* |# _ 82 | #| kp- |# _ 83 | #| tab |# _ 84 | #| ' |# _ 85 | #| , |# _ 86 | #| . |# _ 87 | #| p |# _ 88 | #| y |# _ 89 | #| f |# _ 90 | #| g |# _ 91 | #| c |# _ 92 | #| r |# _ 93 | #| l |# _ 94 | #| / |# _ 95 | #| = |# _ 96 | #| \ |# _ 97 | #| del |# _ 98 | #| end |# _ 99 | #| pgdn |# _ 100 | #| kp7 |# _ 101 | #| kp8 |# _ 102 | #| kp9 |# _ 103 | #| kp+ |# _ 104 | #| caps |# @erm 105 | #| a |# _ 106 | #| o |# _ 107 | #| e |# _ 108 | #| u |# _ 109 | #| i |# _ 110 | #| d |# _ 111 | #| h |# _ 112 | #| t |# _ 113 | #| n |# _ 114 | #| s |# _ 115 | #| - |# _ 116 | #| enter |# _ 117 | #| kp4 |# _ 118 | #| kp5 |# _ 119 | #| kp6 |# _ 120 | #| lsft |# _ 121 | #| ; |# _ 122 | #| q |# _ 123 | #| j |# _ 124 | #| k |# _ 125 | #| x |# _ 126 | #| b |# _ 127 | #| m |# _ 128 | #| w |# _ 129 | #| v |# _ 130 | #| z |# _ 131 | #| rsft |# _ 132 | #| up |# _ 133 | #| kp1 |# _ 134 | #| kp2 |# _ 135 | #| kp3 |# _ 136 | #| kprt |# _ 137 | #| lctrl |# _ 138 | #| lmeta |# _ 139 | #| lalt |# _ 140 | #| spc |# _ 141 | #| ralt |# _ 142 | #| rmeta |# _ 143 | #| menu |# _ 144 | #| rctrl |# _ 145 | #| left |# _ 146 | #| down |# _ 147 | #| rght |# _ 148 | #| kp0 |# _ 149 | #| kp. |# _ 150 | #| mute |# _ 151 | #| volu |# _ 152 | #| vold |# _ 153 | #| brup |# _ 154 | #| brdn |# _ 155 | #| blup |# _ 156 | #| bldn |# _ 157 | #| next |# _ 158 | #| pp |# _ 159 | #| prev |# _ 160 | #| plyr |# _ 161 | #| power |# _ 162 | #| sleep |# _ 163 | #| f13 |# _ 164 | #| f14 |# _ 165 | #| f15 |# _ 166 | #| f16 |# _ 167 | #| f17 |# _ 168 | #| f18 |# _ 169 | #| f19 |# _ 170 | #| f20 |# _ 171 | #| f21 |# _ 172 | #| f22 |# _ 173 | #| f23 |# _ 174 | #| f24 |# _ 175 | #| mlft |# _ 176 | #| mrgt |# _ 177 | #| mmid |# _ 178 | #| mfwd |# _ 179 | #| mbck |# _ 180 | ) 181 | -------------------------------------------------------------------------------- /src/config/nushell/modules/mappings.nu: -------------------------------------------------------------------------------- 1 | export def main [] { 2 | [ 3 | 4 | # complete hint (word) 5 | { 6 | mode: vi_insert 7 | modifier: alt 8 | keycode: char_i 9 | event: { send: historyHintWordComplete } 10 | } 11 | 12 | # complete hint (full) 13 | { 14 | mode: vi_insert 15 | modifier: alt 16 | keycode: char_e 17 | event: { send: historyHintComplete } 18 | } 19 | 20 | { 21 | mode: vi_normal 22 | modifier: none 23 | keycode: char_~ 24 | event: { edit: capitalizeChar } 25 | } 26 | 27 | { 28 | mode: vi_insert 29 | modifier: control 30 | keycode: char_w 31 | event: { edit: cutWordLeft } 32 | } 33 | 34 | { 35 | mode: vi_insert 36 | modifier: control 37 | keycode: backspace 38 | event: { edit: backspaceWord } 39 | } 40 | 41 | { 42 | mode: vi_insert 43 | modifier: alt 44 | keycode: char_b 45 | event: { edit: moveWordLeft } 46 | } 47 | 48 | { 49 | mode: vi_insert 50 | modifier: alt 51 | keycode: char_f 52 | event: { edit: moveWordRight } 53 | } 54 | 55 | { 56 | mode: vi_insert 57 | modifier: control 58 | keycode: char_a 59 | event: { edit: moveToLineStart } 60 | } 61 | 62 | { 63 | mode: vi_insert 64 | modifier: control 65 | keycode: char_u 66 | event: { edit: cutFromStart } 67 | } 68 | 69 | { 70 | mode: [ vi_normal vi_insert ] 71 | modifier: alt 72 | keycode: enter 73 | event: { edit: insertString, value: (char nl) } 74 | } 75 | 76 | { 77 | mode: vi_insert 78 | modifier: control 79 | keycode: char_d 80 | event: { send: ctrlD } 81 | } 82 | 83 | { 84 | name: reload_config 85 | mode: [ vi_insert emacs ] 86 | modifier: none 87 | keycode: f5 88 | event: { 89 | send: executeHostCommand 90 | cmd: "source $nu.config-path" 91 | } 92 | } 93 | 94 | { 95 | name: fzf-cd 96 | mode: [ vi_insert emacs ] 97 | modifier: alt 98 | keycode: char_c 99 | event: { 100 | send: executeHostCommand 101 | cmd: "fzf-cd" 102 | } 103 | } 104 | 105 | { 106 | name: zoxide-query 107 | mode: [ vi_insert emacs ] 108 | modifier: alt 109 | keycode: char_s 110 | event: { 111 | send: executeHostCommand 112 | cmd: "zoxide query -i | cd $in" 113 | } 114 | } 115 | 116 | # qol 117 | 118 | # input first word of prior command 119 | { 120 | mode: vi_insert 121 | modifier: alt 122 | keycode: "char_," 123 | event: { 124 | send: executeHostCommand 125 | cmd: "commandline edit --insert (history | last | get command | parse --regex `^(?P[^ ]+)` | get val.0)" 126 | } 127 | } 128 | 129 | # input last word of prior command 130 | { 131 | mode: vi_insert 132 | modifier: alt 133 | keycode: char_. 134 | event: { 135 | send: executeHostCommand 136 | cmd: "commandline edit --insert (history | last | get command | parse --regex `(?P[^ ]+)$` | get val.0)" 137 | } 138 | } 139 | 140 | # menus 141 | 142 | { 143 | mode: [ vi_normal vi_insert emacs ] 144 | modifier: alt 145 | keycode: char_/ 146 | event: { 147 | until: [ 148 | { send: menu, name: commands_menu } 149 | { send: menuPageNext } 150 | ] 151 | } 152 | } 153 | 154 | { 155 | mode: [ vi_normal vi_insert emacs ] 156 | modifier: alt 157 | keycode: char_v 158 | event: { 159 | until: [ 160 | { send: menu, name: vars_menu } 161 | { send: menuPageNext } 162 | ] 163 | } 164 | } 165 | 166 | { 167 | mode: [ vi_insert emacs ] 168 | modifier: control 169 | keycode: char_t 170 | event: { send: menu, name: files_menu } 171 | } 172 | 173 | { 174 | mode: [ vi_insert emacs ] 175 | modifier: alt 176 | keycode: char_d 177 | event: { send: menu, name: folders_menu } 178 | } 179 | 180 | { 181 | name: ide_completion_menu 182 | modifier: alt 183 | keycode: space 184 | mode: [emacs vi_normal vi_insert] 185 | event: { 186 | until: [ 187 | { send: menu name: ide_completion_menu } 188 | { send: menunext } 189 | { edit: complete } 190 | ] 191 | } 192 | } 193 | 194 | ] 195 | } 196 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # meta 2 | 3 | - combine startup.sh and i3 startup section 4 | - move gtk-vikb into repo as submodule with build script 5 | - split `lib` into `lib` and `src` 6 | - look into [these dotfiles](https://github.com/xero/dotfiles) for sexiness 7 | 8 | ## dots 9 | 10 | - make `upgrade/U`, for things like submodules 11 | - make `update` announce uncommitted changes in `dotfiles` and `sync` 12 | - make `dots-get`, which will return requested settings/paths/variables 13 | - move `THEME` into a more general place with more, like a toml file 14 | 15 | ### install 16 | 17 | - support arguments 18 | - `--cli`: non-X mode (no need to install i3 things on a server, for example) 19 | - vet using a `Makefile` 20 | - call `dots update` from systemd service 21 | - possibly make a (generated? githook?) manifest file, to make cleanup easier 22 | - add a clause to `update` that creates new links and removes old 23 | 24 | ## docs 25 | 26 | - improve/update 27 | - screenshots 28 | - meta (kind of pun), as in keyboard layout, remapped keys, etc. 29 | - vim setup 30 | - git aliases 31 | - wm workflow 32 | - tig workflow 33 | 34 | # apps 35 | 36 | ## vim 37 | 38 | - modes 39 | - tests 40 | - make mappings for opening the test for the current file (and vice versa) 41 | - buffer 42 | - mapping to delete all unused/hidden buffers (not just empty) 43 | - diff 44 | - :LineDiff 45 | - :DiffChanges 46 | - :git diff 47 | - sessions 48 | - fix and/or make stuff that actually works 49 | - [pluginify my modes](https://stevelosh.com/blog/2011/09/writing-vim-plugins/#s6-mapping-keys-the-right-way) 50 | 51 | ## i3 52 | 53 | - make playerctl player changeable 54 | - modes 55 | - break out modes into separate files 56 | - add a generated help notification for each mode, on `?` 57 | - universalize the media/resize/move increments and whatnot 58 | - make sure there are mappings for both big and small increments 59 | - integrate todoist 60 | 61 | ## tmux 62 | 63 | - use `choose-session` to pick a session to link current session to 64 | 65 | ### tp 66 | 67 | - break `tp` and friends into separate repo 68 | - use `j -sl | fzf +s --tac` to give a list of recent dirs 69 | - add option to `ta` and `tp` to `j`ump to the directory and make the session name the destination dir 70 | - should possibly share code with `tp` and `ta`, to determine the session name 71 | - universalize all of the `tl`, `ta`, `tp`, etc things, into one binary 72 | - `t p`, `t l`, etc. 73 | 74 | ## tig 75 | 76 | - fix opening files in neovim (again) 77 | - mappings 78 | - scrap 79 | - stash / pop 80 | - per file 81 | - all 82 | - checkout tags 83 | - the main checkout bind should probably just support tags too 84 | - add tags to the list branch 85 | - add mappings to wiki 86 | 87 | ## copyq 88 | 89 | - make it use my dotfiles theme 90 | - figure out why URLs are duplicated 91 | 92 | # shell 93 | 94 | - add `-n` arg to `copy` to strip out `\n`s 95 | 96 | ## for-{in,of} 97 | 98 | - break out into separate repo 99 | 100 | # X11 101 | 102 | - [modularize `.Xresources`](https://wiki.archlinux.org/index.php/x_resources#Include_files) 103 | - look into [existing `.Xresources` themes](http://www.noobslab.com/) 104 | 105 | ## keys 106 | 107 | - vet breaking out into separate repo 108 | 109 | # awmni / owmni 110 | 111 | - client-agnostic back-end, which should work with X and terminals alike 112 | - clients 113 | - rofi 114 | - fzf 115 | - pick 116 | - selecta 117 | - dmenu 118 | - plugins 119 | - git 120 | - `git branch | cut -c 3- | owmni | xargs git checkout` 121 | - `git branch -r | cut -c 10- | fzf | xargs git checkout` 122 | - i3 123 | - copyq 124 | - zeal 125 | - todoist 126 | - apps 127 | - open (`.desktop` files) 128 | - run (`/usr/bin`, etc., or maybe everything in `$PATH`) 129 | - kill 130 | - switch-to (like `rofi`'s window mode) 131 | - media 132 | - computer 133 | - fasd 134 | - files 135 | - recursive list of files 136 | - all 137 | - respecting .gitignore 138 | - files in current folder 139 | - all 140 | - respecting .gitignore 141 | - projects 142 | - open tmux panes on certain workspaces, etc 143 | - windows 144 | - pidgin / finch 145 | - initiate IMs 146 | - switch to opened IMs 147 | - send a message 148 | - email (mutt?) 149 | - grunt 150 | -------------------------------------------------------------------------------- /src/config/nvim/plugin/modules/language/code.lua: -------------------------------------------------------------------------------- 1 | local code = Module.new("code", "c") 2 | 3 | pack "monaqa/dial.nvim" 4 | 5 | -- 6 | -- SETTINGS 7 | -- 8 | 9 | -- indents 10 | vim.opt.shiftwidth = 0 11 | vim.opt.tabstop = 2 12 | 13 | -- spelling 14 | vim.opt.spell = true 15 | vim.opt.spelllang = "en_us" 16 | 17 | -- meta 18 | vim.opt.swapfile = false 19 | 20 | -- 21 | -- FUCTIONS 22 | -- 23 | 24 | local augend = require "dial.augend" 25 | local constant = function(elements, options) 26 | options = options or {} 27 | options.elements = elements 28 | if options.preserve_case == nil then options.preserve_case = true end 29 | return augend.constant.new(options) 30 | end 31 | 32 | -- 33 | -- SETUP 34 | -- 35 | 36 | require("mini.align").setup() 37 | require("mini.splitjoin").setup() 38 | require("mini.surround").setup() 39 | 40 | require("mini.pairs").setup({ 41 | mappings = { 42 | -- Prevents the action if the cursor is just before any character or next to a "\". 43 | ["("] = { action = "open", pair = "()", neigh_pattern = "[^\\][%s%)%]%}]" }, 44 | ["["] = { action = "open", pair = "[]", neigh_pattern = "[^\\][%s%)%]%}]" }, 45 | ["{"] = { action = "open", pair = "{}", neigh_pattern = "[^\\][%s%)%]%}]" }, 46 | -- This is default (prevents the action if the cursor is just next to a "\"). 47 | [")"] = { action = "close", pair = "()", neigh_pattern = "[^\\]." }, 48 | ["]"] = { action = "close", pair = "[]", neigh_pattern = "[^\\]." }, 49 | ["}"] = { action = "close", pair = "{}", neigh_pattern = "[^\\]." }, 50 | -- Prevents the action if the cursor is just before or next to any character. 51 | ['"'] = { action = "closeopen", pair = '""', neigh_pattern = "[^%w][^%w]", register = { cr = false } }, 52 | ["'"] = { action = "closeopen", pair = "''", neigh_pattern = "[^%w][^%w]", register = { cr = false } }, 53 | ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^%w][^%w]", register = { cr = false } }, 54 | }, 55 | }) 56 | 57 | require("mini.move").setup({ 58 | mappings = { 59 | down = "", 60 | left = "", 61 | right = "", 62 | up = "", 63 | 64 | line_down = "", 65 | line_left = "", 66 | line_right = "", 67 | line_up = "", 68 | } 69 | }) 70 | 71 | require("dial.config").augends:register_group({ 72 | default = { 73 | augend.constant.alias.bool, 74 | augend.date.alias["%H:%M"], 75 | augend.date.alias["%Y-%m-%d"], 76 | augend.date.alias["%Y/%m/%d"], 77 | augend.date.alias["%m/%d"], 78 | augend.date.alias["%m/%d/%Y"], 79 | augend.integer.alias.binary, 80 | augend.integer.alias.decimal_int, 81 | augend.integer.alias.hex, 82 | augend.integer.alias.octal, 83 | augend.semver.alias.semver, 84 | 85 | constant({ "&&", "||" }, { word = false }), 86 | constant({ "True", "False" }), 87 | constant({ "and", "or" }), 88 | constant({ "before", "after" }, { word = false }), 89 | constant({ "high", "low" }), 90 | constant({ "mon", "tues", "wed", "thurs", "fri", "sat", "sun" }), 91 | constant({ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" }, { word = false }), 92 | constant({ "on", "off" }), 93 | constant({ "start", "stop" }), 94 | constant({ "up", "down", "left", "right" }), 95 | constant({ "yes", "no" }), 96 | constant({ "inner", "outer" }), 97 | constant({ "next", "previous" }, { word = false }), 98 | }, 99 | }) 100 | 101 | -- 102 | -- MAPPINGS 103 | -- 104 | 105 | -- enhancements 106 | 107 | -- delete word 108 | map("", "", "i") 109 | 110 | -- redo 111 | map("U", "") 112 | 113 | -- jump forth 114 | map("", "") 115 | 116 | -- find 117 | map("/", [[/\v]], "", { silent = false }) 118 | 119 | -- increment/decrement 120 | local dial = require "dial.map" 121 | map("", dial.inc_normal()) 122 | map("", dial.dec_normal()) 123 | 124 | local mini_pick = require "mini.pick" 125 | code:map("s", mini_pick.registry.spellsuggest) 126 | 127 | map("grd", vim.lsp.buf.definition) 128 | map("grf", vim.lsp.buf.format) 129 | 130 | -- 131 | -- EVENTS 132 | -- 133 | 134 | -- preserve cursor position [:h restore-cursor] 135 | vim.api.nvim_create_autocmd("BufRead", { 136 | group = code.group, 137 | command = [[ 138 | if line("'\"") > 1 && line("'\"") <= line("$") | exec "normal! g`\"" | endif 139 | ]], 140 | }) 141 | -------------------------------------------------------------------------------- /src/config/nushell/env.nu: -------------------------------------------------------------------------------- 1 | ## 2 | ## path 3 | ## 4 | 5 | $env.PATH = ( 6 | $env.PATH 7 | | prepend [ 8 | # personal 9 | "~/bin", 10 | "~/local/bin", 11 | "~/.local/bin", 12 | 13 | # domain 14 | "~/dev/bin", 15 | 16 | # apps 17 | "~/.asdf/shims", 18 | ] 19 | | append [ 20 | # system 21 | "/opt/homebrew/bin", 22 | 23 | # lang 24 | "~/.bun/bin", 25 | "~/.cargo/bin", 26 | "~/.gem/ruby/3.0.0/bin", 27 | "~/.nimble/bin", 28 | "~/.rvm/bin", 29 | "~/go/bin", 30 | "~/.dotnet/tools", 31 | ] 32 | ) 33 | 34 | ## 35 | ## prompt 36 | ## 37 | 38 | def color [color: string] { 39 | each { $"(ansi $color)($in)(ansi reset)" } 40 | } 41 | 42 | def prompt_left [] { 43 | let dir = match (do -i { $env.PWD | path relative-to $nu.home-path }) { 44 | null => $env.PWD 45 | "" => "~" 46 | $relative_pwd => ([~ $relative_pwd] | path join) 47 | } 48 | 49 | let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold }) 50 | let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_blue_bold }) 51 | let seg_path = $path_color + $dir 52 | 53 | $seg_path | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)" 54 | } 55 | 56 | def prompt_right [] { 57 | let seg_time = ( 58 | [ 59 | (ansi reset) 60 | (ansi magenta) 61 | (date now | format date "%X") 62 | ] 63 | | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" 64 | ) 65 | 66 | let seg_vcs = ( 67 | if (do { git rev-parse --abbrev-ref HEAD } | complete | get stderr | is-empty) { 68 | $"[(git rev-parse --abbrev-ref HEAD | str trim)]" | color yellow 69 | } 70 | ) 71 | 72 | let seg_exit_code = if ($env.LAST_EXIT_CODE != 0) { 73 | ([ 74 | (ansi rb) 75 | ($env.LAST_EXIT_CODE) 76 | ] | str join) 77 | } else { "" } 78 | 79 | ([ 80 | $seg_exit_code 81 | $seg_vcs 82 | $seg_time 83 | ] | str join (char space)) 84 | } 85 | 86 | # Use nushell functions to define your right and left prompt 87 | $env.PROMPT_COMMAND = { prompt_left } 88 | $env.PROMPT_COMMAND_RIGHT = { prompt_right } 89 | 90 | # The prompt indicators are environmental variables that represent 91 | # the state of the prompt 92 | $env.PROMPT_INDICATOR = "〉" 93 | $env.PROMPT_INDICATOR_VI_INSERT = $"〉(ansi -e '6 q')" 94 | $env.PROMPT_INDICATOR_VI_NORMAL = $": (ansi -e '2 q')" 95 | $env.PROMPT_MULTILINE_INDICATOR = "::: " 96 | 97 | ## 98 | ## setup 99 | ## 100 | 101 | # Directories to search for scripts when calling source or use 102 | # 103 | # By default, /scripts is added 104 | const NU_LIB_DIRS = [ 105 | ($nu.default-config-dir | path join modules) 106 | ($nu.data-dir | path join 'completions') 107 | "~" 108 | ] 109 | 110 | # Directories to search for plugin binaries when calling register 111 | # 112 | # By default, /plugins is added 113 | const NU_PLUGIN_DIRS = [ 114 | ($nu.config-path | path dirname | path join plugins) 115 | ] 116 | 117 | ## 118 | ## settings 119 | ## 120 | 121 | # make gpg open in-terminal dialog 122 | $env.GPG_TTY = (tty | str trim) 123 | 124 | $env.EDITOR = "nvim" 125 | $env.BROWSER = "thorium-browser" 126 | 127 | ## 128 | ## display 129 | ## 130 | 131 | $env.XCURSOR_SIZE = 32 132 | 133 | ## 134 | ## langs 135 | ## 136 | 137 | # nodejs 138 | $env.N_PREFIX = "~/local" 139 | 140 | # vlang 141 | # $env.VROOT = "/usr/local/bin/v" 142 | 143 | # .NET 144 | $env.DOTNET_ROLL_FORWARD = "LatestMajor" 145 | 146 | ## 147 | ## apps 148 | ## 149 | 150 | # fzf 151 | $env.FZF_DEFAULT_COMMAND = "fd --type file --hidden --follow" 152 | $env.FZF_DEFAULT_OPTS = ([ 153 | "--cycle" 154 | "--bind 'alt-enter:print-query,tab:toggle-up,ctrl-y:execute-silent(echo {} | copy)'" 155 | "--preview 'bat --line-range :500 {}'" 156 | ] | str join " ") 157 | 158 | # steam 159 | $env.STEAM_COMPAT_DATA_PATH = "/media/data/games/proton/" 160 | 161 | # godot 162 | $env.GODOT_BIN = "/usr/bin/godot" 163 | $env.GODOT4_BIN = $env.GODOT_BIN 164 | 165 | # sensible pagers 166 | $env.PAGER = "less -FRSX" 167 | $env.MANPAGER = "sh -c 'col -bx | bat -l man -p'" 168 | $env.MANROFFOPT = "-c" 169 | 170 | # pass 171 | $env.PASSWORD_STORE_ENABLE_EXTENSIONS = "true" # [sic] 172 | 173 | # tig 174 | # NOTE: workaround because of https://github.com/jonas/tig/issues/1367 175 | $env.GIT_EDITOR = "nvim" 176 | 177 | ## 178 | ## insurance 179 | ## 180 | 181 | if ("~/local/config.nu" | path exists | not $in) { 182 | touch ~/local/config.nu 183 | } 184 | -------------------------------------------------------------------------------- /src/.termux/termux.properties: -------------------------------------------------------------------------------- 1 | ### After making changes and saving you need to run `termux-reload-settings` 2 | ### to update the terminal. All information here can also be found on the 3 | ### wiki: https://wiki.termux.com/wiki/Terminal_Settings 4 | 5 | ############### 6 | # General 7 | ############### 8 | 9 | ### Allow external applications to execute arbitrary commands within Termux. 10 | ### This potentially could be a security issue, so option is disabled by 11 | ### default. Uncomment to enable. 12 | allow-external-apps = true 13 | 14 | ### Default working directory that will be used when launching the app. 15 | # default-working-directory = /data/data/com.termux/files/home 16 | 17 | ### Uncomment to disable toasts shown on terminal session change. 18 | # disable-terminal-session-change-toast = true 19 | 20 | ### Uncomment to not show soft keyboard on application start. 21 | # hide-soft-keyboard-on-startup = true 22 | 23 | ### Uncomment to let keyboard toggle button to enable or disable software 24 | ### keyboard instead of showing/hiding it. 25 | # soft-keyboard-toggle-behaviour = enable/disable 26 | 27 | ### Adjust terminal scrollback buffer. Max is 50000. May have negative 28 | ### impact on performance. 29 | terminal-transcript-rows = 20000 30 | 31 | ### Uncomment to use volume keys for adjusting volume and not for the 32 | ### extra keys functionality. 33 | # volume-keys = volume 34 | 35 | ############### 36 | # Fullscreen mode 37 | ############### 38 | 39 | ### Uncomment to let Termux start in full screen mode. 40 | # fullscreen = true 41 | 42 | ### Uncomment to attempt workaround layout issues when running in 43 | ### full screen mode. 44 | # use-fullscreen-workaround = true 45 | 46 | ############### 47 | # Cursor 48 | ############### 49 | 50 | ### Cursor blink rate. Values 0, 100 - 2000. 51 | # terminal-cursor-blink-rate = 0 52 | 53 | ### Cursor style: block, bar, underline. 54 | # terminal-cursor-style = block 55 | 56 | ############### 57 | # Extra keys 58 | ############### 59 | 60 | ### Settings for choosing which set of symbols to use for illustrating keys. 61 | ### Choose between default, arrows-only, arrows-all, all and none 62 | # extra-keys-style = default 63 | 64 | ### Force capitalize all text in extra keys row button labels. 65 | # extra-keys-text-all-caps = true 66 | 67 | ### Two rows with more keys 68 | extra-keys = [ \ 69 | [ \ 70 | { key: ESC, popup: TAB }, \ 71 | { key: CTRL, popup: { macro: 'CTRL u', display: 'tmux' } }, \ 72 | { key: ALT, popup: { macro: 'CTRL d', display: 'exit' } }, \ 73 | { key: DOWN, popup: UP }, \ 74 | { key: RIGHT, popup: LEFT }, \ 75 | { key: KEYBOARD, popup: { macro: 'CTRL |', display: 'NEW' } }, \ 76 | { macro: 'CTRL >', display: 'NEXT', popup: { macro: 'CTRL <', display: 'PREV' } } \ 77 | ] \ 78 | ] 79 | 80 | ############### 81 | # Colors/themes 82 | ############### 83 | 84 | ### Force black colors for drawer and dialogs 85 | # use-black-ui = true 86 | 87 | ############### 88 | # UI 89 | ############### 90 | 91 | terminal-margin-horizontal = 0 92 | terminal-margin-vertical = 0 93 | 94 | ############### 95 | # HW keyboard shortcuts 96 | ############### 97 | 98 | ### Disable hardware keyboard shortcuts. 99 | # disable-hardware-keyboard-shortcuts = true 100 | 101 | ### Open a new terminal with ctrl + t (volume down + t) 102 | shortcut.create-session = ctrl + | 103 | 104 | ### Go one session down with (for example) ctrl + 2 105 | shortcut.next-session = ctrl + > 106 | 107 | ## Go one session up with (for example) ctrl + 1 108 | shortcut.previous-session = ctrl + < 109 | 110 | ### Rename a session with (for example) ctrl + n 111 | # shortcut.rename-session = ctrl + n 112 | 113 | ############### 114 | # Bell key 115 | ############### 116 | 117 | ### Vibrate device (default). 118 | # bell-character = vibrate 119 | 120 | ### Beep with a sound. 121 | # bell-character = beep 122 | 123 | ### Ignore bell character. 124 | # bell-character = ignore 125 | 126 | ############### 127 | # Back key 128 | ############### 129 | 130 | ### Send the Escape key. 131 | back-key=escape 132 | 133 | ### Hide keyboard or leave app (default). 134 | # back-key=back 135 | 136 | ############### 137 | # Keyboard issue workarounds 138 | ############### 139 | 140 | ### Letters might not appear until enter is pressed on Samsung devices 141 | # enforce-char-based-input = true 142 | 143 | ### ctrl+space (for marking text in emacs) does not work on some devices 144 | # ctrl-space-workaround = true 145 | -------------------------------------------------------------------------------- /src/.myclirc: -------------------------------------------------------------------------------- 1 | # vi: ft=dosini 2 | [main] 3 | 4 | # Enables context sensitive auto-completion. If this is disabled the all 5 | # possible completions will be listed. 6 | smart_completion = True 7 | 8 | # Multi-line mode allows breaking up the sql statements into multiple lines. If 9 | # this is set to True, then the end of the statements must have a semi-colon. 10 | # If this is set to False then sql statements can't be split into multiple 11 | # lines. End of line (return) is considered as the end of the statement. 12 | multi_line = False 13 | 14 | # Destructive warning mode will alert you before executing a sql statement 15 | # that may cause harm to the database such as "drop table", "drop database" 16 | # or "shutdown". 17 | destructive_warning = True 18 | 19 | # log_file location. 20 | log_file = ~/.mycli.log 21 | 22 | # Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" 23 | # and "DEBUG". "NONE" disables logging. 24 | log_level = INFO 25 | 26 | # Log every query and its results to a file. Enable this by uncommenting the 27 | # line below. 28 | # audit_log = ~/.mycli-audit.log 29 | 30 | # Timing of sql statments and table rendering. 31 | timing = True 32 | 33 | # Table format. Possible values: ascii, double, github, 34 | # psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html, 35 | # latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, csv. 36 | # Recommended: ascii 37 | table_format = double 38 | 39 | # Syntax coloring style. Possible values (many support the "-dark" suffix): 40 | # manni, igor, xcode, vim, autumn, vs, rrt, native, perldoc, borland, tango, emacs, 41 | # friendly, monokai, paraiso, colorful, murphy, bw, pastie, paraiso, trac, default, 42 | # fruity. 43 | # Screenshots at http://mycli.net/syntax 44 | syntax_style = monokai 45 | 46 | # Keybindings: Possible values: emacs, vi. 47 | # Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL. 48 | # When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. 49 | key_bindings = emacs 50 | 51 | # Enabling this option will show the suggestions in a wider menu. Thus more items are suggested. 52 | wider_completion_menu = False 53 | 54 | # MySQL prompt 55 | # \D - The full current date 56 | # \d - Database name 57 | # \h - Hostname of the server 58 | # \m - Minutes of the current time 59 | # \n - Newline 60 | # \P - AM/PM 61 | # \p - Port 62 | # \R - The current time, in 24-hour military time (0–23) 63 | # \r - The current time, standard 12-hour time (1–12) 64 | # \s - Seconds of the current time 65 | # \t - Product type (Percona, MySQL, MariaDB) 66 | # \u - Username 67 | prompt = '\t \u@\h:\d> ' 68 | prompt_continuation = '-> ' 69 | 70 | # Skip intro info on startup and outro info on exit 71 | less_chatty = True 72 | 73 | # Use alias from --login-path instead of host name in prompt 74 | login_path_as_host = False 75 | 76 | # Cause result sets to be displayed vertically if they are too wide for the current window, 77 | # and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.) 78 | auto_vertical_output = False 79 | 80 | # keyword casing preference. Possible values "lower", "upper", "auto" 81 | keyword_casing = auto 82 | 83 | # disabled pager on startup 84 | enable_pager = True 85 | 86 | # Custom colors for the completion menu, toolbar, etc. 87 | [colors] 88 | # Completion menus. 89 | Token.Menu.Completions.Completion.Current = 'bg:#00aaaa #000000' 90 | Token.Menu.Completions.Completion = 'bg:#008888 #ffffff' 91 | Token.Menu.Completions.MultiColumnMeta = 'bg:#aaffff #000000' 92 | Token.Menu.Completions.ProgressButton = 'bg:#003333' 93 | Token.Menu.Completions.ProgressBar = 'bg:#00aaaa' 94 | 95 | # Query results 96 | Token.Output.Header = 'bold' 97 | Token.Output.OddRow = '' 98 | Token.Output.EvenRow = '' 99 | 100 | # Selected text. 101 | Token.SelectedText = '#ffffff bg:#6666aa' 102 | 103 | # Search matches. (reverse-i-search) 104 | Token.SearchMatch = '#ffffff bg:#4444aa' 105 | Token.SearchMatch.Current = '#ffffff bg:#44aa44' 106 | 107 | # The bottom toolbar. 108 | Token.Toolbar = 'bg:#222222 #aaaaaa' 109 | Token.Toolbar.Off = 'bg:#222222 #888888' 110 | Token.Toolbar.On = 'bg:#222222 #ffffff' 111 | 112 | # Search/arg/system toolbars. 113 | Token.Toolbar.Search = 'noinherit bold' 114 | Token.Toolbar.Search.Text = 'nobold' 115 | Token.Toolbar.System = 'noinherit bold' 116 | Token.Toolbar.Arg = 'noinherit bold' 117 | Token.Toolbar.Arg.Text = 'nobold' 118 | 119 | # Favorite queries. 120 | [favorite_queries] 121 | 122 | # Use the -d option to reference a DSN. 123 | [alias_dsn] 124 | # example_dsn = mysql://[user[:password]@][host][:port][/dbname] 125 | -------------------------------------------------------------------------------- /bin/diffconflicts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # A better vimdiff mergetool for Git 4 | # 5 | # Git does a great job resolving merge conflicts automatically but there are 6 | # times when human intervention is still needed. Git resolves all the conflicts 7 | # that it is able to and finally wraps each conflict it cannot resolve within 8 | # special markers which must be resolved by a human. 9 | # 10 | # The vertical format and lack of syntax highlighting in the plain conflict 11 | # marker layout makes it difficult to spot subtle conflicts such as 12 | # single-character changes and this is where a two-way diff really shines! 13 | # To see this explained using screenshots, see: 14 | # http://vim.wikia.com/wiki/A_better_Vimdiff_Git_mergetool 15 | # 16 | # This script, when used as a Git mergetool, opens each "side" of the conflict 17 | # markers in a two-way vimdiff window. This combines all the awesome of Git's 18 | # automatic merging savvy with the awesome and simplicity of a simple two-way 19 | # diff. 20 | # 21 | # Add this mergetool to your ~/.gitconfig (you can substitute gvim for vim): 22 | # 23 | # git config --global merge.tool diffconflicts 24 | # git config --global mergetool.diffconflicts.cmd 'diffconflicts vim $BASE $LOCAL $REMOTE $MERGED' 25 | # git config --global mergetool.diffconflicts.trustExitCode true 26 | # git config --global mergetool.diffconflicts.keepBackup false 27 | # 28 | # The next time you perform a merge with conflicts, invoke this tool with the 29 | # following command. (Of course you can set it as your default mergetool as 30 | # well.) 31 | # 32 | # git mergetool --tool diffconflicts 33 | # 34 | # This tool will open three tabs in Vim that each provide a different way to 35 | # view the conflicts. You can resolve the conflicts in the first tab and save 36 | # and exit the file. This will also mark the conflict as resolved in Git. 37 | # 38 | # Tab1 is a two-way diff of just the conflicts. Resolve the conflicts here 39 | # and save the file. 40 | # +--------------------------------+ 41 | # | LCONFL | RCONFL | 42 | # +--------------------------------+ 43 | # Tab2 is a three-way diff of the original files and the merge base. This is 44 | # the traditional three-way diff. Although noisy, it is occasionally useful 45 | # to view the three original states of the conflicting file before the merge. 46 | # +--------------------------------+ 47 | # | LOCAL | BASE | REMOTE | 48 | # +--------------------------------+ 49 | # Tab3 is the in-progress merge that Git has written to the filesystem 50 | # containing the conflict markers. I.e., the file you would normally edit by 51 | # hand when not using a mergetool. 52 | # +--------------------------------+ 53 | # | <<<<<<< HEAD | 54 | # | LCONFL | 55 | # | ======= | 56 | # | RCONFL | 57 | # | >>>>>>> someref | 58 | # +--------------------------------+ 59 | # 60 | # Workflow: 61 | # 62 | # 1. Save your changes to the LCONFL temporary file (the left window on the 63 | # first tab; also the only file that isn't read-only). 64 | # 2. The LOCAL, BASE, and REMOTE versions of the file are available in the 65 | # second tabpage if you want to look at them. 66 | # 3. When vimdiff exits cleanly, the file containing the conflict markers 67 | # will be updated with the contents of your LCONFL file edits. 68 | # 69 | # NOTE: Use :cq to abort the merge and exit Vim with an error code. 70 | 71 | if [[ -z $@ || $# != "5" ]] ; then 72 | echo -e "Usage: $0 \$EDITOR \$BASE \$LOCAL \$REMOTE \$MERGED" 73 | exit 1 74 | fi 75 | 76 | cmd="$1" 77 | BASE="$2" 78 | LOCAL="$3" 79 | REMOTE="$4" 80 | MERGED="$5" 81 | printf -v QBASE '%q' "${BASE}" 82 | printf -v QLOCAL '%q' "${LOCAL}" 83 | printf -v QREMOTE '%q' "${REMOTE}" 84 | printf -v QMERGED '%q' "${MERGED}" 85 | 86 | # Temporary files for left and right side 87 | LCONFL="${MERGED}.OURS.$$.tmp" 88 | RCONFL="${MERGED}.THEIRS.$$.tmp" 89 | 90 | # Always delete our temp files; Git will handle it's own temp files 91 | trap 'rm -f "'"${LCONFL}"'" "'"${RCONFL}"'"' SIGINT SIGTERM EXIT 92 | 93 | # Remove the conflict markers for each 'side' and put each into a temp file 94 | sed -e '/^<<<<<<< /,/^=======$/d' -e '/^>>>>>>> /d' "${MERGED}" > "${LCONFL}" 95 | sed -e '/^=======$/,/^>>>>>>> /d' -e '/^<<<<<<< /d' "${MERGED}" > "${RCONFL}" 96 | 97 | # Fire up vimdiff 98 | $cmd -f -R -d "${LCONFL}" "${RCONFL}" \ 99 | -c ":set noro" \ 100 | -c ":tabe $QLOCAL" -c ":vert diffs $QBASE" -c ":vert diffs $QREMOTE" \ 101 | -c ":winc t" -c ":tabe $QMERGED" -c ":tabfir" 102 | 103 | EC=$? 104 | 105 | # Overwrite $MERGED only if vimdiff exits cleanly. 106 | if [[ $EC == "0" ]] ; then 107 | cat "${LCONFL}" > "${MERGED}" 108 | fi 109 | 110 | exit $EC 111 | --------------------------------------------------------------------------------