261 Commits

Author SHA1 Message Date
548734d948 feat: Updates nvim config. 2026-02-15 13:22:59 -05:00
0a59fef11c fix: Fixes hyprpaper configuration, updates to new syntax. 2026-02-06 15:38:19 -05:00
fdf1ba6fb0 feat: Set TERM at bottom of .zshrc when in a devpod environment so that tmux works inside dev container. 2026-02-02 10:39:56 -05:00
17d83c347d feat: Adds devpod module to starship prompt. 2026-02-02 09:37:16 -05:00
c4faef634a feat: Working on devpod in starship 2026-02-02 09:20:37 -05:00
2795a86441 feat: Adds container component to starship prompt. 2026-02-02 09:11:19 -05:00
03244bd272 feat: Updates devcontainer-env 2026-02-02 09:01:50 -05:00
37b97b00f5 feat: Updates to nvim config 2026-02-02 08:48:51 -05:00
5d6cb3a843 feat: Adds tmux config to devcontainer-env. 2026-02-01 16:56:30 -05:00
5561f3ccaf feat: Updates devcontainer-env to pull nvim submodule. 2026-02-01 15:57:24 -05:00
3a82ae15df feat: Updates neovim config. 2026-02-01 14:47:04 -05:00
d26ca008c0 feat: Adds devcontainer-env script, which installs minimal dotfiles when working in a devcontainer. 2026-02-01 13:00:13 -05:00
d29876b367 feat: Adds ste alias to perform swift tests with code coverage enabled. 2026-02-01 12:11:04 -05:00
24440f845b feat: Updates to nvim config 2026-01-30 10:08:41 -05:00
4a08de9573 fix: Fixes typo in hyprtoolkit config 2026-01-06 10:39:25 -05:00
b1c3b16cc6 feat: Updates neovim config. 2026-01-05 10:54:06 -05:00
b159565288 feat: Adds swiftly env support to zshrc. 2025-12-31 12:27:35 -05:00
df876d2cac feat: Adds repos script to clone a few repositories on new installation / machine. 2025-12-18 10:40:08 -05:00
e052f0c394 fix: Fixes dp function 2025-12-18 10:07:59 -05:00
0d916fe960 feat: Updates system to include cifs utils and mounts. 2025-12-16 13:06:09 -05:00
1b504cca65 fix: Moves aap script, so that it can be used from airflow assessment template scripts. 2025-12-15 12:29:43 -05:00
fb0e4d705b feat: Adds airflow assessment generation to hpa scripts. 2025-12-15 12:21:13 -05:00
b9f248926b feat: Updates to qcal configuration. 2025-12-10 14:57:20 -05:00
f798ef2e4e feat: Adds runs/calendar and updates hyprkeybinds. 2025-12-10 14:25:03 -05:00
fa47fcaed7 feat: Moves hyprland workspace configuration to it's own file. 2025-12-10 11:22:44 -05:00
f39a9113d6 feat: Moves hyprland workspace configuration to it's own file. 2025-12-10 11:21:50 -05:00
207e4469b2 feat: Adds jellyfin-tui run and configuration, updates ghostty font size. 2025-12-10 10:01:24 -05:00
047c241df8 feat: Adds localsend keybind. 2025-12-09 16:38:00 -05:00
b8bf70f117 feat: Adds todo for setting up pipewire. 2025-12-06 14:04:52 -05:00
bec884f866 feat: Adds mail todo, updates hyprland run to not use '-git' packages. 2025-12-05 13:26:21 -05:00
943427b3e1 feat: Adds runs/after/localsend to set firewall ports. 2025-12-04 08:36:54 -05:00
eae3bfbc90 feat: Adds github-cli to runs/dev. 2025-11-25 15:51:57 -05:00
6621475808 feat: Removes unused hyprworkspaces.conf 2025-11-24 08:01:09 -05:00
090a0681ca feat: Reverts to not including hyprworkspaces.conf. 2025-11-23 08:17:56 -05:00
3acaf486c0 feat: Updates nvim config. 2025-11-22 12:58:49 -05:00
80c6eefe8c feat: Updates nvim config. 2025-11-22 08:56:15 -05:00
0c80780ade feat: Changes prettier line width to be 100, which is better on my laptop. 2025-11-22 08:32:24 -05:00
5ea0ef74e4 feat: Updates nvim config. 2025-11-21 20:46:51 -05:00
5bad99f712 feat: Updates neovim config, adds window rules for show-me-the-key 2025-11-21 16:01:39 -05:00
44aec09d62 feat: Updates neovim config, and shorten-url create. 2025-11-21 12:29:31 -05:00
a0dcba3810 feat: Updates neovim config. 2025-11-19 13:07:17 -05:00
7356d129cc feat: Updates neovim config. 2025-11-19 12:34:10 -05:00
eece231724 feat: Adds logs subcommand to shorten-url. For viewing or removing logs. 2025-11-19 09:48:48 -05:00
3446460827 WIP: Adds --expire flag to shorten-url create command. 2025-11-19 07:43:49 -05:00
1e60f88ec4 WIP: Adds --no-spin option to shorten-url, fixes dev-env to copy shorten-url utils scripts. 2025-11-19 05:34:51 -05:00
45666a5911 WIP: Moving shorten-url into seperate scripts / utils for gum spinner to work. 2025-11-19 05:04:25 -05:00
46186e2741 feat: Updates nvim config. 2025-11-18 17:32:53 -05:00
fe25f1bf19 feat: Begins shorten-url script. 2025-11-18 17:21:31 -05:00
c8212b7587 feat: Updates nvim config.f' 2025-11-18 10:50:01 -05:00
4b674c40c9 feat: Adds customer share mount to runs/after/system 2025-11-18 10:48:47 -05:00
8daa596205 feat: Adds idle-inhibitor to waybar. 2025-11-16 18:07:15 -05:00
9977a8806b feat: Adds gnome-keyring to pika-backup run. 2025-11-14 08:12:29 -05:00
c667bfb8ee feat: Adds syu alias for quicker system package update 2025-11-13 22:29:14 -05:00
2ed9208e6a feat: Adds backup logger script. 2025-11-13 21:52:14 -05:00
0be8bcd1a2 feat: Adds pika-backup run. 2025-11-13 21:31:21 -05:00
dcb186393e feat: Updates to hpa config and scripts. 2025-11-13 17:08:58 -05:00
b7ce95dc66 feat: Adds runs/after/zathura to set it as the default pdf viewer. 2025-11-13 15:23:32 -05:00
358b9719f1 feat: Adds zathura after run. 2025-11-13 13:44:08 -05:00
89b12fc5fa feat: Adds zathura for pdf viewer. 2025-11-13 13:39:33 -05:00
23a27446df fix: Adds hyprshot to hyprland run. 2025-11-13 10:21:20 -05:00
c44c2cf5ea Updates neovim config. 2025-11-12 23:44:19 -05:00
9d6b99206a feat: Updates git config to better handle submodules automatically. 2025-11-12 22:13:02 -05:00
d19a33f4f0 feat: Updates neovim config. 2025-11-12 22:05:52 -05:00
9c7d395c6b feat: Updates neovim config. 2025-11-12 21:23:13 -05:00
2f9c68acfb feat: Adds swift-dev script 2025-11-12 17:34:15 -05:00
df109c3803 feat: Sets prettierrc width to 100 columns 2025-11-12 15:52:51 -05:00
cbe53484fa feat: Neovim config updates. 2025-11-12 15:49:27 -05:00
2aa9f4e839 feat: Updates mail submodule. 2025-11-12 08:03:48 -05:00
ad593bc25f fix: Removes unused lines in run script. 2025-11-11 15:26:53 -05:00
790ba581aa feat: Adds fuse-overlayfs to runs/podman 2025-11-11 09:46:10 -05:00
e57262b4d3 feat: Unifies webapp scripts into a single script with subcommands. 2025-11-10 21:33:02 -05:00
e63e4f4fab feat: Adds home directory setup in runs/after/system and fixes dev-env not copying markdownlint config with proper file name. 2025-11-10 20:30:59 -05:00
86d3a54e3b feat: Updates nvim config. 2025-11-10 16:56:36 -05:00
cf05f11759 feat: Removes system script, as it's handled in the runs/after/system now. 2025-11-10 16:20:51 -05:00
059dba6f18 feat: Removes pkg subcommands from kanatactl in favor of using package manager. 2025-11-10 16:16:50 -05:00
00c9c77bcc fix: Sets hypr input debounce delay back to 200ms as I was getting lots of false keypresses. 2025-11-10 16:09:11 -05:00
52cbe2ad89 WIP: TODO updates, nvim updates. 2025-11-10 16:03:42 -05:00
f1b65e955e WIP: Adds more items to runs/after/system, adds missing package to runs/dev, adds runs/after/gopass to remove password store. 2025-11-10 15:15:10 -05:00
3c98a008c8 WIP: Adds kanatctl to runs/after/system, adds ability for kanatactl to install service as user or system service. 2025-11-10 11:36:21 -05:00
74011a46bc WIP: Adds some before/after scripts to runs. 2025-11-10 09:14:55 -05:00
e972dd331c feat: Creates run-handler script so that using find works properly for runs. 2025-11-10 00:12:00 -05:00
9c007c9434 WIP: Converts runs to be text files of packages to install / uninstall, begins before and after scripts to execute during runs. 2025-11-09 22:15:29 -05:00
381a0450e5 feat: Prep for new run syntax. 2025-11-09 20:44:40 -05:00
af7b46efa5 feat: Adds some more todos, increases keyboard keyrepeat delay a little. 2025-11-09 16:37:55 -05:00
f269906fd5 feat: Increases key input speed, in hyprinput. 2025-11-09 14:19:24 -05:00
307a971371 fix: Fixes webapp script logging errors. 2025-11-09 13:57:02 -05:00
6b13291fff fix: Fixes some colors for hyprlauncher. 2025-11-09 13:47:44 -05:00
b4b7fa0a84 feat: Some cleanup. 2025-11-09 13:24:18 -05:00
d166c246ef feat: Some cleanup. 2025-11-09 13:23:50 -05:00
746167a9c8 fix: Removes elephant (walker dependency) from autostart. 2025-11-09 12:12:50 -05:00
419752b381 feat: Adds hyprlauncher and configuration (currently requires '-git' versions of hypr*), removes walker (previously used launcher). 2025-11-09 11:56:28 -05:00
79da2db401 feat: Moves nvim config to be a submodule. 2025-11-09 01:59:10 -05:00
0da387b1b9 feat: Updates README and LICENSE in nvim, in prep to make a submodule. 2025-11-09 01:53:10 -05:00
e1ed84d343 chore: Updates todos. 2025-11-09 01:48:45 -05:00
d5f1d56b94 feat: Clean up in nvim config. 2025-11-09 01:38:40 -05:00
97f3047989 feat: Adds better markdown support / plugins to nvim config. 2025-11-09 01:26:12 -05:00
18fc260a75 feat: Adds docker language server to nvim config. 2025-11-08 22:49:05 -05:00
5811d5602b feat: Adds ripgrep to dev run, adds chsh to system script. 2025-11-08 22:21:13 -05:00
d172a0071b feat: Adds ripgrep configuration so mini.pick shows hidden files. 2025-11-08 21:27:29 -05:00
2995edfc86 feat: Updates oil config to show hidden directories, except for .git 2025-11-08 20:39:52 -05:00
10987bd255 feat: Adds mail as a submodule, updates dev-env script to also install / update email config. 2025-11-08 20:25:03 -05:00
0045e6149c feat: Cleans up zshrc and zshenv, more keymaps and plugins in neovim. 2025-11-08 18:39:36 -05:00
3081c6b9b3 feat: Nvim config updates, renames hyprland config files to have a 'hypr' prefix for hypr lsp to work on them. 2025-11-08 14:05:08 -05:00
e154efcac4 feat: Adds bob as package installed by dev. 2025-11-08 13:19:05 -05:00
71eae2eb5b feat: Minimal neovim v0.12 config. 2025-11-08 13:17:18 -05:00
9af452c849 feat: Updates hpa and config to mount home directory inside container. 2025-11-07 15:59:40 -05:00
0636832796 feat: Minor updates. 2025-11-07 12:09:46 -05:00
05cb700cb1 feat: Specifies signing key in git config, updates tmux-sessionator email option to also open iCloud email. 2025-11-07 09:47:01 -05:00
a03617608d feat: Adds tmux-kill-old-sessions script and systemd timer/service, to clean up inactive sessions. 2025-11-07 08:13:27 -05:00
ef933bd3aa feat: Adds consults directory and work directory to tmux-sessionator path. 2025-11-06 16:28:58 -05:00
6b9f2203c1 feat: Adds consults directory and work directory to tmux-sessionator path. 2025-11-06 16:26:08 -05:00
e0214a49d2 feat: Adds auto-pull options to hpa with a default pull interval of 1 hour. 2025-11-06 16:22:35 -05:00
b090430cd8 feat: Adds '--date' option to hpa-create script to allow date override when generating a new project. 2025-11-06 15:26:13 -05:00
e53cef27a0 feat: Creates hpa-pull script, adds '--echo' to logging. 2025-11-06 15:18:52 -05:00
43f18eb45a feat: Creates hpa-init script and hpa.env. 2025-11-06 14:35:28 -05:00
c1eae18c67 feat: Creates hpa-create utility script, which will also push / generate the remote git repo upon creation. 2025-11-06 12:27:41 -05:00
4d73fede8b feat: Updates to notes in hpa script 2025-11-06 07:54:15 -05:00
ba06819221 feat: Adds hpa-create helper script. 2025-11-05 19:56:35 -05:00
ba81c53054 feat: Updates to hpa script. 2025-11-05 17:22:19 -05:00
36fd0558b0 feat: Cleans up hpa script, adds init command to it. 2025-11-04 22:09:24 -05:00
1b349b11c3 feat: Adds hpa configuration, adds global prettierrc and markdownlint 2025-11-04 16:51:48 -05:00
26f2b360e3 feat: Adds hpa wrapper script to run swift-hpa in a docker container. 2025-11-04 14:51:13 -05:00
2ac8560de1 feat: Adds neomutt wrapper script to set TERM correctly, this is to allow tmux-sessionator --email work properly. 2025-11-02 21:38:21 -05:00
f4341f3b5f feat: Update obs-studio run, WIP. 2025-11-02 21:30:16 -05:00
9ab1bed56a feat: Adds neomutt alias that set's TERM to xterm-direct for color scheme to work properly. 2025-11-02 16:03:56 -05:00
def9a00b76 fix: Fixes hyprland GTK scale not specified correctly. 2025-11-02 12:56:10 -05:00
d1e9e3cc5a feat: Adds some todos, adds pcre to dev run, removes sddm-catppuccin that is failing to install. 2025-11-02 11:14:33 -05:00
005403f939 feat: Adds email keybind to tmux config, updates tmux-sessionator to skip choosing if an argument is passed in so the tss alias works better. 2025-11-01 17:25:04 -04:00
9c7940b5fa feat: Updates tmux-sessionator to generate an email session with the '--email' flag, adds email alias to zshrc. 2025-11-01 16:04:29 -04:00
2949a85159 fix: Adds required sasl-oauth package to neomutt installation run. 2025-11-01 10:05:52 -04:00
737f9bfb2c feat: Adds nvim autocmd to detect neomutt compose emails and set filetype to markdown. 2025-10-31 15:50:16 -04:00
654c61a460 feat: Adds run script to install podman. 2025-10-31 14:16:09 -04:00
6f14542b7d fix: Fixes dev-env script to not clobber utils script folder. 2025-10-31 11:48:50 -04:00
63e698acb5 feat: Adds browser to zshenv, so that urlview works in neomutt. 2025-10-31 11:10:31 -04:00
aec01d5876 feat: Sources personal env variables file, if it exists. 2025-10-30 08:51:52 -04:00
95ffc9fa44 feat: Adds mail scripts to path. 2025-10-29 16:37:36 -04:00
b45503717f feat: Adds script to generate work email tokens for work email account. 2025-10-28 17:14:38 -04:00
8acc2e6647 fix: Fixes gopass alias to work along with having pass installed, which is used by some other programs. 2025-10-28 09:17:47 -04:00
f5705e9809 fix: Fixes brave run to uuse brave-bin 2025-10-27 16:21:41 -04:00
eda3213f72 feat: Adds todo for kanata keyboard service. 2025-10-27 15:22:14 -04:00
d21e9931eb feat: Adds brave browser and removes chromium. 2025-10-27 15:17:03 -04:00
ed76943b79 feat: Adds neomutt run for terminal based email setup. 2025-10-25 10:40:03 -04:00
4909aa1fcb fix: Fixes private browser keybind to work with brave. 2025-10-24 09:48:12 -04:00
fcfbfac7dd feat: Updates keybind to launch brave browser instead of zen. 2025-10-24 09:41:12 -04:00
281c26ed71 feat: Updates TMUX_SESSIONATOR path to include personal config directory. 2025-10-24 09:31:18 -04:00
cb479a5370 feat: Updates launch-webapp browser to use brave instead of chromium. 2025-10-24 09:21:40 -04:00
32bdafff4f fix: Fixes npm bin path. 2025-10-23 16:22:16 -04:00
1006821a9c feat: Adds npm bin directory to path. 2025-10-23 16:20:45 -04:00
3b89eb4877 feat: Changes ai keybind to locally hosted open-webui instance. 2025-10-22 14:04:18 -04:00
45fa5196a7 fix: Fixes obs-studio package build to include a libajantv2 library as dependency. 2025-10-20 08:04:59 -04:00
f94d724d67 feat: Adds obs-studio pkgbuild and run file to get working on aarch64 2025-10-19 12:14:37 -04:00
a6fcc8a460 feat: Updates macbook keyboard layout. 2025-10-19 08:41:43 -04:00
3799a81f05 fix: Fixes window-action-picker not calling appropriate close-window script. 2025-10-16 16:34:17 -04:00
97ed707936 feat: Updates starship configuration.f' 2025-10-16 14:04:42 -04:00
Michael Housh
6aee095859 Updates starship prompt. (#3)
* feat: Update kanata voyager keyboard number layer to include modifier
keys on the homerow of my left hand, so that I can use modifier +number
keybinds.

* feat: Updates starship prompt.
2025-10-15 16:43:17 -04:00
Michael Housh
461d06f681 feat: Update kanata voyager keyboard number layer to include modifier (#2) 2025-10-15 15:54:37 -04:00
Michael Housh
2f626d4664 Merge pull request #1 from m-housh/push-osqwmkpzynup
feat: Adds firewalld to system run and setup script.
2025-10-15 09:18:05 -04:00
b87348da96 feat: Adds firewalld to system run and setup script.
feat: Move dotfiles location and update the appropriate environment variables.
2025-10-15 08:40:02 -04:00
4fcd2f43fd feat: Adds firewalld to system run and setup script. 2025-10-14 09:48:24 -04:00
d1dffb632f feat: Updates kanatctl to use the pkg subcommand 2025-10-14 08:24:26 -04:00
1196849c3b feat: Begins pkg subcommand for kanatactl. 2025-10-14 07:41:52 -04:00
e77b3e7535 feat: Begins breaking kanatactl subcommands into their own files. 2025-10-13 16:58:54 -04:00
ee2898053b feat: Adds mouse and arrow layer to voyager keyboard layouts, adds config subcommand to kanatactl to copy the appropriate config based on keyboard type. 2025-10-13 12:48:14 -04:00
f1202d77f3 feat: Begins voyager keyboard layout for kanata, need to update kanatactl to choose between which config to use. 2025-10-13 11:27:48 -04:00
087d7963e8 feat: Adds mouse layer to kanata config, adds stop command to kanatactl script. 2025-10-12 22:41:37 -04:00
8b25509344 fix: Fixes a few typos in kanatactl script. 2025-10-12 20:56:36 -04:00
0034ac6d87 feat: Adds kanatactl to manage kanata installation, building, systemd service, etc. 2025-10-12 20:43:11 -04:00
5c6409c2e9 feat: Adds kanata run and starts config, for macbook pro keyboard mods. 2025-10-11 22:37:24 -04:00
8a63efd6cf feat: Adds screenshot keybinds. 2025-10-11 09:52:48 -04:00
7d4a0714d0 feat: updates. 2025-10-10 16:48:09 -04:00
b454c5d01d feat: Fixes gen script for the new logging settings. 2025-10-09 21:57:15 -04:00
e003be5bee feat: Updates logging paths, to all write to 'logs' directory in the tmp directory. 2025-10-09 18:36:49 -04:00
0bb288b3d6 feat: Adds localsend package to runs. 2025-10-09 15:42:47 -04:00
23a5dc0bdc feat: Updates walker config that was giving errors after walker update. 2025-10-09 15:14:13 -04:00
72ff2e6316 feat: Adds logs picker / views to utils-launcher 2025-10-09 14:46:18 -04:00
390230e532 feat: Moves utils-launcher preview to be at bottom and updates window rules for utils-launcher 2025-10-09 13:34:07 -04:00
a006539bf1 fix: Fixes window titles not always showing properly in window picker. 2025-10-09 12:50:45 -04:00
6332eafea5 feat: Adds ability for window picker to only show windows for a given workspace, in prep for adding workspace action picker. 2025-10-09 10:25:30 -04:00
933ce337a1 feat: Adds workspace picker to utils-launcher 2025-10-09 09:16:42 -04:00
ae73074f6a fix: Fixes window action picker not returning proper choice, removes scripts that are now in the '*ctl' commands. 2025-10-09 08:26:31 -04:00
63c8645051 feat: Adds switch subcommand to workspacectl, and updates keybinds. 2025-10-09 08:16:11 -04:00
aec425c7d2 feat: Restores workspacectl toggle command to only working on active workspace. 2025-10-08 17:06:20 -04:00
fa6a482f2f feat: Begins workspacectl. 2025-10-08 16:34:39 -04:00
dff77ae065 feat: Adds required smb packages to nautilus run/install file. 2025-10-08 12:36:00 -04:00
bac516d446 feat: Fixes missing window-picker script that got deleted. 2025-10-08 11:46:07 -04:00
4674b132f3 feat: Moves preview-stats script into hypr/utils/fzf 2025-10-08 11:31:06 -04:00
fd22a4ab4a feat: Updates timestamp formats for logs to be more readable, updates utils-launcher config to use the '*ctl' command variants, updates preview-stats for utils to format previews based on width of preview window. 2025-10-08 11:10:42 -04:00
18fce8e2bb feat: Adds monitorctl script to handle monitor subcommands. 2025-10-08 10:38:05 -04:00
0922f7578f feat: Adds keybind for launching immich / photos. 2025-10-08 09:30:19 -04:00
335b60f43c feat: Adds window rules for windowctl windows to be floating when opened a new window. 2025-10-08 08:55:26 -04:00
99110dea2a feat: Adds spinner to weather script when loading weather. 2025-10-08 08:50:41 -04:00
2eb831e565 feat: Removes files from scripts/hypr that are now integrated into windowctl. 2025-10-08 08:41:45 -04:00
53c439a418 fix: Fixes windowctl action picker to not focus on it's own window when the '--active' flag is passed. 2025-10-08 08:05:47 -04:00
77c168cc99 feat: Updates keybinds. 2025-10-07 23:04:48 -04:00
cfc846e2f7 feat: Adds toggle floating option to windowctl picker actions. 2025-10-07 19:28:07 -04:00
55d7199315 fix: Fixes some scripts that had logging errors since logging updates. 2025-10-07 17:49:35 -04:00
5ddf6c3927 feat: Adds subcommand toggle-floating to windowctl. 2025-10-07 17:05:46 -04:00
dd9c018f99 fix: Fixes logging errors in switch-to-workspace 2025-10-07 15:50:57 -04:00
1eea0b84a7 feat: Updates logging vars in launch script. 2025-10-07 15:32:07 -04:00
8d21e9a9fe fix: Fixes logging errors in launch-webapp. 2025-10-07 15:15:24 -04:00
52b78aadf8 feat: Updates windowctl subcommands, fixes some logging bugs. Need to remove old files and update keybinds to use windowctl subcommands. 2025-10-07 14:40:04 -04:00
7178a12893 feat: Integrates subcommands into windowctl, need to move the windowctl primary picker into it's own subcommand. 2025-10-07 10:24:20 -04:00
931903d18c feat: Begin incorporating utility scripts into windowctl 2025-10-07 08:37:52 -04:00
7024182f49 feat: Moves window action picker to it's own script, need to use it from windowctl 2025-10-06 23:09:03 -04:00
7aec9d1610 feat: Adds ability to pipe addresses into close-windows script. 2025-10-06 19:56:14 -04:00
5946a177fb feat: Adds help to preview-stats, changes message that get logs to console during error or warning messages. 2025-10-06 18:46:59 -04:00
7c08fec16b feat: Adds ability to narrow down keys returned for preview-stats. 2025-10-06 18:06:09 -04:00
78e40a9401 feat: Begins moving some scripts into a utils folder and using them as subcommands. 2025-10-06 17:01:07 -04:00
b5198a5df6 fix: Fixes windowctl to handle when ctrl-c is hit from the window-picker, when not launched in a new terminal window. Adds a few more options to that allow to return to the window picker after performing certain actions on a selected window. 2025-10-06 16:32:26 -04:00
54fe479ee1 fix: Fixes windowctl not properly focusing windows on special workspaces, adds the ability to call windowctl with an address to perform certain actions without going through the pickers, should likely call from the launch script so code is shared / not duplicated in two spots. 2025-10-06 12:16:46 -04:00
503df7ce33 feat: Adds mychart webapp. 2025-10-06 11:20:07 -04:00
009efbb952 fix: Fixes install-webapp script not properly handling spaces in the desktop file name. 2025-10-06 10:57:07 -04:00
b1fb505ac5 feat: Renames window-table to windowctl, adds preview data to utils-launcher and windowctl actions. 2025-10-06 10:26:25 -04:00
6721b2a8c5 fix: Fixes launch script to have a --new-instance flag to force launching a new instance of an application. 2025-10-06 08:29:01 -04:00
a4a560eb3d feat: Adds monitor-picker to utility launcher config. 2025-10-05 21:49:14 -04:00
a7e6bc893c feat: Adds monitor-picker, utility script for generating fzf preview data for pickers. 2025-10-05 21:17:04 -04:00
90c97263cb feat: Updates setup-logger script to not require file argument, will default to /tmp/<label>.log 2025-10-05 16:46:59 -04:00
dccb1ca0a3 feat: Integrates logging into scripts that need it. 2025-10-05 16:35:19 -04:00
f729bedc99 feat: Adds logging script as a general logging utility to not pollute console for TUI's for example. Updated gen script to put it into newly generated scripts, need to update existing scripts to use it. 2025-10-05 15:21:50 -04:00
4edf92e034 feat: Adds previews to utils-launcher, sources catppuccin colors file in zshrc so that fzf options are setup. 2025-10-05 11:05:05 -04:00
5e8fbbcbab Feat: Updates pickers so delimiters are not showing in selections. 2025-10-05 10:31:16 -04:00
6d6f24467f feat: Adds preview windows to window and workspace pickers. 2025-10-05 01:21:46 -04:00
cc47106e74 feat: Moves window and workspace pickers to their own scripts. 2025-10-04 23:05:18 -04:00
bad3282dc5 feat: Adds waybarctl to combine scripts that were similar. 2025-10-04 19:08:29 -04:00
33e6683369 feat: Adds more items to utility launcher, fixes bug in toggle waybar, and fix window-table to use fzf 2025-10-04 18:02:12 -04:00
c38348e62c feat: Creates a utility launcher fuzzy finder. 2025-10-04 16:57:11 -04:00
55257e7c28 feat: Updates install-webapp script with more flags and a launch option to open in a new terminal window. 2025-10-04 12:27:34 -04:00
318e7c7f95 feat: Adds launch option to install-webapp script, to launch it in a new terminal window. 2025-10-04 10:10:34 -04:00
b6ce570f1d feat: Adds switch-to-workspace script, so that moving workspaces will toggle a special workspace if it's active. 2025-10-04 09:45:55 -04:00
f911bfb7f1 feat: Moves hyprland scripts that were missed and updates systemd services to the appropriate locations. 2025-10-03 23:50:50 -04:00
d32d0cf64f feat: Moves hyprland scripts into it's own directory. 2025-10-03 23:43:29 -04:00
1def0356d7 feat: Adds some more flag options to the launch script. 2025-10-03 21:56:49 -04:00
4d4b8c9945 feat: Renames launch-or to just launch, generalizes it to also handle special workspaces, integrates launch-webapp script to use it, and updates keybinds that reference the script. 2025-10-03 20:06:47 -04:00
cedb6d8ab7 fix: Fixes purchase orders to open in dispatch workspace. 2025-10-03 15:40:02 -04:00
eae42b40b8 feat: Adds purchase order keybind. 2025-10-03 15:38:31 -04:00
42e962d439 feat: Adds home assistant web app. 2025-10-03 11:06:59 -04:00
27767d3948 feat: Adds more matches for emails to espanso, also restart espanso service when dev-env script is ran. 2025-10-03 10:24:49 -04:00
8bb6d35acd feat: Moves launch or focus script and makes it so that it can also close a window based on pattern. Updates keybinds that use it. 2025-10-03 09:58:05 -04:00
50191dde0c feat: Adds window-table script that will show a pretty table of active windows, they can be selected and focused, closed, etc. 2025-10-02 22:37:36 -04:00
d4f85a6786 feat: Updates tmux bindings to navigate windows to use either prefix+h|l or <c-alt>h|l, switches window keybind prefix to use alt in hyprland. 2025-10-02 17:02:34 -04:00
1ee8cad635 fix: Fixes typo in active-workspace flag for close-windows script 2025-10-02 16:31:26 -04:00
93fe3b6864 feat: Updates keybinds and removes close-all-windows script. 2025-10-02 16:28:04 -04:00
e23e861101 feat: Adds close-windows script, need to remove close-all-windows script and update keybinds to use new script. 2025-10-02 16:26:10 -04:00
45bcf8771c feat: Adds script generation to the gen script. 2025-10-02 10:26:30 -04:00
ab2f4356a3 feat: Adds super-tab to focus previous workspace. 2025-10-02 10:01:04 -04:00
26bc6635af fix: Fixes typo in keybinds not calling close-all-windows in active workspace. 2025-10-02 09:42:16 -04:00
0b166ad757 feat: Adds apple calendar web app, updates close-all-windows script to work on workspaces. 2025-10-02 09:38:58 -04:00
eb4c6990ec feat: Renames get-weather script to just weather. 2025-10-01 22:12:45 -04:00
f37b5f1db2 feat: Adds weather desktop file, I may need to fix how it gets copied in the dev-env script. 2025-10-01 17:26:08 -04:00
dccf54e115 feat: Adds META-L to lock computer. 2025-10-01 15:56:43 -04:00
c88d070b86 feat: Adds generic launch-or-focus script for apps that aren't webapps 2025-10-01 15:51:13 -04:00
1305b6708c feat: Adds meta+num sends window to workspace without switching the active workspace. 2025-10-01 14:43:11 -04:00
e15a0ef007 feat: Check alternate gpg key. 2025-10-01 12:39:43 -04:00
6a14830189 fix: Fixes webapp icons not showing properly for oryx and housecall pro. 2025-10-01 12:09:59 -04:00
ede7e4288b feat: Updates launch-webapp script, reformats keybinds, and removes uneeded scripts now that launch-webapp is more robust. 2025-10-01 12:03:13 -04:00
026a998fc4 feat: Makes launch webapp script handle more options, should be able to get rid of some other scripts. 2025-09-30 23:27:55 -04:00
a7033b749e feat: Organizes, reformats, and cleans up hyprland keybinds config file. 2025-09-30 22:10:23 -04:00
7d4e518479 feat: Begins reworking keymaps so that SUPER is for apps / hyprland controls and CTRL OPT are for window controls. 2025-09-30 18:47:11 -04:00
2d878f8c63 feat: Updates keybinds. 2025-09-30 17:10:07 -04:00
cefdf21fc8 feat: Adds proton pass manager script, updates keybinds and window rules for proton pass. 2025-09-30 15:39:05 -04:00
c89b0e307c feat: Updates dotfiles location in zshenv. 2025-09-30 10:39:20 -04:00
200 changed files with 6547 additions and 2664 deletions

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "mail"]
path = mail
url = ssh://git@git.housh.dev:2222/michael/mail.git
[submodule "env/.config/nvim"]
path = env/.config/nvim
url = https://github.com/m-housh/mhoush.nvim.git

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"proseWrap": "always"
"printWidth": 100
}

