Compare commits

...

185 Commits

Author SHA1 Message Date
5e7c193a28 niri: Use caelestia quickshell 2025-12-07 15:11:56 +01:00
67f7129dac nu: Add more m subcommands 2025-12-06 16:23:01 +01:00
333bd228d4 helix: Add qml language 2025-12-06 16:22:31 +01:00
5c7e24e645 mullvad: Add nu waydroid commands 2025-11-18 17:44:25 +01:00
4ff5da379c Use helix as default editor 2025-11-18 17:37:01 +01:00
53b3e791df helix: add extend_line_above keybind 2025-11-04 11:25:05 +01:00
cf7a36c3ba Fix screenlock 2025-10-21 19:45:08 +02:00
af3ccebaae sputnik: Move monitors 2025-10-17 21:41:11 +02:00
10c12125a3 swaync: Add padding 2025-10-06 11:35:49 +02:00
6e67fa87bb helix: Add keybind 2025-10-03 14:38:29 +02:00
2628308f0b helix: Add light theme 2025-09-23 17:15:02 +02:00
bbb7add614 eww: Add ram gauge 2025-09-11 11:34:50 +02:00
5b4f97982d nu: Improve m e2e 2025-09-09 13:44:09 +02:00
96f80a024a nu: Fix ipv6 dns lookups 2025-09-03 12:58:50 +02:00
18a93fe079 nu: Add --server argument to dns command 2025-09-03 12:57:15 +02:00
8517bc121c gtk: Don't use dark theme on pinenote 2025-09-03 12:26:15 +02:00
354a7118de arch-firstinstall: Add man 2025-09-01 15:27:02 +02:00
d7b18e47b0 högtalare: New bluetooth mac 2025-08-26 13:06:45 +02:00
5ae87c8796 swaync: Move to top right 2025-08-26 13:05:55 +02:00
d395cc57c8 nu: Fix "m daemon --boringtun" 2025-08-25 17:48:39 +02:00
c910091882 nu: More mullvad helpers 2025-08-25 17:35:31 +02:00
f51a70d0a3 niri: Use qt5ct as Qt themer 2025-08-17 17:37:38 +02:00
98af89fa7d arch-firstinstall: Install qt5ct 2025-08-16 01:38:53 +02:00
952a358d91 nu: Fix completer for nu 0.106 2025-08-12 15:27:58 +02:00
594b3d667b nvim: Stuff 2025-08-02 12:03:40 +02:00
e63b1fd2e6 Add fuzzel config 2025-07-06 10:47:43 +02:00
9661b20ede nu: Add DNS to tailscale peer command 2025-07-04 16:23:51 +02:00
a59d2f6a65 More null checks 2025-06-29 17:48:09 +02:00
e10eb03b3d nvim: Remove deprecated setup_handlers 2025-06-29 17:43:20 +02:00
5abd83a2e5 niri: Update monitor layout 2025-06-29 17:41:55 +02:00
b48aa761bb nu: Add null check to tailscale peer 2025-06-26 22:51:15 +02:00
ffb0c2717e Fix user field in tailscale scp 2025-06-25 18:18:59 +02:00
399ac740fa Parse user in tailscale ssh nu command 2025-06-25 18:06:42 +02:00
051927907d niri: Add dynamic screencasting keybinds 2025-06-16 21:20:54 +02:00
3fd0b5a647 nu: Add tailscale scp command 2025-06-08 14:11:46 +02:00
87b77cd412 niri stuff 2025-05-27 16:11:36 +02:00
57198f0f77 nu: Add tailscale ssh command 2025-05-18 14:10:09 +02:00
5fe3c435c5 niri: Disable middle-click paste 2025-05-12 21:38:23 +02:00
7d8410f5ad Add tailscale peer nushell command 2025-05-12 21:38:22 +02:00
9cb3239cfe sputnik: Add scale to primary monitor 2025-05-12 21:37:45 +02:00
0a7942333a hyprlock: Disable video 2025-05-12 21:37:45 +02:00
db852f5144 nu: Add macos network util scripts 2025-05-06 16:23:27 +02:00
79b41aa29f Macos stuff 2025-05-06 16:23:04 +02:00
d3cece065e niri: Map tablet to main monitor 2025-03-21 14:41:43 +01:00
979647e7ff niri: Set ozone platform hint env variable 2025-03-06 11:22:49 +01:00
f01522b313 niri: Reposition monitors 2025-03-02 14:30:15 +01:00
f9d5c1f65a nvim: Disable transparent mode for neovide 2025-02-26 10:05:04 +01:00
fa4126ab3d niri: Add debug shortcuts 2025-02-26 10:03:10 +01:00
a68cd06f99 starship: Remove stl 2025-02-17 20:26:03 +01:00
78a9b670c1 nushell: Update config format 2025-02-16 11:30:29 +01:00
2c607a8e74 niri: Update monitors 2025-02-16 11:30:19 +01:00
7edbac4624 Replace dunst with swaync 2025-02-16 11:29:29 +01:00
3ec25cd975 fish: Remove mkdir hack 2025-02-06 19:43:26 +01:00
e0ed6a4de9 niri: Add kb layout hotkey 2025-02-06 17:56:56 +01:00
e73ca2721d niri: Remove virt-manager max width 2025-02-06 17:56:14 +01:00
b563afec08 Add mullpod script 2025-02-05 14:22:27 +01:00
957d0e91dc fish: Create ~/.ssh if missing 2025-01-30 18:08:06 +01:00
ceb4fa97d5 Update niri with floating config 2025-01-13 19:59:22 +01:00
c043f4e9f8 niri: Set max-scroll-amount 2024-12-08 21:34:51 +01:00
90d4b80cf9 install-script: Add screen brightness control tools 2024-12-05 10:41:06 +01:00
d7f7fab0e7 nvim: Add plugin snacks 2024-12-03 11:59:44 +01:00
31f14bf065 Install lazygit and add alias 2024-12-03 11:51:54 +01:00
5b7b3ad924 readelf: string to glob 2024-11-22 10:20:35 +01:00
a411350480 eww: Show current keyboard layout 2024-11-20 22:26:47 +01:00
06affa9723 nvim: todo-notes: Add highlight for rust safety comments 2024-11-20 17:42:51 +01:00
06257367b8 nvim: Don't show Lazy updates constantly 2024-11-20 17:42:51 +01:00
c9a710b86b nushell: Small fixes 2024-11-20 17:42:51 +01:00
e0d95e3bd0 manager: Add os variable since hostname on macos is weird 2024-11-20 17:42:51 +01:00
9001a8f4bd eww: Flash battery gauge when low 2024-11-18 20:47:12 +01:00
67b7083617 eww: Add button to toggle xwayland 2024-11-17 15:43:35 +01:00
e26b76514e niri: Add monitor config for sputnik 2024-11-16 11:01:52 +01:00
45200d0108 niri: Command to move between workspaces 2024-11-08 10:03:13 +01:00
b1c4c6d4ac Make hyprlock default and add battery level 2024-11-08 10:02:59 +01:00
840948e179 fix gitfixremote 2024-11-07 13:24:40 +01:00
38fcc71ca3 nu: Add ctd command 2024-11-04 16:00:30 +01:00
da0e57ae22 Fix gitfixremote 2024-11-04 16:00:30 +01:00
65ab18e077 Update alacritty config format 2024-10-27 14:51:54 +01:00
06c1211342 Update nushell config format 2024-10-27 14:51:23 +01:00
6641a7cf7f screenlock-video: Loop the video 2024-10-04 17:45:34 +02:00
2286485bb7 Add command to fix git remotes 2024-10-03 21:39:38 +02:00
258aa4b5ea Add niri config 2024-10-03 21:39:20 +02:00
13d1b5a116 Tweak lockscreen and themes 2024-10-03 21:38:45 +02:00
3527a4fd65 nu: Remove deprecated use_grid_icons 2024-09-21 14:51:19 +02:00
573aac3d6f arch-firstinstall: Install tree-sitter 2024-09-17 14:47:18 +02:00
e8f6d38da5 gitconfig: Don't user private gpg key on buran 2024-09-17 11:35:08 +02:00
7b4a78692b nushell: Don't assume that XDG_RUNTIME_DIR is set 2024-09-15 12:21:21 +02:00
fd0c14dc0c nvim: Improve LSP stuff 2024-09-13 13:01:36 +02:00
2458565137 hyprland: Refer to monitor by desc, not port 2024-08-25 18:02:40 +02:00
1d01dacdfd nvim: Enable transparent mode 2024-08-22 17:03:17 +02:00
927bede28b nvim: Fix automatic dark mode switching 2024-08-07 10:26:02 +02:00
cb22c6bbdb arch-firstinstall: Add more programs 2024-07-26 18:06:37 +02:00
c99739a2e3 hypr: Use wmutils for workspace switching 2024-07-26 11:25:34 +02:00
62c641e1fc swayidle: add sputnik config 2024-07-26 11:21:48 +02:00
dcbdc4203c eww: Fix errors and warnings 2024-07-26 11:21:24 +02:00
fce4839256 arch-firstinstall: Add netcat 2024-07-25 11:31:13 +02:00
dc460aaf4f General fixes 2024-07-25 11:17:15 +02:00
174e7a8249 Update arch-firstinstall 2024-07-20 14:38:55 +02:00
6e17c8f6a6 nvim: Update rust-tools to rustaceanvim
Also other stuff
2024-07-20 14:38:38 +02:00
0e1f393379 eww: Improveme stuff 2024-07-20 14:38:06 +02:00
972bcf003d eww: Add color-scheme switch button 2024-07-17 10:55:18 +02:00
b5babe522d nu: Change default editor to nvim 2024-07-17 10:54:16 +02:00
4ab0c938d1 swayidle: Set screenlock as global locker 2024-07-15 13:05:18 +02:00
c037e5875a nvim: Update which-key config 2024-07-15 13:05:18 +02:00
9af7a35729 Add swayidle config 2024-07-10 10:39:41 +02:00
c64933826b bat: Add light theme 2024-07-10 10:38:55 +02:00
6880ff625b nvim: Use which-key 2024-07-10 10:38:00 +02:00
db737efb58 nushell: Add light theme support 2024-07-09 13:20:51 +02:00
3a42637493 nvim: packer -> lazy 2024-07-05 16:27:41 +02:00
8218831b06 hypr: Remove deprecated config entry 2024-07-05 10:16:31 +02:00
179b5ee6ae screenlock: Add support for niri 2024-06-26 17:42:52 +02:00
aa9e55ec13 hypr: Only swap *left* alt/super 2024-06-03 10:19:46 +02:00
d94374c77e Add helix config 2024-06-02 13:29:52 +02:00
3d65ba5862 nushell: Set global cargo target dir env 2024-06-02 13:17:27 +02:00
3a4bf7d82d eww: Tweaks 2024-06-02 13:17:27 +02:00
db25034891 git: Always show gpg signatures in log 2024-06-02 13:17:27 +02:00
ff7ca4e4ba nvim: Tweaks 2024-06-02 13:17:26 +02:00
a18a03ba0e hyprland: Swap super and alt keys 2024-06-02 13:07:01 +02:00
d9a68f0181 nu: Remove deprecated config setting 2024-06-02 13:07:01 +02:00
a5b2a89963 eww: Add WIP bluetooth widget 2024-05-19 12:22:00 +02:00
cb7c1dc23c eww: Fix workspaces monitor filter 2024-05-16 09:56:50 +02:00
6540833edc eww: Better workspaces 2024-05-15 23:22:39 +02:00
f4b52e2836 eww: Only show workspaces on same monitor 2024-05-14 09:40:43 +02:00
ce8d911622 Eww show charging status 2024-05-13 00:08:41 +02:00
c887d19846 Eww battery gauge 2024-05-12 23:19:31 +02:00
517b4499e1 More eww styling 2024-05-12 23:05:51 +02:00
acfeed782e eww: Hide temp thingy if no temp 2024-05-09 14:52:32 +02:00
8d88dc5cd8 Improve ewwbar 2024-05-09 12:58:52 +02:00
3ceaf2c0ca Improve ewwbar 2024-05-08 23:51:44 +02:00
1b11595fb3 hyprland: Start eww on buran 2024-05-07 23:00:24 +02:00
3fc49a7491 nvim: Add bindings for telescope lsp stuff 2024-05-07 22:59:17 +02:00
34ee591b48 Make alacritty more transparent 2024-05-07 22:58:29 +02:00
b13ab1ee86 Change wallpaper 2024-05-07 22:55:21 +02:00
9ea4271925 s/findex/fuzzel 2024-05-07 22:54:56 +02:00
0867bbae0f Improve eww bar 2024-05-07 22:54:24 +02:00
388856418f Update arch-firstinstall script 2024-05-06 15:40:03 +02:00
02f153a216 Change gpg pinentry program 2024-05-02 20:09:56 +02:00
032261cc53 nvim: Add wgsl language server 2024-05-02 20:09:44 +02:00
67f71e45e6 nushell: Use tkey-ssh-agent if installed 2024-05-02 20:06:07 +02:00
2dfc7c657e nvim: Remove cursorline 2024-04-22 13:40:04 +02:00
519935c8c3 nvim: More lsps 2024-04-22 13:39:40 +02:00
0045b88e23 nvim: Fix comments 2024-04-22 13:38:35 +02:00
d16f786da3 nu: Add ~/.radicle/bin to path 2024-04-09 17:48:30 +02:00
fa5410c51e nvim: Add todo-comments 2024-03-25 13:39:52 +01:00
18d0304855 hyprland: Update device config with new syntax 2024-03-21 16:18:15 +01:00
aa18fd63fb arch-firstinstall: Add qt-wayland packages 2024-03-13 15:36:15 +01:00
74de1a4b69 nvim: Add telescope to switch rust-analyzer target 2024-03-13 15:36:15 +01:00
a24277188b nvim: Add wgsl filetype 2024-02-29 20:58:07 +01:00
0271518975 nushell: Set up external completion using fish 2024-02-28 14:16:30 +01:00
fa6f170e78 Add script to easily send replaceable notifys 2024-02-28 14:12:52 +01:00
36e62c9bbf nushell: Add ssh agent socket env 2024-02-28 14:10:41 +01:00
0642124a2b Alias gw = git switch 2024-02-28 14:10:13 +01:00
aa2dc6ea15 Add nu scripts to access mullvad api 2024-02-28 14:09:43 +01:00
9c40ab1ef4 arch-firstinstall: Add some packages 2024-02-28 14:08:06 +01:00
2a7ae7ee34 waybar: Fix tray icons context menu bug 2024-02-28 14:07:39 +01:00
5176480fe3 hyprland: Add jitsi window rules 2024-02-28 14:07:17 +01:00
d950725e34 Update readelf.nu 2024-02-28 14:06:58 +01:00
8c30126267 hyprland: Start dunst 2024-02-23 18:06:43 +01:00
3a4c2a3175 nu: Add xo alias 2024-02-23 18:05:26 +01:00
6d195b54a9 Add script to help with first install 2024-02-20 18:40:18 +01:00
cae9efe25f hyprland: Tweak display settings 2024-02-20 18:40:11 +01:00
b08d55d093 nushell: Add volta stuff to env 2024-02-20 18:39:41 +01:00
056211fc5d Add --daemonize flag to swaylock 2024-02-14 22:10:33 +01:00
237fa22c3c buran: Update monitor config 2024-02-14 22:10:04 +01:00
a2d35fa565 Update volume indicator config 2024-01-07 14:15:16 +01:00
1a7258a7c2 hypr: Configure monitor for sputnik 2024-01-05 12:31:41 +01:00
a6a3e7a97d disable nushell zoxide config gen (it's broken) 2024-01-05 10:06:01 +01:00
5ad22d6a0c migrate alacritty config to toml 2024-01-05 10:05:43 +01:00
a451e48887 nushell: Enable history sync
The alternative is worse...
2023-12-27 19:09:23 +01:00
f09d772b43 nvim: Add auto-save plugin 2023-12-27 19:08:48 +01:00
093b7afe94 Add eww helper scripts 2023-12-27 19:08:48 +01:00
b6531abf57 buramn/hyprland: Lower gaps_out 2023-12-27 16:25:04 +01:00
d0a13dc52d buran/hyprland: exec screenlock on lid close 2023-12-27 16:22:20 +01:00
838e99f3de bluetooth scripts: Notify status 2023-12-24 20:51:42 +01:00
a77c1289a4 nvim: Show some whitespace 2023-12-24 20:50:46 +01:00
cd2e4cc650 nushell: fuzzy completion sucks 2023-11-17 20:27:28 +01:00
2b60c4f42c pylsp 2023-11-17 20:27:16 +01:00
704871969f Add eww bar 2023-11-11 11:27:08 +01:00
48e4b9db44 screenlock: Default color if image blur didn't work 2023-11-08 22:55:02 +01:00
cf794d8841 nvim: More keys 2023-11-08 22:54:23 +01:00
b69097755b nushell tweaks 2023-11-08 22:38:19 +01:00
a74f22a58c hypr: Disable exit hotkey, rebind screenlock 2023-11-06 14:56:00 +01:00
4520984561 hypr: Add printscreen hotkey 2023-10-30 11:34:04 +01:00
23886416b4 hypr: Use findex instead of wofi 2023-10-28 20:19:21 +02:00
e750b5ea50 hypr: Alt+Shift+Q to close windows 2023-10-28 20:18:52 +02:00
409ce9a05c Update volshow script to use sockets 2023-10-28 20:18:33 +02:00
71 changed files with 4677 additions and 1987 deletions

467
manager/Cargo.lock generated
View File

@ -2,6 +2,21 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "aho-corasick"
version = "0.7.15"
@ -34,7 +49,7 @@ checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
dependencies = [
"proc-macro2",
"quote",
"syn",
"syn 1.0.109",
]
[[package]]
@ -43,16 +58,31 @@ version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"hermit-abi 0.1.19",
"libc",
"winapi",
]
[[package]]
name = "autocfg"
version = "1.1.0"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "backtrace"
version = "0.3.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]]
name = "bitflags"
@ -60,6 +90,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "bitvec"
version = "0.19.6"
@ -74,8 +110,8 @@ dependencies = [
[[package]]
name = "blueprint"
version = "0.4.0"
source = "git+https://git.nubo.sh/hulthe/blueprint.git#974a6e89b2b62cfe97e82d2b128f3f2321995606"
version = "0.5.0"
source = "git+https://git.nubo.sh/hulthe/blueprint.git#92df5833161321f0548ae4849548b615e35a9772"
dependencies = [
"nom",
"structopt",
@ -84,9 +120,18 @@ dependencies = [
[[package]]
name = "bytes"
version = "1.1.0"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
[[package]]
name = "cc"
version = "1.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9"
dependencies = [
"shlex",
]
[[package]]
name = "cfg-if"
@ -102,39 +147,20 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"ansi_term",
"atty",
"bitflags",
"bitflags 1.3.2",
"strsim",
"textwrap",
"unicode-width",
"vec_map",
]
[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]]
name = "dotfiles"
version = "0.1.0"
dependencies = [
"async-recursion",
"blueprint",
"eyre",
"futures",
"log",
"pretty_env_logger",
@ -159,6 +185,16 @@ dependencies = [
"termcolor",
]
[[package]]
name = "eyre"
version = "0.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
dependencies = [
"indenter",
"once_cell",
]
[[package]]
name = "funty"
version = "1.1.0"
@ -167,9 +203,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]]
name = "futures"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e"
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
@ -182,9 +218,9 @@ dependencies = [
[[package]]
name = "futures-channel"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
@ -192,15 +228,15 @@ dependencies = [
[[package]]
name = "futures-core"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-executor"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
@ -209,38 +245,38 @@ dependencies = [
[[package]]
name = "futures-io"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-macro"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn",
"syn 2.0.87",
]
[[package]]
name = "futures-sink"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
[[package]]
name = "futures-task"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
[[package]]
name = "futures-util"
version = "0.3.21"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-channel",
"futures-core",
@ -255,15 +291,10 @@ dependencies = [
]
[[package]]
name = "getrandom"
version = "0.2.6"
name = "gimli"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
dependencies = [
"cfg-if",
"libc",
"wasi 0.10.2+wasi-snapshot-preview1",
]
checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
[[package]]
name = "heck"
@ -283,6 +314,12 @@ dependencies = [
"libc",
]
[[package]]
name = "hermit-abi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "humantime"
version = "1.3.0"
@ -293,10 +330,16 @@ dependencies = [
]
[[package]]
name = "lazy_static"
version = "1.4.0"
name = "indenter"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "lexical-core"
@ -305,7 +348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
dependencies = [
"arrayvec",
"bitflags",
"bitflags 1.3.2",
"cfg-if",
"ryu",
"static_assertions",
@ -313,15 +356,15 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.126"
version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]]
name = "lock_api"
version = "0.4.7"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
@ -329,12 +372,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.17"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "memchr"
@ -343,22 +383,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]]
name = "mio"
version = "0.8.3"
name = "miniz_oxide"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799"
checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
dependencies = [
"adler",
"autocfg",
]
[[package]]
name = "mio"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
"hermit-abi 0.3.9",
"libc",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys",
"wasi",
"windows-sys 0.52.0",
]
[[package]]
name = "nom"
version = "6.2.1"
version = "6.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6"
checksum = "c6a7a9657c84d5814c6196b68bb4429df09c18b1573806259fba397ea4ad0d44"
dependencies = [
"bitvec",
"funty",
@ -368,26 +418,22 @@ dependencies = [
]
[[package]]
name = "num_cpus"
version = "1.13.1"
name = "object"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
"hermit-abi",
"libc",
]
checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
[[package]]
name = "once_cell"
version = "1.12.0"
version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "parking_lot"
version = "0.12.1"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
"parking_lot_core",
@ -395,22 +441,22 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.3"
version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-sys",
"windows-targets",
]
[[package]]
name = "pin-project-lite"
version = "0.2.9"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "pin-utils"
@ -437,7 +483,7 @@ dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn",
"syn 1.0.109",
"version_check",
]
@ -454,9 +500,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.39"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [
"unicode-ident",
]
@ -469,9 +515,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.18"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@ -484,22 +530,11 @@ checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
[[package]]
name = "redox_syscall"
version = "0.2.13"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
dependencies = [
"bitflags",
]
[[package]]
name = "redox_users"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
"getrandom",
"redox_syscall",
"thiserror",
"bitflags 2.6.0",
]
[[package]]
@ -515,71 +550,86 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.6.26"
version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "rustc-demangle"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "ryu"
version = "1.0.10"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "scopeguard"
version = "1.1.0"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.137"
version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.137"
version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766"
dependencies = [
"proc-macro2",
"quote",
"syn",
"syn 2.0.87",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.0"
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook-registry"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
"libc",
]
[[package]]
name = "slab"
version = "0.4.6"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "smallvec"
version = "1.8.0"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "socket2"
version = "0.4.4"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
dependencies = [
"libc",
"winapi",
"windows-sys 0.52.0",
]
[[package]]
@ -615,14 +665,25 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
"syn 1.0.109",
]
[[package]]
name = "syn"
version = "1.0.96"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
dependencies = [
"proc-macro2",
"quote",
@ -637,9 +698,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "termcolor"
version = "1.1.3"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
@ -655,81 +716,79 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.31"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a"
checksum = "3b3c6efbfc763e64eb85c11c25320f0737cb7364c4b6336db90aa9ebe27a0bbd"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.31"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
checksum = "b607164372e89797d78b8e23a6d67d5d1038c1c65efd52e1389ef8b77caba2a6"
dependencies = [
"proc-macro2",
"quote",
"syn",
"syn 2.0.87",
]
[[package]]
name = "tokio"
version = "1.19.2"
version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439"
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
"libc",
"memchr",
"mio",
"num_cpus",
"once_cell",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"winapi",
"windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
version = "1.8.0"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn",
"syn 2.0.87",
]
[[package]]
name = "toml"
version = "0.5.9"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "unicode-ident"
version = "1.0.0"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "unicode-segmentation"
version = "1.9.0"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-width"
version = "0.1.9"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
name = "vec_map"
@ -739,15 +798,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "version_check"
version = "0.9.4"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "wasi"
version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
@ -773,11 +826,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.5"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"winapi",
"windows-sys 0.59.0",
]
[[package]]
@ -788,46 +841,85 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.36.1"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wyz"
@ -837,9 +929,6 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
[[package]]
name = "xdg"
version = "2.4.1"
version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6"
dependencies = [
"dirs",
]
checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"