View File

@@ -1,2 +0,0 @@
proseWrap: always
printWidth: 80

View File

@@ -1,20 +1,16 @@
# My Dotfiles # My Dotfiles
This is a repository for my dotfiles. Be warned that these may often change and This is a repository for my dotfiles. Be warned that these may often change and that the installation documentation may
that the installation documentation may not always be correct as things not always be correct as things progress. In general the setup process is something that is only done when a new machine
progress. In general the setup process is something that is only done when is purchased or I feel like testing in a virtual machine (which does not happen often). It is helpful to have an
a new machine is purchased or I feel like testing in a virtual machine (which understanding of what these commands do on your own.
does not happen often). It is helpful to have an understanding of what these
commands do on your own.
In general no pull-requests or changes will be accepted, however you can In general no pull-requests or changes will be accepted, however you can generate an issue if you find a problem.
generate an issue if you find a problem.
It currently will install homebrew and the following homebrew formula. It currently will install homebrew and the following homebrew formula.
Most of the functionality is contained in the Most of the functionality is contained in the [dots](https://github.com/m-housh/dots) project, that is a companion to
[dots](https://github.com/m-housh/dots) project, that is a companion to manage manage the dotfiles, which expects the dotfiles directory to be at `~/.dotfiles`.
the dotfiles, which expects the dotfiles directory to be at `~/.dotfiles`.
``` ```
fd fd
@@ -78,15 +74,14 @@ On a fresh system run the following command from the dotfiles root.
make bootstrap make bootstrap
``` ```
This start by installing homebrew, then install the required homebrew formulas and casks. Next it will use This start by installing homebrew, then install the required homebrew formulas and casks. Next it will use `gnu-stow` to
`gnu-stow` to symlink configuration files to the appropriate locations. And finally, it will download symlink configuration files to the appropriate locations. And finally, it will download applications from the
applications from the `App Store`. When the bootstrap command is done it will open up the `~/Downloads` folder `App Store`. When the bootstrap command is done it will open up the `~/Downloads` folder for the few applications that
for the few applications that get downloaded from the internet, so that you can finish the installation of those applications. get downloaded from the internet, so that you can finish the installation of those applications.
### Minimal Setup ### Minimal Setup
If you would like to just setup minimal stuff, link dotfiles, and install brews. If you would like to just setup minimal stuff, link dotfiles, and install brews. Then you can run the following command.
Then you can run the following command.
```bash ```bash
make bootstrap-minimal make bootstrap-minimal
@@ -100,14 +95,13 @@ source scripts/setup_defaults
## Post Installation ## Post Installation
After everything has finished up, you will be able to open `iTerm2` and load After everything has finished up, you will be able to open `iTerm2` and load the profile which should now be symlinked
the profile which should now be symlinked to `~/.config/macOS/iterm/profile.json` to `~/.config/macOS/iterm/profile.json`
## Make commands ## Make commands
It is also possible to not do the full bootstrapping. If you would only like It is also possible to not do the full bootstrapping. If you would only like to install homebrew (without any formula or
to install homebrew (without any formula or casks) then you can run the following casks) then you can run the following command.
command.
``` ```
make bootstrap-homebrew make bootstrap-homebrew
@@ -115,13 +109,12 @@ make bootstrap-homebrew
## Other Make Commands ## Other Make Commands
If you would like to setup any specific `zsh` configuration that is only for If you would like to setup any specific `zsh` configuration that is only for the local machine then you can run the
the local machine then you can run the following command. following command.
```bash ```bash
make zshrc-local make zshrc-local
``` ```
This will generate and symlink a file that you can use to extend the default This will generate and symlink a file that you can use to extend the default `zshrc` configuration. In general, I use
`zshrc` configuration. In general, I use this to set custom location for this to set custom location for homebrew casks to be installed on certain machines.
homebrew casks to be installed on certain machines.

72
TODO.md
View File

@@ -1,29 +1,59 @@
# TODO # TODO
- Add zsh functions to dots cli manager. A list of in-progress and completed todo's.
- Add tmux plugins to dots cli manager.
- Add tmux-powerline linking to `dots` cli manager.
- Clean up zet commands, maybe make a gum / fzf filter script.
- Update README to reflect ansible installation
- Update ansible to do gpg installation.
- Update ansible to include sketchybar.
# Arch Todos ## Arch Todos
- Separate scripts that are used for configurations / store them somewhere aside - [ ] Update README, it's way out of date.
- [x] Separate scripts that are used for configurations / store them somewhere aside
from `~/.local/bin` from `~/.local/bin`
- Clipse didn't work when installed on a new machine when I try to use the - [x] Add neomutt configuration files into the repo (or probably a private repo)
- [x] Clipse didn't work when installed on a new machine when I try to use the
config in the dotfiles, but works if I use the default config. Need to explore config in the dotfiles, but works if I use the default config. Need to explore
why (current thoughts are it has to do with creating the why (current thoughts are it has to do with creating the
clipboard_history.json file and not letting clipse do it automatically). clipboard_history.json file and not letting clipse do it automatically).
- Set sddm login theme, currently it doesn't allow me to echo values into the - [x] Need to add the following system packages for neovim/render-markdown.nvim
/etc/sddm.conf file, also need to edit the theme in - [x] `libtexprintf`
`/usr/share/sddm/themes/catppuccin-mocha/theme.conf` to use the wallpaper as a - [ ] Add pipewire-zeroconf to runs.
background image. - [ ] Setup pipewire config to allow streaming output to homepod's.
- Note: The background needs to be copied into the theme's background - [See arch.wiki](https://wiki.archlinux.org/title/PipeWire)
directory. It didn't seem to work when I just set the path to somewhere in
my home directory. ### Bootstrapping a new machine
- Add script to generate yubikey authentication using the pam-u2f module
[documentation](https://wiki.archlinux.org/title/Universal_2nd_Factor). - [ ] Need to confirm bootstrap does things properly with git submodules. Currently the
- Note: that the directory this is stored in MUST be ~/.config/Yubico (I tried system run handles installing packages needed for my yubikey, probably need to automate
using ~/.config/yubico and it didn't work) installing the public key into the keyring.
- [x] Add gpg public key import into `runs/after/system`
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
- [ ] Need to add `repos` script when bootstrapping.
### Keyboard / kanata
- [x] Move keyboard (kanata) systemd service to be started as a '--user' service, as
it seems to not work when used on a desktop (mac mini) vs. laptop.
- [x] Need to update kanatactl to generate udev rules, etc. (see
here)[https://github.com/jtroo/kanata/blob/main/docs/setup-linux.md]
- [ ] Need to rethink symbol / number keyboard layers.
- [ ] Move symbols to their own layer.
- [ ] I would like to have a symbols layer that I can hold modifier keys with a symbol
and would also like to possibly pass through underlying key / experiment so that
I can use default keybinds in certain applications (i.e. neovim `[b`, etc.).
- [x] Remove pkg sub-commands from kanatactl, it is available via package manager now.
### Runs (package installs)
- [x] Should runs just export / echo a list of packages, then the `run` script can handle the package
manager options / command.
- [x] Think about adding a `before` and an `after` directory for runs, so that they can perform setup tasks after
the packages are installed.
- [x] The `before` and `after` file should have the same name as the `run` file.
- [ ] This could allow to remove / move the `system` script into the `after` directory.
- [ ] Look into install packages with `nvim --headless`, not sure if this possible when using the new package
manager builtin to neovim as it prompts for user input to install packages.
- With lazy this was done with `nvim --headless "+Lazy! sync" +qa`
### Mail
- [ ] Remove outlook / office email setup, this has been moved to proton.

View File

@@ -4,8 +4,8 @@
# #
if [ -z "$DEV_ENV" ]; then if [ -z "$DEV_ENV" ]; then
echo "env var DEV_ENV needs to be present" echo "env var DEV_ENV needs to be present"
exit 1 exit 1
fi fi
# if i just did DEV_ENV=$(pwd) ./run then this is needed for the rest of the # if i just did DEV_ENV=$(pwd) ./run then this is needed for the rest of the
@@ -15,15 +15,16 @@ export DEV_ENV="$DEV_ENV"
args="" args=""
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
if [[ "$1" =~ dry ]]; then if [[ "$1" =~ dry ]]; then
args="--dry-run" args="--dry-run"
fi fi
done done
echo "Args to bootstrap scripts: $args" echo "Args to bootstrap scripts: $args"
echo "Installing packages may require your password multiple times." echo "Installing packages may require your password multiple times."
echo "Running packages" && $DEV_ENV/run "$args"
echo "Installing configuration" && $DEV_ENV/dev-env "$args" echo "Installing configuration" && $DEV_ENV/dev-env "$args"
# TODO: Need to run system run early, then once ssh keys are setup pull
# git submodules, then run config install again.
echo "Running packages" && $DEV_ENV/run "$args"
echo "Installing webapps" && $DEV_ENV/webapp "$args" echo "Installing webapps" && $DEV_ENV/webapp "$args"
echo "Starting system services" && $DEV_ENV/system "$args"

171
dev-env
View File

@@ -7,93 +7,108 @@
dry_run="0" dry_run="0"
if [ -z "$XDG_CONFIG_HOME" ]; then if [ -z "$XDG_CONFIG_HOME" ]; then
echo "no xdg config home" echo "no xdg config home"
echo "using ~/.config" echo "using ~/.config"
XDG_CONFIG_HOME=$HOME/.config XDG_CONFIG_HOME=$HOME/.config
fi fi
if [ -z "$XDG_DATA_HOME" ]; then if [ -z "$XDG_DATA_HOME" ]; then
echo "no xdg data home" echo "no xdg data home"
echo "using ~/.local/share" echo "using ~/.local/share"
XDG_DATA_HOME=$HOME/.local/share XDG_DATA_HOME=$HOME/.local/share
fi fi
if [ -z "$DEV_ENV" ]; then if [ -z "$DEV_ENV" ]; then
echo "env var DEV_ENV needs to be present" echo "env var DEV_ENV needs to be present"
exit 1 exit 1
fi fi
if [[ $1 =~ ^--dry ]]; then if [[ $1 =~ ^--dry ]]; then
dry_run="1" dry_run="1"
fi fi
log() { log() {
if [[ $dry_run == "1" ]]; then if [[ $dry_run == "1" ]]; then
echo "[DRY_RUN]: $1" echo "[DRY_RUN]: $1"
else else
echo "$1" echo "$1"
fi fi
} }
log "env: $DEV_ENV" log "env: $DEV_ENV"
# Removes a destination directory and copies all files to the destination. # Removes a destination directory and copies all files to the destination.
update_dirs() { update_dirs() {
log "copying over files from: $1" log "copying over files from: $1"
pushd $1 &>/dev/null pushd $1 &>/dev/null
( (
# Copy everything except systemd and zsh folders, they need treated differently. # Copy everything except systemd, share, and zsh folders, they need treated differently.
configs=$(find . -mindepth 1 -maxdepth 1 -type d \( -name "systemd" -o -name "zsh" \) -prune -o -type d -print) configs=$(
for c in $configs; do find . -mindepth 1 -maxdepth 1 -type d \
directory=${2%/}/${c#./} \( -name "systemd" -o -name "zsh" -o -name "share" -o -name "scripts" -o -name "kanata" \) \
log " removing: rm -rf $directory" -prune -o -type d -print
)
for c in $configs; do
directory=${2%/}/${c#./}
log " removing: rm -rf $directory"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
rm -rf $directory rm -rf $directory
fi fi
log " copying env: cp $c $2" log " copying env: cp $c $2"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
cp -r ./$c $2 cp -r ./$c $2
fi fi
done done
) )
popd &>/dev/null popd &>/dev/null
} }
# Removes a destination file and copies a single file to the destination. # Removes a destination file and copies a single file to the destination.
copy() { copy() {
log "removing: $2" log "removing: $2"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
rm $2 &>/dev/null rm $2 &>/dev/null
fi fi
log "copying: $1 to $2" log "copying: $1 to $2"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
cp $1 $2 cp $1 $2
fi fi
} }
# Copy all files from a directory into another directory. # Copy all files from a directory into another directory.
copy_files() { copy_files() {
log "copying over files from: $1" log "copying over files from: $1"
pushd $1 &>/dev/null pushd "$1" &>/dev/null || exit 1
( (
for f in $(find . -mindepth 1 -maxdepth 1 -type f); do for f in $(find . -mindepth 1 -maxdepth 1 -type f); do
local dest="$2/$(basename $f)" declare dest
dest="$2/$(basename "$f")"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
rm -rf $dest >/dev/null 2>&1 rm -rf $dest >/dev/null 2>&1
fi fi
log " copying env: cp $f $dest" log " copying env: cp $f $dest"
if [[ $dry_run == "0" ]]; then if [[ $dry_run == "0" ]]; then
cp $f $dest cp $f $dest
fi fi
done done
) )
popd &>/dev/null popd &>/dev/null || exit 1
}
email() {
if command -v mailctl; then
log "Updating using mailctl..."
[[ $dry_run == "0" ]] && mailctl update && mailctl config
else
log "Installing mailctl..."
[[ $dry_run == "0" ]] && . "$DEV_ENV/mail/install"
fi
} }
############################## MAIN ############################## ############################## MAIN ##############################
@@ -102,34 +117,60 @@ copy_files() {
update_dirs $DEV_ENV/env/.config $XDG_CONFIG_HOME update_dirs $DEV_ENV/env/.config $XDG_CONFIG_HOME
update_dirs $DEV_ENV/env/.local $HOME/.local update_dirs $DEV_ENV/env/.local $HOME/.local
# SCRIPTS
mkdir -p ~/.local/scripts/{hypr,utils} >/dev/null 2>&1
mkdir -p ~/.local/scripts/utils/{kanatactl,hpa,shorten-url} >/dev/null 2>&1
update_dirs $DEV_ENV/env/.local/scripts/hypr $HOME/.local/scripts/hypr
copy_files $DEV_ENV/env/.local/scripts/hypr $HOME/.local/scripts/hypr
copy_files "$DEV_ENV/env/.local/scripts/utils/kanatactl" "$HOME/.local/scripts/utils/kanatactl"
copy_files "$DEV_ENV/env/.local/scripts/utils/hpa" "$HOME/.local/scripts/utils/hpa"
copy_files "$DEV_ENV/env/.local/scripts/utils/shorten-url" "$HOME/.local/scripts/utils/shorten-url"
copy_files $DEV_ENV/env/.local/scripts $HOME/.local/scripts
# SYSTEMD # SYSTEMD
mkdir -p $XDG_CONFIG_HOME/systemd/user mkdir -p $XDG_CONFIG_HOME/systemd/user >/dev/null 2>&1
copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user
# ZSH # ZSH
# NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and # NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and
# copying configuration. # copying configuration.
copy $DEV_ENV/env/.zshenv $HOME/.zshenv copy $DEV_ENV/env/.zshenv $HOME/.zshenv
mkdir -p $XDG_CONFIG_HOME/zsh mkdir -p $XDG_CONFIG_HOME/zsh >/dev/null 2>&1
update_dirs $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh update_dirs $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh # copies sup-directories.
copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh # copies files in the root directory.
# TMUX # TMUX
copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf
# GPG # GPG
mkdir $HOME/.gnupg mkdir $HOME/.gnupg >/dev/null 2>&1
copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg
# Wallpapers # Wallpapers
mkdir $HOME/wallpapers mkdir $HOME/wallpapers >/dev/null 2>&1
copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers
# MISC # MISC
mkdir $HOME/Pictures mkdir $HOME/Pictures >/dev/null 2>&1
mkdir -p $XDG_DATA_HOME/clipse/tmp_files mkdir -p $XDG_DATA_HOME/clipse/tmp_files
copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env
copy $DEV_ENV/env/.markdownlint.jsonc $HOME/.markdownlint.jsonc
copy $DEV_ENV/env/.prettierrc $HOME/.prettierrc
systemctl --user daemon-reload mkdir -p $XDG_DATA_HOME/applications/icons
hyprctl reload copy_files $DEV_ENV/env/.local/share/applications $XDG_DATA_HOME/applications
exec zsh -l copy_files $DEV_ENV/env/.local/share/applications/icons $XDG_DATA_HOME/applications/icons
# Custom package builds.
mkdir $HOME/pkgbuilds
update_dirs $DEV_ENV/env/pkgbuilds $HOME/pkgbuilds
# Email.
email
if [[ $dry_run == "0" ]]; then
systemctl --user daemon-reload
hyprctl reload
espanso service restart
exec zsh -l
fi

76
devcontainer-env Executable file
View File

@@ -0,0 +1,76 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
# Intsalls appropriate dotfiles inside a devcontainer context.
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
DEV_ENV=${DEV_ENV:-$(dirname "${BASH_SOURCE[0]}")}
if [ ! -d "$DEV_ENV" ]; then
echo "[ERROR]: DEV_ENV variable does not exist."
exit 1
fi
log() {
echo "$*"
}
copy_dir() {
local dir=${1:-""}
local path="${DEV_ENV}/${dir}"
if [ -z "$dir" ] || [ ! -d "$path" ]; then
log "[ERROR]: Directory does not exist: $dir"
exit 1
else
log "Copying dir: $dir"
cp -R "$path" "$XDG_CONFIG_HOME"
fi
}
copy_file() {
local file=${1:-""}
if [[ -z "$file" ]] || [[ ! -f "$file" ]]; then
log "[ERROR]: file does not exist: $file"
exit 1
else
log "Copying file: $file"
cp "$DEV_ENV/$file" "$HOME"
fi
}
# MAIN
dirs=(
env/.config/eza
env/.config/git
env/.config/ripgrep
env/.config/starship
env/.config/yazi
env/.config/zsh
)
files=(
env/.markdownlint.jsonc
env/.prettierrc
env/.tmux.conf
env/.zshenv
)
for dir in "${dirs[@]}"; do
copy_dir "$dir"
done
for file in "${files[@]}"; do
copy_file "$file"
done
# Install neovim config
git submodule update --init --remote env/.config/nvim
source env/.config/nvim/install.sh
# Install my scripts
cp -R env/.local/scripts "$HOME/.local"

75
env/.config/aap/config.toml vendored Normal file
View File

@@ -0,0 +1,75 @@
# This config is setup for running inside the docker container.
#
# NOTE:
# Configuration settings for the `hpa` command line tool.
# You can delete settings that are not applicable to your use case.
# Default arguments / options that get passed into `ansible-playbook` commands.
# WARNING: Do not put arguments / options that contain spaces in the same string,
# they should be separate strings, for example do not do something like
# ['--tags debug'], instead use ['--tags', 'debug'].
#
args = ['--tags', 'debug']
# Set to true if you want to pass the vault args to `ansible-playbook` commands.
useVaultArgs = true
# NOTE:
# Configuration for running the generate command(s). This allows custimizations
# to the files that get used to generate the final output (generally a pdf).
# See `pandoc --help`. Below are the defaults that get used, which only need
# adjusted if your template does not follow the default template design or if
# you add extra files to your template that need to be included in the final
# output. Also be aware that any of the files specified in the `files` or
# `includeInHeader` options, need to be inside the `buildDirectory` when generating
# the final output file.
# [generate]
# this relative to the project directory.
# buildDirectory = '.build'
# pdfEngine = 'xelatex'
# includeInHeader = [
# 'head.tex',
# 'footer.tex'
# ]
# files = [
# 'Report.md',
# 'Definitions.md'
# ]
# outputFileName = 'Report'
# NOTE:
# These are more for local development of the ansible playbook and should not be needed
# in most cases. Uncomment the lines if you want to customize the playbook and use it
# instead of the provided / default playbook.
[playbook]
directory = '/root/.local/share/hpa/playbook'
inventory = '/root/.local/share/hpa/playbook/inventory.ini'
version = 'main'
# NOTE:
# These are to declare where your template files are either on your local system or
# a remote git repository.
[template]
# The directory path on your local system to the template files.
directory = '/root/.local/share/hpa/airflow-assessment-template'
vars = 'repo_vars'
# The url to a git repository that contains your template files.
# url = 'https://git.example.com/consult-template.git'
# The version, tag, branch, or sha of the template files to clone from the remote
# template repository. In general it is best practice to use a version instead of a
# branch.
# version = '1.0.0'
# NOTE:
# Holds settings for `ansible-vault` commands.
[vault]
# Arguments to pass to commands that use `ansible-vault`, such as encrypting or decrypting
# files.
args = ['--vault-password-file=/run/secrets/vault-pass']
# An id to use when encrypting `ansible-vault` files.
#encryptId = 'myId'

View File

@@ -4,8 +4,11 @@ matches:
# Email Addresses # Email Addresses
- trigger: ":@hhe" - trigger: ":@hhe"
replace: "mhoush@houshhomeenergy.com" replace: "mhoush@houshhomeenergy.com"
- trigger: ":@service" - trigger: ":@w"
replace: "mhoush@houshhomeenergy.com"
- trigger: ":@ser"
replace: "service@houshhomeenergy.com" replace: "service@houshhomeenergy.com"
- trigger: ":@me" - trigger: ":@me"
replace: "michael@mhoush.com" replace: "michael@mhoush.com"
- trigger: ":@p"
replace: "michael@mhoush.com"

View File

@@ -3,7 +3,7 @@ theme = Catppuccin Mocha
confirm-close-surface = false confirm-close-surface = false
font-family = "Fira Code" font-family = "Fira Code"
font-size = 13 font-size = 18
font-thicken = false font-thicken = false
window-save-state = always window-save-state = always

View File

@@ -8,7 +8,7 @@
[user] [user]
name = Michael Housh name = Michael Housh
email = michael@mhoush.com email = michael@mhoush.com
signingkey = 0x90D3EB6274D5B7CF signingkey = 0x90D3EB6274D5B7CF
[commit] [commit]
gpgsign = true gpgsign = true
@@ -30,6 +30,7 @@
default = simple default = simple
autoSetupRemote = true autoSetupRemote = true
followTags = true followTags = true
recurseSubmodules = on-demand
[fetch] [fetch]
prune = true prune = true
@@ -65,3 +66,6 @@
autoSquash = true autoSquash = true
autoStash = true autoStash = true
updateRefs = true updateRefs = true
[submodule]
recurse = true

75
env/.config/hpa/config.toml vendored Normal file
View File

@@ -0,0 +1,75 @@
# This config is setup for running inside the docker container.
#
# NOTE:
# Configuration settings for the `hpa` command line tool.
# You can delete settings that are not applicable to your use case.
# Default arguments / options that get passed into `ansible-playbook` commands.
# WARNING: Do not put arguments / options that contain spaces in the same string,
# they should be separate strings, for example do not do something like
# ['--tags debug'], instead use ['--tags', 'debug'].
#
args = ['--tags', 'debug']
# Set to true if you want to pass the vault args to `ansible-playbook` commands.
useVaultArgs = true
# NOTE:
# Configuration for running the generate command(s). This allows custimizations
# to the files that get used to generate the final output (generally a pdf).
# See `pandoc --help`. Below are the defaults that get used, which only need
# adjusted if your template does not follow the default template design or if
# you add extra files to your template that need to be included in the final
# output. Also be aware that any of the files specified in the `files` or
# `includeInHeader` options, need to be inside the `buildDirectory` when generating
# the final output file.
# [generate]
# this relative to the project directory.
# buildDirectory = '.build'
# pdfEngine = 'xelatex'
# includeInHeader = [
# 'head.tex',
# 'footer.tex'
# ]
# files = [
# 'Report.md',
# 'Definitions.md'
# ]
# outputFileName = 'Report'
# NOTE:
# These are more for local development of the ansible playbook and should not be needed
# in most cases. Uncomment the lines if you want to customize the playbook and use it
# instead of the provided / default playbook.
[playbook]
directory = '/root/.local/share/hpa/playbook'
inventory = '/root/.local/share/hpa/playbook/inventory.ini'
version = 'main'
# NOTE:
# These are to declare where your template files are either on your local system or
# a remote git repository.
[template]
# The directory path on your local system to the template files.
directory = '/root/.local/share/hpa/template'
vars = 'repo_vars'
# The url to a git repository that contains your template files.
# url = 'https://git.example.com/consult-template.git'
# The version, tag, branch, or sha of the template files to clone from the remote
# template repository. In general it is best practice to use a version instead of a
# branch.
# version = '1.0.0'
# NOTE:
# Holds settings for `ansible-vault` commands.
[vault]
# Arguments to pass to commands that use `ansible-vault`, such as encrypting or decrypting
# files.
args = ['--vault-password-file=/run/secrets/vault-pass']
# An id to use when encrypting `ansible-vault` files.
#encryptId = 'myId'

View File

@@ -6,11 +6,10 @@
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this: # Or execute your favorite apps at launch like this:
exec-once = pidof hyprpaper | uwsm app -- hyprpaper exec-once = uwsm app -- hyprpaper
exec-once = pidof hypridle | uwsm app -- hypridle exec-once = pidof hypridle | uwsm app -- hypridle
exec-once = uwsm app -- elephant exec-once = pidof hyprlauncher | uwsm app -- hyprlauncher -d
exec-once = uwsm app -- swaync exec-once = pidof swaync | uwsm app -- swaync
exec-once = uwsm app -- walker --gapplication-service & exec-once = pidof waybar | uwsm app -- waybar
exec-once = uwsm app -- waybar
exec-once = uwsm app -- clipse -listen exec-once = uwsm app -- clipse -listen

View File

@@ -18,7 +18,7 @@ env = ELECTRON_OZONE_PLATFORM_HINT,wayland
env = OZONE_PLATFORM,wayland env = OZONE_PLATFORM,wayland
env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_TYPE,wayland
env = GDK_SCALE=2 env = GDK_SCALE,2
# Allow better support for screen sharing (Google Meet, Discord, etc) # Allow better support for screen sharing (Google Meet, Discord, etc)
env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_CURRENT_DESKTOP,Hyprland

View File

@@ -10,7 +10,7 @@ input {
kb_options = ctrl:nocaps kb_options = ctrl:nocaps
kb_rules = kb_rules =
repeat_rate = 35 repeat_rate = 50
repeat_delay = 200 repeat_delay = 200
follow_mouse = 2 follow_mouse = 2
@@ -24,9 +24,9 @@ input {
} }
# https://wiki.hyprland.org/Configuring/Variables/#gestures # https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures { # gestures {
workspace_swipe = false # workspace_swipe = false
} # }
# Example per-device config # Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more

197
env/.config/hypr/hyprkeybinds.conf vendored Normal file
View File

@@ -0,0 +1,197 @@
##############################
### HYPRLAND - KEYBINDINGS ###
##############################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # "Command/Windows" key as main modifier
$windowMod = ALT # Option for window controls.
$MEH = ALT SHIFT CTRL
$HYPER = ALT SHIFT SUPER CTRL
# See https://wiki.hyprland.org/Configuring/Keywords/
$terminal = uwsm app -- ghostty
$browser = uwsm app -- brave
$fileManager = $terminal -e yazi
$fileBrowser = uwsm app -- nautilus
$menu = hyprlauncher
$scripts = ~/.local/scripts/hypr
$pwa = $scripts/webapp launch
$tmuxSessionator = ~/.local/scripts/tmux-sessionator
$clipboardHistory = com.ghostty.clipse $terminal --class=com.ghostty.clipse -e clipse
$uninstallDesktop = $terminal --class=com.ghostty.float -e $scripts/uninstall-desktop-app
$utilsLauncher = com.ghostty.utils-launcher $scripts/utils-launcher --launch
$housecallPro = https://pro.housecallpro.com/app/calendar_new
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
##############################################################################################
# Apps / hyprland controls
#
# These should in general use the $mainMod prefix
##############################################################################################
# MOD # KEY # DESC # Action #
##############################################################################################
bindd = $mainMod, SPACE, Application launcher, exec, $menu
bindd = $mainMod, RETURN, New terminal, exec, $terminal
bindd = $mainMod SHIFT, RETURN, New floating terminal, exec, $terminal --class=com.ghostty.float
bindd = $mainMod, TAB, Focus previous workspace, exec, $scripts/workspacectl switch --to previous
bindd = $mainMod, A, [A]i - launch / focus, exec, $pwa --or-focus "https://ollama.housh.dev"
bindd = $mainMod SHIFT, A, [A]i - new window, exec, $pwa "https://ollama.housh.dev"
bindd = $mainMod, B, New [b]rowser, exec, $browser
bindd = $mainMod SHIFT, B, New private [b]rowser, exec, $browser --incognito
bindd = $mainMod, C, [C]alendar, togglespecialworkspace, calendar
bindd = $mainMod SHIFT, C, [C]onfig folder in tmux session, exec, $terminal -e $tmuxSessionator ~/.config
bindd = $mainMod, D, [D]ispatch app - special workspace, togglespecialworkspace, dispatch
bindd = $mainMod SHIFT, D, [D]ispatch app - new window, exec, $pwa --new $housecallPro
bindd = $mainMod, E, [E]mail - personal, exec, $pwa --or-focus "https://mail.proton.me"
bindd = $mainMod SHIFT, E, [E]mail - work, exec, $scripts/launch --or-focus thunderbird uwsm app -- thunderbird
bindd = $mainMod, F, [F]ile manager - terminal, exec, $fileManager
bindd = $mainMod SHIFT, F, [F]ile manager - application, exec, $fileBrowser
bindd = $mainMod, G, [G]itea, exec, $pwa --or-focus "https://git.housh.dev"
bindd = $mainMod SHIFT, G, [G]ithub, exec, $pwa --or-focus "https://github.com"
bindd = $mainMod, H, Focus window - left, movefocus, l # move window focus using vim keys
bindd = $mainMod SHIFT, H, Workspace - back, workspace, -1
bindd = $mainMod, I, Localsend, exec, $scripts/launch --or-close localsend uwsm app -- localsend
bindd = $mainMod, J, Focus window - down, movefocus, d # move window focus using vim keys
bindd = $mainMod, K, Focus window - up, movefocus, u # move window focus using vim keys
bindd = $mainMod, L, Focus window - right, movefocus, r # move window focus using vim keys
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
bindd = $mainMod, M, [M]usic - jellyfin-tui, togglespecialworkspace, music
bindd = $mainMod SHIFT, M, [M]enu bar - toggle visible, exec, $scripts/waybarctl --toggle
bindd = $mainMod, O, Purchase [o]rders, exec, $pwa --special dispatch "https://po.housh.dev"
bindd = $mainMod, P, [P]assword manager, togglespecialworkspace, pass
bindd = $mainMod SHIFT, P, [P]hotos, exec, $pwa --or-focus "https://photos.housh.dev"
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, $scripts/waybarctl --restart
bindd = $mainMod, S, Toggle [s]pecial workspace, togglespecialworkspace, magic # use $windowMod S to send window to the special workspace
bindd = $mainMod, Y, [Y]ouTube, exec, $pwa --or-focus "https://youtube.com"
bindd = $mainMod, U, [U]nifi, exec, $pwa "https://unifi.ui.com"
bindd = $mainMod SHIFT, U, [U]tility launcher, exec, $scripts/launch --or-close $utilsLauncher
bindd = $mainMod, V, Clipboard history, exec, $scripts/launch --or-close $clipboardHistory
bindd = $mainMod, W, Close current window, killactive,
bindd = $mainMod SHIFT, W, Close all windows in active workspace, exec, $scripts/windowctl close --active-workspace
# Switch to workspaces with mainMod + [0-9]
bindd = $mainMod, 1, Switch to workspace [1], exec, $scripts/workspacectl switch --to 1
bindd = $mainMod, 2, Switch to workspace [2], exec, $scripts/workspacectl switch --to 2
bindd = $mainMod, 3, Switch to workspace [3], exec, $scripts/workspacectl switch --to 3
bindd = $mainMod, 4, Switch to workspace [4], exec, $scripts/workspacectl switch --to 4
bindd = $mainMod, 5, Switch to workspace [5], exec, $scripts/workspacectl switch --to 5
bindd = $mainMod, 6, Switch to workspace [6], exec, $scripts/workspacectl switch --to 6
bindd = $mainMod, 7, Switch to workspace [7], exec, $scripts/workspacectl switch --to 7
bindd = $mainMod, 8, Switch to workspace [8], exec, $scripts/workspacectl switch --to 8
bindd = $mainMod, 9, Switch to workspace [9], exec, $scripts/workspacectl switch --to 9
bindd = $mainMod, 0, Switch to workspace 1[0], exec, $scripts/workspacectl switch --to 10
# Move all workspaces to a monitor
bindd = $mainMod SHIFT, 1, Switch all workspaces to monitor [1], exec, $scripts/mv-all-workspaces-to-monitor 1
bindd = $mainMod SHIFT, 0, Switch all workspaces to monitor [0], exec, $scripts/mv-all-workspaces-to-monitor 0
# Screen Shots
bindd = $mainMod SHIFT, 3, Screenshot a monitor, exec, hyprshot --mode output --output-folder ~/Pictures
bindd = $mainMod SHIFT, 4, Screenshot a selection, exec, hyprshot --mode region --output-folder ~/Pictures
bindd = $mainMod SHIFT, 5, Screenshot a window, exec, hyprshot --mode window --output-folder ~/Pictures
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bindm = $mainMod SHIFT, mouse_down, resizewindow
#######################################################################################
# Window controls
#
# These should in general use the $windowMod prefix
##########################################################################################
# MOD # KEY # DESC # Action #
##########################################################################################
# TODO: Decide which is prefered to switch to fullscreen.
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, F, Toggle [f]loating, exec, $scripts/windowctl toggle-floating --active --width 80% --height 80%
bindd = $windowMod SHIFT, F, Toggle [f]loating, exec, $scripts/windowctl toggle-floating --active
bindd = $windowMod, H, Move window - left, movewindow, l # move windows with windowMod + vim keys
bindd = $windowMod, J, Move window - down, movewindow, d # move windows with windowMod + vim keys
bindd = $windowMod, K, Move window - up, movewindow, u # move windows with windowMod + vim keys
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
bindd = $windowMod, M, Move window to [m]usic workspace, movetoworkspace, special:music
bindd = $windowMod SHIFT, P, Toggle [p]seudo window mode, pseudo, # dwindle
bindd = $windowMod, S, Move window to [s]pecial workspace, movetoworkspacesilent, special:magic
bindd = $windowMod, W, [W]indow actions, exec, $scripts/windowctl launch action --active
# FIX: Changes size of window, this works a different depending on if
# the window is on the right or left of the screen.
#
# Resize horizontally
bindd = $windowMod, EQUAL, Increase window size - horizontal, resizeactive, 20 0
bindd = $windowMod, MINUS, Decrease window size - horizontal, resizeactive, -20 0
# Resize vertically
bindd = $windowMod SHIFT, EQUAL, Increase window size - vertical, resizeactive, 0 20
bindd = $windowMod SHIFT, MINUS, Decrease window size - vertical, resizeactive, 0 -20
# Move active window to a workspace with windowMod + [0-9]
bindd = $windowMod, 1, Move window to workspace [1], movetoworkspace, 1
bindd = $windowMod, 2, Move window to workspace [2], movetoworkspace, 2
bindd = $windowMod, 3, Move window to workspace [3], movetoworkspace, 3
bindd = $windowMod, 4, Move window to workspace [4], movetoworkspace, 4
bindd = $windowMod, 5, Move window to workspace [5], movetoworkspace, 5
bindd = $windowMod, 6, Move window to workspace [6], movetoworkspace, 6
bindd = $windowMod, 7, Move window to workspace [7], movetoworkspace, 7
bindd = $windowMod, 8, Move window to workspace [8], movetoworkspace, 8
bindd = $windowMod, 9, Move window to workspace [9], movetoworkspace, 9
bindd = $windowMod, 0, Move window to workspace 1[0], movetoworkspace, 10
#######################################################################################
# HYPER (Alt + Shift + Super + Ctrl) controls
#
# These should in general use the $HYPER prefix
#######################################################################################
# MOD # KEY # DESC # Action #
#######################################################################################
bindd = $HYPER, H, [H]ide / show windows, exec, $scripts/workspacectl toggle
bindd = $HYPER, J, Toggle split orientation, togglesplit # dwindle
bindd = $HYPER, L, [L]ock computer, exec, hyprlock
bindd = $HYPER, W, Close all windows, exec, $scripts/windowctl close --all
# Move active window to a workspace silently with HYPER + [0-9]
bindd = $HYPER, 1, Move window to workspace silent [1], movetoworkspacesilent, 1
bindd = $HYPER, 2, Move window to workspace silent [2], movetoworkspacesilent, 2
bindd = $HYPER, 3, Move window to workspace silent [3], movetoworkspacesilent, 3
bindd = $HYPER, 4, Move window to workspace silent [4], movetoworkspacesilent, 4
bindd = $HYPER, 5, Move window to workspace silent [5], movetoworkspacesilent, 5
bindd = $HYPER, 6, Move window to workspace silent [6], movetoworkspacesilent, 6
bindd = $HYPER, 7, Move window to workspace silent [7], movetoworkspacesilent, 7
bindd = $HYPER, 8, Move window to workspace silent [8], movetoworkspacesilent, 8
bindd = $HYPER, 9, Move window to workspace silent [9], movetoworkspacesilent, 9
bindd = $HYPER, 0, Move window to workspace silent 1[0], movetoworkspacesilent, 10
#######################################################################################
# MEH (Alt + Shift + Ctrl) controls
#
# These should in general use the $MEH prefix
#######################################################################################
# MOD # KEY # DESC # Action #
#######################################################################################
bindd = $MEH, L, [L]ogs picker / viewer, exec, $terminal --class=com.ghostty.float -e $scripts/utils/logs/logs-picker
##################################################
# Multi-media keys
##################################################
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous

View File

@@ -6,12 +6,13 @@
# Refer to the wiki for more information. # Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/ # https://wiki.hyprland.org/Configuring/
source = ~/.config/hypr/env.conf source = ~/.config/hypr/hyprenv.conf
source = ~/.config/hypr/monitors.conf source = ~/.config/hypr/hyprmonitors.conf
source = ~/.config/hypr/windows.conf source = ~/.config/hypr/hyprwindows.conf
source = ~/.config/hypr/keybinds.conf source = ~/.config/hypr/hyprworkspaces.conf
source = ~/.config/hypr/input.conf source = ~/.config/hypr/hyprkeybinds.conf
source = ~/.config/hypr/autostart.conf source = ~/.config/hypr/hyprinput.conf
source = ~/.config/hypr/hyprautostart.conf
##################### #####################
### LOOK AND FEEL ### ### LOOK AND FEEL ###

2
env/.config/hypr/hyprlauncher.conf vendored Normal file
View File

@@ -0,0 +1,2 @@
desktop_launch_prefix = uwsm app --

View File

@@ -4,7 +4,5 @@
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor= ,preferred,auto,auto monitor= ,preferred,auto,auto
#monitor = HDMI-A-1, preferred, 0x0, auto
#monitor = HDMI-A-1, preferred, 0x0, 1.66667

View File

@@ -1,3 +1,6 @@
preload = /home/michael/wallpapers/wall1.png wallpaper {
wallpaper = ,/home/michael/wallpapers/wall1.png monitor =
splash = true path = /home/michael/wallpapers/wall1.png
fit_mode = cover
}

8
env/.config/hypr/hyprtoolkit.conf vendored Normal file
View File

@@ -0,0 +1,8 @@
background = rgb(1e1e2e)
base = rgb(b4befe)
alternate_base = rgb(cdd6f4)
text = rgb(cdd6f4)
bright_text = rgb(89b4fa)
accent = rgb(b4befe)
accent_secondary = rgb(cba6f7)

47
env/.config/hypr/hyprwindows.conf vendored Normal file
View File

@@ -0,0 +1,47 @@
###############
### WINDOWS ###
###############
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrule = float, tag:floating-window
# windowrule = center, tag:floating-window
# windowrule = size 60% 60%, tag:floating-window
#
# # Weather tui
# windowrule = float, class:^(com.ghostty.weather)$
# windowrule = center, class:^(com.ghostty.weather)$
# windowrule = size 90% 80%, class:^(com.ghostty.weather)$
#
# # Force windows to be a floating window
# windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
# windowrule = tag +floating-window, class:^(com.ghostty.windowctl)$
# windowrule = tag +floating-window, class:^(com.ghostty.utils-launcher)$
# windowrule = tag +floating-window, class:^(com.ghostty.homelab-launcher)$
#
# # Force to stay focused when visible.
# windowrule = stayfocused, class:(blueberry.py)
# windowrule = stayfocused, class:Pinentry.gtk
# windowrule = stayfocused, class:com.ghostty.float
# windowrule = stayfocused, class:com.ghostty.windowctl
# windowrule = stayfocused, class:^(com.ghostty.utils-launcher)$
#
# # Clipboard history tui in floating window.
# windowrule = tag +floating-window, class:.*clipse.*
# windowrule = stayfocused, class:.*clipse.*
#
# # Ignore maximize requests from apps. You'll probably like this.
# windowrule = suppressevent maximize, class:.*
#
# # Just a dash of opacity by default.
# windowrule = opacity 0.97 0.92, class:.*
# # No opacity on youtube.
# windowrule = opacity 1.0, class:.*youtube.com.*
#
# # Fix some dragging issues with XWayland
# windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
#
# # To get more information about a windows class, title, XWayland status or its size, you can use `hyprctl clients`. (From Hyprland Wiki)
# windowrulev2 = float,class:^(one.alynx.showmethekey)$
# windowrulev2 = float,class:^(showmethekey-gtk)$ # make window floating
# windowrulev2 = pin,class:^(showmethekey-gtk)$ # pin window

15
env/.config/hypr/hyprworkspaces.conf vendored Normal file
View File

@@ -0,0 +1,15 @@
##################
### WORKSPACES ###
##################
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
$scripts = ~/.local/scripts/hypr
$pwa = $scripts/webapp launch
$housecallPro = $pwa "https://pro.housecallpro.com/app/calendar_new"
workspace = special:hidden, invisible
workspace = special:pass,on-created-empty: $pwa "https://pass.proton.me"
workspace = special:dispatch,on-created-empty: $housecallPro && $housecallPro
workspace = special:music,on-created-empty: ghostty --class=com.ghostty.music -e jellyfin-tui
workspace = special:calendar,on-created-empty: uwsm app -- gnome-calendar

View File

@@ -1,158 +0,0 @@
##############################
### HYPRLAND - KEYBINDINGS ###
##############################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Command/Windows" key as main modifier
$HYPER = ALT SHIFT WIN CTRL
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
#
# Set programs that you use
$terminal = ghostty
$browser = zen-browser
$fileManager = $terminal -e yazi
$fileBrowser = nautilus
$menu = walker
#$pwa = chromium --profile-directory=Default --enable-features=UseOzonePlatform --ozone-platform=wayland
$pwa = ~/.local/scripts/launch-webapp
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
# NOTE: TUI's / window rules aren't working with ghostty when you try to target the class
# or title so those should be opened with kitty until I can figure out what's happening.
# Apps
bind = $mainMod, Space, exec, $menu # launcher (set above)
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, A, exec, $pwa "https://chatgpt.com" --class com.chromium.chatgpt
bind = $mainMod, B, exec, $browser
bind = $mainMod SHIFT, B, exec, $browser --private-window
bind = $mainMod, C, exec, $terminal -e ~/.local/share/scripts/tmux-sessionator ~/.config
bind = $mainMod, D, exec, $pwa "https://pro.housecallpro.com/app/calendar_new"
bind = $mainMod SHIFT, D, exec, ~/.local/scripts/toggle-desktop
bind = $mainMod, E, exec, $pwa "https://mail.proton.me"
bind = $mainMod SHIFT, E, exec, uwsm app -- thunderbird
bind = $mainMod, F, exec, $fileManager
#bind = $mainMod, K, exec, $launch Komodo
bind = $mainMod SHIFT, F, exec, $fileBrowser
bind = $mainMod, G, exec, $pwa "https://git.housh.dev"
# NOTE: Do not bind apps to H, J, K, or L!
bind = $mainMod, M, exec, ~/.local/scripts/toggle-waybar
bind = $mainMod, N, exec, $terminal -e nvim
bind = $mainMod, P, exec, $pwa "https://pass.proton.me"
bind = $mainMod SHIFT, P, pseudo, # dwindle
bind = $mainMod SHIFT, R, exec, ~/.local/scripts/waybar-restart
bind = $mainMod, Y, exec, $pwa "https://youtube.com"
bind = $mainMod, U, exec, $pwa "https://unifi.ui.com"
bind = $mainMod SHIFT, U, exec, $terminal --class=com.ghostty.float -e ~/.local/scripts/uninstall-desktop-app
bind = $mainMod, V, exec, $terminal --class=com.ghostty.clipse -e clipse
bind = $mainMod, W, killactive,
# TODO: change modifier key.
#bind = $mainMod SHIFT, L, exec, hyprlock
# TODO: change modifier key.
#bind = $mainMod, V, togglefloating
#bind = $mainMod, P, pseudo, # dwindle
#
# Screenshots
bind = $mainMod SHIFT ALT, 4, exec, hyprshot -m region -o ~/Pictures
bind = $mainMod SHIFT ALT, 3, exec, hyprshot -m window -o ~/Pictures
bind = CTRL, F, fullscreen,
bind = ctrl shift, f, exec, ~/.local/scripts/window-toggle-floating
# Move focus with mainMod + arrow keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Move windows with mainMod + Shift
bind = $mainMod SHIFT, H, movewindow, l
#bind = $mainMod SHIFT, H, swapsplit
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
bind = $HYPER, J, togglesplit # dwindle
# FIX: Changes size of window, this works a different depending on if
# the window is on the right or left of the screen.
#
# Resize horizontally
bind = $mainMod, EQUAL, resizeactive, 20 0
bind = $mainMod, MINUS, resizeactive, -20 0
# Resize vertically
bind = $mainMod SHIFT, EQUAL, resizeactive, 0 20
bind = $mainMod SHIFT, MINUS, resizeactive, 0 -20
# Switch to workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move all workspaces to a monitor
bind = $HYPER, 0, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 0
bind = $HYPER, 1, exec, ~/.local/scripts/mv-all-workspaces-to-monitor 1
# Move current workspace.
# bind = $HYPER, H, movecurrentworkspacetomonitor, 1
# bind = $HYPER, L, movecurrentworkspacetomonitor, 0
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bindm = $mainMod SHIFT, mouse_down, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
# Shut off laptop monitor when lid is closed and on when lid is open.
# bindl = , switch:on:Lid Switch, exec, hyprctl dispatch dpms off
# bindl = , switch:off:Lid Switch, exec, hyprctl dispatch dpms on

View File

@@ -1,40 +0,0 @@
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
#
windowrule = float, tag:floating-window
windowrule = center, tag:floating-window
windowrule = size 800 600, tag:floating-window
# Force windows to be a floating window
windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
# Force to stay focused when visible.
windowrule = stayfocused, class:(blueberry.py)
windowrule = stayfocused, class:Pinentry.gtk
windowrule = stayfocused, class:com.ghostty.float
# Clipboard history tui in floating window.
windowrule = tag +floating-window, class:.*clipse.*
windowrule = stayfocused, class:.*clipse.*
# Ignore maximize requests from apps. You'll probably like this.
windowrule = suppressevent maximize, class:.*
# Just a dash of opacity by default.
windowrule = opacity 0.97 0.92, class:.*
# No opacity on youtube.
windowrule = opacity 1.0, class:.*youtube.com.*
# Fix some dragging issues with XWayland
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
#windowrule = float, class:.*pass.proton.me.*
workspace = special:hidden, invisible
#windowrule = size 800 600, title:pinentry

View File

@@ -1,14 +0,0 @@
# Set work spaces 1-5 to be on external monitor
workspace = 1, monitor:1
workspace = 2, monitor:1
workspace = 3, monitor:1
workspace = 4, monitor:1
workspace = 5, monitor:1
# Set work spaces 6-10 to be on internal monitor
workspace = 6, monitor:0
workspace = 7, monitor:0
workspace = 8, monitor:0
workspace = 9, monitor:0
workspace = 10, monitor:0

151
env/.config/kanata/macbook.kbd vendored Normal file
View File

@@ -0,0 +1,151 @@
;; Macbook-Pro configuration file.
;;
;; Adapted from https://github.com/linkarzu/dotfiles-latest/blob/main/kanata/configs/macbook-subl.kbd
;; Video related to this file
;; https://youtu.be/jvJ3f4HHiMY
;; Kanata docs
;; https://github.com/jtroo/kanata/blob/main/docs/config.adoc
;; OS key code mappings
;; https://github.com/jtroo/kanata/blob/main/parser/src/keys/mod.rs
(defcfg
process-unmapped-keys yes
log-layer-changes no
danger-enable-cmd yes
concurrent-tap-hold yes
rapid-event-delay 10
allow-hardware-repeat false
;; When any non-chord activation happens, this timeout begins. Until this timeout expires
;; all inputs will immediately skip chords processing and be processed by the active layer.
;; chords-v2-min-idle 250
)
;; Variables
(defvar
tap-higher 400
tap-time 200
tap-time-plus 300
hold-time-plus 300
hold-time 200
chord-time 60
subl-time 200
tmux-delay 40
)
;; Only one defsrc is allowed.
;;
;; defsrc defines the keys that will be intercepted by kanata. The order of the
;; keys matches with deflayer declarations and all deflayer declarations must
;; have the same number of keys as defsrc. Any keys not listed in defsrc will
;; be passed straight to the operating system.
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / ▲ rsft
lctl lalt lmet spc rmet ralt ◀ ▼ ▶
)
(defalias
;; Modifier keys - Left
mlctl (tap-hold $tap-time $hold-time a lctl)
mlalt (tap-hold $tap-time $hold-time s lalt)
mlmet (tap-hold $tap-time $hold-time d lmet)
mlsft (tap-hold $tap-time $hold-time f lsft)
;; Modifier keys - Right
mrsft (tap-hold $tap-time $hold-time j rsft)
mrmet (tap-hold $tap-time $hold-time k rmet)
mralt (tap-hold $tap-time $hold-time l ralt)
mrctl (tap-hold $tap-time $hold-time ; rctl)
mretu (tap-hold $tap-time $hold-time tab ret)
;; number and symbols layer trigger keys.
mlnums (tap-hold-press $tap-time-plus $hold-time-plus lmet (layer-while-held nums_and_symbols))
mrnums (tap-hold-press $tap-time-plus $hold-time-plus rmet (layer-while-held nums_and_symbols))
;; mouse layer trigger keys.
mlms (tap-hold-press $tap-time $hold-time esc (layer-while-held mouse))
mrms (tap-hold-press $tap-time $hold-time ret (layer-while-held mouse))
;; Multi
mhypr (tap-hold $tap-time $hold-time spc (multi lsft lctl lalt lmet)) ;; Hyper key
;; Sublayers
;; I implemented sublayers thanks to the help in this discussion
;; https://github.com/jtroo/kanata/discussions/1765
;; DO NOT USE THE SUBLAYERS IN A FREQUENTLY PRESSED KEY LIKE SPACEBAR
;; It made typing spaces a pain in the ass, enter is not pressed to often, so it works way better
;; msubl (tap-hold-press $subl-time $subl-time ret (layer-while-held sublayers))
;; Execute script
;; maltt (cmd open "btt://execute_assigned_actions_for_trigger/?uuid=F35EF770-FAA5-448A-957D-70BB449DEB0F")
;; key and script at the same time
;; maltt (tap-hold $tap-time $hold-time lsft (cmd open "btt://execute_assigned_actions_for_trigger/?uuid=F35EF770-FAA5-448A-957D-70BB449DEB0F"))
)
;; Blank layer
;; (deflayer {{NAME}}
;; esc XX XX XX XX XX XX XX XX XX XX XX XX ;; function row
;; grv XX XX XX XX XX XX XX XX XX XX XX XX bspc ;; number row
;; tab XX XX XX XX XX XX XX XX XX XX XX XX XX ;; top letter row
;; caps XX XX XX XX XX XX XX XX XX XX XX ret ;; home row
;; lsft XX XX XX XX XX XX XX XX XX XX XX rsft ;; bottom letter row
;; lctl lalt lmet spc rmet ralt ◀ ▼ ▶ ;; control row
;; )
;; Main layer
;;
;; Disable most function keys, and add homerow mods.
;;
(deflayer main
esc brdn bru XX XX XX XX XX XX XX mute vold volu
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
@mlms @mlctl @mlalt @mlmet @mlsft g h @mrsft @mrmet @mralt @mrctl ' @mrms
lsft z x c v b n m , . / ▲ rsft
lctl lalt @mlnums spc @mrnums ralt ◀ ▼ ▶
)
;; Number and Symbols layer
(deflayer nums_and_symbols
esc XX XX XX XX XX XX XX XX XX XX XX XX
S-grv XX XX XX XX XX XX XX XX XX XX - = bspc
grv S-1 S-9 S-0 S-2 XX XX 1 2 3 \ XX XX XX
XX [ ] S-[ S-] XX XX 4 5 6 . XX ret
lsft S-7 S-8 S-4 S-3 XX XX 7 8 9 / XX rsft
lctl lalt lmet 0 rmet ralt ◀ ▼ ▶
)
(defalias
mwu (mwheel-up 50 120)
mwd (mwheel-down 50 120)
mwl (mwheel-left 50 120)
mwr (mwheel-right 50 120)
ma↑ (movemouse-accel-up 5 1000 1 3)
ma← (movemouse-accel-left 5 1000 1 3)
ma↓ (movemouse-accel-down 5 1000 1 3)
ma→ (movemouse-accel-right 5 1000 1 3)
sm (setmouse 32228 32228)
fst (movemouse-speed 200)
)
;; Mouse and arrow layer
(deflayer mouse
esc XX XX XX XX XX XX XX XX XX XX XX XX ;; function row
grv XX XX XX XX XX XX XX XX XX XX XX XX bspc ;; number row
tab XX XX ▲ XX XX @mwl @mwd @mwu @mwr XX XX XX XX ;; top letter row
caps XX ◀ ▼ ▶ XX @ma← @ma↓ @ma↑ @ma→ XX XX mrtp ;; home row
lsft XX XX XX XX XX XX XX XX XX XX XX rsft ;; bottom letter row
lctl lalt lmet mltp rmet ralt XX XX XX ;; control row
)

156
env/.config/kanata/voyager.kbd vendored Normal file
View File

@@ -0,0 +1,156 @@
;; ZSA Voyager configuration file.
;;
;; Adapted from https://github.com/linkarzu/dotfiles-latest/blob/main/kanata/configs/macbook-subl.kbd
;; Video related to this file
;; https://youtu.be/jvJ3f4HHiMY
;; Kanata docs
;; https://github.com/jtroo/kanata/blob/main/docs/config.adoc
;; OS key code mappings
;; https://github.com/jtroo/kanata/blob/main/parser/src/keys/mod.rs
(defcfg
process-unmapped-keys yes
log-layer-changes no
danger-enable-cmd yes
concurrent-tap-hold yes
rapid-event-delay 3
allow-hardware-repeat false
;; When any non-chord activation happens, this timeout begins. Until this timeout expires
;; all inputs will immediately skip chords processing and be processed by the active layer.
;; chords-v2-min-idle 250
)
;; Variables
(defvar
tap-higher 400
tap-time 150
tap-time-plus 300
hold-time-plus 300
hold-time 200
chord-time 60
subl-time 200
tmux-delay 40
)
;; Only one defsrc is allowed.
;;
;; defsrc defines the keys that will be intercepted by kanata. The order of the
;; keys matches with deflayer declarations and all deflayer declarations must
;; have the same number of keys as defsrc. Any keys not listed in defsrc will
;; be passed straight to the operating system.
(defsrc
;;----------------LEFT-------------------;------------------RIGHT-------------------;;
= 1 2 3 4 5 6 7 8 9 0 -
grv q w e r t y u i o p \
esc a s d f g h j k l ; '
lsft z x c v b n m , . / rsft
ret tab bspc spc
)
(defalias
;; Modifier keys - Left
mlctl (tap-hold $tap-time $hold-time a lctl)
mlalt (tap-hold $tap-time $hold-time s lalt)
mlmet (tap-hold $tap-time $hold-time d lmet)
mlsft (tap-hold $tap-time $hold-time f lsft)
;; Modifier keys - Right
mrsft (tap-hold $tap-time $hold-time j rsft)
mrmet (tap-hold $tap-time $hold-time k rmet)
mralt (tap-hold $tap-time $hold-time l ralt)
mrctl (tap-hold $tap-time $hold-time ; rctl)
mretu (tap-hold $tap-time $hold-time tab ret)
;; number and symbols layer trigger keys.
mlnums (tap-hold-press $tap-time-plus $hold-time-plus ret (layer-while-held nums_and_symbols))
mrnums (tap-hold-press $tap-time-plus $hold-time-plus spc (layer-while-held nums_and_symbols))
;; mouse layer trigger keys.
mlms (tap-hold-press $tap-time $hold-time esc (layer-while-held mouse))
mrms (tap-hold-press $tap-time $hold-time ' (layer-while-held mouse))
;; Multi
mhypr (tap-hold $tap-time $hold-time bspc (multi lsft lctl lalt lmet)) ;; Hyper key
;; Sublayers
;; I implemented sublayers thanks to the help in this discussion
;; https://github.com/jtroo/kanata/discussions/1765
;; DO NOT USE THE SUBLAYERS IN A FREQUENTLY PRESSED KEY LIKE SPACEBAR
;; It made typing spaces a pain in the ass, enter is not pressed to often, so it works way better
;; msubl (tap-hold-press $subl-time $subl-time ret (layer-while-held sublayers))
;; Execute script
;; maltt (cmd open "btt://execute_assigned_actions_for_trigger/?uuid=F35EF770-FAA5-448A-957D-70BB449DEB0F")
;; key and script at the same time
;; maltt (tap-hold $tap-time $hold-time lsft (cmd open "btt://execute_assigned_actions_for_trigger/?uuid=F35EF770-FAA5-448A-957D-70BB449DEB0F"))
)
;; BLANK LAYER
;; (deflayer {{NAME}}
;;;;----------------LEFT-------------------;------------------RIGHT-------------------;;
;; = 1 2 3 4 5 6 7 8 9 0 -
;; grv q w e r t y u i o p \
;; esc a s d f g h j k l ; '
;; lsft z x c v b n m , . / rsft
;; ret tab bspc spc
;; )
;; Main layer
(deflayer main
;;----------------LEFT----------------------------;-------------------------RIGHT---------------------------;;
= 1 2 3 4 5 6 7 8 9 0 -
grv q w e r t y u i o p \
@mlms @mlctl @mlalt @mlmet @mlsft g h @mrsft @mrmet @mralt @mrctl @mrms
lsft z x c v b n m , . / rsft
@mlnums tab @mhypr @mrnums
)
(defalias
;; Number layer modifier keys - Left
nlctl (tap-hold $tap-time $hold-time [ lctl)
nlalt (tap-hold $tap-time $hold-time ] lalt)
nlmet (tap-hold $tap-time $hold-time S-[ lmet)
nlsft (tap-hold $tap-time $hold-time S-] lsft)
)
;; Number and Symbols layer
(deflayer nums_and_symbols
;;----------------LEFT---------------------------------;-------------------RIGHT-------------------;;
= XX XX XX XX XX XX XX XX XX XX -
S-grv S-1 S-9 S-0 S-2 XX - 1 2 3 \ \
XX @nlctl @nlalt @nlmet @nlsft XX S-= 4 5 6 . '
lsft S-7 S-8 S-3 S-4 XX S-8 7 8 9 / rsft
@mlnums tab @mhypr 0
)
(defalias
mwu (mwheel-up 50 120)
mwd (mwheel-down 50 120)
mwl (mwheel-left 50 120)
mwr (mwheel-right 50 120)
ma↑ (movemouse-accel-up 5 1000 1 3)
ma← (movemouse-accel-left 5 1000 1 3)
ma↓ (movemouse-accel-down 5 1000 1 3)
ma→ (movemouse-accel-right 5 1000 1 3)
sm (setmouse 32228 32228)
fst (movemouse-speed 200)
)
;; Mouse and arrow layer
(deflayer mouse
;;----------------LEFT-------------------;------------------RIGHT-------------------;;
XX brdn bru XX XX XX XX XX mute vold volu XX
XX XX XX ▲ XX XX @mwl @mwd @mwu @mwr XX XX
XX XX ◀ ▼ ▶ XX @ma← @ma↓ @ma↑ @ma→ XX XX
XX XX XX XX XX XX XX XX XX XX XX XX
ret tab mltp mrtp
)

1
env/.config/nvim vendored Submodule

Submodule env/.config/nvim added at dba64075d8

View File

@@ -1,8 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

View File

@@ -1,15 +0,0 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,4 +0,0 @@
# 💤 LazyVim
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.

View File

@@ -1,20 +0,0 @@
-- Markdown specific key maps.
--
local todos = require("todo-comments")
local keywords = { "WARN", "WARNING", "IMPORTANT" }
-- Show all the warnings in the quick fix list.
vim.keymap.set(
"n",
"<leader>tw",
"<CMD>Trouble todo toggle filter = {tag = {WARN, IMPORTANT}}<CR>",
{ desc = "[T]odo [W]arnings" }
)
vim.keymap.set("n", "]w", function()
todos.jump_next({ keywords = keywords })
end, { desc = "Next [W]arning" })
vim.keymap.set("n", "[w", function()
todos.jump_prev({ keywords = keywords })
end, { desc = "Previous [W]arning" })

View File

@@ -1,2 +0,0 @@
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2

View File

@@ -1,15 +0,0 @@
-- bootstrap lazy.nvim, LazyVim and your plugin
vim.g.netrw_browsex_viewer = "xdg-open"
require("config.lazy")
vim.filetype.add({
pattern = {
[".*"] = function(path, bufnr)
local first_line = vim.api.nvim_buf_get_lines(bufnr, 0, 1, false)[1] or ""
if first_line:match("^#!.*zsh") then
return "bash"
end
end,
},
})

View File

@@ -1,27 +0,0 @@
{
"extras": [
"lazyvim.plugins.extras.coding.mini-snippets",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.editor.fzf",
"lazyvim.plugins.extras.editor.harpoon2",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.ansible",
"lazyvim.plugins.extras.lang.clangd",
"lazyvim.plugins.extras.lang.cmake",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.git",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.tex",
"lazyvim.plugins.extras.lang.toml",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.util.startuptime"
],
"install_version": 8,
"news": {
"NEWS.md": "11866"
},
"version": 8
}

View File

@@ -1,76 +0,0 @@
local defaultGroupOptions = { clear = true }
local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions)
local createCmd = vim.api.nvim_create_autocmd
createCmd("BufEnter", {
pattern = "*.md",
group = markdownGroup,
callback = function(_)
-- HACK: Set filetype to markdown for '.md' files.
-- Not sure why it doesn't detect these as markdown files, but this fixes the issue.
vim.cmd.setlocal("filetype=markdown")
vim.cmd.setlocal("textwidth=120")
vim.cmd.setlocal("spell spelllang=en_us")
end,
})
-- Hyprlang LSP
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.hl", "hypr*.conf" },
callback = function(event)
print(string.format("starting hyprls for %s", vim.inspect(event)))
vim.lsp.start({
name = "hyprlang",
cmd = { "hyprls" },
root_dir = vim.fn.getcwd(),
})
end,
})
-- Markdown
-- createCmd("BufWritePost", {
-- pattern = { "*.md", "*.markdown" },
-- group = markdownGroup,
-- callback = function(_)
-- -- local cursor = vim.fn.getpos(".")
-- vim.cmd("FormatWrite")
-- -- vim.fn.setpos(".", cursor)
-- end,
-- })
-- Go
createCmd("BufWritePre", {
pattern = "*.go",
callback = function()
require("go.format").goimport()
end,
group = vim.api.nvim_create_augroup("GoFormat", defaultGroupOptions),
})
-- GoPass
vim.api.nvim_exec2(
[[
autocmd BufNewFile,BufRead /private/**/gopass** setlocal noswapfile nobackup noundofile shada=""
]],
{}
)
-- Highlight when yanking.
createCmd("TextYankPost", {
desc = "Highlight when yanking text.",
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- Force zsh scripts to use bash syntax hyighlighting.
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = "*",
callback = function(args)
local first_line = vim.api.nvim_buf_get_lines(args.buf, 0, 1, false)[1] or ""
if first_line:match("^#!.*zsh") then
vim.bo[args.buf].filetype = "bash"
end
end,
})

View File

@@ -1,54 +0,0 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local keymap = vim.keymap.set
local default_options = { noremap = true, silent = true }
local wk = require("which-key")
local wk_add = function(mode, keymaps)
wk.add(keymaps, { mode = mode, silent = true })
end
keymap("i", "jk", "<ESC>", default_options)
local make_executable = function()
local file = vim.fn.expand("%:p")
vim.cmd("silent !chmod +x " .. file)
print("Made " .. file .. " executable")
end
--------------------------------------------------------------------------------
-- Normal Mode
--------------------------------------------------------------------------------
wk_add("n", {
{ "<Left>", ":vertical resize +1<CR>", desc = "Resize Pane Left" },
{ "<Right>", ":vertical resize -1<CR>", desc = "Resize Pane Right" },
{ "<Up>", "resize -1<CR>", desc = "Resize Pane Up" },
{ "<Down>", "resize +1<CR>", desc = "Resize Pane Down" },
{ "<leader>n", "<CMD>:noh<CR>", desc = "[N]o highlighting" },
{ "<leader>s", "<CMD>:set spell!<CR>", desc = "[S]pell check toggle" },
{ "<C-s>", "<CMD>:write<CR>", desc = "[S]ave" },
{ "J", ":move .+1<CR>==", desc = "Move line down" },
{ "K", ":move .-2<CR>==", desc = "Move line up" },
{ "<leader>x", make_executable, desc = "Make current file e[x]ecutable" },
{ "<leader>z", "<CMD>:ZenMode<CR>", desc = "[Z]en Mode" },
})
--------------------------------------------------------------------------------
-- Visual Mode
--------------------------------------------------------------------------------
vim.keymap.set("v", "K", ":move '<-2<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
vim.keymap.set("v", "J", ":move '>+1<CR>gv=gv", { desc = "Move selected block up.", silent = true, noremap = true })
-- Toggle term key maps, that get attached when terminal is opened.
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
keymap("t", "<esc>", [[<C-\><C-n>]], opts)
end
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")

View File

@@ -1,69 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{
import = "lazyvim.plugins.extras.editor.mini-files",
opts = {
options = {
use_as_default_explorer = true,
},
},
},
{
import = "lazyvim.plugins.extras.coding.blink",
keymap = {
preset = "enter",
["<C-y>"] = { "select_and_accept" },
},
},
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@@ -1,72 +0,0 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
--
local o = vim.opt
local wo = vim.wo
local fn = vim.fn
vim.cmd.set("inccommand=split")
o.filetype = "on"
o.updatetime = 500 -- faster completion
o.timeoutlen = 800 -- time to wait for a mapped sequence to complete (in milliseconds)
o.ttimeoutlen = 300 -- Time in milliseconds to wait for a key code sequence to complete
o.backup = false -- creates a backup file
o.swapfile = false -- enable/disable swap file creation
o.dir = fn.stdpath("data") .. "/swp" -- swap file directory
o.undofile = false -- enable/disable undo file creation
o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory
o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered.
o.hidden = true -- required to keep multiple buffers and open multiple buffers
--o.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
o.fileencoding = "utf-8" -- the encoding written to a file
o.conceallevel = 0 -- so that `` is visible in markdown files
o.number = true -- set numbered lines
o.relativenumber = true -- set relative numbered lines
o.cmdheight = 1 -- space for displaying messages/commands
o.showmode = false -- we don't need to see things like -- INSERT -- anymore
o.showtabline = 2 -- always show tabs
o.laststatus = 2 -- The value of this option influences when the last window will have a status line (2 always)
o.smartcase = true -- smart case
o.smartindent = true -- make indenting smarter again
o.splitbelow = true -- force all horizontal splits to go below current window
o.splitright = true -- force all vertical splits to go to the right of current window
o.autoindent = true -- turn on auto indent.
o.expandtab = true -- convert tabs to spaces
o.smarttab = true -- turn on smart tab
o.shiftwidth = 2 -- the number of spaces inserted for each indentation
o.tabstop = 2 -- how many columns a tab counts for
o.termguicolors = true -- set term gui colors (most terminals support this)
o.cursorline = true -- highlight the current line
o.scrolloff = 20 -- Minimal number of screen lines to keep above and below the cursor
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
o.hlsearch = false -- highlight all matches on previous search pattern
o.ignorecase = true -- ignore case in search patterns
o.foldenable = false -- disable folding; enable with zi
o.foldmethod = "expr"
o.foldexpr = "nvim_treesitter#foldexpr()"
vim.cmd.set("nolist") -- don't show listchars.
-- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<"
o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣"
o.shortmess = o.shortmess + "c" -- prevent "pattern not found" messages
wo.colorcolumn = "99999"
o.wildmode = "full"
o.lazyredraw = false -- do not redraw screen while running macros
o.grepprg = "rg --hidden --vimgrep --smart-case --"
o.completeopt = { "menu", "menuone", "noselect", "noinsert" } -- A comma separated list of options for Insert mode completion
o.wildignorecase = true -- When set case is ignored when completing file names and directories
o.wildignore = [[
.git,.hg,.svn
*.aux,*.out,*.toc
*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class
*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp
*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg
*.mp3,*.oga,*.ogg,*.wav,*.flac
*.eot,*.otf,*.ttf,*.woff
*.doc,*.pdf,*.cbr,*.cbz
*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb
*.swp,.lock,.DS_Store,._*
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
]]
o.viminfo = "" -- disable viminfo from copying information from current session, for security.
vim.g.snacks_animate = false

View File

@@ -1,8 +0,0 @@
return {
"saghen/blink.cmp",
opts = {
keymap = {
preset = "default"
}
}
}

View File

@@ -1,9 +0,0 @@
return {
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin",
},
},
}

View File

@@ -1,4 +0,0 @@
return {
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
{ "akinsho/bufferline.nvim", enabled = false },
}

View File

@@ -1,23 +0,0 @@
return {
"j-hui/fidget.nvim",
event = "VeryLazy",
config = function()
local fidget = require("fidget")
fidget.setup({
notification = {
window = {
normal_hl = "String", -- Base highlight group in the notification window
winblend = 0, -- Background color opacity in the notification window
border = "rounded", -- Border around the notification window
zindex = 45, -- Stacking priority of the notification window
max_width = 0, -- Maximum width of the notification window
max_height = 0, -- Maximum height of the notification window
x_padding = 1, -- Padding from right edge of window boundary
y_padding = 1, -- Padding from bottom edge of window boundary
align = "bottom", -- How to align the notification window
relative = "editor", -- What the notification window position is relative to
},
},
})
end,
}

View File

@@ -1,30 +0,0 @@
return {
"stevearc/conform.nvim",
opts = {
formatters = {
["markdown-toc"] = {
condition = function(_, ctx)
for _, line in ipairs(vim.api.nvim_buf_get_lines(ctx.buf, 0, -1, false)) do
if line:find("<!%-%- toc %-%->") then
return true
end
end
end,
},
["markdownlint-cli2"] = {
condition = function(_, ctx)
local diag = vim.tbl_filter(function(d)
return d.source == "markdownlint"
end, vim.diagnostic.get(ctx.buf))
return #diag > 0
end,
},
},
formatters_by_ft = {
["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" },
["markdown.mdx"] = { "prettier", "markdownlint-cli2", "markdown-toc" },
lua = { "stulua" },
swift = { "swiftformat" },
},
},
}

View File

@@ -1,78 +0,0 @@
return {
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
opts = {
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
},
},
keys = {
{
"<C-e>",
function()
require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())
end,
desc = "Open Harpoon window.",
},
{
"<leader>a",
function()
require("harpoon"):list():add()
end,
desc = "[A]dd to the harpoon list.",
},
{
"<A-y>",
function()
require("harpoon"):list():select(1)
end,
desc = "Select first harpoon buffer.",
},
{
"<A-u>",
function()
require("harpoon"):list():select(2)
end,
desc = "Select second harpoon buffer.",
},
{
"<A-i>",
function()
require("harpoon"):list():select(3)
end,
desc = "Select third harpoon buffer.",
},
{
"<A-o>",
function()
require("harpoon"):list():select(4)
end,
desc = "Select fourth harpoon buffer.",
},
{
"<C-[>",
function()
require("harpoon"):list():prev()
end,
desc = "Previous harpoon buffer.",
},
{
"<C-]>",
function()
require("harpoon"):list():next()
end,
desc = "Next harpoon buffer.",
},
-- Extensions
require("harpoon"):extend({
UI_CREATE = function(cx)
vim.keymap.set("n", "<C-v>", function()
require("harpoon").ui:select_menu_item({ vsplit = true })
end, { buffer = cx.buffer, desc = "Open in [V]split" })
end,
}),
},
},
}

View File

@@ -1,29 +0,0 @@
-- Plugins that don't require much configuration are in here.
--
return {
{
"folke/snacks.nvim",
opts = {
indent = { enabled = false },
},
},
{
"christoomey/vim-tmux-navigator",
lazy = false,
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
"TmuxNavigatorProcessList",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
}

View File

@@ -1,12 +0,0 @@
return {
{
"mfussenegger/nvim-lint",
opts = {
linters = {
markdownlint = {
args = { "--config", "~/.markdownlint.jsonc", "--" },
},
},
},
},
}

View File

@@ -1,169 +0,0 @@
return {
{
"mason-org/mason.nvim",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
ensure_installed = {
"clangd",
"marksman",
"shfmt",
"tinymist",
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"cmake",
"dockerfile",
"editorconfig",
"ini",
"jq",
"latex",
"make",
},
},
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
opts = {
servers = {
bashls = {},
clangd = {},
dockerls = {},
gopls = {},
harper_ls = {},
jsonls = {},
lua_ls = {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
},
},
marksman = {},
sourcekit = {},
tinymist = {
settings = {
formatterMode = "typstyle",
},
},
yamlls = {},
},
setup = {
clangd = function(_, opts)
opts.capabilities.offsetEncoding = { "utf-16" }
end,
sourcekit = function(_, opts)
opts.cmd = {
vim.trim(vim.fn.system("xcrun -f sourcekit-lsp")) or nil,
}
end,
},
},
},
}
-- return {
-- "neovim/nvim-lspconfig",
-- event = { "BufReadPre", "BufNewFile" },
-- dependencies = {
-- "hrsh7th/cmp-nvim-lsp",
-- { "antosha417/nvim-lsp-file-operations", config = true },
-- "williamboman/mason.nvim",
-- "williamboman/mason-lspconfig.nvim",
-- {
-- "folke/lazydev.nvim",
-- ft = "lua",
-- opts = {
-- library = {
-- { path = "${3rd}/luv/library", words = { "vim%.uv" } },
-- },
-- },
-- },
-- },
-- config = function()
-- require("mason").setup()
-- require("mason-lspconfig").setup({
-- opts = {
-- ensure_installed = lsp_servers,
-- },
-- })
-- local lspconfig = require("lspconfig")
-- local cmp_nvim_lsp = require("cmp_nvim_lsp")
-- local capabilities = cmp_nvim_lsp.default_capabilities()
-- local opts = { noremap = true, silent = true }
-- local on_attach = function(_, bufnr)
-- opts.buffer = bufnr
--
-- opts.desc = "Show line diagnostics"
-- vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
--
-- opts.desc = "Show diagnostics in Telescope"
-- vim.keymap.set("n", "<leader><leader>d", "<CMD>Telescope diagnostics bufnr=0<CR>", opts)
--
-- opts.desc = "Show documentation for what is under cursor"
-- vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
--
-- opts.desc = "[G]oto [D]efinition"
-- vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions trim_text=true<cr>", opts)
--
-- opts.desc = "[G]oto [D]eclaration"
-- vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
--
-- opts.desc = "LSP [C]ode [A]ction"
-- vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
--
-- --opts.desc = "[R]e-[N]ame"
-- --vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
--
-- opts.desc = "[R]eload or start LSP"
-- vim.keymap.set("n", "<leader>rl", ":LspRestart | :LspStart<CR>", opts)
--
-- opts.desc = "Goto previous diagnostic"
-- vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
--
-- opts.desc = "Goto next diagnostic"
-- vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
-- end
--
-- for _, lsp in ipairs(lsp_servers) do
-- lspconfig[lsp].setup({
-- capabilities = capabilities,
-- on_attach = on_attach,
-- on_init = function(client)
-- -- HACK: to fix some issues with LSP
-- -- more details: https://github.com/neovim/neovim/issues/19237#issuecomment-2237037154
-- client.offset_encoding = "utf-8"
-- end,
-- cmd = lsp == "sourcekit" and { vim.trim(vim.fn.system("xcrun -f sourcekit-lsp")) } or nil,
-- })
-- end
--
-- -- nice icons
-- local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " }
-- for type, icon in pairs(signs) do
-- local hl = "DiagnosticSign" .. type
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
-- end
--
-- -- For some reason I was having trouble getting this to work inside the on-attach, so it's here.
-- vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e-[N]ame" })
-- end,
-- }