View File

@ -13,6 +13,7 @@ async-recursion = "0.3.2"
xdg = "2.2.0"
thiserror = "1.0.24"
toml = "0.5.8"
eyre = "0.6.12"
[dependencies.blueprint]
git = "https://git.nubo.sh/hulthe/blueprint.git"

View File

@ -3,16 +3,17 @@ use crate::Config;
use async_recursion::async_recursion;
use blueprint::{parse_template, Env, Value};
use futures::future::join_all;
use futures::TryFutureExt;
use std::collections::HashMap;
use std::env;
use std::ffi::OsStr;
use std::io::ErrorKind;
use std::path::PathBuf;
use std::process::Command;
use std::str::from_utf8;
use tokio::fs::{copy, create_dir, read_dir, read_to_string, File};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::join;
use tokio::process::Command;
pub const TEMPLATE_EXTENSION: &str = "tpl";
@ -20,6 +21,7 @@ pub async fn build_tree(cfg: &Config) -> Result<(), Errors> {
let mut env = Env::new();
env.insert("hostname".into(), Value::Str(get_hostname().await));
env.insert("username".into(), Value::Str(get_username()));
env.insert("os".into(), Value::Str(get_operating_system().await));
debug!("trying to read {:?}", cfg.variables_path);
if let Ok(s) = read_to_string(&cfg.variables_path).await {
@ -31,11 +33,7 @@ pub async fn build_tree(cfg: &Config) -> Result<(), Errors> {
let value = match toml_value {
toml::Value::String(s) => Value::Str(s),
toml::Value::Boolean(b) => Value::Bool(b),
_ => {
return Err(InnerError::TypeErr
.with_location(&cfg.variables_path)
.into())
}
_ => return Err(InnerError::Type.with_location(&cfg.variables_path).into()),
};
env.insert(key, value);
@ -170,26 +168,38 @@ fn get_username() -> String {
env::var("USER")
.ok()
.or_else(|| env::var("USERNAME").ok())
.unwrap_or_else(String::new)
.unwrap_or_default()
}
async fn get_hostname() -> String {
async fn read_hostname_file() -> Option<String> {
read_to_string("/etc/hostname").await.ok()
async fn read_hostname_file() -> eyre::Result<String> {
Ok(read_to_string("/etc/hostname").await?)
}
// TODO: should be async
fn run_hostname_cmd() -> Option<String> {
async fn run_hostname_cmd() -> eyre::Result<String> {
Command::new("hostname")
.output()
.ok()
.and_then(|out| from_utf8(&out.stdout).ok().map(str::to_string))
.await
.map_err(Into::into)
.and_then(|out| Ok(from_utf8(&out.stdout).map(str::to_string)?))
}
read_hostname_file()
.or_else(|_| run_hostname_cmd())
.await
.or_else(run_hostname_cmd)
.unwrap_or_else(String::new)
.unwrap_or(String::new())
.trim()
.to_string()
}
async fn get_operating_system() -> String {
Command::new("uname")
.output()
.await
.ok()
.as_ref()
.and_then(|out| from_utf8(&out.stdout).ok())
.unwrap_or("unknown")
.trim()
.to_lowercase()
}

View File

@ -15,16 +15,16 @@ pub struct Error {
#[derive(Debug, Error)]
pub enum InnerError {
#[error("IO Error: {0}")]
IoErr(#[from] io::Error),
Io(#[from] io::Error),
#[error("Failed to parse template file")]
TemplateErr(#[from] blueprint::Error),
Template(#[from] blueprint::Error),
#[error("Failed to parse toml file")]
TomlErr(#[from] toml::de::Error),
Toml(#[from] toml::de::Error),
#[error("Unsupported variable type")]
TypeErr,
Type,
}
impl From<Vec<Error>> for Errors {

View File

@ -10,7 +10,7 @@ use builder::build_tree;
use error::Errors;
use linker::link_tree;
use log::LevelFilter;
use peeker::peek_tree;
use peeker::print_variables;
use std::env;
use std::path::PathBuf;
use structopt::StructOpt;
@ -88,8 +88,8 @@ async fn run() -> Result<(), Errors> {
};
if opt.print_variables {
info!("peeking tree");
peek_tree(&cfg).await?;
info!("scanning tree");
print_variables(&cfg).await?;
} else {
info!("building tree");
build_tree(&cfg).await?;

View File

@ -9,7 +9,8 @@ use std::path::PathBuf;
use tokio::fs::{read_dir, read_to_string};
use tokio::join;
pub async fn peek_tree(cfg: &Config) -> Result<(), Errors> {
/// Iterate over the directory tree and print all variables used in all template files.
pub async fn print_variables(cfg: &Config) -> Result<(), Errors> {
for var in dir(cfg, PathBuf::new()).await? {
println!("{}", var);
}

View File

@ -0,0 +1,380 @@
[bell]
animation = "EaseOutExpo"
duration = 0
[colors]
draw_bold_text_with_bright_colors = true
{% if light %}
# Gruvbox Light
[colors.primary]
# hard contrast: background = '0xf9f5d7'
background = "0xfbf1c7"
# soft contrast: background = '0xf2e5bc'
foreground = "0x3c3836"
# Normal colors
[colors.normal]
black = "0xfbf1c7"
red = "0xcc241d"
green = "0x98971a"
yellow = "0xd79921"
blue = "0x458588"
magenta = "0xb16286"
cyan = "0x689d6a"
white = "0x7c6f64"
# Bright colors
[colors.bright]
black = "0x928374"
red = "0x9d0006"
green = "0x79740e"
yellow = "0xb57614"
blue = "0x076678"
magenta = "0x8f3f71"
cyan = "0x427b58"
white = "0x3c3836"
{% else %}
# Gruvbox Dark
[colors.primary]
# hard contrast: background = '0x1d2021'
background = "0x282828"
# soft contrast: background = '0x32302f'
foreground = "0xebdbb2"
[colors.normal]
black = "0x282828"
blue = "0x458588"
cyan = "0x689d6a"
green = "0x98971a"
magenta = "0xb16286"
red = "0xcc241d"
white = "0xa89984"
yellow = "0xd79921"
[colors.bright]
black = "0x928374"
blue = "0x83a598"
cyan = "0x8ec07c"
green = "0xb8bb26"
magenta = "0xd3869b"
red = "0xfb4934"
white = "0xebdbb2"
yellow = "0xfabd2f"
{% end %}
[debug]
render_timer = false
[env]
TERM = "xterm-256color"
[font]
{% if hostname == "vostok" %}
size = 10.0
{% else %}
size = 11.0
{% end %}
[font.bold]
style = "Bold"
{% if hostname == "sputnik" %}
family = "SauceCodePro Nerd Font"
{% elif hostname == "vostok" %}
family = "Source Code Pro for Powerline"
{% elif os == "darwin" %}
{% else %}
family = "monospace"
{% end %}
[font.italic]
style = "Italic"
{% if hostname == "sputnik" %}
family = "SauceCodePro Nerd Font"
{% elif hostname == "vostok" %}
family = "Source Code Pro for Powerline"
{% elif os == "darwin" %}
{% else %}
family = "monospace"
{% end %}
[font.normal]
style = "Regular"
{% if hostname == "sputnik" %}
family = "SauceCodePro Nerd Font"
{% elif hostname == "vostok" %}
family = "Source Code Pro for Powerline"
{% elif os == "darwin" %}
{% else %}
family = "monospace"
{% end %}
[font.offset]
x = 0
y = 0
[[keyboard.bindings]]
action = "Paste"
key = "V"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "Quit"
key = "Q"
mods = "Command"
[[keyboard.bindings]]
action = "Quit"
key = "W"
mods = "Command"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Plus"
mods = "Control"
[[keyboard.bindings]]
action = "DecreaseFontSize"
key = "Minus"
mods = "Control"
[[keyboard.bindings]]
action = "ResetFontSize"
key = "Key0"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001BOH"
key = "Home"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1~"
key = "Home"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOF"
key = "End"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[4~"
key = "End"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001B[5~"
key = "PageUp"
[[keyboard.bindings]]
chars = "\u001B[6~"
key = "PageDown"
[[keyboard.bindings]]
chars = "\u001B[1;2D"
key = "Left"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5D"
key = "Left"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3D"
key = "Left"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[D"
key = "Left"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOD"
key = "Left"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2C"
key = "Right"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5C"
key = "Right"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3C"
key = "Right"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[C"
key = "Right"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOC"
key = "Right"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2A"
key = "Up"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5A"
key = "Up"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3A"
key = "Up"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[A"
key = "Up"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOA"
key = "Up"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[1;2B"
key = "Down"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001B[1;5B"
key = "Down"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[1;3B"
key = "Down"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[B"
key = "Down"
mode = "~AppCursor"
[[keyboard.bindings]]
chars = "\u001BOB"
key = "Down"
mode = "AppCursor"
[[keyboard.bindings]]
chars = "\u001B[Z"
key = "Tab"
mods = "Shift"
[[keyboard.bindings]]
chars = "\u001BOP"
key = "F1"
[[keyboard.bindings]]
chars = "\u001BOQ"
key = "F2"
[[keyboard.bindings]]
chars = "\u001BOR"
key = "F3"
[[keyboard.bindings]]
chars = "\u001BOS"
key = "F4"
[[keyboard.bindings]]
chars = "\u001B[15~"
key = "F5"
[[keyboard.bindings]]
chars = "\u001B[17~"
key = "F6"
[[keyboard.bindings]]
chars = "\u001B[18~"
key = "F7"
[[keyboard.bindings]]
chars = "\u001B[19~"
key = "F8"
[[keyboard.bindings]]
chars = "\u001B[20~"
key = "F9"
[[keyboard.bindings]]
chars = "\u001B[21~"
key = "F10"
[[keyboard.bindings]]
chars = "\u001B[23~"
key = "F11"
[[keyboard.bindings]]
chars = "\u001B[24~"
key = "F12"
[[keyboard.bindings]]
chars = "\u007F"
key = "Back"
[[keyboard.bindings]]
chars = "\u001B\u007F"
key = "Back"
mods = "Alt"
[[keyboard.bindings]]
chars = "\u001B[2~"
key = "Insert"
[[keyboard.bindings]]
chars = "\u001B[3~"
key = "Delete"
mode = "AppKeypad"
[[keyboard.bindings]]
chars = "\u001B[P"
key = "Delete"
mode = "~AppKeypad"
[mouse]
hide_when_typing = false
[[mouse.bindings]]
action = "PasteSelection"
mouse = "Middle"
[selection]
semantic_escape_chars = ",│`|:\"' ()[]{}<>"
[terminal.shell]
program = "nu"
[window]
{% if demo %}
opacity = 1.0
{% elif os == "darwin" %}
opacity = 0.95
{% else %}
opacity = 0.90
{% end %}
[window.dimensions]
columns = 80
lines = 24

View File

@ -1,304 +0,0 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization. Default is xterm-256color
# Note: the default TERM value `xterm-256color` does not
# specify all features alacritty supports. This does pose
# a few issues with programs relying on terminfo and the
# `tput` command
#TERM: tmux-256color
TERM: xterm-256color
# Window dimensions in character columns and lines
# (changes require restart)
window:
dimensions:
columns: 80
lines: 24
{% if demo %}
opacity: 1.0
{% else %}
opacity: 0.95
{% end %}
# The FreeType rasterizer needs to know the device DPI for best results
# (changes require restart)
dpi:
{% if hostname == "vostok" %}
x: 209.9
y: 209.9
{% else %}
x: 96.0
y: 96.0
{% end %}
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true
# Font configuration (changes require restart)
font:
normal:
{% if hostname == "sputnik" %}
family: SauceCodePro Nerd Font
{% elif hostname == "vostok" %}
family: Source Code Pro for Powerline
{% else %}
family: monospace
{% end %}
style: Regular
bold:
{% if hostname == "sputnik" %}
family: SauceCodePro Nerd Font
{% elif hostname == "vostok" %}
family: Source Code Pro for Powerline
{% else %}
family: monospace
{% end %}
style: Bold
italic:
{% if hostname == "sputnik" %}
family: SauceCodePro Nerd Font
{% elif hostname == "vostok" %}
family: Source Code Pro for Powerline
{% else %}
family: monospace
{% end %}
style: Italic
# Point size of the font
{% if hostname == "sputnik" %}
size: 11.0
{% elif hostname == "vostok" %}
size: 10.0
{% else %}
size: 11.0
{% end %}
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset:
x: 0
y: 0
# Should display the render timer
debug:
render_timer: false
{% if light %}
# Colors (Gruvbox light)
colors:
# Default colors
primary:
# hard contrast: background = '0xf9f5d7'
background: '0xfbf1c7'
# soft contrast: background = '0xf2e5bc'
foreground: '0x3c3836'
# Normal colors
normal:
black: '0xfbf1c7'
red: '0xcc241d'
green: '0x98971a'
yellow: '0xd79921'
blue: '0x458588'
magenta: '0xb16286'
cyan: '0x689d6a'
white: '0x7c6f64'
# Bright colors
bright:
black: '0x928374'
red: '0x9d0006'
green: '0x79740e'
yellow: '0xb57614'
blue: '0x076678'
magenta: '0x8f3f71'
cyan: '0x427b58'
white: '0x3c3836'
{% else %}
# Colors (Gruvbox dark)
colors:
# Default colors
primary:
# hard contrast: background = '0x1d2021'
background: '0x282828'
# soft contrast: background = '0x32302f'
foreground: '0xebdbb2'
# Normal colors
normal:
black: '0x282828'
red: '0xcc241d'
green: '0x98971a'
yellow: '0xd79921'
blue: '0x458588'
magenta: '0xb16286'
cyan: '0x689d6a'
white: '0xa89984'
# Bright colors
bright:
black: '0x928374'
red: '0xfb4934'
green: '0xb8bb26'
yellow: '0xfabd2f'
blue: '0x83a598'
magenta: '0xd3869b'
cyan: '0x8ec07c'
white: '0xebdbb2'
{% end %}
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Possible values for `animation`
# `Ease`
# `EaseOut`
# `EaseOutSine`
# `EaseOutQuad`
# `EaseOutCubic`
# `EaseOutQuart`
# `EaseOutQuint`
# `EaseOutExpo`
# `EaseOutCirc`
# `Linear`
#
# To completely disable the visual bell, set its duration to 0.
#
bell:
animation: EaseOutExpo
duration: 0
# Key bindings
#
# Each binding is defined as an object with some properties. Most of the
# properties are optional. All of the alphabetical keys should have a letter for
# the `key` value such as `V`. Function keys are probably what you would expect
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
# etc. These all match the glutin::VirtualKeyCode variants.
#
# Possible values for `mods`
# `Command`, `Super` refer to the super/command/windows key
# `Control` for the control key
# `Shift` for the Shift key
# `Alt` and `Option` refer to alt/option
#
# mods may be combined with a `|`. For example, requiring control and shift
# looks like:
#
# mods: Control|Shift
#
# The parser is currently quite sensitive to whitespace and capitalization -
# capitalization must match exactly, and piped items must not have whitespace
# around them.
#
# Either an `action` or `chars` field must be present. `chars` writes the
# specified string every time that binding is activated. These should generally
# be escape sequences, but they can be configured to send arbitrary strings of
# bytes. Possible values of `action` include `Paste` and `PasteSelection`.
#
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
# then run `showkey -a` to get the sequence associated to a key combination.
key_bindings:
- { key: V, mods: Control|Shift, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: Plus, mods: Control, action: IncreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[1~", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[4~", mode: ~AppCursor }
- { key: PageUp, chars: "\x1b[5~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
- { key: Left, chars: "\x1bOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
- { key: Right, chars: "\x1bOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
- { key: Up, chars: "\x1bOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
- { key: Down, chars: "\x1bOB", mode: AppCursor }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Insert, chars: "\x1b[2~" }
- { key: Delete, chars: "\x1b[3~", mode: AppKeypad }
- { key: Delete, chars: "\x1b[P", mode: ~AppKeypad }
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
hide_when_typing: false
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
shell:
program: nu
# args:
# - --login

View File

@ -0,0 +1,3 @@
[colors.primary]
background = "#1d1f21"
foreground = "#1d1f21"

View File

@ -1,8 +0,0 @@
# Silent alacritty config
# Hack to hide the cursor
colors:
primary:
background: "#1d1f21"
foreground: "#1d1f21"

View File

@ -0,0 +1,6 @@
{% if light %}
--theme=gruvbox-light
{% else %}
--theme=gruvbox-dark
{% end %}

View File

@ -0,0 +1,220 @@
{
"appearance": {
"anim": {
"durations": {
"scale": 1
}
},
"font": {
"family": {
"material": "Material Symbols Rounded",
"mono": "CaskaydiaCove NF",
"sans": "Rubik"
},
"size": {
"scale": 1
}
},
"padding": {
"scale": 1
},
"rounding": {
"scale": 1
},
"spacing": {
"scale": 1
},
"transparency": {
"enabled": false,
"base": 0.85,
"layers": 0.4
}
},
"general": {
"apps": {
"terminal": [
"foot"
],
"audio": [
"pavucontrol"
]
}
},
"background": {
"desktopClock": {
"enabled": false
},
"enabled": true,
"visualiser": {
"enabled": true,
"autoHide": true,
"rounding": 1,
"spacing": 1
}
},
"bar": {
"clock": {
"showIcon": false
},
"dragThreshold": 20,
"entries": [
{
"id": "logo",
"enabled": true
},
{
"id": "workspaces",
"enabled": true
},
{
"id": "spacer",
"enabled": true
},
{
"id": "activeWindow",
"enabled": true
},
{
"id": "spacer",
"enabled": true
},
{
"id": "tray",
"enabled": true
},
{
"id": "clock",
"enabled": true
},
{
"id": "statusIcons",
"enabled": true
},
{
"id": "idleInhibitor",
"enabled": true
},
{
"id": "power",
"enabled": true
}
],
"persistent": false,
"showOnHover": true,
"status": {
"showAudio": false,
"showBattery": true,
"showBluetooth": true,
"showMicrophone": false,
"showKbLayout": false,
"showNetwork": true
},
"tray": {
"background": true,
"recolour": true
},
"workspaces": {
"activeIndicator": true,
"activeLabel": "󰮯",
"activeTrail": false,
"groupIconsByApp": true,
"groupingRespectsLayout": true,
"windowRighClickContext": true,
"label": "◦",
"occupiedBg": true,
"occupiedLabel": "⊙",
"showWindows": true,
"shown": 4,
"windowIconImage": false,
"focusedWindowBlob": true,
"windowIconGap": 0,
"windowIconSize": 30
}
},
"border": {
"rounding": 25,
"thickness": 10
},
"dashboard": {
"mediaUpdateInterval": 500,
"showOnHover": true
},
"launcher": {
"actionPrefix": ">",
"dragThreshold": 50,
"vimKeybinds": false,
"enableDangerousActions": false,
"maxShown": 8,
"maxWallpapers": 9,
"specialPrefix": "@",
"useFuzzy": {
"apps": false,
"actions": false,
"schemes": false,
"variants": false,
"wallpapers": false
},
"showOnHover": false
},
"lock": {
"recolourLogo": false
},
"notifs": {
"actionOnClick": false,
"clearThreshold": 0.3,
"defaultExpireTimeout": 5000,
"expandThreshold": 20,
"expire": false
},
"osd": {
"enabled": true,
"enableBrightness": true,
"enableMicrophone": true,
"hideDelay": 2000
},
"paths": {
"mediaGif": "root:/assets/bongocat.gif",
"sessionGif": "root:/assets/kurukuru.gif",
"wallpaperDir": "~/.config/wallpapers/"
},
"services": {
"audioIncrement": 0.1,
"defaultPlayer": "Spotify",
"gpuType": "",
"playerAliases": [
{
"from": "com.github.th_ch.youtube_music",
"to": "YT Music"
}
],
"weatherLocation": "",
"useFahrenheit": false,
"useTwelveHourClock": false,
"smartScheme": true,
"visualiserBars": 45
},
"session": {
"dragThreshold": 30,
"vimKeybinds": true,
"commands": {
"logout": [
"loginctl",
"terminate-user",
""
],
"shutdown": [
"systemctl",
"poweroff"
],
"hibernate": [
"systemctl",
"hibernate"
],
"reboot": [
"systemctl",
"reboot"
]
}
}
}

View File

@ -1,434 +0,0 @@
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = none
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The maximum height of a single notification, excluding the frame.
height = 300
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 10x50
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 3
# Defines color of the frame around the notification window.
frame_color = "#aaaaaa"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
### Text ###
font = Monospace 8
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://docs.gtk.org/Pango/pango_markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Align icons left/right/top/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 0
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32
# Paths to default icons.
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/xdg-open
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
frame_color = "#1D918B"
foreground = "#FFEE79"
background = "#18191E"
timeout = 5
[urgency_normal]
frame_color = "#D16BB7"
foreground = "#FFEE79"
background = "#18191E"
timeout = 10
[urgency_critical]
frame_color = "#FC2929"
foreground = "#FFFF00"
background = "#18191E"
timeout = 10
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# icon_position
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
# hide_text
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

210
tree/.config/eww/eww.scss Normal file
View File

@ -0,0 +1,210 @@
$text: #e0c1c1;
//$highlight1: #fdab70; // orange
$highlight1: #f65d76; // akira pink
$highlight2: white;
$background: #151515;
$lowlight2: #272727;
$lowlight1: black;
$transparent: rgba(#000000, 0.0);
*{
all: unset;
font-family: "Sauce Code Pro Nerd Font Mono";
color: $text;
}
window {
}
.sidebar {
margin-top: 10px;
margin-left: 5px;
background: rgba($background, 1.0);
border-radius: 30px;
margin-bottom: 10px;
}
.workspace {
font-size: 18px;
font-weight: 400;
border: dashed $highlight1 2px;
background: $lowlight1;
border-radius: 30px;
padding-top: 3px;
padding-bottom: 5px;
margin-bottom: 6px;
transition: border-color 0.5s;
}
.workspace.active {
border: solid $highlight2 2px;
}
.workspace:hover {
background-color: $lowlight2;
}
.workspace:active {
background-color: $highlight2;
}
.workspaces {
margin-bottom: 10px;
}
.bottom {
//background-image: linear-gradient(to right, $transparent 40%, $highlight1 40%, $highlight1 60%, $transparent 60% );
margin-bottom: 2px;
}
.thingy {
padding-top: 8px;
padding-bottom: 8px;
min-height: 20px;
border-top: solid $highlight1 2px;
}
.bigthingy {
padding-top: 8px;
padding-bottom: 8px;
min-height: 20px;
border-top: solid $highlight1 2px;
font-size: 35px;
}
scale trough {
all: unset;
background-color: #22242b;
box-shadow: 0 0px 5px 1px #06060b;
border-radius: 16px;
min-width: 16px;
min-height: 70px;
margin: 0px 0px 0px 0px;
}
.volbox {
transition: all 0.5s;
}
.volbox.active {
background-color: $lowlight2;
}
.volume {
min-height: 150px;
}
.volume trough highlight {
background-image: linear-gradient(to right, $highlight2 30%, $highlight1 50%, $highlight1 100% *50);
border-radius: 10px;
}
.vpn {
font-size: 40px;
margin: 2px;
margin-top: -10px;
}
.vpn label {
margin-top: -5px;
margin-bottom: -5px;
transition: color 0.5s;
color: green;
}
.vpn:hover {
background-color: $lowlight2;
}
.vpn:active {
background-color: $highlight1;
}
.vpn.connecting label {
color: orange;
}
.vpn.disconnected label {
color: red;
}
.bluetooth {
}
.bluetooth.active {
}
.battery-gauge {
color: $highlight1;
transition: all 0.5s;
}
.battery-gauge.low {
color: red;
animation: 1s ease-in 1s infinite alternate battery-gauge-low;
}
.battery-gauge.charging {
color: purple;
}
@keyframes battery-gauge-low {
from {
background-color: $background;
}
to {
background-color: red;
}
}
.calendar {
background: $lowlight2;
}
.toggleable {
transition: border 0.5s;
}
.toggleable.on {
border-left: solid 2px green;
border-right: solid 2px green;
}
.clickable {
transition: background-color 0.2s;
}
.clickable:hover {
background-color: $lowlight2;
}
.clickable:active {
background-color: $highlight1;
}
.date {
transition: all 0.2s;
}
.clock {
font-size: 25px;
font-weight: 400;
color: $highlight1;
margin-bottom: -1px;
padding-top: 18px;
}
.clock label {
padding: 0;
margin-top: -8px;
}
.color_scheme {
}
.pwrbtn {
font-size: 35px;
font-weight: 400;
border-bottom-left-radius: 30px;
border-bottom-right-radius: 30px;
margin-bottom: -2px;
}

284
tree/.config/eww/eww.yuck Normal file
View File

@ -0,0 +1,284 @@
(defwindow bar0
:monitor 0
:geometry (geometry :height "100%"
:width "40px"
:anchor "center left")
:stacking "fg"
:exclusive true
(centerbox :orientation "v" :active true :class "sidebar"
(workspaces :monitor 0)
(middle)
(bottom)
))
(defwindow bar1
:monitor 1
:geometry (geometry :height "100%"
:width "40px"
:anchor "center left")
:stacking "fg"
:exclusive true
(centerbox :orientation "v" :active true :class "sidebar"
(workspaces :monitor 1)
(middle)
(bottom)
))
(defwidget middle []
(box :orientation "v"
:valign "center"
:space-evenly false
))
(defwidget bottom []
(box :orientation "v"
:valign "end"
:class "bottom"
:space-evenly false
(vpn)
(bluetooth)
(speaker)
(temperature)
(battery)
(ram)
(box :class "thingy" (systray :orientation "v"))
(color_scheme)
(xwayland)
(kb_layout)
(date)
(clock)
(notifications)
(lock)
))
(defwidget workspaces [monitor]
(box :orientation "v"
:valign "start"
:class "workspaces"
:space-evenly: false
; can't use a for loop here because that breaks css animations
(workspace :monitor monitor :n 1)
(workspace :monitor monitor :n 2)
(workspace :monitor monitor :n 3)
(workspace :monitor monitor :n 4)
(workspace :monitor monitor :n 5)
(workspace :monitor monitor :n 6)
(workspace :monitor monitor :n 7)
(workspace :monitor monitor :n 8)
(workspace :monitor monitor :n 9)
(workspace :monitor monitor :n 10)
(workspace :monitor monitor :n 11)
(workspace :monitor monitor :n 12)
))
(defwidget workspace [monitor n]
(button :visible {jq(workspaces, '.["${n}"] != null')}
:class 'workspace ${workspaces?.[n]?.active == true && monitor == workspaces?.[n]?.monitor ? "active" : ""}'
:onclick 'wmutils switch-workspace ${n}'
(label :text n))
)
(defwidget vpn []
(button :valign "end"
:class "vpn thingy ${vpn_status.class}"
:onclick "${vpn_status.on_click}"
:tooltip "${vpn_status.tooltip}"
(label :text "${vpn_status.icon}")
))
(defwidget bluetooth []
(eventbox :onhover "${EWW_CMD} update show_bluetooth=true"
:onhoverlost "${EWW_CMD} update show_bluetooth=false"
(box :orientation "v"
:class "thingy bluetooth ${show_bluetooth ? "active" : ""}"
:space-evenly false
(revealer :transition "slidedown"
:reveal show_bluetooth
(box :orientation "v"
(button :class "clickable" :onclick "ba lurar" (label :text "LUR"))
(button :class "clickable" :onclick "ba högtalare" (label :text "HÖG"))
(button :class "clickable" :onclick "ba bluetoothctl disconnect" (label :text "---"))
)
)
(label :text "BLU")
(revealer :transition "slideup"
:reveal {!show_bluetooth}
(label :text "---")
)
)))
(defwidget speaker []
(eventbox :onhover "${EWW_CMD} update show_volume=true"
:onhoverlost "${EWW_CMD} update show_volume=false"
(box :orientation "v"
:class "thingy volbox ${show_volume ? "active" : ""}"
:space-evenly false
(revealer :transition "slidedown"
:reveal show_volume
(scale :orientation "v"
:class "volume"
:flipped true
:min 0
:max 100
:value volume_out
:onchange "pamixer --set-volume {} && volshow"
))
(label :text "VOL")
(revealer :transition "slideup"
:reveal {!show_volume}
(label :text {is_muted ? "MM" : volume_out})
)
)))
(defwidget temperature []
(box :orientation "v"
:valign "end"
:class "battery thingy"
:visible {current_temp != ""}
(label :text "TEM")
(label :text "${current_temp / 1000}°")
))
(defwidget ram []
(box :orientation "v"
:valign "end"
:class "thingy"
(label :text "RAM")
(circular-progress
:thickness 4.0
:value {EWW_RAM.used_mem_perc}
:class {
EWW_RAM?.used_mem_perc > 80 ? "battery-gauge low" :
"battery-gauge"
}
)
))
(defwidget battery []
(box :orientation "v"
:valign "end"
:class "thingy"
:visible {EWW_BATTERY != "" && EWW_BATTERY?.BAT0?.capacity != ""}
(label :text "BAT")
(circular-progress
:thickness 4.0
:value {EWW_BATTERY != "" ? EWW_BATTERY?.BAT0?.capacity : 100.0}
:class {
EWW_BATTERY == "" ? "" :
EWW_BATTERY?.BAT0?.status == "Charging" ? "battery-gauge charging" :
EWW_BATTERY?.BAT0?.capacity < 15 ? "battery-gauge low" :
"battery-gauge"
}
)
))
(defwidget color_scheme []
(button
:onclick {
color_scheme == "light" ? "set-color-scheme dark && ${EWW_CMD} update color_scheme=dark"
: "set-color-scheme light && ${EWW_CMD} update color_scheme=light"
}
:hexpand true
:class "bigthingy clickable"
(label :text {
color_scheme == "light" ? "" : ""
})
))
(defwidget xwayland []
(button
:onclick {
xwayland_on ? "wmutils xwayland stop && ${EWW_CMD} update xwayland_on=false"
: "wmutils xwayland start && ${EWW_CMD} update xwayland_on=true"
}
:hexpand true
:class {"thingy clickable toggleable" + (xwayland_on ? " on" : "")}
(label :text "XWL")
))
(defwidget kb_layout []
(button :onclick "wmutils next-keyboard-layout"
:hexpand true
:class "thingy clickable"
(label :text keyboard_layout)
))
(defwidget date []
(tooltip :halign "fill"
(calendar :class "calendar")
(button :onclick "ba gnome-calendar"
:hexpand true
:class "thingy date clickable"
(box :orientation "v"
(label :text current_month)
(label :text current_day)
))))
(defwidget clock []
(box :orientation "v"
:valign "end"
:class "clock thingy"
(label :text current_hour)
(label :text current_minute)
))
(defwidget notifications []
(button :orientation "v"
:valign "end"
:onclick "swaync-client -t -sw"
:class "bigthingy clickable"
(label :text "🕭")
))
(defwidget lock []
(button :orientation "v"
:valign "end"
:class "bigthingy clickable"
:onclick "loginctl lock-session"
(label :text "󰩈")
))
(defwidget pwr []
(button :orientation "v"
:valign "end"
:class "bigthingy clickable"
:onclick "${EWW_CMD} open --toggle pwrctl"
(label :text "⏻")
))
(defwindow pwrctl
:monitor 0
:geometry (geometry :y "5%"
:x "20px"
:height "200px"
:width "300px"
:anchor "bottom left")
:stacking "fg"
;:exclusive true
(box :orientation "v"
:valign "end"
:class "thingy"
(label :text "SLEEP")
(label :text "OFF")
))
(defvar show_volume false)
(defvar show_bluetooth false)
(defpoll workspaces :interval "1s" "wmutils workspaces")
(defpoll volume_out :interval "1s" "pamixer --get-volume")
(defpoll color_scheme :interval "5s" "get-color-scheme")
(defpoll is_muted :interval "1s" :initial false "pamixer --get-mute")
(defpoll current_minute :interval "1s" "date +%M")
(defpoll current_hour :interval "1s" "date +%H")
(defpoll current_day :interval "60s" "date +%d")
(defpoll current_month :interval "60s" "date +%b")
(defpoll current_temp :interval "5s" "cat /sys/class/thermal/thermal_zone*/temp")
(defpoll keyboard_layout :interval "5s" "wmutils keyboard-layout --short")
(defpoll xwayland_on :interval "5s" "wmutils xwayland is-running")
(defvar vpn_status "{'icon': '-', 'class': 'disconnected'}" )

View File

@ -0,0 +1,23 @@
icon-theme=hicolor
lines=10
prompt="▶ "
width=32
font=FiraSans,Sans:size=18
line-height=27
[colors]
# akira pink
text=e0c1c1ff
background=151515aa
selection=282a36ff
match=ebebebff
selection-match=ffffffff
selection-text=d4d4d4ff
border=f65d76ff
[border]
width=3
radius=24

View File

@ -1,4 +1,4 @@
{% if hostname == "buran" %}
{% if hostname != "pinenote" %}
[Settings]
gtk-application-prefer-dark-theme = true
{% end %}

View File

@ -0,0 +1,5 @@
{% if hostname != "pinenote" %}
[Settings]
gtk-application-prefer-dark-theme = true
{% end %}

View File

@ -0,0 +1,21 @@
{% if light %}
theme = "gruvbox_light"
{% else %}
theme = "gruvbox"
{% end %}
[editor]
auto-format = true
#line-number = "relative"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[keys.select]
X = "extend_line_above" # Extend the selection with the line above the selection
[keys.normal]
X = "extend_line_above" # Extend the selection with the line above the selection
C-n = "extend_search_next" # Add next search result to selection

View File

@ -0,0 +1,6 @@
[[language]]
name = "rust"
diagnostic-severity = "info" # don't show hints
[language-server.qmlls]
command = "qmlls6"

View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -0,0 +1,18 @@
general {
lock_cmd = screenlock
unlock_cmd = pkill -USR1 swaylock
#before_sleep_cmd = notify-send "Zzz" # command ran before sleep
#after_sleep_cmd = notify-send "Awake!" # command ran after sleep
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
}
listener {
timeout = 585 # seconds
on-timeout = notify-set idle-lock -t 14000 "Idle" "Locking in 15s..."
on-resume = notify-set idle-lock -t 1000 "Idle" "Never mind."
}
listener {
timeout = 600 # seconds
on-timeout = loginctl lock-session
}

View File

@ -3,9 +3,6 @@
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
@ -20,7 +17,7 @@ env = XCURSOR_SIZE,24
env = PATH,$HOME/.local/bin:$HOME/.cargo/bin:$PATH
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_QPA_PLATFORMTHEME,qt5ct:qt6ct
env = GTK_USE_PORTAL,1
env = BROWSER,firefox
env = MOZ_ENABLE_WAYLAND,1
@ -31,7 +28,7 @@ input {
kb_layout = se
kb_variant =
kb_model =
kb_options = caps:escape
kb_options = caps:escape,altwin:swap_lalt_lwin
kb_rules =
follow_mouse = 1
@ -49,7 +46,8 @@ input {
}
# DIY keyboard config
device:tux-tangentbord1 {
device {
name = tux-tangentbord1
kb_layout = us
kb_variant =
kb_model =
@ -61,13 +59,10 @@ general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
{% if hostname == "sputnik" %}
gaps_out = 10
{% else %}
gaps_out = 20
{% end %}
gaps_out = 5
border_size = 2
col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg
#col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg orange
col.active_border = rgba(f65d76ff) rgba(f65d76ee) 45deg akira pink
col.inactive_border = rgba(595959aa)
layout = dwindle
@ -111,45 +106,90 @@ dwindle {
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# See https://wiki.hyprland.org/Configuring/Window-Rules/
windowrule=float,title:Volume
windowrule=size 300 100,title:Volume
windowrule=move 100%-375 75,title:Volume
windowrule=noanim,title:Volume
windowrule=rounding 35,title:Volume
windowrule=nofocus,title:Volume
windowrule=float,title:Volume Indicator
windowrule=size 300 100,title:Volume Indicator
windowrule=move 100%-375 75,title:Volume Indicator
windowrule=rounding 35,title:Volume Indicator
windowrule=nofocus,title:Volume Indicator
windowrule=float,title:Jitsi Meet
windowrule=move 100%-375 75,title:Jitsi Meet
windowrule=workspace 1,title:WORKSPACE 1
windowrule=workspace 2,title:WORKSPACE 2
windowrule=workspace 3,title:WORKSPACE 3
windowrule=workspace 4,title:WORKSPACE 4
windowrule=workspace 5,title:WORKSPACE 5
windowrule=workspace 6,title:WORKSPACE 6
windowrule=workspace 7,title:WORKSPACE 7
windowrule=workspace 8,title:WORKSPACE 8
windowrule=workspace 9,title:WORKSPACE 9
windowrule=workspace 10,title:WORKSPACE 10
windowrule=workspace 11,title:WORKSPACE 11
windowrule=workspace 12,title:WORKSPACE 12
windowrule=workspace 13,title:WORKSPACE 13
windowrule=workspace 14,title:WORKSPACE 14
windowrule=workspace 15,title:WORKSPACE 15
windowrule=workspace 16,title:WORKSPACE 16
windowrule=float,title:WORKSPACE 1
windowrule=float,title:WORKSPACE 2
windowrule=float,title:WORKSPACE 3
windowrule=float,title:WORKSPACE 4
windowrule=float,title:WORKSPACE 5
windowrule=float,title:WORKSPACE 6
windowrule=float,title:WORKSPACE 7
windowrule=float,title:WORKSPACE 8
windowrule=float,title:WORKSPACE 9
windowrule=float,title:WORKSPACE 10
windowrule=float,title:WORKSPACE 11
windowrule=float,title:WORKSPACE 12
windowrule=float,title:WORKSPACE 13
windowrule=float,title:WORKSPACE 14
windowrule=float,title:WORKSPACE 15
windowrule=float,title:WORKSPACE 16
windowrule=animation slide,title:WORKSPACE 1
windowrule=animation slide,title:WORKSPACE 2
windowrule=animation slide,title:WORKSPACE 3
windowrule=animation slide,title:WORKSPACE 4
windowrule=animation slide,title:WORKSPACE 5
windowrule=animation slide,title:WORKSPACE 6
windowrule=animation slide,title:WORKSPACE 7
windowrule=animation slide,title:WORKSPACE 8
windowrule=animation slide,title:WORKSPACE 9
windowrule=animation slide,title:WORKSPACE 10
windowrule=animation slide,title:WORKSPACE 11
windowrule=animation slide,title:WORKSPACE 12
windowrule=animation slide,title:WORKSPACE 13
windowrule=animation slide,title:WORKSPACE 14
windowrule=animation slide,title:WORKSPACE 15
windowrule=animation slide,title:WORKSPACE 16
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = ALT
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Return, exec, alacritty
bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit,
bind = $mainMod_SHIFT, L, exec, screenlock
bind = $mainMod_SHIFT, Q, killactive,
#bind = $mainMod, M, exit,
bind = $mainMod_SHIFT, Plus, exec, screenlock
#bind = $mainMod, E, exec, dolphin
bind = $mainMod, Space, togglefloating,
bind = $mainMod, D, exec, wofi --show drun
bind = $mainMod, D, exec, fuzzel
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, E, togglesplit, # dwindle
bind = $mainMod, F, fullscreen,
{% if hostname == "buran" %}
bindl=,switch:Lid Switch,exec,screenlock
{% end %}
bindl = , xf86audiolowervolume, exec, voldown
bindl = , xf86audioraisevolume, exec, volup
bindl = , xf86audiomute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
@ -160,6 +200,8 @@ bindl = , xf86audioplay, exec, playerctl play-pause
bindl = , xf86audionext, exec, playerctl next
bindl = , xf86audioprev, exec, playerctl previous
bind = , Print, exec, scap
# Move focus with mainMod + arrow keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
@ -167,16 +209,18 @@ bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Switch 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
# using wmutils instead of builtin workspace ensures eww-bar gets updated
# bind = $mainMod, 1, workspace, 1
bind = $mainMod, 1, exec, wmutils switch-workspace 1
bind = $mainMod, 2, exec, wmutils switch-workspace 2
bind = $mainMod, 3, exec, wmutils switch-workspace 3
bind = $mainMod, 4, exec, wmutils switch-workspace 4
bind = $mainMod, 5, exec, wmutils switch-workspace 5
bind = $mainMod, 6, exec, wmutils switch-workspace 6
bind = $mainMod, 7, exec, wmutils switch-workspace 7
bind = $mainMod, 8, exec, wmutils switch-workspace 8
bind = $mainMod, 9, exec, wmutils switch-workspace 9
bind = $mainMod, 0, exec, wmutils switch-workspace 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
@ -198,9 +242,15 @@ bind = $mainMod, mouse_up, workspace, e-1
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
monitor=eDP-1,3456x2160@60.00100,0x680,2.0
monitor=DP-1,5120x2160@59.98500,1728x450,1.3
monitor=DP-3,2560x1440@59.95100,5666x0,1.0,transform,3
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor =, preferred, auto, auto
{% if hostname == "sputnik" %}
monitor = desc:Microstep MSI MAG342CQR DB6H262101804, 3440x1440@100.00000, auto, auto
{% end %}
{% if hostname == "buran" %}
monitor = eDP-1, preferred, 3072x380, 1.8
monitor = eDP-2, preferred, 3072x380, 1.8
monitor = DP-2, 3840x1600@59.99400, 0x0, 1.25
# transform list
# normal (no transforms) -> 0
# 90 degrees -> 1
@ -210,6 +260,13 @@ monitor=DP-3,2560x1440@59.95100,5666x0,1.0,transform,3
# flipped + 90 degrees -> 5
# flipped + 180 degrees -> 6
# flipped + 270 degrees -> 7
{% end %}
exec-once=hyprpaper
exec-once=waybar
exec-once=swayidle
exec-once=dunst
exec-once=eww daemon
exec-once=eww open bar0
exec-once=nextcloud

View File

@ -0,0 +1,160 @@
general {
grace = 0
immediate_render = true
}
background {
monitor =
# make background transparent, used in combination with screenlock-video
#color = rgba(00000000)
path = ~/.config/wallpapers/6000x3376/akira.jpg
}
input-field {
monitor =
size = 300, 75
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = false
dots_rounding = -2 # -1 default circle, -2 follow input-field rounding
outer_color = rgb(f65d76) # akira pink
inner_color = rgb(151515)
font_color = rgb(e0c1c1)
fade_on_empty = false
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <b>PASS_</b> # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>ERR__</i> # can be set to empty
fail_timeout = 2000 # milliseconds before fail_text and fail_color disappears
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false
position = 0, -210
halign = center
valign = center
shadow_passes = 3
shadow_size = 10
shadow_boost = 1.2
}
# ferris image in the center
image {
monitor =
path = ~/.config/hypr/ferris-stamp.png
rounding = 0
size = 300
position = 0, 0
halign = center
valign = center
border_size = 0
shadow_passes = 3
shadow_size = 10
shadow_boost = 1.2
}
# clock
label {
monitor =
text = <b>$TIME</b>
text_align = left
color = rgba(ffffff69)
font_size = 160
font_family = Noto Sans
rotate = 0 # degrees, counter-clockwise
position = 0, -160
halign = center
valign = top
shadow_passes = 4
shadow_size = 1
shadow_boost = 1.3
}
# battery
label {
monitor =
text = cmd[update:5000] wmutils battery
text_align = left
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = Noto Sans
rotate = 0 # degrees, counter-clockwise
position = 24, -20
halign = left
valign = top
shadow_passes = 2
shadow_size = 1
shadow_boost = 1.1
}
# keyboard layout
label {
monitor =
text = $LAYOUT
text_align = right
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = Noto Sans
rotate = 0 # degrees, counter-clockwise
position = -24, -20
halign = right
valign = top
shadow_passes = 2
shadow_size = 1
shadow_boost = 1.1
}
# greeting text
label {
monitor =
text = GREET_ $user
text_align = center
color = rgba(200, 200, 200, 1.0)
font_size = 25
font_family = Noto Sans
rotate = 0 # degrees, counter-clockwise
position = 0, 210
halign = center
valign = center
shadow_passes = 2
shadow_size = 1
shadow_boost = 1.3
}
# number of login attempts
label {
monitor =
text = $ATTEMPTS[0]x $FAIL
text_align = center
color = rgba(200, 200, 200, 1.0)
font_size = 28
font_family = Noto Sans
rotate = 0 # degrees, counter-clockwise
position = 0, 160
halign = center
valign = bottom
shadow_passes = 2
shadow_size = 2
shadow_boost = 1.3
}

View File

@ -1,2 +1,2 @@
preload = ~/.config/wallpapers/2560x1440/rocket.jpg
wallpaper = ,~/.config/wallpapers/2560x1440/rocket.jpg
preload = ~/.config/wallpapers/6000x3376/akira.jpg
wallpaper = ,~/.config/wallpapers/6000x3376/akira.jpg

View File

@ -0,0 +1,541 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
environment {
DISPLAY ":0"
ELECTRON_OZONE_PLATFORM_HINT "auto"
QT_QPA_PLATFORMTHEME "qt5ct"
}
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
layout "se,us"
options "caps:escape,compose:menu"
}
}
// Focus windows and outputs automatically when moving the mouse into them.
focus-follows-mouse max-scroll-amount="0%"
{% if hostname == "sputnik" %}
tablet {
map-to-output "Microstep MSI MAG342CQR DB6H262101804"
}
{% end %}
}
clipboard {
disable-primary // disable middle-click paste
}
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// `niri msg outputs`
output "Microstep MSI MAG342CQR DB6H262101804" {
mode "3440x1440@144.000"
position x=1152 y=387
scale 1.25
}
output "Dell Inc. DELL U2724DE 1MV5L04" {
mode "2560x1440@120.000"
position x=0 y=0
transform "270"
scale 1.25
// layout {
// gaps 0
// }
}
output "eDP-1" {
scale 1.8
// position x=0 y=0
}
output "DP-2" {
scale 1.25
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
{% if hostname == "sputnik" %}
gaps 2 // TODO: fix output-specific layout
{% else %}
gaps 12
{% end %}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixls.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
left -12
right -12
top -12
bottom -12
}
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
fixed 948 // roughly fits a single vim buffer
//proportion 0.33333
proportion 0.5
proportion 0.66667
}
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
focus-ring {
off
}
shadow {
on
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
width 2
active-color "#f65d76" // akira pink
inactive-color "#505050"
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
}
spawn-at-startup "hyprpaper"
spawn-at-startup "swayidle" "-w" // ~/.config/swayidle/config
spawn-at-startup "qs" "-p" "/etc/quickshell/niri-caelestia-shell"
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some rounded corners.
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/screenshots/%Y-%m-%d_%H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
animations {
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
workspace-switch {
spring damping-ratio=0.8 stiffness=500 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.8 stiffness=500 epsilon=0.0001
}
window-resize {
spring damping-ratio=0.5 stiffness=500 epsilon=0.0001
}
window-open {
duration-ms 600
custom-shader r#"
// make the window fall into place with a slight rotation
vec4 slide_in_from_right(vec3 coords_geo, vec3 size_geo) {
// For this shader, set animation curve to linear for best results.
// Simulate decelleration: square the (linear) progress.
float progress = 1.0 - niri_clamped_progress * niri_clamped_progress;
// Get our rotation pivot point coordinates at the bottom center of the window.
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
// Move the window in from the right
coords.x -= progress * 200.0;
// Randomize rotation direction and maximum angle.
float random = (niri_random_seed - 0.5) / 2.0;
random = sign(random) - random;
float max_angle = 0.05 * random;
// Rotate the window around our pivot point.
float angle = progress * max_angle;
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
coords = rotate * coords;
// Transform the coordinates back.
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
// Sample the window texture.
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
// Multiply by alpha to fade out.
return color * niri_clamped_progress;
}
// this is the main function
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return slide_in_from_right(coords_geo, size_geo);
}
"#
}
window-close {
duration-ms 600
custom-shader r#"
// make the window "fall down" with slight rotation.
vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {
// For this shader, set animation curve to linear for best results.
// Simulate an accelerated fall: square the (linear) progress.
float progress = niri_clamped_progress * niri_clamped_progress;
// Get our rotation pivot point coordinates at the bottom center of the window.
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
// Move the window down to simulate a fall.
coords.y -= progress * 200.0;
// Randomize rotation direction and maximum angle.
float random = (niri_random_seed - 0.5) / 2.0;
random = sign(random) - random;
float max_angle = 0.05 * random;
// Rotate the window around our pivot point.
float angle = progress * max_angle;
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
coords = rotate * coords;
// Transform the coordinates back.
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
// Sample the window texture.
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
// Multiply by alpha to fade out.
return color * (1.0 - niri_clamped_progress);
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return fall_and_rotate(coords_geo, size_geo);
}
"#
}
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
window-rule {
geometry-corner-radius 22
clip-to-geometry true
}
// Indicate screencasted windows with red colors.
window-rule {
match is-window-cast-target=true
focus-ring {
active-color "#f38ba8"
inactive-color "#7d0d2d"
}
border {
inactive-color "#7d0d2d"
}
shadow {
color "#7d0d2d70"
}
tab-indicator {
active-color "#f38ba8"
inactive-color "#7d0d2d"
}
}
window-rule {
match title="Volume Indicator"
geometry-corner-radius 35
min-width 300
max-width 300
min-height 100
max-height 100
open-floating true
default-floating-position x=35 y=35 relative-to="top-right"
}
window-rule {
match app-id="Mullvad VPN"
default-floating-position x=5 y=10 relative-to="bottom-left"
}
// block out password managers from screen capture.
window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
}
window-rule {
match title="Virtual Machine Manager"
match app-id="virt-manager"
//max-width 400
}
window-rule {
match app-id="com.nextcloud.desktopclient.nextcloud"
open-floating true
default-floating-position x=5 y=10 relative-to="bottom-left"
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Plus { show-hotkey-overlay; }
Mod+Return { spawn "ghostty"; }
Mod+Plus { spawn "loginctl" "lock-session"; }
// TODO: why do i have to use spawn-sh?
Mod+D { spawn "qs" "-p" "/etc/quickshell/niri-caelestia-shell" "ipc" "call" "drawers" "toggle" "launcher"; }
// You can also use a shell:
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--min-value=10" "set" "10%-"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--min-value=10" "set" "+10%"; }
Mod+Q { close-window; }
Mod+Space { switch-focus-between-floating-and-tiling; }
Mod+Ctrl+Space { toggle-window-floating; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-or-workspace-down; }
Mod+K { focus-window-or-workspace-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Ctrl+L { move-column-right; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
Mod+Backspace { toggle-overview; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { spawn "wmutils" "switch-workspace" "1"; }
Mod+2 { spawn "wmutils" "switch-workspace" "2"; }
Mod+3 { spawn "wmutils" "switch-workspace" "3"; }
Mod+4 { spawn "wmutils" "switch-workspace" "4"; }
Mod+5 { spawn "wmutils" "switch-workspace" "5"; }
Mod+6 { spawn "wmutils" "switch-workspace" "6"; }
Mod+7 { spawn "wmutils" "switch-workspace" "7"; }
Mod+8 { spawn "wmutils" "switch-workspace" "8"; }
Mod+9 { spawn "wmutils" "switch-workspace" "9"; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
Mod+Comma { consume-window-into-column; }
Mod+Period { expel-window-from-column; }
Mod+W { toggle-column-tabbed-display; }
// There are also commands that consume or expel a single window to the side.
// Mod+BracketLeft { consume-or-expel-window-left; }
// Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// Switch to the next keyboard layout
Mod+Tab { spawn "wmutils" "next-keyboard-layout"; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
// Mod+Shift+P { power-off-monitors; }
// Dynamic screencasting target
Mod+Slash { clear-dynamic-cast-target; }
Mod+Ctrl+Slash { set-dynamic-cast-window; }
Mod+Shift+Slash { set-dynamic-cast-monitor; }
// Debugging
Mod+Shift+Ctrl+T { toggle-debug-tint; }
Mod+Shift+Ctrl+O { debug-toggle-opaque-regions; }
Mod+Shift+Ctrl+D { debug-toggle-damage; }
}

View File

@ -6,183 +6,32 @@
# https://www.nushell.sh/book/coloring_and_theming.html
# And here is the theme collection
# https://github.com/nushell/nu_scripts/tree/main/themes
let dark_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
bool: {|| if $in { 'light_cyan' } else { 'light_gray' } }
int: white
filesize: {|e|
if $e == 0b {
'white'
} else if $e < 1mb {
'cyan'
} else { 'blue' }
let fish_completer = {|spans|
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
| from tsv --flexible --noheaders --no-infer
| rename value description
| update value {|row|
let value = $row.value
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
if ($need_quote and ($value | path exists)) {
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
$'"($expanded_path | str replace --all "\"" "\\\"")"'
} else {$value}
}
duration: white
date: {|| (date now) - $in |
if $in < 1hr {
'purple'
} else if $in < 6hr {
'red'
} else if $in < 1day {
'yellow'
} else if $in < 3day {
'green'
} else if $in < 1wk {
'light_green'
} else if $in < 6wk {
'cyan'
} else if $in < 52wk {
'blue'
} else { 'dark_gray' }
}
range: white
float: white
string: white
nothing: white
binary: white
cellpath: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
search_result: {bg: red fg: white}
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
let light_theme = {
# color for nushell primitives
separator: dark_gray
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
bool: {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
int: dark_gray
filesize: {|e|
if $e == 0b {
'dark_gray'
} else if $e < 1mb {
'cyan_bold'
} else { 'blue_bold' }
}
duration: dark_gray
date: {|| (date now) - $in |
if $in < 1hr {
'purple'
} else if $in < 6hr {
'red'
} else if $in < 1day {
'yellow'
} else if $in < 3day {
'green'
} else if $in < 1wk {
'light_green'
} else if $in < 6wk {
'cyan'
} else if $in < 52wk {
'blue'
} else { 'dark_gray' }
}
range: dark_gray
float: dark_gray
string: dark_gray
nothing: dark_gray
binary: dark_gray
cellpath: dark_gray
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
search_result: {fg: white bg: red}
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
source theme.nu
# External completer example
# let carapace_completer = {|spans|
# carapace $spans.0 nushell $spans | from json
# }
# The default config record. This is where much of your global configuration is setup.
$env.config = {
show_banner: true # true or false to enable or disable the welcome banner at startup
show_banner: false
display_errors: {
exit_code: false # assume the external command prints an error message
# Core dump errors are always printed, and SIGPIPE never triggers an error.
# The setting below controls message printing for termination by all other signals.
termination_signal: true
}
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
@ -260,13 +109,12 @@ $env.config = {
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
completer: $fish_completer
}
}
filesize: {
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
unit: "binary" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
}
cursor_shape: {
@ -275,15 +123,14 @@ $env.config = {
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
}
color_config: {} # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto
# sourced from theme.nu
color_config: $color_config
footer_mode: 25 # always, never, number_of_rows, auto
float_precision: 2 # the precision for displaying floats in tables
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
use_ansi_coloring: true
bracketed_paste: true # enable bracketed paste, currently useless on windows
edit_mode: vi # emacs, vi
shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this.
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
hooks: {
@ -821,11 +668,20 @@ alias gp = git push
alias gpu = git push -u origin
alias gsta = git stash push
alias gstp = git stash pop
alias gw = git switch
alias lg = lazygit
alias bt = bluetoothctl
alias d = cd ~/.config/dotfiles/tree
alias xo = xdg-open
# random scripts
source ~/.local/nu/readelf.nu
source ~/.local/nu/mullvad.nu
source ~/.local/nu/git.nu
source ~/.local/nu/tailscale.nu
{% if os == "darwin" %}
source ~/.local/nu/macos.nu
{% end %}
# init zoxide
source ~/.cache/zoxide.nu

View File

@ -78,13 +78,34 @@ $env.NU_PLUGIN_DIRS = [
# ($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
]
$env.PATH = ($env.PATH | split row (char esep) | prepend [($env.HOME + "/.local/bin"), ($env.HOME + "/.cargo/bin")])
if XDG_CONFIG_HOME not-in $env {
$env.XDG_CONFIG_HOME = $"($env.HOME)/.config"
}
$env.PATH = ($env.PATH | split row (char esep) | prepend [
($env.HOME + "/.local/bin"),
($env.HOME + "/.cargo/bin"),
($env.HOME + "/.radicle/bin"),
($env.HOME + "/.volta/bin"),
($env.HOME + "/.orbstack/bin"), # docker on macos
])
# auto-detect which ssh-agent to use
if ("XDG_RUNTIME_DIR" in $env) {
if (which tkey-ssh-agent | is-empty) {
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent.socket"
} else {
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/tkey-ssh-agent/sock"
}
}
$env.GPG_TTY = (tty)
$env.BROWSER = "firefox"
$env.EDITOR = "nvim"
$env.EDITOR = "helix"
$env.DEFMT_LOG = "info"
$env.MOZ_ENABLE_WAYLAND = "1"
$env.VOLTA_HOME = $"($env.HOME)/.volta"
$env.CARGO_TARGET_DIR = $"($env.HOME)/.cargo/target"
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

View File

@ -0,0 +1,175 @@
# gruvbox-dark
let dark_theme = {
separator: "#a89984"
leading_trailing_space_bg: { attr: "n" }
header: { fg: "#98971a" attr: "b" }
empty: "#458588"
bool: {|| if $in { "#8ec07c" } else { "light_gray" } }
int: "#a89984"
filesize: {|e|
if $e == 0b {
"#a89984"
} else if $e < 1mb {
"#689d6a"
} else {{ fg: "#458588" }}
}
duration: "#a89984"
date: {|| (date now) - $in |
if $in < 1hr {
{ fg: "#cc241d" attr: "b" }
} else if $in < 6hr {
"#cc241d"
} else if $in < 1day {
"#d79921"
} else if $in < 3day {
"#98971a"
} else if $in < 1wk {
{ fg: "#98971a" attr: "b" }
} else if $in < 6wk {
"#689d6a"
} else if $in < 52wk {
"#458588"
} else { "dark_gray" }
}
range: "#a89984"
float: "#a89984"
string: "#a89984"
nothing: "#a89984"
binary: "#a89984"
cellpath: "#a89984"
row_index: { fg: "#98971a" attr: "b" }
record: "#a89984"
list: "#a89984"
block: "#a89984"
hints: "dark_gray"
search_result: { fg: "#cc241d" bg: "#a89984" }
shape_and: { fg: "#b16286" attr: "b" }
shape_binary: { fg: "#b16286" attr: "b" }
shape_block: { fg: "#458588" attr: "b" }
shape_bool: "#8ec07c"
shape_custom: "#98971a"
shape_datetime: { fg: "#689d6a" attr: "b" }
shape_directory: "#689d6a"
shape_external: "#689d6a"
shape_externalarg: { fg: "#98971a" attr: "b" }
shape_filepath: "#689d6a"
shape_flag: { fg: "#458588" attr: "b" }
shape_float: { fg: "#b16286" attr: "b" }
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
shape_globpattern: { fg: "#689d6a" attr: "b" }
shape_int: { fg: "#b16286" attr: "b" }
shape_internalcall: { fg: "#689d6a" attr: "b" }
shape_list: { fg: "#689d6a" attr: "b" }
shape_literal: "#458588"
shape_match_pattern: "#98971a"
shape_matching_brackets: { attr: "u" }
shape_nothing: "#8ec07c"
shape_operator: "#d79921"
shape_or: { fg: "#b16286" attr: "b" }
shape_pipe: { fg: "#b16286" attr: "b" }
shape_range: { fg: "#d79921" attr: "b" }
shape_record: { fg: "#689d6a" attr: "b" }
shape_redirection: { fg: "#b16286" attr: "b" }
shape_signature: { fg: "#98971a" attr: "b" }
shape_string: "#98971a"
shape_string_interpolation: { fg: "#689d6a" attr: "b" }
shape_table: { fg: "#458588" attr: "b" }
shape_variable: "#b16286"
background: "#282828"
foreground: "#ebdbb2"
cursor: "#ebdbb2"
}
# gruvbox-light-hard
let light_theme = {
separator: "#504945"
leading_trailing_space_bg: { attr: "n" }
header: { fg: "#79740e" attr: "b" }
empty: "#076678"
bool: {|| if $in { "#427b58" } else { "light_gray" } }
int: "#504945"
filesize: {|e|
if $e == 0b {
"#504945"
} else if $e < 1mb {
"#427b58"
} else {{ fg: "#076678" }}
}
duration: "#504945"
date: {|| (date now) - $in |
if $in < 1hr {
{ fg: "#9d0006" attr: "b" }
} else if $in < 6hr {
"#9d0006"
} else if $in < 1day {
"#b57614"
} else if $in < 3day {
"#79740e"
} else if $in < 1wk {
{ fg: "#79740e" attr: "b" }
} else if $in < 6wk {
"#427b58"
} else if $in < 52wk {
"#076678"
} else { "dark_gray" }
}
range: "#504945"
float: "#504945"
string: "#504945"
nothing: "#504945"
binary: "#504945"
cellpath: "#504945"
row_index: { fg: "#79740e" attr: "b" }
record: "#504945"
list: "#504945"
block: "#504945"
hints: "dark_gray"
search_result: { fg: "#9d0006" bg: "#504945" }
shape_and: { fg: "#8f3f71" attr: "b" }
shape_binary: { fg: "#8f3f71" attr: "b" }
shape_block: { fg: "#076678" attr: "b" }
shape_bool: "#427b58"
shape_custom: "#79740e"
shape_datetime: { fg: "#427b58" attr: "b" }
shape_directory: "#427b58"
shape_external: "#427b58"
shape_externalarg: { fg: "#79740e" attr: "b" }
shape_filepath: "#427b58"
shape_flag: { fg: "#076678" attr: "b" }
shape_float: { fg: "#8f3f71" attr: "b" }
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
shape_globpattern: { fg: "#427b58" attr: "b" }
shape_int: { fg: "#8f3f71" attr: "b" }
shape_internalcall: { fg: "#427b58" attr: "b" }
shape_list: { fg: "#427b58" attr: "b" }
shape_literal: "#076678"
shape_match_pattern: "#79740e"
shape_matching_brackets: { attr: "u" }
shape_nothing: "#427b58"
shape_operator: "#b57614"
shape_or: { fg: "#8f3f71" attr: "b" }
shape_pipe: { fg: "#8f3f71" attr: "b" }
shape_range: { fg: "#b57614" attr: "b" }
shape_record: { fg: "#427b58" attr: "b" }
shape_redirection: { fg: "#8f3f71" attr: "b" }
shape_signature: { fg: "#79740e" attr: "b" }
shape_string: "#79740e"
shape_string_interpolation: { fg: "#427b58" attr: "b" }
shape_table: { fg: "#076678" attr: "b" }
shape_variable: "#8f3f71"
background: "#f9f5d7"
foreground: "#504945"
cursor: "#504945"
}
{% if light %}
let color_config = $light_theme
$env.LS_COLORS = (vivid generate gruvbox-light-hard | str trim)
{% else %}
let color_config = $dark_theme
$env.LS_COLORS = (vivid generate gruvbox-dark | str trim)
{% end %}

View File

@ -1,14 +1,93 @@
vim.g.mapleader = " "
vim.g.localleader = "\\"
-- Install Lazy
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)
-- TODO: get colored renders working
vim.g.rustaceanvim = {
-- Plugin configuration
tools = {
float_win_config = { border = 'rounded' },
},
-- LSP configuration
server = {
on_attach = function(client, bufnr)
vim.keymap.set('n', '<leader>lg', pick_rust_target,
{ desc = "Pick Target (Rust)", buffer = bufnr })
vim.keymap.set('n', "<leader>a", function() vim.cmd.RustLsp('codeAction') end,
{ desc = "Code Action (Rust)", buffer = bufnr })
vim.keymap.set('n', "<leader>e", function() vim.cmd.RustLsp('renderDiagnostic', 'current') end,
{ desc = "Render Diagnostic", buffer = bufnr })
end,
default_settings = {
['rust-analyzer'] = {
checkOnSave = true,
check = {
overrideCommand = {
"cargo", "check", "--message-format=json-diagnostic-rendered-ansi",
}
},
},
},
settings = function(project_root)
local ra = require('rustaceanvim.config.server')
local settings = ra.load_rust_analyzer_settings(project_root, {
settings_file_pattern = 'rust-analyzer.json'
})
-- override default target (if `set_rust_target` has been called)
local rust_target = vim.g["rust-analyzer-target"]
if rust_target then
settings["rust-analyzer"]["cargo"] = { target = rust_target }
end
vim.g["rust-analyzer-target-test"] = settings
return settings
end,
},
-- DAP configuration
dap = {},
}
require('plugins')
require('vars')
require('opts')
require('fns')
require('keys')
require('theme')
require('statusline')
--require('debugger') -- TODO:
-- Mason Setup
local language_servers = {
"pylsp",
"eslint",
"cssls",
"jsonls",
"ts_ls",
"gopls",
"wgsl_analyzer",
}
require("mason").setup({
ui = {
icons = {
@ -16,57 +95,50 @@ require("mason").setup({
package_pending = "",
package_uninstalled = "",
},
}
},
ensure_installed = language_servers,
})
require("mason-lspconfig").setup()
require("mason-lspconfig").setup {
automatic_enable = {
exclude = {
-- rust_analyzer is managed by rustaceanvim
"rust_analyzer",
}
}
}
local rt = require("rust-tools")
local lspconfig = require("lspconfig")
for _, l in pairs(language_servers) do
lspconfig[l].setup {}
end
rt.setup({
server = {
on_attach = function(_, bufnr)
-- Hover actions
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
require('dapui').setup();
local compare = require "cmp.config.compare"
require('cmp').setup.filetype({ "rust" }, {
sorting = {
priority_weight = 2,
comparators = {
-- deprioritize `.box`, `.mut`, etc.
require("cmp-rust").deprioritize_postfix,
-- deprioritize `Borrow::borrow` and `BorrowMut::borrow_mut`
require("cmp-rust").deprioritize_borrow,
-- deprioritize `Deref::deref` and `DerefMut::deref_mut`
require("cmp-rust").deprioritize_deref,
-- deprioritize `Into::into`, `Clone::clone`, etc.
require("cmp-rust").deprioritize_common_traits,
compare.offset,
compare.exact,
compare.score,
--compare.recently_used,
compare.locality,
compare.sort_text,
compare.length,
compare.order,
},
},
})
-- -- LSP Diagnostics Options Setup
-- local sign = function(opts)
-- vim.fn.sign_define(opts.name, {
-- texthl = opts.name,
-- text = opts.text,
-- numhl = ''
-- })
-- end
--
-- sign({name = 'DiagnosticSignError', text = ''})
-- sign({name = 'DiagnosticSignWarn', text = ''})
-- sign({name = 'DiagnosticSignHint', text = ''})
-- sign({name = 'DiagnosticSignInfo', text = ''})
--
-- vim.diagnostic.config({
-- virtual_text = false,
-- signs = true,
-- update_in_insert = true,
-- underline = true,
-- severity_sort = false,
-- float = {
-- border = 'rounded',
-- source = 'always',
-- header = '',
-- prefix = '',
-- },
-- })
--
-- vim.cmd([[
-- set signcolumn=yes
-- autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
-- ]])
-- Format file on save
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]

View File

@ -0,0 +1,5 @@
{% if light %}
vim.o.background = "light"
{% else %}
vim.o.background = "dark"
{% end %}

View File

@ -0,0 +1,176 @@
local dap = require('dap')
local codelldb_bin = "/usr/bin/codelldb"
-- Rust, C++, C
dap.adapters.codelldb = {
type = 'server',
port = "${port}",
executable = {
command = codelldb_bin,
args = { "--port", "${port}" },
}
}
local function get_default_rust_program_path()
local workspace = vim.fn.getcwd()
local program_name = vim.fn.fnamemodify(workspace, ":t")
return workspace .. '/target/debug/' .. program_name
end
dap.configurations.cpp = {
{
port = 1234,
host = '127.0.0.1',
name = "Attach to name",
type = "codelldb",
request = "attach",
pid = function()
-- Lets user enter the name of a running process instead of looking up the pid themselves
local name = vim.fn.input('Enter pidof name: ')
local handle = io.popen("pidof " .. name)
local pid = handle:read("*a")
handle:close()
-- Trim the result
pid = pid:match("^%s*(.-)%s*$")
return pid
end,
stopOnEntry = true,
},
{
port = 1234,
host = '127.0.0.1',
name = "Attach to PID",
type = "codelldb",
request = "attach",
pid = function()
return tonumber(vim.fn.input('Enter PID: '))
end,
stopOnEntry = true,
},
{
port = 1234,
host = '127.0.0.1',
name = "Manually launch file",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = true,
},
{
-- To debug programs that need to run as root you can run a remote lldb-server as root
-- sudo lldb-server platform --server --listen '*:1234'
name = "Remote attach to name",
type = "codelldb",
request = "attach",
pid = function()
-- Lets user enter the name of a running process instead of looking up the pid themselves
local name = vim.fn.input('Enter pidof name: ')
local handle = io.popen("pidof " .. name)
local pid = handle:read("*a")
handle:close()
-- Trim the result
pid = pid:match("^%s*(.-)%s*$")
return pid
end,
initCommands = {
"platform select remote-linux",
"platform connect connect://127.0.0.1:1234",
"settings set target.inherit-env false",
},
},
{
-- To debug programs that need to run as root you can run a remote lldb-server as root
-- sudo lldb-server platform --server --listen '*:1234'
name = "Remote launch",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
initCommands = {
"platform select remote-linux",
"platform connect connect://127.0.0.1:1234",
"settings set target.inherit-env false",
},
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
-- Insert this config as a rust specific one before the C++ configs
table.insert(dap.configurations.rust, 1, {
port = 1234,
host = '127.0.0.1',
name = "Launch Default Rust Program",
type = "codelldb",
request = "launch",
program = get_default_rust_program_path,
cwd = '${workspaceFolder}',
stopOnEntry = true,
})
-- Python
--dap.adapters.python = function(cb, config)
-- if config.request == 'attach' then
-- ---@diagnostic disable-next-line: undefined-field
-- local port = (config.connect or config).port
-- ---@diagnostic disable-next-line: undefined-field
-- local host = (config.connect or config).host or '127.0.0.1'
-- cb({
-- type = 'server',
-- port = assert(port, '`connect.port` is required for a python `attach` configuration'),
-- host = host,
-- options = {
-- source_filetype = 'python',
-- },
-- })
-- else
-- local home = os.getenv("HOME")
-- cb({
-- type = 'executable',
-- -- You need to install debugpy in $HOME/.virtualenvs/
-- -- Like this:
-- -- $ mkdir .virtualenvs
-- -- $ cd .virtualenvs
-- -- $ python -m venv debugpy
-- -- $ debugpy/bin/python -m pip install debugpy
-- command = home .. '/.virtualenvs/debugpy/bin/python',
-- args = { '-m', 'debugpy.adapter' },
-- options = {
-- source_filetype = 'python',
-- },
-- })
-- end
--end
--dap.configurations.python = {
-- {
-- -- The first three options are required by nvim-dap
-- type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
-- request = 'launch';
-- name = "Launch file";
--
-- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
--
-- program = "${file}"; -- This configuration will launch the current file if used.
-- pythonPath = function()
-- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
-- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
-- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
-- local cwd = vim.fn.getcwd()
-- if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
-- return cwd .. '/venv/bin/python'
-- elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
-- return cwd .. '/.venv/bin/python'
-- else
-- return '/usr/bin/python'
-- end
-- end;
-- },
--}

View File

@ -0,0 +1,26 @@
-- change rust-analyzer target and restart
set_rust_target = function(target)
vim.g["rust-analyzer-target"] = target
vim.cmd("RustAnalyzer restart")
print("rust-analyzer.cargo.target = " .. target)
end
pick_rust_target = function(opts)
opts = opts or {}
require("telescope.pickers").new(opts, {
prompt_title = "rustup target list --installed",
finder = require("telescope.finders").new_oneshot_job({ "rustup", "target", "list", "--installed" }, opts ),
sorter = require("telescope.config").values.generic_sorter(opts),
attach_mappings = function(prompt_bufnr, map)
local actions = require("telescope.actions")
actions.select_default:replace(function()
actions.close(prompt_bufnr)
local selection = require("telescope.actions.state").get_selected_entry()
set_rust_target(selection[1])
end)
return true
end,
}):find()
end

View File

@ -1,7 +1,146 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>fs', builtin.treesitter, {}) -- find symbols
vim.keymap.set('n', 'U', ":redo<Enter>", {}) -- find symbols
local telescope = require('telescope.builtin')
local wk = require('which-key')
local harpoon = require("harpoon")
local telescope_conf = require("telescope.config").values
harpoon:setup()
vim.keymap.set('n', '<leader>f', telescope.find_files, { desc = "File picker" })
vim.keymap.set('n', '<leader>g', telescope.live_grep, { desc = "Grep recursively" })
vim.keymap.set('n', '<leader>b', telescope.buffers, { desc = "Buffer picker" })
vim.keymap.set('n', '<leader>?', telescope.help_tags, { desc = "Help tags picker" })
vim.keymap.set('n', '<leader>s', telescope.treesitter, { desc = "Treesitter symbol picker" })
vim.keymap.set('n', '<leader>j', telescope.jumplist, { desc = "Jumplist" })
vim.keymap.set('n', '<leader>u', ":TodoTelescope<Enter>", { desc = "Grep for TODOs" })
vim.keymap.set('n', 'U', ":redo<Enter>", {})
vim.keymap.set('n', '<leader>p', ":b#<Enter>", { desc = "Go to last buffer" })
local function toggle_telescope(harpoon_files)
local displayer = require("telescope.pickers.entry_display").create({
separator = " | ",
items = {
--{ width = 0.1 },
{ width = 0.9 },
}
})
local harpoons = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(harpoons, {
filepath = item.value,
col = item.context.col,
row = item.context.row,
})
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = harpoons,
entry_maker = function(entry)
--vim.print("mapping entry")
--vim.print(entry)
local filepath_with_row = string.format("%s:%d", entry.filepath, entry.row)
return {
-- Value to display. Required. type=any
--value = { "foo", entry.filepath, },
value = entry,
-- Whether to display the entry. Optional. type=bool
valid = true,
-- Optional. type=string|function
--display = entry.filepath,
display = function(entry)
return displayer({
-- NOTE: the number of elements must match the
-- configuration passed to `displayer` above
--{ "foobar" },
{ filepath_with_row }
})
end,
-- Used for filtering. Optional. type=string
ordinal = filepath_with_row,
-- File to open when pressing enter. Optional. type=string
filename = entry.filepath,
-- Buffer to open when pressing enter. Optional. type=number
-- bufnr = 0,
-- Line number of file/buffer to open. Optional. type=number
lnum = entry.row,
-- Line number of file/buffer to open. Optional. type=number
col = entry.row,
}
end
}),
previewer = telescope_conf.grep_previewer({}),
sorter = telescope_conf.generic_sorter({}),
}):find()
end
vim.keymap.set("n", "<leader>h", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window" })
vim.keymap.set("n", "<leader>H", function() harpoon:list():add() end,
{ desc = "Launch harpoon" })
-- Toggle previous & next buffers stored within Harpoon list
--vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
--vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
vim.keymap.set('n', '<leader>ld', telescope.lsp_definitions, { desc = "Show definitons", buffer = ev.buf })
vim.keymap.set('n', '<leader>lr', telescope.lsp_references, { desc = "Show references", buffer = ev.buf })
vim.keymap.set('n', '<leader>li', telescope.lsp_implementations,
{ desc = "Show implementations", buffer = ev.buf })
vim.keymap.set('n', '<leader>lt', telescope.lsp_type_definitions,
{ desc = "Show type definitions", buffer = ev.buf })
vim.keymap.set('n', '<leader>le', telescope.diagnostics, { desc = "Show diagnostics", buffer = ev.buf })
vim.keymap.set('n', '<leader>ls', telescope.lsp_workspace_symbols,
{ desc = "Show workspace symbols", buffer = ev.buf })
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = ev.buf })
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, { buffer = ev.buf })
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder,
{ desc = "Add workspace folder", buffer = ev.buf })
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder,
{ desc = "Remove workspace folder", buffer = ev.buf })
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, { desc = "List workspace folders", buffer = ev.buf })
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol", buffer = ev.buf })
vim.keymap.set('n', "<leader>a", vim.lsp.buf.code_action, { desc = "Code Action", buffer = ev.buf })
wk.add({
{ "<leader>l", desc = "Language server stuff" },
{ "<leader>w", desc = "Workspace stuff" },
})
end,
})
--local rust_tools = require("rust-tools")
--rust_tools.setup({
-- server = {
-- on_attach = function(_, bufnr)
-- -- Hover actions
-- vim.keymap.set("n", "<C-space>", rust_tools.hover_actions.hover_actions, { buffer = bufnr })
-- -- Code action groups
-- vim.keymap.set("n", "<leader>a", rust_tools.code_action_group.code_action_group, { desc = "Code actions", buffer = bufnr })
-- end,
-- settings = {
-- ["rust-analyzer"] = {},
-- }
-- },
--})

View File

@ -0,0 +1,16 @@
-- Bootstrap lazy.nvim
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)

View File

@ -7,12 +7,13 @@ vim.opt.clipboard="unnamedplus"
opt.colorcolumn = '100' -- str: Show col for max line length
opt.number = true -- bool: Show line numbers
opt.relativenumber = true -- bool: Show relative line numbers
opt.scrolloff = 4 -- int: Min num lines of context
opt.scrolloff = 10 -- int: Min num lines of context
opt.signcolumn = "yes" -- str: Show the sign column
-- [[ Filetypes ]]
opt.encoding = 'utf8' -- str: String encoding to use
opt.fileencoding = 'utf8' -- str: File encoding to use
-- opt.fileencoding = 'utf8' -- str: File encoding to use
vim.filetype.add({ extension = { wgsl = "wgsl" } })
-- [[ Theme ]]
opt.syntax = "ON" -- str: Allow syntax highlighting
@ -29,6 +30,7 @@ opt.hlsearch = false -- bool: Highlight search matches
opt.shiftwidth = 4 -- num: Size of an indent
opt.softtabstop = 4 -- num: Number of spaces tabs count for in insert mode
opt.tabstop = 4 -- num: Number of spaces tabs count for
opt.list = true -- show some whitespace
-- [[ Splits ]]
opt.splitright = true -- bool: Place new window to right of current one
@ -45,8 +47,6 @@ vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
vim.opt.shortmess = vim.opt.shortmess + { c = true }
vim.api.nvim_set_option('updatetime', 300)
-- Uncomment to enable treesitter folding by default
--vim.wo.foldmethod = 'expr'
--vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'

View File

@ -1,120 +1,122 @@
-- vim.cmd([[
-- augroup packer_user_config
-- autocmd!
-- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
-- augroup end
-- ]])
require("lazy").setup({
spec = {
-- install plugins
{ 'nvim-treesitter/nvim-treesitter' },
{ 'ellisonleao/gruvbox.nvim' },
{ 'danilamihailov/beacon.nvim' },
{ 'nvim-lua/plenary.nvim' },
{
'folke/todo-comments.nvim',
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
keywords = {
SAFETY = {
icon = "",
color = "warning",
alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
},
INVARIANT = {
icon = "🦑",
color = "hint",
},
},
},
},
{
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
},
{ 'rktjmp/fwatch.nvim' },
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
bigfile = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
},
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
},
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- -- language server stuff
{ 'williamboman/mason.nvim' },
{ 'williamboman/mason-lspconfig.nvim' },
{ 'neovim/nvim-lspconfig' },
{
'mrcjkb/rustaceanvim',
version = '^6',
lazy = false, -- This plugin is already lazy
},
{ 'mfussenegger/nvim-dap' },
{ 'rcarriga/nvim-dap-ui', dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } },
{ 'theHamsta/nvim-dap-virtual-text' },
{ 'jay-babu/mason-nvim-dap.nvim' },
-- Simple plugins can be specified as strings
use 'rstacruz/vim-closer'
-- -- nushell support
-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
{ 'LhKipp/nvim-nu' },
-- Lazy loading:
-- Load on specific commands
use {'tpope/vim-dispatch', opt = true, cmd = {'Dispatch', 'Make', 'Focus', 'Start'}}
-- -- Completion framework:
{ 'hrsh7th/nvim-cmp' },
-- Load on an autocommand event
use {'andymass/vim-matchup', event = 'VimEnter'}
-- -- LSP completion source:
{ 'hrsh7th/cmp-nvim-lsp' },
-- Load on a combination of conditions: specific filetypes or commands
-- Also run code after load (see the "config" key)
use {
'w0rp/ale',
ft = {'sh', 'zsh', 'bash', 'c', 'cpp', 'cmake', 'html', 'markdown', 'racket', 'vim', 'tex'},
cmd = 'ALEEnable',
config = 'vim.cmd[[ALEEnable]]'
}
-- -- Useful completion sources:
{ 'hrsh7th/cmp-nvim-lua' },
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
{ 'hrsh7th/cmp-vsnip' },
{ 'hrsh7th/cmp-path' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/vim-vsnip' },
{ 'ryo33/nvim-cmp-rust' },
-- Plugins can have dependencies on other plugins
use {
'haorenW1025/completion-nvim',
opt = true,
requires = {{'hrsh7th/vim-vsnip', opt = true}, {'hrsh7th/vim-vsnip-integ', opt = true}}
}
{
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = { 'nvim-lua/plenary.nvim' }
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" }
},
-- Plugins can also depend on rocks from luarocks.org:
--use {
-- 'my/supercoolplugin',
-- rocks = {'lpeg', {'lua-cjson', version = '2.1.0'}}
--}
-- You can specify rocks in isolation
use_rocks 'penlight'
use_rocks {'lua-resty-http', 'lpeg'}
-- Local plugins can be included
--use '~/projects/personal/hover.nvim'
-- Plugins can have post-install/update hooks
use {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview'}
-- Post-install/update hook with neovim command
use 'nvim-treesitter/nvim-treesitter'
-- Post-install/update hook with call of vimscript function with argument
use { 'glacambre/firenvim', run = function() vim.fn['firenvim#install'](0) end }
-- Use specific branch, dependency and run lua file after load
--use {
-- 'glepnir/galaxyline.nvim', branch = 'main', config = function() require'statusline' end,
-- requires = {'kyazdani42/nvim-web-devicons'}
--}
-- Use dependency and run lua function after load
--use {
-- 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' },
-- config = function() require('gitsigns').setup() end
--}
-- You can specify multiple plugins in a single call
use {'tjdevries/colorbuddy.vim', {'nvim-treesitter/nvim-treesitter', opt = true}}
-- You can alias plugin names
use {'dracula/vim', as = 'dracula'}
-- example plugins above
-- my stuff below
use 'ellisonleao/gruvbox.nvim'
use 'danilamihailov/beacon.nvim'
-- language server stuff
use 'williamboman/mason.nvim'
use 'williamboman/mason-lspconfig.nvim'
use 'neovim/nvim-lspconfig'
use 'simrat39/rust-tools.nvim'
use 'WhoIsSethDaniel/lualine-lsp-progress.nvim'
-- nushell support
--use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
use 'LhKipp/nvim-nu'
-- Completion framework:
use 'hrsh7th/nvim-cmp'
-- LSP completion source:
use 'hrsh7th/cmp-nvim-lsp'
-- Useful completion sources:
use 'hrsh7th/cmp-nvim-lua'
use 'hrsh7th/cmp-nvim-lsp-signature-help'
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/vim-vsnip'
-- telescope
use "nvim-lua/plenary.nvim"
use {
'nvim-telescope/telescope.nvim', branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- status line
use {
'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
end)
-- -- status line
{ 'linrongbin16/lsp-progress.nvim' },
{ 'nvim-lualine/lualine.nvim' },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = {
enabled = true,
notify = false,
},
})

View File

@ -0,0 +1,139 @@
return {
braille = { "", "", "", "", "", "", "", "" },
triangles = { "", "", "", "" },
dwarf_fortress = {
" ██████£££ ",
"☺██████£££ ",
"☺██████£££ ",
"☺▓█████£££ ",
"☺▓█████£££ ",
"☺▒█████£££ ",
"☺▒█████£££ ",
"☺░█████£££ ",
"☺░█████£££ ",
"☺ █████£££ ",
" ☺█████£££ ",
" ☺█████£££ ",
" ☺▓████£££ ",
" ☺▓████£££ ",
" ☺▒████£££ ",
" ☺▒████£££ ",
" ☺░████£££ ",
" ☺░████£££ ",
" ☺ ████£££ ",
" ☺████£££ ",
" ☺████£££ ",
" ☺▓███£££ ",
" ☺▓███£££ ",
" ☺▒███£££ ",
" ☺▒███£££ ",
" ☺░███£££ ",
" ☺░███£££ ",
" ☺ ███£££ ",
" ☺███£££ ",
" ☺███£££ ",
" ☺▓██£££ ",
" ☺▓██£££ ",
" ☺▒██£££ ",
" ☺▒██£££ ",
" ☺░██£££ ",
" ☺░██£££ ",
" ☺ ██£££ ",
" ☺██£££ ",
" ☺██£££ ",
" ☺▓█£££ ",
" ☺▓█£££ ",
" ☺▒█£££ ",
" ☺▒█£££ ",
" ☺░█£££ ",
" ☺░█£££ ",
" ☺ █£££ ",
" ☺█£££ ",
" ☺█£££ ",
" ☺▓£££ ",
" ☺▓£££ ",
" ☺▒£££ ",
" ☺▒£££ ",
" ☺░£££ ",
" ☺░£££ ",
" ☺ £££ ",
" ☺£££ ",
" ☺£££ ",
" ☺▓££ ",
" ☺▓££ ",
" ☺▒££ ",
" ☺▒££ ",
" ☺░££ ",
" ☺░££ ",
" ☺ ££ ",
" ☺££ ",
" ☺££ ",
" ☺▓£ ",
" ☺▓£ ",
" ☺▒£ ",
" ☺▒£ ",
" ☺░£ ",
" ☺░£ ",
" ☺ £ ",
" ☺£ ",
" ☺£ ",
" ☺▓ ",
" ☺▓ ",
" ☺▒ ",
" ☺▒ ",
" ☺░ ",
" ☺░ ",
"",
" ☺ &",
" ☺ ☼&",
" ☺ ☼ &",
" ☺☼ &",
" ☺☼ & ",
" ‼ & ",
" ☺ & ",
" ‼ & ",
" ☺ & ",
" ‼ & ",
" ☺ & ",
"‼ & ",
" & ",
" & ",
" & ░ ",
" & ▒ ",
" & ▓ ",
" & £ ",
" & ░£ ",
" & ▒£ ",
" & ▓£ ",
" & ££ ",
" & ░££ ",
" & ▒££ ",
"& ▓££ ",
"& £££ ",
" ░£££ ",
" ▒£££ ",
" ▓£££ ",
" █£££ ",
" ░█£££ ",
" ▒█£££ ",
" ▓█£££ ",
" ██£££ ",
" ░██£££ ",
" ▒██£££ ",
" ▓██£££ ",
" ███£££ ",
" ░███£££ ",
" ▒███£££ ",
" ▓███£££ ",
" ████£££ ",
" ░████£££ ",
" ▒████£££ ",
" ▓████£££ ",
" █████£££ ",
" ░█████£££ ",
" ▒█████£££ ",
" ▓█████£££ ",
" ██████£££ ",
" ██████£££ ",
},
}

View File

@ -1,3 +1,17 @@
require('lsp-progress').setup({
spinner = require('spinners').dwarf_fortress,
spin_update_time = 200,
client_format = function(client_name, spinner, series_messages)
return #series_messages > 0
and (
table.concat(series_messages, ", ")
.. " " .. spinner
.. " [" .. client_name .. "]"
)
or nil
end,
})
require('lualine').setup {
options = {
icons_enabled = true,
@ -12,7 +26,7 @@ require('lualine').setup {
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
statusline = 200,
tabline = 1000,
winbar = 1000,
}
@ -21,10 +35,11 @@ require('lualine').setup {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = { 'filename' },
lualine_x = {{
'lsp_progress',
timer = { progress_enddelay = 20, spinner = 20, lsp_client_name_enddelay = 20 },
}},
lualine_x = {
function()
return require('lsp-progress').progress()
end
},
lualine_y = { 'encoding', 'fileformat', 'filetype' },
lualine_z = { 'location' }
},

View File

@ -22,9 +22,12 @@ require("gruvbox").setup({
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = false,
transparent_mode = not vim.g.neovide,
})
vim.o.background = "dark" -- or "light" for light mode
require('color-scheme')
local color_scheme_file = os.getenv("HOME") .. "/.cache/dotfiles/.config/nvim/lua/color-scheme.lua"
require('fwatch').watch(color_scheme_file, "luafile " .. color_scheme_file)
vim.cmd([[colorscheme gruvbox]])

View File

@ -1,338 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/hulthe/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?.lua;/home/hulthe/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?/init.lua;/home/hulthe/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?.lua;/home/hulthe/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/hulthe/.cache/nvim/packer_hererocks/2.1.1694285958/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
ale = {
commands = { "ALEEnable" },
config = { "vim.cmd[[ALEEnable]]" },
loaded = false,
needs_bufread = true,
only_cond = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/ale",
url = "https://github.com/w0rp/ale"
},
["beacon.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/beacon.nvim",
url = "https://github.com/danilamihailov/beacon.nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lsp-signature-help"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
},
["cmp-nvim-lua"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["cmp-vsnip"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
url = "https://github.com/hrsh7th/cmp-vsnip"
},
["colorbuddy.vim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/colorbuddy.vim",
url = "https://github.com/tjdevries/colorbuddy.vim"
},
["completion-nvim"] = {
after = { "vim-vsnip-integ" },
loaded = false,
needs_bufread = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/completion-nvim",
url = "https://github.com/haorenW1025/completion-nvim"
},
dracula = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/dracula",
url = "https://github.com/dracula/vim"
},
firenvim = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/firenvim",
url = "https://github.com/glacambre/firenvim"
},
["gruvbox.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/gruvbox.nvim",
url = "https://github.com/ellisonleao/gruvbox.nvim"
},
["lualine-lsp-progress.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/lualine-lsp-progress.nvim",
url = "https://github.com/WhoIsSethDaniel/lualine-lsp-progress.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["markdown-preview.nvim"] = {
commands = { "MarkdownPreview" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim",
url = "https://github.com/iamcco/markdown-preview.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = false,
needs_bufread = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["rust-tools.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
url = "https://github.com/simrat39/rust-tools.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["vim-closer"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/vim-closer",
url = "https://github.com/rstacruz/vim-closer"
},
["vim-dispatch"] = {
commands = { "Dispatch", "Make", "Focus", "Start" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/vim-dispatch",
url = "https://github.com/tpope/vim-dispatch"
},
["vim-matchup"] = {
after_files = { "/home/hulthe/.local/share/nvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" },
loaded = false,
needs_bufread = true,
only_cond = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/vim-matchup",
url = "https://github.com/andymass/vim-matchup"
},
["vim-vsnip"] = {
loaded = true,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/start/vim-vsnip",
url = "https://github.com/hrsh7th/vim-vsnip"
},
["vim-vsnip-integ"] = {
after_files = { "/home/hulthe/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ/after/plugin/vsnip_integ.vim" },
load_after = {
["completion-nvim"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/hulthe/.local/share/nvim/site/pack/packer/opt/vim-vsnip-integ",
url = "https://github.com/hrsh7th/vim-vsnip-integ"
}
}
time([[Defining packer_plugins]], false)
-- Command lazy-loads
time([[Defining lazy-load commands]], true)
pcall(vim.api.nvim_create_user_command, 'MarkdownPreview', function(cmdargs)
require('packer.load')({'markdown-preview.nvim'}, { cmd = 'MarkdownPreview', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'markdown-preview.nvim'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('MarkdownPreview ', 'cmdline')
end})
pcall(vim.api.nvim_create_user_command, 'Dispatch', function(cmdargs)
require('packer.load')({'vim-dispatch'}, { cmd = 'Dispatch', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'vim-dispatch'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('Dispatch ', 'cmdline')
end})
pcall(vim.api.nvim_create_user_command, 'Make', function(cmdargs)
require('packer.load')({'vim-dispatch'}, { cmd = 'Make', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'vim-dispatch'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('Make ', 'cmdline')
end})
pcall(vim.api.nvim_create_user_command, 'Focus', function(cmdargs)
require('packer.load')({'vim-dispatch'}, { cmd = 'Focus', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'vim-dispatch'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('Focus ', 'cmdline')
end})
pcall(vim.api.nvim_create_user_command, 'Start', function(cmdargs)
require('packer.load')({'vim-dispatch'}, { cmd = 'Start', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'vim-dispatch'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('Start ', 'cmdline')
end})
pcall(vim.api.nvim_create_user_command, 'ALEEnable', function(cmdargs)
require('packer.load')({'ale'}, { cmd = 'ALEEnable', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
end,
{nargs = '*', range = true, bang = true, complete = function()
require('packer.load')({'ale'}, {}, _G.packer_plugins)
return vim.fn.getcompletion('ALEEnable ', 'cmdline')
end})
time([[Defining lazy-load commands]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Filetype lazy-loads
time([[Defining lazy-load filetype autocommands]], true)
vim.cmd [[au FileType cmake ++once lua require("packer.load")({'ale'}, { ft = "cmake" }, _G.packer_plugins)]]
vim.cmd [[au FileType html ++once lua require("packer.load")({'ale'}, { ft = "html" }, _G.packer_plugins)]]
vim.cmd [[au FileType markdown ++once lua require("packer.load")({'ale'}, { ft = "markdown" }, _G.packer_plugins)]]
vim.cmd [[au FileType racket ++once lua require("packer.load")({'ale'}, { ft = "racket" }, _G.packer_plugins)]]
vim.cmd [[au FileType tex ++once lua require("packer.load")({'ale'}, { ft = "tex" }, _G.packer_plugins)]]
vim.cmd [[au FileType vim ++once lua require("packer.load")({'ale'}, { ft = "vim" }, _G.packer_plugins)]]
vim.cmd [[au FileType c ++once lua require("packer.load")({'ale'}, { ft = "c" }, _G.packer_plugins)]]
vim.cmd [[au FileType sh ++once lua require("packer.load")({'ale'}, { ft = "sh" }, _G.packer_plugins)]]
vim.cmd [[au FileType zsh ++once lua require("packer.load")({'ale'}, { ft = "zsh" }, _G.packer_plugins)]]
vim.cmd [[au FileType bash ++once lua require("packer.load")({'ale'}, { ft = "bash" }, _G.packer_plugins)]]
vim.cmd [[au FileType cpp ++once lua require("packer.load")({'ale'}, { ft = "cpp" }, _G.packer_plugins)]]
time([[Defining lazy-load filetype autocommands]], false)
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'vim-matchup'}, { event = "VimEnter *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

View File

@ -19,20 +19,20 @@ format = "[$hostname]($style) in "
disabled = true
{% end %}
[custom.stl]
description = "time logger"
when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
command = "cat /home/hulthe/.stld"
symbol = "🕑"
style = "italic bright-purple"
format = "[$symbol ($output )]($style)"
#[custom.stl]
#description = "time logger"
#when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
#command = "cat /home/hulthe/.stld"
#symbol = "🕑"
#style = "italic bright-purple"
#format = "[$symbol ($output )]($style)"
{% if demo %}
disabled = true
#disabled = true
{% end %}
# hide all persondata while in demo mode
{% if demo %}
# hide all persondata while in demo mode
[directory]
truncation_length = 1

View File

@ -0,0 +1,18 @@
{% if hostname == "sputnik" %}
lock '$HOME/.local/bin/screenlock'
{% else %}
lock '$HOME/.local/bin/screenlock'
{% end %}
before-sleep 'loginctl lock-session'
{% if hostname == "sputnik" %}
timeout 1770 'notify-send "Locking in 30s"'
timeout 1800 'loginctl lock-session'
{% else %}
timeout 530 'notify-send "Locking in 30s"'
timeout 600 'loginctl lock-session'
{% end %}
{% if hostname == "buran" %}
timeout 660 'niri msg action power-off-monitors'
{% end %}

View File

@ -0,0 +1,99 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"control-center-margin-top": 10,
"control-center-margin-bottom": 10,
"control-center-margin-left": 10,
"notification-icon-size": 64,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": false,
"control-center-width": 500,
"control-center-height": 1033,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"script-fail-notify": true,
"widgets": [
"buttons-grid",
"volume",
"backlight"
],
"widget-config": {
"title": {
"text": "Notification Center",
"clear-all-button": true,
"button-text": "󰆴 Clear"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 1,
"text": "Notification Center"
},
"mpris": {
"image-size": 50,
"image-radius": 5
},
"volume": {
"label": "󰕾"
},
"backlight": {
"label": "󰃟"
},
"buttons-grid": {
"actions": [
{
"label": "󰐥",
"command": "systemctl poweroff"
},
{
"label": "󰜉",
"command": "systemctl reboot"
},
{
"label": "󰌾",
"command": "swaylock-corrupter"
},
{
"label": "󰍃",
"command": "swaymsg exit"
},
{
"label": "󰆴",
"command": "swaync-client -C"
},
{
"label": "󰕾",
"command": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"type": "toggle"
},
{
"label": "󰍬",
"command": "pactl set-source-mute @DEFAULT_SOURCE@ toggle",
"type": "toggle"
},
{
"label": "󰖩",
"command": "iwgtk"
},
{
"label": "󰂯",
"command": "blueman-manager"
},
{
"label": "",
"command": "kooha"
}
]
}
}
}

View File

@ -0,0 +1,307 @@
@define-color cc-bg rgba(26, 27, 38, 1);
/* @define-color noti-border-color rgba(255, 255, 255, 0.15); */
@define-color noti-border-color #f65d76;
@define-color noti-bg rgb(17, 17, 27);
@define-color noti-bg-darker rgb(43, 43, 57);
@define-color noti-bg-hover rgb(27, 27, 43);
@define-color noti-bg-focus rgba(27, 27, 27, 0.6);
@define-color noti-close-bg rgba(255, 255, 255, 0.1);
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
@define-color text-color rgba(169, 177, 214, 1);
@define-color text-color-disabled rgb(150, 150, 150);
@define-color bg-selected rgb(0, 128, 255);
* {
font-family: JetBrainsMono NFM SemiBold;
}
.control-center .notification-row:focus,
.control-center .notification-row:hover {
opacity: 1;
background: @noti-bg-darker;
}
.notification-row {
outline: none;
margin: 0px;
padding: 0px;
}
.notification {
background: @cc-bg;
border: 2px solid @noti-border-color;
border-radius: 12px;
margin: 6px 8px 0px 0px;
padding: 4px;
}
.notification-content {
background: @cc-bg;
}
.notification-default-action {
margin: 0;
padding: 0;
}
.close-button {
background: #f7768e;
color: @cc-bg;
text-shadow: none;
padding: 0px;
border-radius: 0px;
margin-top: 5px;
margin-right: 5px;
}
.close-button:hover {
box-shadow: none;
background: #f7768e;
transition: all 0.15s ease-in-out;
border: none;
}
.notification-action {
border: 2px solid #34548a;
border-top: none;
}
.notification-default-action:hover,
.notification-action:hover {
color: #7aa2f7;
background: @cc-bg;
}
.notification-default-action:not(:only-child) {
border-bottom-left-radius: 7px;
border-bottom-right-radius: 7px;
}
.notification-action:first-child {
border-bottom-left-radius: 10px;
background: #1b1b2b;
}
.notification-action:last-child {
border-bottom-right-radius: 10px;
background: #1b1b2b;
}
.inline-reply {
margin-top: 8px;
}
.inline-reply-entry {
background: @noti-bg-darker;
color: @text-color;
caret-color: @text-color;
border: 1px solid @noti-border-color;
border-radius: 5px;
}
.inline-reply-button {
margin-left: 4px;
background: @noti-bg;
border: 1px solid @noti-border-color;
border-radius: 5px;
color: @text-color;
}
.inline-reply-button:disabled {
background: initial;
color: @text-color-disabled;
border: 1px solid transparent;
}
.inline-reply-button:hover {
background: @noti-bg-hover;
}
.image {
border-radius: 0px;
margin-right: 10px;
}
.summary {
font-size: 16px;
font-weight: 700;
background: transparent;
color: rgba(158, 206, 106, 1);
text-shadow: none;
}
.time {
font-size: 16px;
font-weight: 700;
background: transparent;
color: @text-color;
text-shadow: none;
margin-right: 18px;
}
.body {
font-size: 15px;
font-weight: 400;
background: transparent;
color: @text-color;
text-shadow: none;
}
.control-center {
background: @cc-bg;
border: 2px solid #34548a;
border-radius: 0px;
}
.control-center-list {
background: transparent;
}
.control-center-list-placeholder {
opacity: 0.5;
}
.floating-notifications {
background: transparent;
}
.blank-window {
background: alpha(black, 0.1);
}
.widget-title {
color: #7aa2f7;
background: @noti-bg-darker;
padding: 5px 10px;
margin: 10px 10px 5px 10px;
font-size: 1.5rem;
border-radius: 5px;
}
.widget-title > button {
font-size: 1rem;
color: @text-color;
text-shadow: none;
background: @noti-bg;
box-shadow: none;
border-radius: 5px;
}
.widget-title > button:hover {
background: #f7768e;
color: @cc-bg;
}
.widget-dnd {
background: @noti-bg-darker;
padding: 5px 10px;
margin: 5px 10px;
border-radius: 5px;
font-size: large;
color: #7aa2f7;
}
.widget-dnd > switch {
border-radius: 5px;
background: #7aa2f7;
}
.widget-dnd > switch:checked {
background: #f7768e;
border: 1px solid #f7768e;
}
.widget-dnd > switch slider,
.widget-dnd > switch:checked slider {
background: @cc-bg;
border-radius: 5px;
}
.widget-label {
margin: 10px 10px 5px 10px;
}
.widget-label > label {
font-size: 1rem;
color: @text-color;
}
.widget-mpris {
color: @text-color;
background: @noti-bg-darker;
padding: 5px 10px;
margin: 5px 10px 5px 10px;
border-radius: 5px;
}
.widget-mpris > box > button {
border-radius: 5px;
}
.widget-mpris-player {
padding: 5px 10px;
margin: 10px;
}
.widget-mpris-title {
font-weight: 700;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}
.widget-buttons-grid {
font-size: x-large;
padding: 5px;
margin: 10px 10px 5px 10px;
border-radius: 0px;
background: @noti-bg-darker;
}
.widget-buttons-grid > flowbox > flowboxchild > button {
margin: 3px;
background: @cc-bg;
border-radius: 0px;
color: @text-color;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
background: rgba(122, 162, 247, 1);
color: @cc-bg;
}
.widget-buttons-grid > flowbox > flowboxchild > button:checked {
background: rgb(158, 206, 106);
color: @cc-bg;
}
.widget-menubar > box > .menu-button-bar > button {
border: none;
background: transparent;
}
.topbar-buttons > button {
border: none;
background: transparent;
}
.widget-volume {
background: @noti-bg-darker;
padding: 5px;
margin: 5px 10px;
border-radius: 0px;
font-size: 2rem;
color: #7aa2f7;
}
.widget-backlight {
background: @noti-bg-darker;
padding: 5px;
margin: 5px 10px;
border-radius: 0px;
font-size: 2rem;
color: #7aa2f7;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 KiB

View File

@ -1,5 +1,5 @@
{
// "layer": "top", // Waybar at top layer
"layer": "top", // Waybar at top layer
"position": "bottom", // Waybar position (top|bottom|left|right)
"height": 26, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width

44
tree/.face Normal file
View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="120"
height="120"
viewBox="0 0 31.75 31.75"
version="1.1"
id="svg8"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
style="display:inline">
<path
style="fill:#ffffff;stroke-width:0.177246"
d="m 13.134179,31.651166 c -1.367874,-0.18043 -3.4872278,-0.85238 -4.780367,-1.51563 -1.871747,-0.96002 -4.179215,-3.22966 -5.0074297,-4.92534 -1.5914865,-3.25839 -1.6801158,-7.72336 -0.2278948,-11.48085 1.0247424,-2.65144 2.7098602,-4.5706201 5.4768881,-6.2376401 4.4640374,-2.6894 6.9208324,-4.59636 8.5218534,-6.61464 0.435944,-0.54955 0.851411,-0.9404 0.923263,-0.86855 0.34663,0.34663 0.709996,2.45556 0.596276,3.46071 l -0.118698,1.04918 0.543199,-0.3868 c 0.298763,-0.21273 0.754695,-0.66407 1.013185,-1.00297 0.258491,-0.3389 0.531184,-0.55268 0.605988,-0.47507 0.277608,0.28804 0.872923,2.3693 0.872923,3.05181 0,0.78189 -0.07309,0.70941 2.140938,2.12277 3.360595,2.14527 5.28622,5.2741001 5.845846,9.4985401 0.238089,1.79727 0.119928,4.12317 -0.289284,5.69424 -0.438918,1.68512 -1.295306,3.20011 -2.596637,4.59356 -2.715779,2.90803 -6.119638,4.1954 -10.928887,4.13338 -1.132683,-0.0146 -2.298705,-0.0581 -2.591161,-0.0967 z m 5.683631,-1.1265 c 5.074026,-0.89873 8.492767,-3.70496 9.49005,-7.7898 0.358508,-1.46844 0.317005,-5.28368 -0.07569,-6.95754 -0.594746,-2.53514 -2.005266,-4.78931 -3.64922,-5.8318801 -1.428352,-0.90583 -1.561881,-0.82384 -2.840659,1.7442101 -0.615739,1.23654 -1.777129,3.21756 -2.580868,4.40229 l -1.461342,2.15404 0.927607,0.3153 c 1.188141,0.40386 2.476979,1.20634 2.848748,1.77373 0.272049,0.4152 0.269021,0.4806 -0.04735,1.02231 -0.778356,1.33273 -2.272203,1.79512 -5.849412,1.81056 l -2.340153,0.0101 -2.489801,2.46697 c -2.6276133,2.60352 -2.8788341,3.03045 -2.0880964,3.54856 1.8126654,1.18771 7.0732674,1.8772 10.1561944,1.33115 z m 3.183004,-13.17071 c -0.205126,-0.14999 -0.329285,-0.4602 -0.329285,-0.8227 0,-0.96498 1.087198,-1.43355 1.715448,-0.73934 0.872429,0.96402 -0.338235,2.3283 -1.386163,1.56204 z m -3.186586,4.78402 c 1.133944,-0.30198 1.619925,-0.56299 1.85054,-0.9939 0.246861,-0.46126 -0.269147,-0.94676 -1.770094,-1.66543 -1.062457,-0.50872 -1.296906,-0.55176 -3.013183,-0.55311 -1.794444,-0.001 -1.910137,0.0225 -3.231141,0.66815 -1.860639,0.90936 -2.118197,1.48499 -0.948717,2.12031 1.182601,0.64245 5.357705,0.89133 7.112595,0.42398 z m -5.26747,-0.96936 c -1.113796,-0.13246 -1.303724,-0.23853 -1.149022,-0.64168 0.08921,-0.23246 0.582443,-0.27351 3.286452,-0.27351 1.749822,0 3.307658,0.0484 3.461858,0.10758 0.350902,0.13466 0.365077,0.53097 0.02367,0.66198 -0.432127,0.16582 -4.555272,0.2726 -5.622968,0.14563 z m -3.7845902,-3.81466 c 0.7343882,-0.537 0.2478022,-1.88618 -0.6802563,-1.88618 -0.5030742,0 -0.9992445,0.51278 -0.9992445,1.03268 0,0.90987 0.9453857,1.39029 1.6795008,0.8535 z"
id="path865" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 7.5967544,-6.2400058 c 0,0 -0.041418,0.1031026 -0.02862,0.2093299 0.012798,0.1062273 0.084435,0.1741091 0.084435,0.1741091 l -0.083147,0.088222 c 0,0 -0.1053512,-0.138166 -0.073877,-0.2774823 0.031474,-0.1393166 0.1012092,-0.1941783 0.101209,-0.1941787 z"
id="path1039" />
</g>
<g
id="layer2"
style="display:none" />
<g
id="layer3"
style="display:none" />
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,7 +1,9 @@
[user]
email = joakim@hulthe.net
name = Joakim Hulthe
{% if hostname != "buran" %}
email = joakim@hulthe.net
signingkey = joakim@hulthe.net
{% end %}
[commit]
gpgSign = true
@ -10,7 +12,7 @@
rebase = true
[core]
editor = nvim
editor = helix
[init]
defaultBranch = master
@ -26,3 +28,6 @@
[interactive]
diffFilter = delta --color-only
[log]
showSignature = true

View File

@ -1 +1 @@
pinentry-program /usr/bin/pinentry-curses
pinentry-program /usr/bin/pinentry-gnome3

View File

@ -0,0 +1,86 @@
#!/bin/bash
set -e
if [ "$(id -u)" -eq 0 ]; then echo "Do not run as root." >&2; exit 1; fi
sudo pacman -Syu
sudo pacman --needed -S \
alacritty \
base-devel \
bat \
bluez \
bluez-utils \
brightnessctl \
curl \
difftastic \
dust \
ddcutil \
exa \
fd \
fish \
fuzzel \
git \
git-delta \
gnome \
grim \
htop \
hyprland \
hyprpaper \
i2c-tools \
lazygit \
luarocks \
man-db man-pages \
neovim \
nerd-fonts \
niri \
noto-fonts \
noto-fonts-emoji \
noto-fonts-extra \
nushell \
openbsd-netcat \
pamixer \
qt5ct \
qt5-wayland \
qt6-wayland \
ripgrep \
rustup \
sad \
starship \
swayidle \
swaylock \
swaync \
tig \
tree-sitter tree-sitter-cli \
vim \
vivid \
waybar \
wget \
wl-clipboard \
xdg-desktop-portal-gtk \
zathura \
zoxide
rustup default stable
if ! command -v paru &> /dev/null; then
echo "`paru` not found, installing..."
sleep 1
cd "$(mktemp -d)"
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
fi
paru -S wdisplays eww
cargo install --locked --git https://git.nubo.sh/hulthe/wmutils.git
cargo install --locked --git https://git.nubo.sh/hulthe/lockscreen-blur.git
cargo install --locked --git https://git.nubo.sh/hulthe/volume_indicator.git
# cargo binstall
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall cargo-watch
cargo binstall cargo-get

10
tree/.local/bin/eww-workspaces Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env nu
let active = (hyprctl activeworkspace -j | from json | get id)
hyprctl workspaces -j |
from json |
sort-by id |
each {|w| {$w.id: {monitor: $w.monitorID active: ($w.id == $active) }}} |
reduce {|a, b| $a | merge $b } |
to json

View File

@ -0,0 +1,7 @@
#!/bin/sh
{% if light %}
echo light
{% else %}
echo dark
{% end %}

View File

@ -2,5 +2,11 @@
set -x
notify-send "Connecting to Högtalare"
bluetoothctl power on
bluetoothctl connect 04:FE:A1:71:4C:70
if bluetoothctl connect E8:26:CF:33:2D:BA; then
notify-send "Connected"
else
notify-send "Failed to connect to Högtalare"
fi

View File

@ -2,5 +2,11 @@
set -x
notify-send "Connecting to Lurar"
bluetoothctl power on
bluetoothctl connect 94:DB:56:41:C0:38
if bluetoothctl connect 94:DB:56:41:C0:38; then
notify-send "Connected"
else
notify-send "Failed to connect to Lurar"
fi

53
tree/.local/bin/mullpod Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env fish
# Extend the container in mullvadvpn-app with some useful dev tools and run it.
cd $HOME/proj/mullvadvpn-app
set base_tag (cat building/android-container-image.txt)
set custom_tag "$base_tag-extra"
# check if image exists
if not podman image inspect $custom_tag >/dev/null
echo "Building custom image"
set tmp_dockerfile (mktemp)
echo "
FROM $base_tag
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
fish \
procps
# cargo-binstall
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall bacon cargo-watch zoxide starship exa
RUN curl -L --proto '=https' -sSf https://git.nubo.sh/hulthe/df/raw/branch/master/manager/setup.sh | bash
RUN tee /entrypoint.sh <<EOF
#!/bin/bash
(cd ~/.config/dotfiles && git pull && dotfiles)
exec \"\\\$@\"
EOF
RUN chmod +x /entrypoint.sh
ENTRYPOINT [\"/entrypoint.sh\"]
" > $tmp_dockerfile
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
rm $tmp_dockerfile
end
podman run --rm -it \
--hostname mullpod \
-v .:/build \
-v cargo-target:/cargo-target:Z \
-v cargo-registry:/root/.cargo/registry:Z \
-v gradle-cache:/root/.gradle:Z \
$custom_tag mold -run fish

41
tree/.local/bin/mullvad-status Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
if ! which mullvad &> /dev/null
then
echo "ERROR: command 'mullvad' does not exist"
exit 1
fi
STATUS="$(mullvad status)"
CONNECTING="Connecting"
CONNECTED="Connected"
DISCONNECTED="Disconnected"
check_status() {
STRING="$1"
echo "$STATUS" | grep -iq "$STRING"
}
TOOLTIP="$STATUS"
ICON="󱙱"
ON_CLICK=""
if check_status "$DISCONNECTED"; then
CLASS="disconnected"
ON_CLICK="mullvad connect"
elif check_status "$CONNECTED"; then
CLASS=""
ICON="󱎚"
ON_CLICK="mullvad disconnect"
elif check_status "$CONNECTING"; then
CLASS="connecting"
ON_CLICK="mullvad disconnect"
else
CLASS="disconnected"
ON_CLICK="mullvad connect"
fi
echo '{"icon":"'$ICON'", "tooltip":"'$TOOLTIP'", "class":"'$CLASS'", "on_click": "'$ON_CLICK'"}'

16
tree/.local/bin/notify-set Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Send a notification using notify-send, but also give it a name to make it easily replaceable.
ID="$1"
DIR="/tmp/notify-ids/$(whoami)"
ID_PATH="$DIR/$ID"
mkdir -p "$DIR"
REPLACE_ID="$(cat "$ID_PATH" 2>/dev/null)";
if [ -n "$REPLACE_ID" ]; then
REPLACE_ID="--replace-id=$REPLACE_ID"
fi
notify-send $REPLACE_ID --print-id "${@:2}" > "$ID_PATH"

12
tree/.local/bin/screenlock Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/fish
# configured for wayland
set LOCKPROG hyprlock
# check if lock program is running
if ps -e | grep " $LOCKPROG\$"
echo "$LOCKPROG is already running"
exit 1
end
ba $LOCKPROG $argv

View File

@ -0,0 +1,26 @@
#!/usr/bin/fish
# Run hyprlock and spawn fullscreen video windows to be shown behind the lockscreen
set LOCKPROG hyprlock
set video ~/hämtningar/video-screensavers/4k/comp_GMT329_117NC_401C_1037_IRELAND_TO_ASIA_v48_SDR_PS_FINAL_20180725_F0F6300_SDR_4K_HEVC.mov
# check if lock program is running
if ps -e | grep " $LOCKPROG\$"
echo "$LOCKPROG is already running"
exit 1
end
# Spawn an mpv instance for each monitor
for workspace in (hyprctl -j monitors | jq '.[] | .activeWorkspace.id')
# Thi "WORKSPACE n" title is read by hyprland to position the window correctly
mpv --fs --loop-file=inf --panscan=1.0 --title="WORKSPACE $workspace" $video &
end
$LOCKPROG
for pid in (jobs -p | tail -n +1)
kill $pid
end

View File

@ -1,47 +0,0 @@
#!/usr/bin/fish
# configured for wayland
set LOCKPROG swaylock
set OPTIONAL_CMDS grep sed grim lockscreen-blur
set CONFIG "$HOME/.config/sway/swaylock.config"
set FALLBACK_ARGS --config $CONFIG --color "302f3b"
set BLUR_FACTOR 40
# check if lock program is running
if ps -e | grep " $LOCKPROG\$"
echo "$LOCKPROG is already running"
exit 1
end
for cmd in $OPTIONAL_CMDS
if not command -v $cmd &>/dev/null
echo "$cmd could not be found, falling back to basic mode."
$LOCKPROG $FALLBACK_ARGS
exit 0
end
end
{% if hostname == "buran" %}
# list display outputs using hyprctl
set outputs (hyprctl monitors | rg Monitor | sed 's/Monitor //' | sed 's/ (ID.*$//')
{% elif hostname == "sputnik" %}
# list display outputs using hyprctl
set outputs (hyprctl monitors | rg Monitor | sed 's/Monitor //' | sed 's/ (ID.*$//')
{% else %}
# list display outputs using swaymsg
set outputs (swaymsg -t get_outputs -r | grep "name" | sed 's/^.*"name": "//' | sed 's/",$//')
{% end %}
# take one screenshot of each output
for output in $outputs
set img "/tmp/lock-$output.png"
grim -o $output -t ppm - | lockscreen-blur -o $img -b $BLUR_FACTOR --stamp ~/.config/wallpapers/ferris-stamp.png &
set -a images "--image"
set -a images "$output:$img"
end
wait
$LOCKPROG --config $HOME/.config/sway/swaylock.config $images

View File

@ -0,0 +1,21 @@
#!/bin/env fish
switch $argv[1]
case 'light'
# configure terminal stuff with light theme
dotfiles light
# change gtk theme
gsettings set org.gnome.desktop.interface color-scheme prefer-light
case 'dark'
# configure terminal stuff with dark theme
dotfiles
# change gtk theme
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
case '*'
echo "usage: set-color-scheme <dark|light>"
exit 1
end

View File

@ -1,9 +1,16 @@
#!/bin/sh
# Pops up a window showing the current volume
alacritty -t "Volume" \
SOCKET="/tmp/volume_indicator"
# If theres an existing volume_indicator running, prod the socket
# Otherwise, start a new volume_indicator instance.
nc -U "$SOCKET" 2>/dev/null || \
ba alacritty -T "Volume Indicator" \
--class "volume_indicator" \
--config-file "$HOME/.config/alacritty/silent.yml" \
--config-file "$HOME/.config/alacritty/silent.toml" \
--command volume_indicator \
--cols 30 \
--rows 3 \
--timeout 1000
--socket "$SOCKET" \
--timeout 2000

6
tree/.local/nu/cargo.nu Normal file
View File

@ -0,0 +1,6 @@
# Resolve path to the cargo target dir, including an optional subpath
def ctd [
path?: string
] {
$"($env.CARGO_TARGET_DIR)/($path)"
}

20
tree/.local/nu/git.nu Normal file
View File

@ -0,0 +1,20 @@
def gitfixremote [
--name: string = "origin",
] {
let url = (git remote get-url $name)
let parsed = ($url | parse --regex '^(\w+://)?(\w*@)?(?P<host>[^/:]+)(:(?P<port>\d+))?(:|/)(?P<owner>\w+)/(?P<repo>[\w_-]+)')
if ($parsed | is-empty) {
print "Unparseable remote"
return
}
let parsed = ($parsed | get 0)
if ($parsed.host in ["github.com" "git.nubo.sh"]) {
git remote set-url $name $"https://($parsed.host)/($parsed.owner)/($parsed.repo).git"
git remote set-url --push $name $"ssh://($parsed.host)/($parsed.owner)/($parsed.repo).git"
} else {
print $"Unknown host: ($parsed.host)"
}
}

23
tree/.local/nu/macos.nu Normal file
View File

@ -0,0 +1,23 @@
# Utility commands for macos
def "net route 4" [
] {
netstat -rnl -f inet | tail +4 | from ssv -m 1 | into int Refs Use Mtu
}
def "net route 6" [
] {
netstat -rnl -f inet6 | tail +4 | from ssv -m 1 | into int Refs Use Mtu
}
def "net fw rule" [
--anchor (-a): string
] {
sudo pfctl -sr -a $anchor | lines
}
def "net fw nat" [
--anchor (-a): string
] {
sudo pfctl -sn -a $anchor | lines
}

280
tree/.local/nu/mullvad.nu Normal file
View File

@ -0,0 +1,280 @@
# Get a Mullvad api access token from an account number
def "m token" [
account: string # Mullvad account number
] {
(http post https://api.mullvad.net/auth/v1/token
-t application/json {account_number: $account}
).access_token
}
# Add a device to a mullvad account
def "m add device" [
account: string # Mullvad account number
] {
let token = (m-token $account)
let bearer = ("Bearer " + $token)
(http post https://api.mullvad.net/accounts/v1/devices
-t application/json
-H [Authorization $bearer]
{
pubkey: (wg genkey | wg pubkey),
hijack_dns: false,
kind: "App",
})
}
# Get mullvad-daemon system path
def "m daemon path" []: nothing -> string {
match (uname).kernel-name {
Linux => "/usr/bin/mullvad-daemon",
Darwin => "/Applications/Mullvad VPN.app/Contents/Resources/mullvad-daemon",
_ => (panic "Unknown Kernel"),
}
}
# Return true if mullvad-daemon is running
def "m daemon is-running" [
# Only return true if mullvad-daemon is running as a launch daemon
--system (-s),
] {
let procs = (^ps aux | lines)
if $system {
$procs | any { |line| $line =~ (m daemon path) }
} else {
$procs | any { |line| $line =~ "mullvad-daemon" }
}
}
def dns [
--server (-s): string,
name: string,
] {
# HACK: turn the optional argument into a list. not sure how to pass it to nslookup otherwise.
let server = ([$server] | compact)
let ipv4 = (dig $name A | lines | skip until {|l| $l =~ "ANSWER SECTION" } | skip 1 | take until { |l| $l == "" } | split column "\t" -c | rename host ttl _ type addr) | reject _
let ipv6 = (dig $name AAAA | lines | skip until {|l| $l =~ "ANSWER SECTION" } | skip 1 | take until { |l| $l == "" } | split column "\t" -c | rename host ttl _ type addr) | reject _
$ipv4 | append $ipv6
}
# Build and run mullvad-daemon
def "m daemon" [
--release (-r)
# Force userspace wireguard
--userwg
# Use wireguard-go over GotaTun
--wggo
# Use stagemole
--stagemole
# Attach GDB
--gdb
# Add counters and such to nft rules
--debug-fw
] {
mut daemon_args = []
mut cargo_flags = []
mut envs = [
MULLVAD_RESOURCE_DIR=./dist-assets/
]
if $release {
$cargo_flags ++= [--release]
}
if $stagemole {
$cargo_flags ++= [--features api-override]
$envs ++= [
MULLVAD_API_HOST=api.stagemole.eu
MULLVAD_API_ADDR=(dns api.stagemole.eu | where type == A | get 0.addr):443
]
}
if $debug_fw {
$envs ++= [TALPID_FIREWALL_DEBUG=1]
}
if $userwg {
$envs ++= [TALPID_FORCE_USERSPACE_WIREGUARD=1]
}
if $wggo {
$cargo_flags ++= [--features wireguard-go]
}
if (m daemon is-running --system) {
print "daemon is loaded, stopping..."
match (uname).kernel-name {
Linux => {
sudo systemctl stop mullvad-daemon
},
Darwin => {
sudo launchctl unload -w /Library/LaunchDaemons/net.mullvad.daemon.plist
},
_ => (panic "Unknown Kernel"),
}
} else if (m daemon is-running) {
print "mulvad-daemon is running in another terminal"
return
}
if $gdb {
$daemon_args ++= [gdb --args]
}
let daemon_path = if $release {
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/release/mullvad-daemon"]
} else {
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/debug/mullvad-daemon"]
}
# increase verbosity
$daemon_args ++= ["-vv"]
cargo b ...$cargo_flags
sudo ...$envs ...$daemon_args
}
def "m android cli" [
...args
] {
let socket_filename = "rpc-socket"
sudo MULLVAD_RPC_SOCKET_PATH=(sudo fd $socket_filename ~/.local/share/waydroid) mullvad ...$args
}
def "m android start" [
] {
print "starting net.mullvad.mullvadvpn"
adb shell am start -n net.mullvad.mullvadvpn/.ui.MainActivity;
# TODO: the waydroid cli is bork in the nix flake
# waydroid app launch net.mullvad.mullvadvpn
}
def "m android stop" [
] {
let app_pid = (ps | where name =~ mullvadvpn | get -o pid.0)
if $app_pid != null {
print $"kill net.mullvad.mullvadvpn [($app_pid)]"
sudo kill $app_pid
} else {
print "net.mullvad.mullvadvpn is not running"
}
}
def "m android run" [
] {
print "hack: making sure we're disconnected"
do --ignore-errors { m android cli disconnect }
print "compiling apk"
./gradlew installOssProdDebug
m android start
}
def "m android reload-daemon" [
] {
let daemon_path = (fd libmullvad_jni.so ~/.local/share/waydroid/ | lines | get -o 0)
if $daemon_path == null {
print "Can't find libmullvad_jni.so, hot-reload not available. Is the app installed?"
exit
}
m android stop
print "re-compiling libmullvad_jni.so"
./gradlew app:cargoBuildX86_64;
print "Executing hot-swap!"
sudo cp ~/.cargo/target/x86_64-linux-android/debug/libmullvad_jni.so $daemon_path;
m android start
}
def "m e2e list" [
...args
] {
print "Building test utils"
cargo b --target aarch64-apple-darwin
let test_manager = $"($env.CARGO_TARGET_DIR)/aarch64-apple-darwin/debug/test-manager"
print "Listing tests"
^$test_manager list-tests ...$args | from tsv | into int priority | sort-by priority name
}
def "m e2e run" [
account: string
vm: string
--skip: list<string>
--display (-d)
...tests
] {
let commit = (git rev-parse HEAD | take 6 | decode)
print $"Current commit: ($commit)"
let dist = "../dist"
print $"Looking in ($dist)"
let pkg_ext = match (uname).kernel-name {
"Linux" => "rpm", # TODO: rpm
"Darwin" => "pkg",
_ => (panic "Unknown kernel"),
}
let target = match (uname).kernel-name {
"Linux" => "x86_64-unknown-linux-musl",
"Darwin" => "aarch64-apple-darwin",
_ => (panic "Unknown kernel"),
}
let pkgs = (ls $dist | where name =~ $".*\\.($pkg_ext)")
let pkgs = ($pkgs | where name =~ $commit)
if ($pkgs | is-empty) {
print $"No .($pkg_ext) for current commit found."
print "Run ./build.sh"
return
}
if ($pkgs | length) > 1 {
print $"Multiple .($pkg_ext):s for current commit found."
print "Make sure there's only one"
print ...$pkgs
return
}
let pkg = ($pkgs | get 0.name)
print $"Using ($pkg)"
print "Building test utils"
cargo b --release --target $target -p test-runner -p connection-checker
cargo b -p test-manager
let test_manager = $"($env.CARGO_TARGET_DIR)/debug/test-manager"
let bin_dir = $"($env.CARGO_TARGET_DIR)/($target)/release/"
mut args = [
--vm $vm
--account $account
--app-package $pkg
--runner-dir $bin_dir
]
if $display {
$args ++= [--display]
}
for s in $skip {
$args ++= ["--skip" $s]
}
let args = $args
print "Running tests"
RUST_LOG=debug ^$test_manager run-tests -v ...$args ...$tests
}

37
tree/.local/nu/readelf.nu Executable file → Normal file
View File

@ -1,36 +1,13 @@
#!/bin/env nu
def elf-sections [
elf: string # ELF-file to inspect
# Inpect ELF-files
def elf [
elf: glob # ELF-file to inspect
get?: cell-path
] {
LANG=C readelf --wide --sections $elf |
parse -r " +\\[ *\\S+\\] +(?<name>\\.\\S+) +(?<type>\\S+) +0*(?<addr>\\S+) +0*(?<off>\\S+) +0*(?<size>\\S+).*" |
into int -r 16 "addr" "off" "size"
}
def elf-symbols [
elf: string # ELF-file to inspect
--section (-s): string
] {
let symbols = (
LANG=C readelf --wide --syms --demangle=rust $elf |
tail -n +5 |
parse -r " *(?<num>\\d+): (?<addr>\\S+) +(?<size>\\S+) +(?<type>\\S+) +(?<bind>\\S+) +(?<vis>\\S+) +(?<ndx>\\S+) (?<name>.*)" |
into int "size" |
into int "num" |
into int -r 16 "addr"
)
if $section == null {
$symbols
if $get == null {
^elf $elf | from json
} else {
let section = (elf-sections $elf | where name == $section | first)
let section_start = ($section | get addr)
let section_end = ($section_start + ($section | get size))
$symbols | where addr >= $section_start and addr < $section_end
^elf $elf | from json | get $get
}
}

View File

@ -0,0 +1,71 @@
# Get networking info about tailscale peers
def "tailscale peer" [
hostname?: string
get_field?: cell-path
]: nothing -> any {
let get_field = ($get_field | default ([] | into cell-path))
let status = (^tailscale status --json | from json)
let peers = ($status | get Peer)
if $peers == null {
return null
}
let peers = ($peers | transpose key fields | flatten fields)
let peers = ($peers | each { |peer|
let ipv4 = $peer.TailscaleIPs | where { |ip| "." in $ip } | first
let ipv6 = $peer.TailscaleIPs | where { |ip| ":" in $ip } | first
{
host: $peer.HostName,
ipv4: $ipv4,
ipv6: $ipv6,
online: $peer.Online,
active: $peer.Active,
rx: ($peer.RxBytes | into filesize),
tx: ($peer.TxBytes | into filesize),
dns: ($peer.DNSName),
}
})
if $hostname == null {
return $peers
}
let peers = ($peers | where host == $hostname)
if ($peers | is-empty) {
return null
}
$peers | first | get $get_field
}
# SSH to a tailscale peer
def "tailscale ssh" [
user_hostname: string
...ssh_flags: string
]: nothing -> any {
let hostname = ($user_hostname | parse -r "([^@]*@)?(?<hostname>.*)" | get 0.hostname)
ssh -o $"HostName (tailscale peer $hostname | get ipv6)" $user_hostname ...$ssh_flags
}
# SCP to a tailscale peer
def "tailscale scp" [
from: string
to: string
...ssh_flags: string
]: nothing -> any {
let options = (
[$from, $to] |
parse -r "([^@]*@)?(?<hostname>.*):(?<path>.*)" |
each { |it| $"HostName (tailscale peer $it.hostname | get ipv6)" } |
each { |option| ["-o", $option] } |
flatten
)
scp ...$options $from $to ...$ssh_flags
}