View File

@@ -1,39 +0,0 @@
return {
{
"L3MON4D3/LuaSnip",
opts = function()
LazyVim.cmp.actions.snippet_forward = function()
if require("luasnip").jumpable(1) then
require("luasnip").jump(1)
return true
end
end
LazyVim.cmp.actions.snippet_stop = function()
if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine?
require("luasnip").unlink_current()
return true
end
end
end,
keys = {
{
"<C-k>",
mode = { "i", "s" },
function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end
},
{
"<C-j>",
mode = { "i", "s" },
function()
if ls.jumpable(-1) then
ls.jump(-1)
end
end
},
},
},
}

View File

@@ -1,40 +0,0 @@
return {
"stevearc/oil.nvim",
event = "VeryLazy",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
opts = {
columns = { "icon" },
keymaps = {
["<C-h>"] = false,
["<M-h>"] = "actions.select_split",
["<C-v>"] = {
"actions.select",
opts = { vertical = true },
desc = "Open the entry in a vertical split",
},
view_options = {
show_hidden = true,
is_hidden_file = function(name, _) -- second arg is bufnr, but not currently used.
-- Don't show .DS_Store in output.
-- local is_ds_store = name ~= ".DS_Store"
-- return not is_ds_store
return false
end,
},
},
},
keys = {
-- Show the parent directory in current window.
{ "-", "<CMD>Oil<CR>", desc = "Open parent directory." },
-- Open parent directory in floating window.
{
"<space>-",
function()
require("oil").toggle_float()
end,
desc = "Open parent directory in floating window.",
},
},
}

View File

@@ -1,47 +0,0 @@
-- NOTE: Header looks jacked up here, but fine when rendered in the ui.
return {
"folke/snacks.nvim",
opts = {
picker = {
hidden = true,
ignored = true
},
image = {
doc = {
enabled = true,
},
},
dashboard = {
row = nil,
col = nil,
preset = {
header = [[
*
+++++
+++++++++
==+++++++++++
+===:+++++++++++*
+======--+++++++++++*##+====
+==========:=+++++++++++#+====
+=============-=++++++++++++====
+================-:+++++++++++++==
+===================--++++++++++++++*
+======================--+++++++++++++++*
=========================-++++++++++++++++
==========================:+++++++++++++++
===========================:++++++++++++++
===========================-.-++++++++++++
===========================-::.=++++++++++
===========================----..=++++++++
===========================------..:=+++++
===========================--------:...-++
===========================------------:.:
===========================---------------
===========================---------------
===========================---------------
]],
},
},
},
}

View File

@@ -1,11 +0,0 @@
return {
{
import = "lazyvim.plugins.extras.editor.telescope",
enabled = false,
opts = {
ensure_installed = {
"swift",
},
},
},
}

View File

@@ -1,14 +0,0 @@
return {
"folke/todo-comments.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"folke/trouble.nvim",
},
keys = {
{ "<leader>xt", false },
{ "<leader>xT", false },
{ "<leader>tq", "<CMD>Trouble todo toggle<CR>", desc = "[T]odo [Q]uick fix list." },
{ "<leader><leader>t", "<CMD>TodoTelescope<CR>", desc = "[T]odo telescope list." },
{ "<leader>tl", "<CMD>TodoLocList<CR>", desc = "[T]odo [L]ocation list." },
},
}

View File

@@ -1,15 +0,0 @@
return {
'chomosuke/typst-preview.nvim',
ft = 'typst', -- or ft = 'typst'
version = '1.*',
opts = {
debug = true,
}, -- lazy.nvim will implicitly calls `setup {}`
keys = {
{
"<leader>tp",
"<CMD>TypstPreviewToggle<CR>",
desc = "Toggle typst preview."
},
}
}

View File

@@ -1,73 +0,0 @@
local progress_handle
return {
"wojciech-kulik/xcodebuild.nvim",
event = "VeryLazy",
dependencies = {
"nvim-telescope/telescope.nvim",
"MunifTanjim/nui.nvim",
},
opts = {
show_build_progress_bar = false,
logs = {
auto_open_on_success_tests = false,
auto_open_on_failed_tests = false,
auto_open_on_success_build = false,
auto_open_on_failed_build = false,
auto_focus = false,
auto_close_on_app_launch = true,
only_summary = true,
notify = function(message, severity)
local fidget = require("fidget")
if progress_handle then
progress_handle.message = message
if not message:find("Loading") then
progress_handle:finish()
progress_handle = nil
if vim.trim(message) ~= "" then
fidget.notify(message, severity)
end
end
else
fidget.notify(message, severity)
end
end,
notify_progress = function(message)
local progress = require("fidget.progress")
if progress_handle then
progress_handle.title = ""
progress_handle.message = message
else
progress_handle = progress.handle.create({
message = message,
lsp_client = { name = "xcodebuild.nvim" },
})
end
end,
},
code_coverage = {
enabled = true,
},
},
keys = {
{ "<leader>X", "<cmd>XcodebuildPicker<cr>", desc = "Show Xcodebuild Actions" },
{ "<leader>xf", "<cmd>XcodebuildProjectManager<cr>", desc = "Show Project Manager Actions" },
{ "<leader>xb", "<cmd>XcodebuildBuild<cr>", desc = "Build Project" },
{ "<leader>xB", "<cmd>XcodebuildBuildForTesting<cr>", desc = "Build For Testing" },
{ "<leader>xr", "<cmd>XcodebuildBuildRun<cr>", desc = "Build & Run Project" },
{ "<leader>xt", "<cmd>XcodebuildTest<cr>", desc = "Run Tests" },
{ "<leader>xt", "<cmd>XcodebuildTestSelected<cr>", desc = "Run Selected Tests" },
{ "<leader>xT", "<cmd>XcodebuildTestClass<cr>", desc = "Run This Test Class" },
{ "<leader>xl", "<cmd>XcodebuildToggleLogs<cr>", desc = "Toggle Xcodebuild Logs" },
{ "<leader>xc", "<cmd>XcodebuildToggleCodeCoverage<cr>", desc = "Toggle Code Coverage" },
{ "<leader>xC", "<cmd>XcodebuildShowCodeCoverageReport<cr>", desc = "Show Code Coverage Report" },
{ "<leader>xe", "<cmd>XcodebuildTestExplorerToggle<cr>", desc = "Toggle Test Explorer" },
{ "<leader>xs", "<cmd>XcodebuildFailingSnapshots<cr>", desc = "Show Failing Snapshots" },
{ "<leader>xd", "<cmd>XcodebuildSelectDevice<cr>", desc = "Select Device" },
{ "<leader>xp", "<cmd>XcodebuildSelectTestPlan<cr>", desc = "Select Test Plan" },
{ "<leader>xq", "<cmd>Telescope quickfix<cr", desc = "Show QuickFix List" },
{ "<leader>xx", "<cmd>XcodebuildQuickfixLine<cr>", desc = "Quickfix Line" },
{ "<leader>xa", "<cmd>XcodebuildCodeActions<cr>", desc = "Show Code Actions" },
},
}

View File

@@ -1,17 +0,0 @@
-- Setup snippets here.
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local ms = ls.multi_snippet
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
ls.add_snippets("lua", {
s("hello", {
t('print("hello '),
i(1),
t(' world")'),
}),
})

View File

@@ -1,41 +0,0 @@
-- Setup snippets here.
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local ms = ls.multi_snippet
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
local fmt = require("luasnip.extras.fmt").fmt
ls.add_snippets("lua", {
-- Setup a new snippet file.
s("sf", {
t({
"-- Setup snippets.",
'local ls = require("luasnip")',
"local s = ls.snippet",
"local sn = ls.snippet_node",
"local ms = ls.multi_snippet",
"local i = ls.insert_node",
"local f = ls.function_node",
"local c = ls.choice_node",
"local t = ls.text_node",
"-- Add snippets",
}),
t('ls.add_snippets("'),
i(1, "<file-type>"),
t({
'", {',
"\t-- Define snippets here.",
"})",
}),
}),
s("c", {
c(1, {
fmt("{}", { i(1), t("debug") }),
fmt("{}", { i(1), t("warning") }),
}),
}),
})

View File

@@ -1,131 +0,0 @@
-- Setup snippets.
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local ms = ls.multi_snippet
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
-- Add snippets
ls.add_snippets("swift", {
-- Add a dependency snippet.
s({ trig = "@d", desc = "Add a dependency." }, fmt("@Dependency(\\.{}) var {}", { i(1), rep(1) })),
-- Add a dependency client.
s(
{
trig = "@dc",
desc = "Add a dependency client.",
},
fmt(
[[
public extension DependencyValues {{
var {}: {} {{
get {{ self[{}.self] }}
set {{ self[{}.self] = newValue }}
}}
}}
@DependencyClient
public struct {} {{
// Insert interface here.
{}
}}
extension {}: TestDependencyKey {{
public static let testValue: {} = Self()
}}
]],
{
i(1, "<name>"),
i(2, "<Dependency>"),
rep(2),
rep(2),
rep(2),
i(0),
rep(2),
rep(2),
}
)
),
s(
{ trig = "str", desc = "Add a struct" },
fmt(
[[
struct {}: {} {{
{}
}}
]],
{ i(1, "<Name>"), i(2, "<Protocols>"), i(0) }
)
),
-- Decorate a type or function with an @_spi(...)
s({ trig = "@_s", desc = "Add spi modifier." }, fmt("@_spi({})", { i(1, "name") })),
-- Add an @_spi(...) import ...
s(
{ trig = "@_si", desc = "Import with spi." },
fmt(
[[
@_spi({}) import {}
{}
]],
{ i(1, "name"), i(2, "module"), i(0) }
)
),
-- Document a function
-- TODO: add dynamic number of prameters.
s(
{ trig = "docf", desc = "Document a function." },
fmt(
[[
/// {}
///
/// - Parameters:
/// - {}: {}
]],
{ i(1, "A short description."), i(2, "<param>"), i(3, "Describe the parameter.") }
)
),
-- Add a parameter to a documentation string.
s(
{ trig = "param", desc = "Add a parameter to documentation" },
fmt(
[[
/// - {}: {}
]],
{ i(1, "<param>"), i(2, "<description>") }
)
),
-- Add a withDependencies
s(
{ trig = "wd", desc = "withDependencies" },
fmt(
[[
withDependencies {{
$0.{} = {}
}} operation: {{
@Dependency(\.{}) var {}
{}
}}
]],
{
i(1, "<dependency>"),
i(2, "<override>"),
rep(1),
rep(1),
i(0),
}
)
),
})

View File

@@ -1,21 +0,0 @@
MeasureQuick
Housh
sealtite
Subcool
OEM
NEC
AHJ
CFM
Hydronic
subpar
quo
IAQ
wc
HVAC
dehumidification
ansible
orchestrator
ethernet
unifi
wildcard
Housh

Binary file not shown.

View File

@@ -1,3 +0,0 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

7
env/.config/ripgrep/ripgreprc vendored Normal file
View File

@@ -0,0 +1,7 @@
# Show hidden files
--hidden
# Ignore '.git' directory
--glob=!.git/*
--no-follow
--color=never

View File

@@ -7,27 +7,13 @@ format = """
$os\ $os\
$username\ $username\
$hostname\ $hostname\
[](bg:color_pink fg:color_orange)\ [](bg:color_lavender fg:color_orange)\
${custom.devpod}\
[](bg:color_pink fg:color_lavender)\
$directory\ $directory\
[](fg:color_pink bg:color_lavender)\ [](fg:color_pink bg:color_bg1)\
$git_branch\ $git_branch\
$git_status\ $git_status\
[](fg:color_lavender bg:color_blue)\
$c\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
[](fg:color_bg3 bg:color_green)\
$time\
[ ](fg:color_green)\
$line_break$character""" $line_break$character"""
palette = 'catppuccin_mocha' palette = 'catppuccin_mocha'
@@ -47,6 +33,15 @@ color_yellow = '#eed49f'
color_grey = '#585b70' color_grey = '#585b70'
color_maroon = '#eba0ac' color_maroon = '#eba0ac'
color_pink = '#f5c2e7' color_pink = '#f5c2e7'
color_text = '#585b70'
[custom.devpod]
description = "Displays the active Devpod workspace"
command = "echo $(echo $DEVPOD_WORKSPACE_ID | sed 's/.*://')"
when = "[[ -n $DEVPOD_WORKSPACE_ID ]]"
style = "bold bg:color_lavender fg:color_text"
format = "[ 📦 $output ]($style)"
disabled = false
[os] [os]
disabled = false disabled = false
@@ -75,17 +70,17 @@ RedHatEnterprise = "󱄛"
[username] [username]
show_always = true show_always = true
style_user = "bold bg:color_orange fg:color_grey" style_user = "bold bg:color_orange fg:color_text"
style_root = "bold bg:color_orange fg:color_grey" style_root = "bold bg:color_orange fg:color_text"
format = '[ $user ]($style)' format = '[ $user ]($style)'
[hostname] [hostname]
ssh_only = true ssh_only = true
format = '[$ssh_symbol : $hostname](bold bg:color_orange fg:color_grey)' format = '[$ssh_symbol : $hostname](bold bg:color_orange fg:color_text)'
disabled = false disabled = false
[directory] [directory]
style = "bold fg:color_grey bg:color_pink" style = "bold fg:color_text bg:color_pink"
format = "[ $path ]($style)" format = "[ $path ]($style)"
truncation_length = 3 truncation_length = 3
truncation_symbol = "…/" truncation_symbol = "…/"
@@ -100,72 +95,12 @@ truncate_to_repo = true
[git_branch] [git_branch]
symbol = "" symbol = ""
style = "bg:color_blue" style = "bg:color_bg1"
format = '[[ $symbol $branch ](bold fg:color_grey bg:color_lavender)]($style)' format = '[[ $symbol $branch ](bold fg:color_green bg:color_bg1)]($style)'
[git_status] [git_status]
style = "bg:color_blue" style = "bold bg:color_bg1"
format = '[[($all_status$ahead_behind )](bold fg:color_grey bg:color_lavender)]($style)' format = '[[($all_status$ahead_behind )](bold fg:color_green bg:color_bg1)]($style)'
[nodejs]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[c]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[rust]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[golang]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[php]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[java]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[kotlin]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[haskell]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[python]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
[conda]
style = "bg:color_bg3"
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
[time]
disabled = false
time_format = "%R"
style = "bg:color_green"
format = '[[  $time ](bold fg:color_grey bg:color_green)]($style)'
[line_break] [line_break]
disabled = false disabled = false

View File

@@ -4,5 +4,5 @@ After=graphical-session.target
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=%h/.local/scripts/battery-monitor ExecStart=%h/.local/scripts/hypr/battery-monitor
Environment=DISPLAY=:0 Environment=DISPLAY=:0

View File

@@ -5,7 +5,7 @@ Before=exit.target
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=%h/.local/scripts/clear-clipboard-history ExecStart=%h/.local/scripts/hypr/clear-clipboard-history
[Install] [Install]
WantedBy=exit.target WantedBy=exit.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Tmux kill sessions service
After=graphical-session.target
[Service]
Type=oneshot
ExecStart=%h/.local/scripts/tmux-kill-old-sessions

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Tmux kill sessions timer
Requires=tmux-kill-sessions.service
[Timer]
OnBootSec=2h
OnUnitActiveSec=2h
AccuracySec=10sec
[Install]
WantedBy=timers.target

57
env/.config/utils-launcher/config.json vendored Normal file
View File

@@ -0,0 +1,57 @@
[
{
"name": "App - install web app",
"description": "Install a new website as a desktop application that can be launched by an application launcher.",
"exec": "$SCRIPTS/hypr/install-webapp"
},
{
"name": "App - uninstall desktop app",
"description": "Uninstalls desktop applications and their icon, generally used for web\napplications.\n\nIf the app was installed through a package manager, then you should\nuse the package manager to uninstall the applciation.",
"exec": "$SCRIPTS/hypr/uninstall-desktop-app"
},
{
"name": "Clipboard - clear history",
"description": "Clear the clipboard history file.",
"exec": "$SCRIPTS/hypr/clear-clipboard-history --notify-complete"
},
{
"name": "Logs - view logs",
"description": "View logs generated by our custom commands.",
"exec": "$SCRIPTS/hypr/utils/logs/logs-picker"
},
{
"name": "Monitors - stats / picker",
"description": "View information from hyprctl about currently connected monitors.",
"exec": "$SCRIPTS/hypr/monitorctl picker"
},
{
"name": "Waybar - restart",
"description": "Restart the menu bar application, useful when making changes to the configuration.",
"exec": "$SCRIPTS/hypr/waybarctl --restart"
},
{
"name": "Waybar - toggle",
"description": "Toggle the visibility of the menu bar.",
"exec": "$SCRIPTS/hypr/waybarctl --toggle"
},
{
"name": "Windows - window stats / picker",
"description": "View information from hyprctl about all the current windows.\n\nAllows you to choose an action you would like to perform on the selected window.",
"exec": "$SCRIPTS/hypr/windowctl picker"
},
{
"name": "Windows - close in active workspace",
"description": "Close all windows in the currently active workspace.",
"exec": "$SCRIPTS/hypr/windowctl close --active-workspace"
},
{
"name": "Windows - close ALL",
"description": "Close all windows in all workspaces.",
"exec": "$SCRIPTS/hypr/windowctl close --all"
},
{
"name": "Workspaces - stats / picker",
"description": "View information from hyprctl about currently available workspaces",
"exec": "$SCRIPTS/hypr/workspacectl picker"
}
]

View File

@@ -1,138 +0,0 @@
force_keyboard_focus = true # forces keyboard forcus to stay in Walker
close_when_open = true # close walker when invoking while already opened
selection_wrap = false # wrap list if at bottom or top
global_argument_delimiter = "#" # query: firefox#https://benz.dev => part after delimiter will be ignored when querying. this should be the same as in the elephant config
keep_open_modifier = "shift" # won't close on activation, but rather select the next item in the list
exact_search_prefix = "'" # disable fuzzy searching
theme = "default" # theme to use
disable_mouse = false # disable mouse (on input and list only)
[shell]
anchor_top = true
anchor_bottom = true
anchor_left = true
anchor_right = true
[placeholders]
"default" = { input = "Search", list = "No Results" } # placeholders for input and empty list, key is the providers name, so f.e. "desktopapplications" or "menus:other"
[keybinds]
close = "Escape"
next = "Down"
previous = "Up"
toggle_exact = "ctrl e"
resume_last_query = "ctrl r"
quick_activate = ["F1", "F2", "F3", "F4"]
[providers]
default = [
"desktopapplications",
"calc",
"runner",
"menus",
"websearch",
] # providers to be queried by default
empty = ["desktopapplications"] # providers to be queried when query is empty
[[providers.prefixes]]
prefix = ";"
provider = "providerlist"
[[providers.prefixes]]
prefix = "/"
provider = "files"
[[providers.prefixes]]
prefix = "."
provider = "symbols"
[[providers.prefixes]]
prefix = "!"
provider = "todo"
[[providers.prefixes]]
prefix = "="
provider = "calc"
[[providers.prefixes]]
prefix = "@"
provider = "websearch"
[[providers.prefixes]]
prefix = ":"
provider = "clipboard"
[providers.archlinuxpkgs]
default = "install"
install = "Return"
remove = "ctrl d"
[providers.calc]
default = "copy"
copy = "Return"
save = "ctrl s"
delete = "ctrl d"
[providers.websearch]
default = "search"
search = "Return"
remove_history = "ctrl BackSpace"
[providers.providerlist]
default = "activate"
activate = "Return"
[providers.clipboard]
time_format = "%d.%m. - %H:%M" # format for the clipboard item date
default = "copy"
copy = "Return"
delete = "ctrl d"
edit = "ctrl o"
toggle_images_only = "ctrl i"
[providers.desktopapplications]
default = "start"
start = "Return"
start_keep_open = "shift Return"
remove_history = "ctrl BackSpace"
toggle_pin = "ctrl p"
[providers.files]
default = "open"
open = "Return"
open_dir = "ctrl Return"
copy_path = "ctrl shift c"
copy_file = "ctrl c"
[providers.todo]
default = "save"
save = "Return"
delete = "ctrl d"
mark_active = "ctrl a"
mark_done = "ctrl f"
clear = "ctrl x"
[providers.runner]
default = "start"
start = "Return"
start_terminal = "shift Return"
remove_history = "ctrl BackSpace"
[providers.dmenu]
default = "select"
select = "Return"
[providers.symbols]
default = "copy"
copy = "Return"
remove_history = "ctrl BackSpace"
[providers.unicode]
default = "copy"
copy = "Return"
remove_history = "ctrl BackSpace"
[providers.menus]
default = "activate"
activate = "Return"
remove_history = "ctrl BackSpace"

View File

@@ -6,6 +6,7 @@
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": [ "modules-right": [
"pulseaudio", "pulseaudio",
"idle_inhibitor",
"tray", "tray",
"cpu", "cpu",
"memory", "memory",
@@ -76,4 +77,12 @@
// "format-full": "", // "format-full": "",
"format-icons": ["", "", "", "", ""], "format-icons": ["", "", "", "", ""],
}, },
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
}
}
} }

View File

@@ -54,7 +54,8 @@
#cpu, #cpu,
#memory, #memory,
#custom-lock, #custom-lock,
#custom-power { #custom-power,
#idle_inhibitor {
background-color: @background; background-color: @background;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
margin: 5px 0; margin: 5px 0;
@@ -69,12 +70,18 @@
font-weight: 900; font-weight: 900;
} }
#pulseaudio { #pulseaudio {
color: @red; color: @red;
border-radius: 10px 0px 0px 10px; border-radius: 10px 0px 0px 10px;
margin-left: 1rem; margin-left: 1rem;
} }
#idle_inhibitor {
border-radius: 0px;
margin: 0px;
}
#tray { #tray {
color: @blue; color: @blue;
border-radius: 0px 10px 10px 0px; border-radius: 0px 10px 10px 0px;

View File

@@ -19,17 +19,6 @@ zle -N down-line-or-beginning-search
# Colors # Colors
autoload -Uz colors && colors autoload -Uz colors && colors
#------------------------------ pager ------------------------------
#eval "$(batman --export-env)"
# export LESS_TERMCAP_mb="" # magenta
# export LESS_TERMCAP_md="" # yellow
# export LESS_TERMCAP_me=""
# export LESS_TERMCAP_se=""
# export LESS_TERMCAP_so="" # blue
# export LESS_TERMCAP_ue=""
# export LESS_TERMCAP_so="" # underline
# export LESSHISTFILE="-"
#------------------------------ path ------------------------------ #------------------------------ path ------------------------------
# Helper function to prepend to the $PATH # Helper function to prepend to the $PATH
@@ -63,16 +52,21 @@ path_prepend \
"$GOROOT/bin" \ "$GOROOT/bin" \
"$GOPATH/bin" \ "$GOPATH/bin" \
"$XDG_DATA_HOME/bin" \ "$XDG_DATA_HOME/bin" \
"$XDG_DATA_HOME/npm/bin" \
"$HOME/.local/bin" \ "$HOME/.local/bin" \
"$SCRIPTS" \ "$SCRIPTS" \
"$SCRIPTS/hypr" \
"$SCRIPTS/mail" \
"$HOME/.local/pnpm" \ "$HOME/.local/pnpm" \
"$CARGO_HOME/bin" \ "$CARGO_HOME/bin" \
"$HOME/.local/bin" "$HOME/.local/bin" \
"$XDG_DATA_HOME/bob/nvim-bin"
# last arg will be first in $FPATH # last arg will be first in $FPATH
fpath_prepend \ fpath_prepend \
"$ZDOTDIR/completions" \ "$ZDOTDIR/completions" \
"$HOME/.local/share/zsh/completions" \ "$HOME/.local/share/zsh/completions" \
"$HOME/.zsh/completions" \
"$ZDOTDIR/functions" "$ZDOTDIR/functions"
autoload -Uz $fpath[1]/*(.:t) autoload -Uz $fpath[1]/*(.:t)
@@ -92,8 +86,6 @@ export HISTFILESIZE=5000
export SAVEHIST=5000 export SAVEHIST=5000
export HISTFILE="$XDG_CONFIG_HOME/zsh/history" export HISTFILE="$XDG_CONFIG_HOME/zsh/history"
#set -o vi
#------------------------------ cdpath ------------------------------ #------------------------------ cdpath ------------------------------
setopt autocd setopt autocd
@@ -127,7 +119,7 @@ zsh_add_plugin "Aloxaf/fzf-tab"
#------------------------------ completions ------------------------------ #------------------------------ completions ------------------------------
# case insensitive path-completion # case insensitive path-completion
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# partial completion suggestions # partial completion suggestions
zstyle ':completion:*' list-suffixes zstyle ':completion:*' list-suffixes
@@ -148,10 +140,8 @@ _source_if "$ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh"
#------------------------------ prompt ------------------------------ #------------------------------ prompt ------------------------------
# Prompt / managed by brew. (`brew install starship`)
autoload -Uz promptinit; promptinit autoload -Uz promptinit; promptinit
eval "$(starship init zsh)" eval "$(starship init zsh)"
#prompt pure
#------------------------------ aliases ------------------------------ #------------------------------ aliases ------------------------------
@@ -164,6 +154,7 @@ alias d='docker' # run docker commands quickly
alias dc='docker compose' # run docker-compose commands quickly alias dc='docker compose' # run docker-compose commands quickly
alias dv='dirs -v' # list directory info alias dv='dirs -v' # list directory info
alias essh='edit-ssh-config' # edit ssh config quickly alias essh='edit-ssh-config' # edit ssh config quickly
alias email='tmux-sessionator --email' # Open email tmux session.
alias fl='find-latest' # Find the last modified file in a directory. alias fl='find-latest' # Find the last modified file in a directory.
alias g='git' # access git commands quickly alias g='git' # access git commands quickly
alias ga='git add' # add files to git quickly alias ga='git add' # add files to git quickly
@@ -175,17 +166,19 @@ alias gs='git status' # git status quickly
alias hn='hugo new' # generate a hugo site alias hn='hugo new' # generate a hugo site
alias hnc='hugo new content' # generate new hugo site content quickly alias hnc='hugo new content' # generate new hugo site content quickly
alias j='just' # run justfile's quickly. alias j='just' # run justfile's quickly.
alias kb='kanatactl' # Keyboard / kanata commands.
alias l='eza --long --git --group --links --icons --all' # better ls command. alias l='eza --long --git --group --links --icons --all' # better ls command.
alias lfs='ls -lahH --color=auto "$ZDOTDIR/functions"' # List functions. alias lfs='ls -lahH --color=auto "$ZDOTDIR/functions"' # List functions.
alias ls='eza --long --git --group --links --icons --all' alias ls='eza --long --git --group --links --icons --all'
alias lt='eza --long --git --group --links --icons --tree' alias lt='eza --long --git --group --links --icons --tree'
alias pass='gopass' alias pass='PASSWORD_STORE_DIR=/home/michael/.local/share/gopass/stores/root gopass'
alias p='gopass' # run the pass command quickly.
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard. alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
alias reload='exec zsh -l' # reload the shell, useful when making changes. alias reload='exec zsh -l' # reload the shell, useful when making changes.
alias s='swift' # shorthand to access swift commands alias s='swift' # shorthand to access swift commands
alias st='swift test' # swift test alias st='swift test' # swift test
alias ste='swift test --enable-code-coverage' # swift test with code coverage enabled.
alias sb='swift build' # swift build alias sb='swift build' # swift build
alias syu='yay -Syu' # Update packages.
alias t='tmux' # access tmux quickly alias t='tmux' # access tmux quickly
alias tka='tmux kill-server' # kill tmux server and all sessions. alias tka='tmux kill-server' # kill tmux server and all sessions.
alias ts='$SCRIPTS/tmux-sessionator' # create new tmux session, fuzzy finding common locations. alias ts='$SCRIPTS/tmux-sessionator' # create new tmux session, fuzzy finding common locations.
@@ -195,11 +188,7 @@ alias tks='tmux kill-session -t' # kill tmux session
alias temp='cd $(mktemp -d)' # create a temporary directory and move into it. alias temp='cd $(mktemp -d)' # create a temporary directory and move into it.
alias vi='nvim' # set vi to open neovim alias vi='nvim' # set vi to open neovim
alias newf='"$SCRIPTS"/newx --function' # generate a new shell function alias newf='"$SCRIPTS"/newx --function' # generate a new shell function
alias nlnv='nvim "$LOCAL_ENV"' # open local environment overrides file in neovime alias n='nvim'
alias nvim='unset VIMINIT && unset MYVIMRC && nvim' # alias nvim to unset vimrc, useful when using both vim & neovim
alias nvim-mhoush='NVIM_APPNAME=m-housh && nvim' # set neovim to use my config.
alias nvim-kickstart='NVIM_APPNAME=kickstart nvim' # set neovim to use kickstart config.
alias nvim-lazy='NVIM_APPNAME=lazy nvim' # set neovim to use lazy config.
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" # set wget history location. alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" # set wget history location.
# GPG Yubikey restart relearn when switching keys and stubbed. # GPG Yubikey restart relearn when switching keys and stubbed.
alias yubikeyrestart='gpg-connect-agent killagent /bye && gpg-connect-agent "scd serialno" "learn --force" /bye && gpg --card-status' alias yubikeyrestart='gpg-connect-agent killagent /bye && gpg-connect-agent "scd serialno" "learn --force" /bye && gpg --card-status'
@@ -218,6 +207,8 @@ source <(fzf --zsh)
# I tried sourcing them in the the `.zshenv` files, but did not work. # I tried sourcing them in the the `.zshenv` files, but did not work.
_source_if "$ZDOTDIR/.zshrc-local" _source_if "$ZDOTDIR/.zshrc-local"
_source_if "$LOCAL_ENV" _source_if "$LOCAL_ENV"
_source_if "$SCRIPTS/catppuccin-colors"
_source_if "$XDG_DATA_HOME/swiftly/env.sh"
# pnpm # pnpm
export PNPM_HOME="$XDG_DATA_HOME/pnpm" export PNPM_HOME="$XDG_DATA_HOME/pnpm"
@@ -228,12 +219,9 @@ esac
# pnpm end # pnpm end
# The following lines have been added by Docker Desktop to enable Docker CLI completions. # The following lines have been added by Docker Desktop to enable Docker CLI completions.
fpath=(/Users/michael/.docker/completions $fpath)
autoload -Uz compinit autoload -Uz compinit
compinit compinit
#eval "$(ssh-agent -s)" 1>/dev/null
######################################## ########################################
# Set things up for using gpg-agent # Set things up for using gpg-agent
@@ -251,3 +239,7 @@ use-gpg-agent-for-ssh
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)" command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)" command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)"
if [[ -n "$DEVPOD_WORKSPACE_ID" ]]; then
export TERM=xterm-256color
fi

View File

@@ -1,12 +1,12 @@
#!/bin/zsh #!/bin/zsh
function dp() { function dp() {
[ -z "$1" ] && echo "Must supply temperature" && return 1 [ -z "$1" ] && echo "Must supply temperature" && return 1
[ -z "$2" ] && echo "Must supply relative humidity" && return 1 [ -z "$2" ] && echo "Must supply relative humidity" && return 1
local temperature=$1 local temperature=$1
local humidity=$2 local humidity=$2
/opt/homebrew/bin/psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity" psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
} }

View File

@@ -1,25 +0,0 @@
#!/usr/bin/env zsh
# Open's neovim.
#
# If the argument passed in is a directory or not supplied, then
# open neovim with telescope find files opened. Otherwise open the
# file that is supplied.
#
function n() {
# if [ -z "$1" ]; then
# local gitdir=$(git rev-parse --show-toplevel 2> /dev/null)
#
# [ -n "$gitdir" ] \
# && nvim -c ":Telescope git_files" \
# && return 0
#
# [ -d "$1" ] \
# && nvim -c ":Telescope find_files" \
# && return 0
# fi
nvim "$@"
}

View File

@@ -2,13 +2,5 @@
# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html # https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
enable-ssh-support enable-ssh-support
ttyname $GPG_TTY ttyname $GPG_TTY
default-cache-ttl 60 default-cache-ttl 120
max-cache-ttl 120 max-cache-ttl 120
#pinentry-program /usr/bin/pinentry-curses
#pinentry-program /usr/bin/pinentry-gnome3
#pinentry-program /bin/pinentry-tty
#pinentry-program /usr/bin/pinentry-x11
#pinentry-program /usr/local/bin/pinentry-curses
#pinentry-program /bin/pinentry-dmenu
#pinentry-program /opt/homebrew/bin/pinentry-mac

47
env/.local/scripts/aap vendored Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
# A wrapper script to run swift-hpa in a docker container and
# mount the correct volumes, etc.
#
# Make sure to run 'hpa-init' first on this machine to setup
# dependencies, if you have not done so already.
#
# To attach to a shell inside the container run:
# `hpa bash`
#
# To run ansible vault commands inside the container run:
# `hpa ansible-vault ...`
#
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
. "$SCRIPTS/utils/hpa/hpa.env"
############################## MAIN ##############################
# Don't pull images if they're prefixed with 'localhost'.
if echo "$HPA_DOCKER_IMAGE" | grep -vq "localhost"; then
# Check if we should pull the image prior to running.
last_pull="0"
if [[ -f "$HPA_AIRFLOW_CONFIG_DIR/.lastpull" ]]; then
last_pull=$(cat "$HPA_AIRFLOW_CONFIG_DIR/.lastpull")
fi
curr=$(date +%s)
diff=$((curr - last_pull))
if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; then
. "$SCRIPTS/hpa-pull" "$HPA_AUTO_PULL_OPTS"
fi
fi
podman run --rm --interactive --tty \
--volume "$HPA_AIRFLOW_CONFIG_DIR":/root/.config/hpa:ro \
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
--volume "$HPA_CONSULTS_DIR":/consults \
--volume "$PWD":/root/project \
--secret "$HPA_VAULT_SECRET_KEY" \
"$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" "$@"

68
env/.local/scripts/backup-logger vendored Executable file
View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
LOG_DIR="/tmp/logs"
usage() {
cat <<EOF
Utility for logging backup runs.
USAGE:
$ $THIS <flags> <msg...>
FLAGS:
-h | --help: Show this help page.
-s | --show: Show the log messages.
--rm: Remove the log file
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
show() {
[[ ! -f "$LOG_DIR/$LOG_FILE" ]] &&
log --warning "Empty log file." &&
exit 0
bat "$LOG_DIR/$LOG_FILE"
}
################################################################################
# MAIN
################################################################################
declare -a msg
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
while [[ $# -gt 0 ]]; do
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ $1 == "-s" ]] || [[ $1 == "--show" ]]; then
show && exit 0
elif [[ $1 == "--rm" ]]; then
rm "$LOG_DIR/$LOG_FILE" && exit 0
else
msg+=("$1")
fi
shift
done
[[ -z "${msg[*]}" ]] && log --error "No message passed to log." && exit 1
log "${msg[@]}"

34
env/.local/scripts/catppuccin-colors vendored Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Catppuccin-mocha colors https://catppuccin.com/palette/
#
# This allows this file to be sourced and colors available in other scripts.
export ROSEWATER="#f5e0dc"
export FLAMINGO="#f2cdcd"
export PINK="#f5c2e7"
export MAUVE="#cba6f7"
export RED="#f38ba8"
export MAROON="#eba0ac"
export PEACH="#fab387"
export YELLOW="#f9e2af"
export GREEN="#a6e3a1"
export TEAL="#94e2d5"
export SKY="#89dceb"
export SAPPHIRE="#74c7ec"
export BLUE="#89b4fa"
export LAVENDER="#b4befe"
export TEXT="#cdd6f4"
export SUBTEXT1="#bac2de"
export SUBTEXT0="#a6adc8"
export OVERLAY2="#9399b2"
export OVERLAY1="#7f849c"
export OVERLAY0="#6c7086"
export SURFACE2="#585b70"
export SURFACE1="#45475a"
export SURFACE0="#313244"
export BASE="#1e1e2e"
export MANTLE="#181825"
export CRUST="#11111b"
export FZF_DEFAULT_OPTS="--color=header:$MAROON:bold,footer:$MAROON:bold,pointer:$MAUVE,prompt:$MAUVE,fg+:$MAUVE,border:$LAVENDER,info:$LAVENDER,fg:$TEXT,hl:$TEXT:bold,hl+:$TEXT:bold,bg:$BASE,bg+:$SURFACE0,preview-label:$TEAL:bold"

View File

@@ -1,8 +0,0 @@
#!/bin/bash
#wl-copy --clear >/dev/null 2>&1 && \
if [ -n "$WAYLAND_DISPLAY" ]; then
wl-copy --clear
fi
rm ~/.local/share/clipse/clipboard_history.json >/dev/null 2>&1

View File

@@ -1,5 +0,0 @@
#!/bin/bash
hyprctl clients -j | \
jq '.[] | .address' | \
xargs -I{} hyprctl dispatch closewindow address:{}

49
env/.local/scripts/hpa vendored Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
# A wrapper script to run swift-hpa in a docker container and
# mount the correct volumes, etc.
#
# Make sure to run 'hpa-init' first on this machine to setup
# dependencies, if you have not done so already.
#
# To attach to a shell inside the container run:
# `hpa bash`
#
# To run ansible vault commands inside the container run:
# `hpa ansible-vault ...`
#
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
. "$SCRIPTS/utils/hpa/hpa.env"
############################## MAIN ##############################
# Don't pull images if they're prefixed with 'localhost'.
if echo "$HPA_DOCKER_IMAGE" | grep -vq "localhost"; then
# Check if we should pull the image prior to running.
last_pull="0"
if [[ -f "$HPA_CONFIG_DIR/.lastpull" ]]; then
last_pull=$(cat "$HPA_CONFIG_DIR/.lastpull")
fi
curr=$(date +%s)
diff=$((curr - last_pull))
if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; then
. "$SCRIPTS/hpa-pull" "$HPA_AUTO_PULL_OPTS"
fi
fi
echo "ARGS: $@"
podman run --rm --interactive --tty \
--volume "$HPA_CONFIG_DIR":/root/.config/hpa:ro \
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
--volume "$HPA_CONSULTS_DIR":/consults \
--volume "$PWD":/root/project \
--secret "$HPA_VAULT_SECRET_KEY" \
"$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" "$@"

11
env/.local/scripts/hpa-create vendored Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
title="Creating project..."
script="${SCRIPTS:-$HOME/.local/scripts}/utils/hpa/hpa-create"
first_arg=${1:-""}
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
. "$script" $*
else
# bash -c "$script $*" | tr -d '\r' | head -1
gum spin --show-output --title "$title" -- bash -c "$script $*" | tr -d '\r' | head -1
fi

98
env/.local/scripts/hpa-init vendored Executable file
View File

@@ -0,0 +1,98 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
# Load environment / shared variables.
. "$SCRIPTS/utils/hpa/hpa.env"
usage() {
cat <<EOF
Setup dependencies for running hpa script in docker. This only needs to be
ran once on a new machine.
USAGE:
$ $THIS <flags> <shell> <completion-file>
FLAGS:
-h | --help: Show this help page.
DEFAULTS:
shell: Default is 'zsh', accepts 'zsh' | 'bash' | 'fish'
completion-file: Default is '~/.zsh/completions/_hpa'
ENVIRONMENT:
CONSULTS_DIR: Set the directory where consults / projects are stored.
(default: '~/work/consults')
HPA_DOCKER_TAG: Set the docker image tag to use for the hpa docker image
(default: 'latest')
HPA_VAULT_SECRET_KEY: Set the key used for the ansible-vault secret.
(default: 'vault-pass')
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
generate-completion() {
local output_dir output type
type=${1:-"zsh"}
output=${2:-$HOME/.zsh/completions/_hpa}
output_dir=$(dirname "$output")
log "Generating completion: type: '$type', to: $output"
[[ ! -d "$output_dir" ]] && mkdir -p "$output_dir"
(
podman run --rm -it "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" \
--generate-completion-script "$type" |
tr -d '\r'
) >"$output"
}
generate-secret() {
log "Generating vault secret for key: '$HPA_VAULT_SECRET_KEY'"
local secret
secret="$(pass -c ansible/vault-pass)"
printf "%s" "$secret" | podman secret create "$HPA_VAULT_SECRET_KEY" -
}
################################################################################
# MAIN
################################################################################
first_arg=${1:-""}
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
usage && exit 0
else
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
log "Starting init..."
generate-completion "$@"
generate-secret
log "Generating directories, if they don't exist."
mkdir -p "$HPA_CONSULTS_DIR" &>/dev/null
mkdir "$HPA_DATA_DIR" &>/dev/null
log "Cloning required template and playbook, if they don't exist"
[[ ! -d "$HPA_PLAYBOOK_DIR" ]] && git clone "$HPA_PLAYBOOK_URL" "$HPA_PLAYBOOK_DIR"
[[ ! -d "$HPA_CONSULT_TEMPLATE_DIR" ]] && git clone "$HPA_CONSULT_TEMPLATE_URL" "$HPA_CONSULT_TEMPLATE_DIR"
[[ ! -d "$HPA_AIRFLOW_TEMPLATE_DIR" ]] && git clone "$HPA_AIRFLOW_TEMPLATE_URL" "$HPA_AIRFLOW_TEMPLATE_DIR"
fi

112
env/.local/scripts/hpa-pull vendored Executable file
View File

@@ -0,0 +1,112 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
# Load environment / shared variables.
. "$SCRIPTS/utils/hpa/hpa.env"
usage() {
cat <<EOF
Pulls / updates template, playbook, docker image, etc.
USAGE:
$ $THIS <flags>
FLAGS:
-a | --all: Pull everything (default).
-d | --docker: Pull docker image.
-p | --playbook: Pull ansible-hpa-playbook.
-t | --template: Pull consult template.
-h | --help: Show this help page.
If no flags are passed in then we will pull everything.
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
pull-repo() {
local dir=${1:-""}
[[ -z "$dir" ]] &&
log --error "Directory not supplied to pull git repo." &&
exit 1
pushd "$dir" &>/dev/null || exit 1
(
git pull
)
popd &>/dev/null
}
pull-docker() {
log --echo "Pulling docker image: '$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG'"
podman pull "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG"
}
pull-playbook() {
log --echo "Pulling playbook: '$HPA_PLAYBOOK_DIR'"
pull-repo "$HPA_PLAYBOOK_DIR"
}
pull-template() {
log --echo "Pulling template: '$HPA_CONSULT_TEMPLATE_DIR'"
pull-repo "$HPA_CONSULT_TEMPLATE_DIR"
log --echo "Pulling airflow assessment template: '$HPA_AIRFLOW_TEMPLATE_DIR'"
pull-repo "$HPA_AIRFLOW_TEMPLATE_DIR"
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
all_flag="1"
docker_flag="0"
playbook_flag="0"
template_flag="0"
while [[ $# -gt 0 ]]; do
if [[ $1 == "-a" ]] || [[ $1 == "--all" ]]; then
all_flag="1"
break
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ $1 == "-d" ]] || [[ $1 == "--docker" ]]; then
all_flag="0"
docker_flag="1"
elif [[ $1 == "-p" ]] || [[ $1 == "--playbook" ]]; then
all_flag="0"
playbook_flag="1"
elif [[ $1 == "-t" ]] || [[ $1 == "--template" ]]; then
all_flag="0"
template_flag="1"
fi
shift
done
if [[ $all_flag == "1" ]]; then
docker_flag="1"
playbook_flag="1"
template_flag="1"
fi
[[ $docker_flag == "1" ]] && pull-docker
[[ $playbook_flag == "1" ]] && pull-playbook
[[ $template_flag == "1" ]] && pull-template
date +%s >"$HPA_CONFIG_DIR/.lastpull"
date +%s >"$HPA_AIRFLOW_CONFIG_DIR/.lastpull"

View File

@@ -0,0 +1,21 @@
#!/bin/bash
notify_flag="0"
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
while [[ $# -gt 0 ]]; do
if [[ $1 == "-n" ]] || [[ $1 == "--notify-complete" ]]; then
notify_flag="1"
fi
shift
done
if [[ -n "$WAYLAND_DISPLAY" ]]; then
wl-copy --clear
fi
rm $XDG_DATA_HOME/clipse/clipboard_history.json >/dev/null 2>&1
if [[ $notify_flag == "1" ]] && [[ -n "$WAYLAND_DISPLAY" ]]; then
notify-send --urgency=low --expire-time=3000 --app-name="Clipboard History" "✅ Cleared clipboard history"
fi

194
env/.local/scripts/hypr/launch vendored Executable file
View File

@@ -0,0 +1,194 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=$(basename "$THIS_FILE")
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
usage() {
cat <<EOF
Launch or focus / close a window based on pattern contained within the window
class name. (Default is to focus the window).
This is used in keybinds and by other scripts as a general entrypoint for managing applications.
USAGE:
$ $THIS [OPTIONS] PATTERN [LAUNCH_CMD...]
OPTIONS:
-f | --or-focus: Focus the window matching the pattern, if it exists.
-c | --or-close: Close the window matching the pattern, if it exists.
-o | --focus-active-only: Focus only if window is on active workspace, otherwise launch a new
instance.
-x | --close-active-only: Close only windows on active workspace matching the pattern.
-s | --special <name>: Launch or toggle a special workspace.
-n | --new: Launch a new instance of an application.
-h | --help: Show this help page.
NOTES:
In general only one flag should be passed to determine the action mode.
Passing both any of the close or focus flags together will result in an error if a window is found matching
the pattern, if no window is found then one will still be launched without any errors.
If the special option is passed then we will not attempt to close a window. If the script is
invoked with the special option set, we check if there is a window matching the pattern, if there
is and the currently active window is on the same workspace passed in to the special option, then
we toggle the workspace closed. This allows the same keybind to be used to launch an application
in a special workspace as well as toggle the workspace closed.
EOF
}
action="focuswindow"
close_flag="0"
close_active_only_flag="0"
focus_flag="0"
focus_active_only_flag="0"
new_instance_flag="0"
launch_cmd=()
pattern=""
special_flag="0"
special=""
while [[ $# -gt 0 ]]; do
if [[ $1 == "-c" ]] || [[ $1 == "--or-close" ]]; then
close_flag="1"
action="closewindow"
elif [[ $1 == "-f" ]] || [[ $1 == "--or-focus" ]]; then
focus_flag="1"
action="focuswindow"
elif [[ $1 == "-s" ]] || [[ $1 == "--special" ]]; then
shift
special_flag="1"
special=$1
elif [[ $1 == "-o" ]] || [[ $1 == "--focus-active-only" ]]; then
focus_flag="1"
focus_active_only_flag="1"
action="focuswindow"
elif [[ $1 == "-x" ]] || [[ $1 == "--close-active-only" ]]; then
close_flag="1"
close_active_only_flag="1"
action="closewindow"
elif [[ $1 == "-n" ]] || [[ $1 == "--new" ]]; then
new_instance_flag="1"
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ -z $pattern ]]; then
pattern=$1
else
launch_cmd+=("$1")
fi
shift
done
log() {
logging log --source "$THIS_FILE" "$@"
}
# Redirects all output of hyprctl dispatch commands.
hypr_dispatch() {
hyprctl dispatch "$@" >/dev/null 2>&1
}
toggle_special() {
if [[ -z $special ]]; then
log --error " No name supplied for special workspace."
exit 1
fi
hypr_dispatch togglespecialworkspace $special
}
launch_application() {
log "Launching..."
log "'${launch_cmd[*]}'"
eval exec "${launch_cmd[*]}"
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
if [[ -z $pattern ]]; then
log --error "Must supply a pattern to match the window class."
usage && exit 1
elif [[ -z $launch_cmd ]]; then
log --error "Must supply a launch command to match the window class."
usage && exit 1
fi
log "Pattern: $pattern"
addresses=$(hyprctl clients -j | jq ".[] | select(.class | contains(\"$pattern\")) | .address")
# If no addresses, then launch the application.
if [[ -z $addresses ]] || [[ $new_instance_flag == "1" ]]; then
log "No addresses found or new instance flag set."
# Toggle special workspace if applicable.
if [[ $special_flag == "1" ]]; then
log "Toggling special workspace."
toggle_special
fi
launch_application && exit 0
fi
active_window_workspace=$(hyprctl activewindow -j | jq -r '.workspace.name')
# Check if we have special flag and active window is on the special workspace. If so
# we just toggle the special workspace. This keeps "special" apps alive, but closes and / opens
# the special workspace when invoked.
if [[ $special_flag == "1" ]] && [[ $active_window_workspace =~ $special ]]; then
toggle_special && exit 0
fi
# Check if both close and focus flags were passed, so we don't do the
# wrong thing.
if [[ $focus_flag == "1" ]] && [[ $close_flag == "1" ]]; then
log --error "Both focus and close flag were passed."
exit 1
fi
for address in ${addresses[@]}; do
# Clean the address of quotes.
address=${address//\"/}
log "Handling address: '$address'"
if [[ $focus_active_only_flag == "1" ]] || [[ $close_active_only_flag == "1" ]]; then
# get the workspace name for the address.
workspace=$(hyprctl clients -j | jq -r ".[] | select(.address == \"$address\") | .workspace.name")
# check that the window is on the active workspace.
if [[ $active_window_workspace == $workspace ]]; then
log "Performing action: '$action', on window: '$address'"
hypr_dispatch $action "address:$address"
# early out if focusing a window.
[[ $focus_active_only_flag ]] && exit 0
else
# the window is not on the active workspace, so skip it.
log "Skipping window: $address"
fi
else
# We don't have the focus_active_only_flag or close_active_only_flag set, so we perform
# the action on the window.
log "Performing action: '$action', on window: '$address'"
hypr_dispatch $action "address:$address"
fi
done
# If we made it here and focus_active_only_flag was set, then we did not
# find a window on the active workspace, so we launch a new window.
if [[ $focus_active_only_flag == "1" ]]; then
launch_application
fi

193
env/.local/scripts/hypr/logging vendored Executable file
View File

@@ -0,0 +1,193 @@
#!/usr/bin/env bash
# Basic logging utility functions that can be used by scripts to log
# to files. This helps keep console clean for TUI's. Will log
# messages to all registered files, which allows each script to
# declare their own logging file, but also print logs into parent
# processes files, for ease of discovery.
#
# Supports warning and error flags.
#
# Errors and warnings get logged to the file and to the console.
#
#
# EXAMPLE SETUP:
#
# source $SCRIPTS/hypr/logging
# THIS=$(basename ${BASH_SOURCE[0]})
#
# # Setup logging file and label.
# setup-logging "/tmp/$THIS.log" $THIS
#
# function log() {
# logging log --source ${BASH_SOURCE[0]} "$@"
# }
#
# log "My log message."
# log --warning "My warning message."
# log --error "My error message."
#
set -e
set -o nounset
set -o pipefail
LOG_DIR=${LOG_DIR:-/tmp/logs}
LOG_INVOCATION_ID=${LOG_INVOCATION_ID:-""}
LOG_LABEL=${LOG_LABEL:-""}
# Run in dry run mode, which just prints to the console and does
# not log to the files.
LOG_ENABLE_DRY_RUN=${LOG_ENABLE_DRY_RUN:-"0"}
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
warn_flag="0"
error_flag="0"
__msg() {
if [[ -z "$*" ]]; then
echo -e "\e[31m[ERROR]:\e[0m No logs were supplied."
exit 1
fi
if [[ $warn_flag == "1" ]]; then
echo -e "\e[33m[WARN]:\e[0m $*"
elif [[ $error_flag == "1" ]]; then
echo -e "\e[31m[ERROR]:\e[0m $*"
else
echo "$@"
fi
}
__ensure_setup() {
if [[ -z $LOG_FILE ]] || [[ -z $LOG_INVOCATION_ID ]] || [[ -z $LOG_LABEL ]] || [[ -z $LOG_DIR ]]; then
echo -e "\e[31m[ERROR]:\e[0m Logging is not properly setup."
echo "Perhaps you didn't call 'setup-logging' first."
print_logger_env && exit 1
fi
if [[ ! -d $LOG_DIR ]]; then
mkdir -p "$LOG_DIR"
fi
}
logging() {
__ensure_setup
# Reset flags
log_flag="0"
echo_flag="0"
warn_flag="0"
error_flag="0"
source_file=""
args=()
while [[ $# -gt 0 ]]; do
if [[ $1 == "-w" ]] || [[ $1 == "--warn" ]] || [[ $1 == "--warning" ]]; then
warn_flag="1"
elif [[ $1 == "-e" ]] || [[ $1 =~ ^--error ]]; then
error_flag="1"
elif [[ $1 =~ ^--echo ]]; then
echo_flag="1"
elif [[ $1 == "-s" ]] || [[ $1 =~ ^--source ]]; then
shift
source_file="$1"
elif [[ $1 == "log" ]]; then
log_flag="1"
else
args+=("$1")
fi
shift
done
if [[ -z $source_file ]]; then
echo -e "\e[31m[ERROR]:\e[0m Must supply the source file the logs originate from."
exit 1
fi
if [[ -z "${args[*]}" ]]; then
echo -e "\e[31m[ERROR]:\e[0m No log message supplied."
exit 1
fi
msg="$(__msg "${args[@]}")"
if [[ $LOG_ENABLE_DRY_RUN == "0" ]] && [[ $log_flag == "1" ]]; then
# Loop over log files logging message to each file.
for i in "${!LOG_FILE[@]}"; do
local file=${LOG_DIR}/${LOG_FILE[i]}
local id=$LOG_INVOCATION_ID
local label=${LOG_LABEL[i]:-"$LOG_LABEL"}
local time
time=$(date '+%D %H:%M:%S')
if [[ -z $file ]] || [[ -z $id ]] || [[ -z $label ]]; then
echo "Logging not properly setup."
exit 1
fi
local prefix="[id: $id][time: $time][source: \e[32m$source_file\e[0m][\e[34m$label\e[0m] :"
local m="$prefix $msg"
echo -e "$m" >>"$file"
done
# Also log errors and warning messages to the console.
if [[ $error_flag == "1" ]] || [[ $warn_flag == "1" ]]; then
echo -e "[id: $id]$msg"
elif [[ $warn_flag == "1" ]]; then
echo -e "[id: $id]$msg"
elif [[ $echo_flag == "1" ]]; then
echo -e "$msg"
fi
else
# Dry run mode, so just log to the console
echo -e "\e[34m[DRY RUN]:\e[0m $msg"
fi
}
setup-logging() {
label=""
file=""
if [[ "${#@}" == "1" ]]; then
file="/tmp/$1.log"
label="$1"
else
file="$1"
label="$2"
fi
if [[ -z "$file" ]]; then
echo -e "\e[31m[ERROR]:\e[0m Must supply a log file."
exit 1
fi
if [[ -z "$label" ]]; then
echo -e "\e[31m[ERROR]:\e[0m Must supply a logger label."
exit 1
fi
# Only add files that aren't already in the LOG_FILE.
if [[ ! $LOG_FILE =~ $file ]]; then
LOG_FILE+=("$file")
fi
LOG_INVOCATION_ID=${LOG_INVOCATION_ID:-$RANDOM}
if [[ -n $LOG_LABEL ]] && [[ ! $LOG_LABEL =~ $label ]]; then
LOG_LABEL+=("${LOG_LABEL[@]}=>$label")
elif [[ ! ${LOG_LABEL[*]} =~ $label ]]; then
LOG_LABEL+=("$label")
fi
export LOG_DIR
export LOG_FILE
export LOG_LABEL
export LOG_INVOCATION_ID
}
print_logger_env() {
echo "LOG_FILE: ${LOG_FILE[*]}"
echo "LOG_INVOCATION_ID: $LOG_INVOCATION_ID"
echo "LOG_LABEL: ${LOG_LABEL[*]}"
}
export -f setup-logging
export -f logging
export -f print_logger_env

111
env/.local/scripts/hypr/monitorctl vendored Executable file
View File

@@ -0,0 +1,111 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
window_class="com.ghostty.$THIS"
window_padding_x="10"
usage() {
cat <<EOF
Utility for monitor controls.
USAGE:
$ $THIS <command> <flags>
FLAGS:
-h | --help: Show this help page.
COMMANDS:
launch: Launch in a new terminal window.
picker: Shows information about the monitor(s).
toggle: Enable/disable a connected monitor.
Run "$THIS <command> --help" for more information about a command.
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
launch_usage() {
cat <<EOF
Launches a new terminal window that runs the given '$THIS' command. If no command
is supplied, then it will launch the picker command.
USAGE:
$ $THIS launch <command> <flags>
FLAGS:
-h | --help: Show this help page.
Run "$THIS --help" to show available commands that can ba launched in the new window.
EOF
}
launch() {
if [[ $@ =~ ^-h ]] || [[ $@ =~ ^--help ]]; then
launch_usage && exit 0
fi
log "Launching terminal..."
ghostty --class=$window_class --window-padding-x=$window_padding_x \
--keybind="ctrl+c=quit" \
-e $THIS_FILE "$@"
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
log "Starting args: '$@'"
while [[ $# -gt 0 ]]; do
if [[ $1 == "launch" ]]; then
shift
if [[ -z "$@" ]]; then
launch picker && exit $?
else
launch "$@" && exit $?
fi
elif [[ $1 == "picker" ]]; then
shift
log "Showing picker..."
THIS="$THIS picker" "$SCRIPTS/hypr/utils/monitors/monitor-picker" "$@"
exit $?
elif [[ $1 == "toggle" ]]; then
shift
THIS="$THIS picker" "$SCRIPTS/hypr/utils/monitors/monitor-toggle" "$@"
exit $?
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
else
log --error "Unhandle command: $1" && exit 1
fi
shift
done
# If we've reached here then no commands were passed / handled.
usage && exit 1

View File

@@ -1,10 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Uninstalls '.desktop' applications, including their icon. THIS_FILE=${BASH_SOURCE[0]}
# THIS=$(basename "$THIS_FILE")
# This is primarily used for uninstalling web app's, if a
# desktop app was installed via the package manager, then the
# package manager should be used to uninstall the application.
usage() { usage() {
cat <<EOF cat <<EOF
@@ -15,11 +12,12 @@ package manager, then it should be used to uninstall the application.
Usage: Usage:
uninstall-desktop-app [OPTIONS] [FILE...] $ $THIS [OPTIONS] [FILE...]
OPTIONS: OPTIONS:
--dry-run: Perform but don't actually remove anything.
-h | --help: Show the help page. --dry-run: Perform but don't actually remove anything.
-h | --help: Show the help page.
If no files are supplied, then an interactive session will be If no files are supplied, then an interactive session will be
started that allows you to choose the applications to remove. started that allows you to choose the applications to remove.
@@ -32,27 +30,31 @@ interactive_mode="0"
dry_run="0" dry_run="0"
help_flag="0" help_flag="0"
XDG_DATA_HOME=${XDG_DATA_HOME} XDG_DATA_HOME=${XDG_DATA_HOME}
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
if [[ $1 =~ ^--dry ]]; then if [[ $1 =~ ^--dry ]]; then
dry_run="1" dry_run="1"
elif [[ $1 =~ ^-h ]] || [[ $1 =~ ^--h ]]; then elif [[ $1 =~ ^-h ]] || [[ $1 =~ ^--h ]]; then
help_flag="1" usage && exit 0
else else
files+=("$1") files+=("$1")
fi fi
shift shift
done done
# Early out for help option. log() {
if [[ $help_flag == "1" ]]; then logging log --source "$THIS_FILE" "$@"
usage }
exit 0
fi ############################## MAIN ##############################
source "$SCRIPTS/hypr/logging"
setup-logging "$THIS.log" "$THIS"
if [[ -z $XDG_DATA_HOME ]]; then if [[ -z $XDG_DATA_HOME ]]; then
echo "xdg data home is not set" log "xdg data home is not set"
echo "using: ~/.local/share" log "using: ~/.local/share"
XDG_DATA_HOME=$HOME/.local/share XDG_DATA_HOME=$HOME/.local/share
fi fi
@@ -65,16 +67,6 @@ if [[ ${#files} == 0 ]]; then
) )
fi fi
log() {
if [[ $dry_run == "1" ]]; then
echo "[DRY RUN]: $1"
else
echo "$1"
fi
}
############################## MAIN ##############################
for f in ${files[@]}; do for f in ${files[@]}; do
icon="" icon=""

138
env/.local/scripts/hypr/utils-launcher vendored Executable file
View File

@@ -0,0 +1,138 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
FZF_DEFAULT_OPTS=${FZF_DEFAULT_OPTS:-""}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename $THIS_FILE)
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-$LOG_LABEL.log}
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
XDG_CONFIG_HOME=${XDG_CONFIG_HOME}
usage() {
cat <<EOF
A fuzzy finder to launch utility applications / scripts from a single menu.
USAGE:
$ $THIS [OPTIONS]
OPTIONS:
-c | --config <file>: Set the location of the configuration file (default: XDG_CONFIG_HOME/utils-launcher/config.json)
-l | --launch: Launches in a new terminal window.
EOF
}
window_class="com.ghostty.$THIS"
window_padding_x="2"
config_file=""
launch_flag="0"
rows=()
invocation_id=${RANDOM}
while [[ $# -gt 0 ]]; do
if [[ $1 == "-c" ]] || [[ $1 == "--config" ]]; then
shift
config_file="$1"
elif [[ $1 == "-l" ]] || [[ $1 == "--launch" ]]; then
launch_flag="1"
fi
shift
done
log() {
logging log --source "$THIS_FILE" "$@"
}
launch() {
ghostty --class=$window_class --window-padding-x=$window_padding_x \
--keybind="ctrl+c=quit" \
-e ${BASH_SOURCE[0]} --config $config_file
}
footer() {
cat <<'EOF'
__ ______________ _____
/ / / /_ __/ _/ / / ___/
/ / / / / / / // / \__ \
/ /_/ / / / _/ // /______/ /
\____/ /_/ /___/_____/____/
EOF
}
generate_rows() {
readarray -t names <<<"$(echo "$1" | jq -r '.[] | .name')"
readarray -t execs <<<"$(echo "$1" | jq -r '.[] | .exec')"
for i in "${!names[@]}"; do
rows+=("${execs[i]}|${names[i]}")
done
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
if [[ -z $XDG_CONFIG_HOME ]]; then
log "XDG_CONFIG_HOME not set"
log "using ~/.config"
XDG_CONFIG_HOME=$HOME/.config
fi
if [[ -z $config_file ]]; then
log "No config file set."
log "Using ~/.config/utils-launcher/config.json"
config_file="$XDG_CONFIG_HOME/utils-launcher/config.json"
fi
if [[ $launch_flag == "1" ]]; then
launch && exit 0
fi
if [[ ! -f $config_file ]]; then
log "[ERROR]: no config file set" && exit 1
fi
file_data=$(cat $config_file)
# Setup colors before calling fzf.
[[ -z $FZF_DEFAULT_OPTS ]] &&
[[ -f $SCRIPTS/catppuccin-colors ]] &&
source $SCRIPTS/catppuccin-colors
generate_rows "$file_data"
sel=$(
printf "%s\n" "${rows[@]}" |
fzf --style=full --footer="$(footer)" --with-nth=2 --delimiter='|' \
--preview-label='[ Command ]' \
--preview="$SCRIPTS/hypr/utils/fzf/preview-stats utils {2} $config_file" \
--preview-window='down,30%'
)
log "Selection: $sel"
if [[ -n "$sel" ]]; then
# Parse the exec command for the selection.
exec_cmd=${sel%%|*}
log "Exec: '$exec_cmd'"
if [[ -z $exec_cmd ]]; then
log "[ERROR]: Command is empty." && exit 1
fi
eval exec uwsm app -- "$exec_cmd"
else
log "No selection."
fi

View File

@@ -0,0 +1,95 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename $THIS_FILE)
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-$LOG_LABEL.log}
usage() {
cat <<EOF
Utility for getting fzf preview data.
USAGE:
$ $THIS [COMMAND] [ARG...]
COMMAND:
monitor <id> <keys>: Get monitor data, optionally providing keys to return.
window <address> <keys>: Get window data, optionally providing keys to return.
workspace <id> <keys>: Get workspace data, optionally providing keys to return.
utlis <name> <config>: Get utils-launcher data.
EXAMPLE:
Here's an example of getting window data, but only returning "title", "workspace", and "address".
$ $THIS window "0xaaaaea92a7e0" "{title, workspace, address}"
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
call_jq() {
hypr_path=$1
select_str=$2
optional_keys=$3
if [[ -n $optional_keys ]]; then
hyprctl $hypr_path -j | jq -C ".[] | $select_str | $optional_keys"
else
hyprctl $hypr_path -j | jq -C ".[] | $select_str"
fi
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
# Early out check for help flag
if [[ $@ =~ -h ]] || [[ $@ =~ --help ]]; then
usage && exit 0
# Check for expected argument count or error.
elif [[ ! $# -ge 2 ]] || [[ $# -gt 3 ]]; then
log --error "Unexpected argument count, expected 2 or 3 but got '$#'"
exit 1
fi
mode=${1:-""}
arg=${2:-""}
arg2=${3:-""} # either optional keys or utils config.
if [[ $mode == "monitor" ]]; then
call_jq monitors "select(.id == $arg)" "$arg2"
elif [[ $mode == "window" ]]; then
call_jq clients "select(.address == \"$arg\")" "$arg2"
elif [[ $mode == "workspace" ]]; then
call_jq workspaces "select(.id == $arg)" "$arg2"
elif [[ $mode == "utils" ]]; then
config="${arg2//\'/}"
if [[ ! -f $config ]]; then
log --error "No utility-launcher config found: $config"
exit 1
fi
desc=$(jq -C ".[] | select(.name == \"$arg\") | .description" $config)
exec=$(jq -C ".[] | select(.name == \"$arg\") | .exec" $config)
echo -e "\n${desc[@]}\n\n" | fmt -w ${FZF_PREVIEW_COLUMNS:-80}
echo -e "\e[31mEXEC:\e[0m $exec\n"
else
log --error "Unexpected mode: $mode"
usage && exit 1
fi

View File

@@ -0,0 +1,61 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_DIR=${LOG_DIR:=""}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
FZF_DEFAULT_OPTS=${FZF_DEFAULT_OPTS:-""}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
footer() {
cat <<'EOF'
__
/ / ___ ___ ____
/ /__/ _ \/ _ `(_-<
/____/\___/\_, /___/
/___/
EOF
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
if [[ -z $LOG_DIR ]]; then
echo "Log directory not setup properly!" && exit 1
fi
# Setup colors before calling fzf.
[[ -z $FZF_DEFAULT_OPTS ]] &&
[[ -f $SCRIPTS/catppuccin-colors ]] &&
source $SCRIPTS/catppuccin-colors
sel=$(
/bin/ls $LOG_DIR/*.log |
sed 's#.*/##; s/\..*$//' | # cleans to only show file name, excluding the path and '.log'
fzf --style=full \
--footer="$(footer)" \
--preview-label='[ Logs ]' \
--preview='echo ""; bat $LOG_DIR/{}.log' \
--preview-window="down"
)
if [[ -z $sel ]]; then
log --error "No selection" && exit 1
fi
bat $sel.log

View File

@@ -0,0 +1,108 @@
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
FZF_DEFAULT_OPTS=${FZF_DEFAULT_OPTS:-""}
usage() {
cat <<EOF
Displays a monitor picker and stats preview. This script will accept any fzf options that you'd
like to pass. The id of the monitor is returned from this script upon selection.
USAGE:
$ $THIS [flags] [FZF_OPTIONS...]
FLAGS:
--no-default-footer: Disable the 'Monitors' footer (supplying your own footer disables default as well).
--no-preview: Disables the monitor stats preview window.
-h | --help: Show this help page.
EOF
}
uses_supplied_footer="0"
no_preview_flag="0"
fzf_opts=("--style=full" "--delimiter=|" "--with-nth=2" "--preview-label=[ Monitor Stats ]")
rows=()
monitor_data=$(hyprctl monitors -j | jq 'sort_by(.id)')
while [[ $# -gt 0 ]]; do
if [[ $1 =~ ^--footer ]]; then
uses_supplied_footer="1"
fzf_opts+=("$1")
elif [[ $1 == "--no-preview" ]]; then
no_preview_flag="1"
elif [[ $1 == "--no-default-footer" ]]; then
uses_supplied_footer="1"
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
else
fzf_opts+=("$1")
fi
shift
done
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
footer() {
cat <<'EOF'
__ ___ _ __
/ |/ /__ ___ (_) /____ _______
/ /|_/ / _ \/ _ \/ / __/ _ \/ __(_-<
/_/ /_/\___/_//_/_/\__/\___/_/ /___/
EOF
}
generate_rows() {
readarray -t ids <<<"$(echo "$monitor_data" | jq -r '.[] | .id')"
readarray -t names <<<"$(echo "$monitor_data" | jq -r '.[] | .name')"
# Zip into rows.
for i in "${!ids[@]}"; do
rows+=("${ids[i]}|${names[i]}")
done
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
[[ -z ${FZF_DEFAULT_OPTS} ]] &&
[[ -f $SCRIPTS/catppuccin-colors ]] &&
source $SCRIPTS/catppuccin-colors
if [[ $uses_supplied_footer == "0" ]]; then
fzf_opts+=("--footer=$(footer)")
fi
generate_rows
sel=""
# For some reason can't get the preview to work when setting in the fzf_opts array.
if [[ $no_preview_flag == "0" ]]; then
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}" --preview="$SCRIPTS/hypr/utils/fzf/preview-stats monitor {1}")
else
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}")
fi
# revove everything but the id portion.
sel=${sel%%|*}
echo "$sel"

View File

@@ -0,0 +1,76 @@
#!/usr/bin/env bash
# Toggles the state of the internal laptop monitor, which is useful
# when I'm connected to an external monitor / docks.
set -o nounset
set -o pipefail
set -e
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
usage() {
cat <<EOF
Toggles the state (enable/disable) of a monitor.
USAGE:
$ $THIS <flags> <id>
FLAGS:
-i | --internal: Toggle the internal monitor.
-h | --help: Show this help page.
EOF
}
# Logging utility function, use in place of echo.
log() {
logging log --source "$THIS_FILE" "$@"
}
toggle() {
local monitor="${1:-""}"
if [[ -z $monitor ]]; then
log --error "No monitor supplied." && exit 1
fi
if hyprctl monitors | grep -q "$monitor"; then
hyprctl keyword monitor "$monitor,disable" 1>/dev/null
else
hyprctl keyword monitor "$monitor,enable" 1>/dev/null
fi
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label.
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
monitor=""
while [[ $# -gt 0 ]]; do
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ $1 == "-i" ]] || [[ $1 == "--internal" ]]; then
monitor="eDP-1"
else
log --error "Unhandled option: $1" && exit 1
fi
shift
done
if [[ -z $monitor ]]; then
read -p "Monitor id: " monitor
fi
toggle $monitor

304
env/.local/scripts/hypr/utils/webapp/install vendored Executable file
View File

@@ -0,0 +1,304 @@
#!/usr/bin/env bash
# Adapted from https://github.com/basecamp/omarchy/tree/master?tab=readme-ov-file
THIS_FILE=${BASH_SOURCE[0]}
THIS=${THIS:-$(basename "$THIS_FILE")}
LOG_FILE=${LOG_FILE:-"$THIS.log"}
LOG_LABEL=$(basename "$THIS_FILE")
function usage() {
cat <<EOF
Generates a '.desktop' file for a web application, so that it can act as a stand alone application and
be launched from an application launcher.
USAGE: $THIS [OPTIONS]
OPTIONS:
-n | --name <name>: The name of the application.
-u | --url <url>: The url used to launch the application.
-i | --icon <icon>: The icon for the application.
-e | --exec <cmd>: Custom execution command (optional).
-m | --mime-types <types>: MIME-types for the application (optional).
-f | --file <file>: Install from a spec in a json file.
-l | --launch: Launches in a new terminal window in interactive mode.
--no-interactive: Don't proceed to interactive mode. If required properties aren't set,
then error. This is useful if using '--file' and there are parsing errors
or missing properties.
--dry-run: Run in dry-run mode, which doesn't generate files or download icons.
-h | --help: Show usage information.
EXAMPLES:
If no options or arguments are supplied, then it will start an interactive session that prompts for the
values.
$ $THIS
Calling the app with named arguments:
$ $THIS \\
--name "My Awesome App" \\
--url "https://awesome.com" \\
--icon "https://awesome.com/assets/icon.png"
Using a json file as input:
$ $THIS --file myapp.json
NOTES:
The icon option can either be a url where we will download a png from or a local file. Local files
can either be the full path to the file or a file name of an icon located in '~/.local/share/applications/icons/'.
Interactive sessions do not give the option to use a custom execution command or supply the
MIME types, which are less frequently used options.
If using a json spec file, all keys are the same as their option name, except for mime-types use 'mime_types' as the
key in the json object. Although the 'exec' and 'mime_types' are not required in the spec file. A common json spec
file example would look like:
{
"name": "My Awesome App",
"url": "https://awesome.com",
"icon: "https://awesome.com/assets/icon.png"
}
EOF
}
window_class="com.ghostty.install-webapp"
window_padding_x="2"
app_name=""
app_url=""
exec_cmd=""
dry_run="0"
file_mode_flag="0"
icon_ref=""
json_file=""
mime_types=""
launch_flag="0"
interactive_flag="0" # This is an internal flag, to not log some things when launch is used.
interactive_mode=false
no_interactive_flag="0"
SCRIPTS="${SCRIPTS:-$HOME/.local/scripts}"
XDG_DATA_HOME=${XDG_DATA_HOME}
while [[ $# -gt 0 ]]; do
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ $1 == "-n" ]] || [[ $1 == "--name" ]]; then
shift
app_name=$1
elif [[ $1 == "-u" ]] || [[ $1 == "--url" ]]; then
shift
app_url=$1
elif [[ $1 == "-i" ]] || [[ $1 == "--icon" ]]; then
shift
icon_ref=$1
elif [[ $1 == "-e" ]] || [[ $1 == "--exec" ]]; then
shift
exec_cmd=$1
elif [[ $1 == "-m" ]] || [[ $1 == "--mime-types" ]]; then
shift
mime_types=$1
elif [[ $1 == "-f" ]] || [[ $1 == "--file" ]]; then
file_mode_flag="1"
shift
json_file=$1
elif [[ $1 == "-l" ]] || [[ $1 == "--launch" ]]; then
launch_flag="1"
elif [[ $1 == "--interactive" ]]; then
interactive_flag="1"
elif [[ $1 == "--no-interactive" ]]; then
no_interactive_flag="1"
elif [[ $1 =~ ^--dry ]]; then
dry_run="1"
fi
shift
done
log() {
logging log --source "$THIS_FILE" "$@"
}
launch() {
ghostty --class=$window_class --window-padding-x=$window_padding_x \
--keybind="ctrl+c=quit" \
-e "${BASH_SOURCE[0]}" --interactive
}
check_properties() {
if [[ -z $app_name ]] || [[ -z $app_url ]] || [[ -z $icon_ref ]]; then
return 1
fi
return 0
}
load_from_file() {
if [[ ! -f $1 ]]; then
log --error "File '$1' is not found or readable." && exit 1
fi
file=$(cat $1)
app_name=$(echo $file | jq -r '.name // ""')
app_url=$(echo $file | jq -r '.url // ""')
icon_ref=$(echo $file | jq -r '.icon // ""')
exec_cmd=$(echo $file | jq -r '.exec // ""')
mime_types=$(echo $file | jq -r '.mime_types // ""')
}
print_properties() {
log "\e[33mAPP NAME:\e[0m $app_name"
log "\e[33mURL:\e[0m $app_url"
log "\e[33mICON:\e[0m $icon_ref"
log "\e[33mEXEC:\e[0m $exec_cmd"
log "\e[33mMIME:\e[0m $mime_types"
}
prompt_for_properties() {
log "\e[32mLet's create a new web app you can start with the app launcher.\n\e[0m"
if [[ -z $app_name ]]; then
app_name=$(gum input --prompt "Name> " --placeholder "My favorite web app")
fi
if [[ -z $app_url ]]; then
app_url=$(gum input --prompt "URL> " --placeholder "https://example.com")
fi
if [[ -z $icon_ref ]]; then
icon_ref=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG!)")
fi
}
set_icon_ref() {
# Refer to local icon or fetch remotely from URL
local icon_dir="$XDG_DATA_HOME/applications/icons"
local icon_path=""
# Ensure the icon directory exists (useful if it's the first run.)
[ ! -d $icon_dir ] && mkdir -p $icon_dir
if [[ $icon_ref == https://* ]]; then
icon_path="$icon_dir/$app_name.png"
log "Downloading icon: $icon_ref"
if [[ $dry_run == "0" ]]; then
if curl -sL -o "$icon_path" "$icon_ref"; then
icon_path="$icon_dir/$app_name.png"
else
log --error "Failed to download icon." && exit 1
fi
fi
else
# Check if the icon path is a file.
if [ -f $icon_ref ]; then
icon_path=$icon_ref
else
icon_path="$icon_dir/$icon_ref"
fi
fi
icon_ref=$icon_path
}
generate_file() {
cat >"$1" <<EOF
[Desktop Entry]
Version=1.0
Name=$app_name
Comment=$app_name
Exec=$exec_cmd
Terminal=false
Type=Application
Icon=$icon_ref
StartupNotify=true
EOF
# Add mime types if provided
if [[ -n $mime_types ]]; then
echo "MimeType=$mime_types" >>"$1"
fi
chmod +x "$1"
}
################################################################################
# MAIN
################################################################################
# Setup logging file and label
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_FILE" "$LOG_LABEL"
export LOG_ENABLE_DRY_RUN="$dry_run"
if [[ -z "$XDG_DATA_HOME" ]]; then
log "XDG_DATA_HOME not set"
log "using ~/.local/share"
XDG_DATA_HOME=$HOME/.local/share
fi
if [[ $launch_flag == "1" ]]; then
launch && exit 0
fi
if [[ $file_mode_flag == "1" ]]; then
load_from_file $json_file
fi
# Check that all properties are set, prompt for missing values if not.
check_properties
if [[ "$?" == "1" ]]; then
# Check if the '--no-interactive' flag was passed and exit with error.
[[ $no_interactive_flag == "1" ]] &&
log --error "Required properties not set and '--no-interactive' flag was passed." &&
exit 1
# Only log this if not in interactive mode.
[[ $interactive_mode == "0" ]] &&
log "All required properties not set, prompting for missing properties."
prompt_for_properties
# Check properties again after prompting in interactive mode.
check_properties
if [[ "$?" == "1" ]]; then
# Exit if they were not set during interactive mode.
log --error "You must set app name, app URL, and icon URL!" && exit 1
fi
# Set flag that we are in interactive mode.
interactive_mode=true
fi
desktop_file="$XDG_DATA_HOME/applications/$app_name.desktop"
# Parse the icon ref and download icon, if applicable.
set_icon_ref
# Check that an exec command is set, or default to the 'launch-webapp' script.
if [[ -z $exec_cmd ]]; then
exec_cmd="$SCRIPTS/hypr/webapp launch $app_url"
fi
log "\e[032mCreating web app:\e[0m $desktop_file"
print_properties
if [[ $dry_run == "0" ]]; then
generate_file "$desktop_file"
fi
if [[ $interactive_mode == true ]] && [[ $dry_run == "0" ]]; then
log "You can now find $app_name using the app launcher (SUPER + SPACE)\n"
fi

Some files were not shown because too many files have changed in this diff Show More