Compare commits

..

234 Commits

Author SHA1 Message Date
b86cc94d23 hosts/suwako: prevent spam on gitea
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-11-11 22:40:48 +05:30
95825c6ff1 hosts/suwako: use 2 filehost services :wowo:
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-11-11 22:35:36 +05:30
3e7e404d4c home: emacs:use lsp-deferred on progmode 2025-10-26 02:54:40 +05:30
bb4c77208d even more changes
add isearch count support to evil
add highlight-indent-guides-mode

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-10-22 13:30:05 +05:30
1f53cd2efb home: emacs: delete unused conf
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-10-22 13:29:09 +05:30
d9f8c16011 home: emacs: add olivetti and nyan-mode
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-10-18 22:34:35 +05:30
4335805701 home: emacs some more changes
- Fix benchmark-deactivate on init
- defer loading aidermacs and gptel
- also set evil-want-keybinding to nil: https://github.com/emacs-evil/evil-collection/issues/6
2025-10-18 18:08:07 +05:30
Amneesh Singh
4a18ae77fc home: emacs: update config
remove auto flexpair and use electric mode instead
add gptel
add aidermacs

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-10-17 17:41:56 +05:30
Amneesh Singh
5ebf3c9c5e home: amneesh: pkgs: add libreoffice and git-repo
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-10-17 11:55:12 +05:30
Amneesh Singh
f4e5628238 home: amneesh: use overlay for standalone home-manager
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-10-17 11:54:45 +05:30
Amneesh Singh
bf00621b02 home: amneesh: add screen config
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-10-17 11:53:28 +05:30
Amneesh Singh
ec8d9fafdd home: common: fix zsh GREP_COLORS
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-10-17 11:52:29 +05:30
539b46393e home/natto: emacs: some changes
add savehist
add blamer
tweak lsp to not format at RET

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-16 02:27:44 +05:30
Amneesh Singh
e686aef94e home: amneesh: wrap hypridle with nixGL
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-09-11 12:22:57 +05:30
54c45411fe home/natto: hyprlock: use pixels instead of percentages
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-10 18:58:50 +05:30
Amneesh Singh
23d6f855ee home: amneesh: update home.packages
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-09-10 18:57:54 +05:30
Amneesh Singh
346c304427 home: amneesh: add hypridle, hyprlock and hyprpaper
override pam for unix_chkpwd

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-09-10 18:54:55 +05:30
0bab44bf04 home/natto: add hyprlock,hypridle and hyprpaper
also move hyprland.conf -> hyprland.nix

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-10 16:40:42 +05:30
5579bf49c3 hosts/okina: cleanup
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 17:42:34 +05:30
11a8dfebff hosts/suwako: move gitea from marisa to suwako
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 16:35:31 +05:30
c2a1654be8 hosts/suwako: move filehost from marisa to suwako
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 15:32:44 +05:30
6d431bdf9d hosts/remilia: networking: add suwako public wg key
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 13:12:39 +05:30
5dc4e6d3c0 hosts/remilia: mailserver: dovecot2 directory migration
changed stateVersion to 3

More: https://nixos-mailserver.readthedocs.io/en/latest/migrations.html#dovecot-mail-directory-migration

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 13:11:46 +05:30
5c1c326baf hosts/suwako: mailserver: dovecot2 directory migration
changed stateVersion to 3

More: https://nixos-mailserver.readthedocs.io/en/latest/migrations.html#dovecot-mail-directory-migration

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 12:16:55 +05:30
4e5b555498 hosts/security: fix cert path
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 11:48:32 +05:30
895a495b3f hosts/suwako: split service files
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-09-04 11:48:29 +05:30
7e4a6ac8fe hosts: housekeeping
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-08-31 19:34:44 +05:30
cd52be2620 home: natto: add me@amneesh.com to neomutt
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-08-30 20:05:25 +05:30
34b2c4d015 hosts/suwako: add mailserver for amneesh.com
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-08-30 16:46:44 +05:30
Amneesh Singh
943956f119 home: amneesh: add wayvnc and more pkgs
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-08-29 13:20:00 +05:30
Amneesh Singh
27f3b76ab7 home: natto: restart ags 10s after failure
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-08-28 18:49:02 +05:30
Amneesh Singh
4decf54e13 home: amneesh: wrap hyprland in nixGL
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-08-25 18:16:18 +05:30
Amneesh Singh
abd567a8a5 home: amneesh: move ubuntu->arch and use existing config
Signed-off-by: Amneesh Singh <amneesh@ti.com>
2025-08-25 18:04:40 +05:30
5785832cbe home: emacs: use vertico+consult instead of selectrum
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 22:31:00 +05:30
0eacdcdc27 home: emacs: move config files
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 21:42:25 +05:30
0890c49887 hosts/remilia: mailserver: change certificateScheme
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 00:37:22 +05:30
fb94547fa2 hosts/hina: change rootfs disk path to by-label
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 00:31:54 +05:30
c10e121604 hosts/remilia: change rootfs disk path to by-label
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 00:31:09 +05:30
8a87dc6c93 hosts/remilia: add stateVersion in mailserver
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-07-02 00:30:57 +05:30
5db9d23792 hosts/suwako: add pufferpanel (minecraft paper)
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 20:49:40 +05:30
1651bb9356 home: move amneesh to its own directory
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:51:33 +05:30
a9d4f6de5a treewide: format files
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:49:39 +05:30
404f35c0b9 home/natto: delete unused
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:44:41 +05:30
9baf54ef33 home/natto: split wayland.nix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:40:28 +05:30
5a9ff77a29 home/natto: split programs.nix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:34:12 +05:30
87a6c1a862 home: refactor common files
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 19:23:07 +05:30
43660ff173 home: ags: use v1
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:57:27 +05:30
fe6d79edb5 pkgs: remove tlauncher
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:56:41 +05:30
da4309e2e0 hosts: make security settings common
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:49:58 +05:30
e1e72965f9 hosts: move pipewire to services/
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:31:53 +05:30
0979956f16 hosts: enable dconf on desktop
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:27:59 +05:30
28c9799f60 hosts: move wayland portal to home
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:18:27 +05:30
f9e29ce77f hosts: move xserver to services/
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 18:05:23 +05:30
f4a8493dce hosts: delete minimal.nix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:55:35 +05:30
e097c9d25f hosts: move neovim to programs/
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:54:17 +05:30
58ab2f07a7 hosts: move nix settings to its own file
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:50:50 +05:30
e1faa10e24 hosts: move doas to its own module
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:45:10 +05:30
f9ed56123d hosts: move git to its own module
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:45:08 +05:30
30934f006c hosts: rename modules -> programs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:33:24 +05:30
31bec468c8 hosts: move gnupg into a module
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:31:33 +05:30
6c1400e295 hosts: move adb into a module
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:28:47 +05:30
8d3bbe9d75 hosts: move fonts to home-manager
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:28:04 +05:30
4f96bcda1d hosts: split zsh into a module
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-29 17:27:55 +05:30
0ecd267fa8 home: zsh: fix prezto config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
c590fb01dc home: natto: rename deprecated stuff
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
d9a9d110de home: natto: edit hyprland config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
09f2e19683 hosts: satori: rename opengl -> graphics
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
8b12178bfc hosts: okina: update disk configuration
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
4f0f6021e5 hosts: rename font
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
00ead02ff1 flake: update
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2025-06-14 17:24:32 +05:30
5e54dfded8 hosts/suwako: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-10-20 15:59:58 +05:30
Amneesh Singh
eac8c77797 home/amneesh: update
Signed-off-by: Amneesh Singh <a-singh21@ti.com>
2024-07-12 09:51:21 +05:30
Amneesh Singh
3aab004b55 home/amneesh: init 2024-07-08 17:49:02 +05:30
270d7c2fe4 hosts/okina: add wireguard config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-28 20:22:50 +05:30
4c87e635ab hosts/remilia: update wireguard keys
Signed-off-by: natto1784 <natto@weirdnatto.in>
2024-06-28 20:22:21 +05:30
129fa4973f conf: add okina
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-28 18:49:19 +05:30
075ee51920 hosts: minor change
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-28 18:29:26 +05:30
aeb370f299 satori: im taking this HDD with me for some time
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-28 18:29:04 +05:30
edf8d639b3 emacs: minor fix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-28 17:41:48 +05:30
090c069a11 hosts/okina: add onevpl
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-12 00:13:48 +05:30
f230a60a73 home/natto/ags: add margin to the right of settings
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-04 19:50:37 +05:30
ca1ea8f701 hosts/okina: add avahi daemon for printer discovery (for now)
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-04 19:30:16 +05:30
570bafce6a home/natto/emacs: remove treemacs magit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-04 17:11:44 +05:30
8fd337d099 home/natto/emacs: just use defaultInitFile
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-04 16:58:29 +05:30
7737bc5137 home/natto/emacs: tangle when deploying
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-04 16:31:12 +05:30
f44ddb256b flake: update inputs.stable
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-02 16:06:58 +05:30
3d2befc555 home: fix pkgs generation for other users
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-02 16:05:08 +05:30
194f03c578 home/natto/emacs: minor changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-02 16:04:14 +05:30
d0a53ea9a3 home/natto/ags: add systemd to deps
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 21:14:46 +05:30
c1134662a9 home/natto/ags: update settings css
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:43:16 +05:30
afbfff8e96 home/natto/ags: i have 3 iq
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:40:52 +05:30
87fcf277f5 home/natto/ags: update readme
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:18:14 +05:30
5af717ac53 home/natto/ags: fix weather
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:12:13 +05:30
f6f228f990 conf: fix globalArgs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:10:31 +05:30
c86fb8b6d3 home/natto/ags: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 18:10:31 +05:30
00ea23f65c home/natto/hyprland: update config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 17:10:35 +05:30
a882cc48b4 home/natto/secrets: dont symlink
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 17:10:24 +05:30
684b9a41cc home: move around things a bit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-06-01 16:57:00 +05:30
48e46b465f home: add a way to differentiate bw laptop and desktop
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 06:54:29 +05:30
510cc18de3 hosts/default.nix: remove unnecessary recs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 06:22:29 +05:30
51281913ac home: use agenix modules via flake
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 06:21:56 +05:30
2831c62ee2 expose packages
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 05:54:50 +05:30
111920a63f hosts: update x86builder from satori to okina (who uses this)
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 05:15:57 +05:30
faedfb51ae neovim: update neovim config after a long time (i still use emacs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 05:14:28 +05:30
f748daba0f neovim: move from hosts/ to pkgs/
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-28 05:14:11 +05:30
c1c4714fa2 flake-parts: rename lib' to conf
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-27 23:00:24 +05:30
29acfc513e hosts/xorg: get rid of rename warning
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-27 23:00:24 +05:30
15f03999d3 hosts/okina: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-27 23:00:24 +05:30
ded1e9c202 satori: get rid of rename warning
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-27 23:00:24 +05:30
856d49ee10 hosts: rearrange modules a bit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-05-27 23:00:24 +05:30
ed71d6459c fmt
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-02-25 17:16:10 +05:30
e0a9283d2e home/natto: yearly update
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-02-25 17:15:17 +05:30
855dd5d445 satori: yearly visit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2024-02-25 17:08:12 +05:30
d4554d43ae hosts/hina: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-08-16 13:44:42 +05:30
e281e912d8 hosts/marisa: fix gitea mailer
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-08-07 04:59:53 +05:30
1fc6e8cd96 migrate services from nomad to systemd
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-07-26 22:42:58 +05:30
ff831dc3e0 hosts/marisa: remove hashistack
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-07-26 22:42:58 +05:30
e06bc88784 hosts/remilia: bring back the git subdomain atleast
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-07-26 22:40:30 +05:30
4682d7814b hosts/remilia: remove most subdomains :(
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-07-26 18:03:20 +05:30
78f440f69c pkgs: update tlauncher
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-26 16:43:11 +05:30
cfa5a8d1b8 hosts/satori: changes to udev rules
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-26 16:42:59 +05:30
c33a30be60 home/natto: misc changes
enable sioyek
fix gtk theme
add environment variables
change zathura config
change hyprland config

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-26 16:41:04 +05:30
8f7781f293 hosts/modules: put builder back in a separate file
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-06-24 16:25:48 +05:30
f88702525b hosts/satori: random changes + debloating sound
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-06-24 15:46:52 +05:30
149dbe2e33 home/natto: misc config changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-06-24 15:46:42 +05:30
be59cc0e8a hosts/remilia: random nginx changes
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-04-27 15:01:33 +05:30
0e4ac5dfe5 home: random configuration changes across apps
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-04-27 14:58:59 +05:30
04dc801925 hosts/satori: disable iwd
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-04-27 14:58:10 +05:30
bfe8ae35b8 satori: enable docker
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-23 18:25:48 +05:30
8e3a3aca2b lib: rename
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-08 11:22:04 +05:30
f31eb4c876 arrange users marisa:spark and satori:bat
Signed-off-by: natto1784 <natto@weirdnatto.in>
2023-03-08 10:08:50 +05:30
5652340dae marisa: add user bat
Signed-off-by: natto1784 <singh.amneesh1784@gmail.com>
2023-03-08 07:57:01 +05:30
a739d6de6d rearrange hosts a bit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-08 06:50:15 +05:30
c8d74d3af8 nvim,emacs: remove stupid colemak binds
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-08 06:32:30 +05:30
ab43a24e08 hosts/satori: random changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-08 06:15:08 +05:30
8c32c34bc7 home: update emacs and some other configs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-03-08 06:14:50 +05:30
1626936630 random eww changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 22:49:05 +05:30
e732d5514d change playerctl shortcuts 2023-01-27 21:50:16 +05:30
8899dbdaee home/natto/eww: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 21:39:36 +05:30
c87410b1aa enable iwd
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 07:02:30 +05:30
a4173c855e home/natto: misc changes
add mpdris
change emacs package
hyprland keybind changes
random changes to home.packages

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 07:01:54 +05:30
5e4c51a4ed home/natto: added tofi config, changed hyprland config + webcord
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 20:40:38 +05:30
df34f1fffc hosts/satori: enable rtkit and systemwide zsh
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 20:39:34 +05:30
67a7c8ea27 add catppuccin themes for emacs and nvim
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 15:10:52 +05:30
ec6533a782 wayland: add initial config for hyprland and XDPH and implement new colors
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 11:38:38 +05:30
5fef417fb0 home/natto: move around stuff
move git and zsh from hosts/satori and split services.nix

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 11:36:04 +05:30
950cf357d1 lib/network: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 21:39:56 +05:30
b3fac02b73 hosts/modules: combine minzsh and minpkgs into server.nix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 20:48:59 +05:30
7ed47be803 lib: init
also added globalArgs

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 20:41:42 +05:30
969eb05a7a home/natto: add fcitx and misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 15:43:52 +05:30
de2688145e home/natto: try hyprland
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 15:42:52 +05:30
a18f8b7295 hosts/satori: remove fcitx and change the default kb layout
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-23 15:42:08 +05:30
cb779f9d35 hosts/satori: remove unnecessary packages
this was long due

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-18 14:56:26 +05:30
97bc35cb07 hosts/satori: add tlp and move around misc stuff
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-18 14:51:32 +05:30
6f7e8a749a hosts/satori: move some pkgs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-07 05:12:10 +05:30
15e6418361 flake: remove devshell
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-07 05:11:43 +05:30
01ab8d54b9 emacs and random stuff
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-07 05:11:25 +05:30
2ff04267b6 update readme
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-08 01:17:48 +05:30
e6cb5b2615 ran nixpkgs-fmt
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-08 01:11:53 +05:30
aaf19ee844 massive rewrite using flake-parts
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-08 01:00:12 +05:30
dfd8c57b60 home/natto: emacs: use firacode and misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-06 19:31:40 +05:30
42843126e3 hosts and modules restructuring
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-06 19:31:40 +05:30
d654ab9463 remove useless stuff
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-05 23:47:58 +05:30
eac8edecd9 home/natto/emacs: add direnv and misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-05 14:39:27 +05:30
df682cdebe modules/nvim: update config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-04 07:37:56 +05:30
b09e4cf2ea home/natto: misc changes
update st config
update pkgs and stuff
misc updates to emacs and xmonad config

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-04 07:37:15 +05:30
78a51754a4 flakes: update channels
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-04 07:37:15 +05:30
4f49f4f0ec overlays: customscripts: misc changes, patches: moved to home
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-04 07:37:15 +05:30
f4ce7e6aa9 update st and dmenu overlay
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-25 02:27:36 +05:30
3f4abeee23 hosts/satori: mount drives under /media from now on
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-25 02:27:16 +05:30
df4ba5fff7 home/natto: theme related changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-25 02:26:35 +05:30
0f648a6a90 home/natto: changes
emacs: colemak related updates
pkgs: random pkgs stuff
secrets: add .gitconfig
services: misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-24 04:38:28 +05:30
436e1016d7 flakes: update
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-24 04:38:28 +05:30
07325d0112 hosts/satori: changes
networking: change gateway cuz new router
graphics: use the stable nvidia drivers
misc changes

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-24 04:38:28 +05:30
7b9bfc900c hosts/remilia: regular networking update 2022-11-23 00:11:53 +05:30
ba36e86aec hosts/remilia: update nginx config 2022-11-23 00:11:33 +05:30
b305a2ea68 hosts/satori: random
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-10 20:03:36 +05:30
ddbb19952d home/natto: add mpdas
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-10 20:03:28 +05:30
67f879cfc1 home/natto: email config and misc shit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-10 19:17:20 +05:30
f9723b1f11 hosts/satori: random update
dont use mesa overrides and delete useless comments

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-08 02:53:50 +05:30
05a1c4707b home/natto: use just legacy configs
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-08 02:52:44 +05:30
3da8b6ba31 home/natto: random maintenance
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-05 17:50:14 +05:30
9289d0f172 update a script
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-05 17:49:47 +05:30
3b95e2700d hosts/satori: random stuff
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-05 17:49:27 +05:30
b4d37cfc45 home/natto: random emacs stuff
still as messy as ever

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-05 17:48:34 +05:30
90bdddcabc hosts/satori: random stuff, move modules
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-11-05 17:48:34 +05:30
fc7a90ef64 hosts/marisa/networking: random networking ports
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-11-02 13:31:13 +05:30
fffbd0530c hosts/marisa/services: remove hashicorp configs
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-11-02 13:26:40 +05:30
1a22236a97 cachix: remove
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-11-02 13:26:16 +05:30
661910f8d6 hosts/marisa: random changes
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-10-27 01:33:17 +05:30
e8120c9a57 home/natto: update emacs config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-14 09:59:10 +05:30
3cb1266f60 home/natto: misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-14 09:58:58 +05:30
6faf1756d3 home/natto: update xmonad config
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-14 09:58:28 +05:30
994a22a6da Satori: misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-14 09:57:57 +05:30
c9879b147d misc changes and add tlauncher
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-10-14 09:57:36 +05:30
c7c5dfd651 hosts/satori: generic updates
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-07-12 01:14:09 +05:30
81c072b34f home/natto: generic updates
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-07-12 01:13:56 +05:30
a66daf3ac6 Satori: misc changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-05-30 16:05:26 +05:30
423c2236b7 Marisa: go back to linux 5.10
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-05-07 18:26:41 +05:30
d13815136b regulatory updates
home/natto/programs/emacs: update config to use org-babel and some other keybind related changes
hosts/satori: misc changes
modules/graphics: dont use the vulkan layer override for mesa

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-04-27 01:16:54 +05:30
c805f3e58a change URLs to match upstream
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-04-03 07:14:01 +05:30
f878d1e343 home/natto/secrets: add .gitconfig
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-04-03 06:43:13 +05:30
d4f56a19e9 Marisa: a.
Signed-off-by: natto1784 <natto@weirdnatto.in>
2022-03-28 08:27:39 +05:30
f89fefa53d Satori: a.
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-03-28 04:57:27 +05:30
04da549117 README.md -> README.org 2022-03-19 00:22:30 +05:30
d65b3d0db2 home/natto/services/emacs: change theme 2022-03-18 23:52:24 +05:30
a2dfe8bea3 change themes for xmobar and neovim 2022-03-18 13:25:06 +05:30
2bac5bafcd update dmenu and st and also change color themes 2022-03-18 11:22:19 +05:30
d8b0b372f8 move to babel emacs configuration 2022-03-18 06:24:13 +05:30
71774333bb move emacs config file to home folder 2022-03-18 01:58:50 +05:30
e2e9d5ec0f home/modules/baremacs:init
move emacs to home-manager
2022-03-18 01:50:43 +05:30
ed3bf181ef home: major restructuring
needs more work
2022-03-15 10:42:50 +05:30
81452ba490 Remilia/services: clean up 2022-03-09 16:20:01 +05:30
e88dd9b031 Remilia/boot: bochs_drm -> bochs, also update the flake inputs 2022-03-09 11:46:24 +05:30
26f2fdfd0c Remilia: more updates
services: remove redundant nginx confs
and some very minor changes
2022-03-09 11:24:16 +05:30
53b18802dd Remilia: updates
services: add znc and some random changes
networking: random changes
mailserver: add masti@weirdnatto.in
and some other misc changes
2022-03-09 10:53:07 +05:30
c27c8c3c56 misc update
home: some keybind changes
nvim: random lsp related changes
hosts/satori: add a separate nix.nix file
home/services: random mpd update
2022-03-05 04:35:29 +05:30
c858af7768 neovim: upgrade to nvim-cmp from nvim-compe 2022-02-08 17:00:36 +05:30
ea164bddf8 trivial change 2022-02-08 14:47:55 +05:30
7690f5e954 xmobar, stalonetray: some further changes 2022-02-08 14:41:35 +05:30
97530d7f6c xmobar, nvim: change themes to tomorrow-night 2022-02-08 01:47:01 +05:30
a1921a342b changed color themes 2022-02-07 14:45:50 +05:30
c9e27b621d flake.nix: add old channel, Marisa: downgrade to cgroupv1 2022-02-03 12:23:24 +05:30
b729daba56 Satori: clear up services 2022-02-01 21:52:39 +05:30
fd7dfff321 home/secrets: update .zshrc.age 2022-01-31 23:04:04 +05:30
5ec98401aa home/natto.nix: generic update 2022-01-31 23:00:56 +05:30
b8d1f01af5 mix-pkgs: add hcl ls 2022-01-31 22:44:58 +05:30
32a4b8e5c2 Marisa: generic networking.nix change 2022-01-31 22:44:43 +05:30
0033e909ab Marisa: change consul and nomad dc names and specify envoy image 2022-01-31 22:43:57 +05:30
bca3b14713 Marisa: boot changes 2022-01-31 22:42:32 +05:30
2223c5942e vault:migrate to consul backend 2022-01-30 11:10:37 +05:30
dd96dacbf7 Marisa: try consul and nomad 2022-01-28 02:11:38 +05:30
881512cf97 the
a.
2022-01-25 22:50:33 +05:30
72ea26c17e changed root cert and TLS locations 2022-01-21 14:55:10 +05:30
236 changed files with 14195 additions and 6322 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
flake.lock linguist-generated
*.yuck linguist-language=lisp
**/emacs/config.org linguist-language=elisp

8
.gitignore vendored
View File

@@ -1,2 +1,8 @@
.github
noise.nix
\#*\#
.*.~*~
~*~
*~
*.html
result
.sass-cache

View File

@@ -1,38 +0,0 @@
# Personal Dotfiles
## TODO
1. Add user specific traditional dotfiles.
2. ~~Try home-manager~~
3. ~~Try nix flakes~~
## How install workey
either do
```
git clone https://github.com/natto1784/dotfiles
cd dotfiles
nixos-rebuild switch --flake .#Satori
```
or
`nixos-rebuild switch --flake github:natto1784/dotfiles#Satori`\
Replace Satori with whatever system you want or replace to whatever hostname you want in the config
## How home-manager workey
Either clone repo and do `./hm-switch` inside it (login as the user you want to change config as!!!)
or
```
nix build github:natto1784/dotfiles#hm-configs.{USER}.activationPackage -o hm-result
./hm-result/activate
```
You can unlink "hm-result" after that
replace {USER} with 'natto' or whatever is availabe (or change it in the config)
## How packages workey
To build or run any of the packages in this flake do\
`nix <"run"/"build"> github:natto1784/dotfiles#pkgs.<your_arch>.<package_name>`
Following are the people whose configs I took inspiration from and learned stuff from
- [fufexan](https://github.com/fufexan)
- [NobbZ](https://github.com/NobbZ)
- [dramforever](https://github.com/dramforever)
I'm grateful to all of them

26
README.org Normal file
View File

@@ -0,0 +1,26 @@
#+TITLE: Personal Dotfiles
#+AUTHOR: Amneesh Singh
#+OPTIONS: toc:nil num:nil
NixOS configurations for several hosts, now with [[https://flake.parts][flake-parts]].
* How home-manager workey
Just do
#+begin_src sh
nix run nixpkgs#home-manager switch -- --flake "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos"
#+end_src
* How packages workey
To build or run any of the packages in this flake do
#+begin_src sh
nix <"run"/"build"> "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos"#<package_name>
#+end_src
-----
* I took help from these people and their dotfiles
+ [[https://github.com/fufexan][fufexan]]
+ [[https://github.com/NobbZ][NobbZ]]
+ [[https://github.com/dramforever][dramforever]]
I'm grateful to all of them

View File

@@ -1,29 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE6zCCAtOgAwIBAgIUNNSWTkJnI0dCgQaJdOCX3JAWHc0wDQYJKoZIhvcNAQEL
BQAwFDESMBAGA1UEAwwJMTAuNTUuMC4yMB4XDTIxMDYyNTEzNTYzMFoXDTIyMDYy
NTEzNTYzMFowFDESMBAGA1UEAwwJMTAuNTUuMC4yMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEAxMeQxG3pdasufk1FoJHs9gB9SjV8KwDtp3fWrF9IvU+Y
S/AemARwcublbom8VHfAKAQymUd6ySPrxtfGfY3/p1gfiYVQDEW6tEpLas5mkrPG
zKY3L7ORCuCcxCc6gJZIjSHQv4LpJutcsJDvGiwrw+2M+8mMD2EL0QHT8zYMefhV
Rm9opkcgzE9uWzyzlgqEEVu7FFkBIc6s0f27ZQzYtSrabU0qeCc3jrxlux/0jupM
73LG79CvPo3sTocDmol2Rqi85OE7KuR7CgMqa5ZkR4uLLTnp8Zia0Ha4UuMRANHN
FxIfnXcTgkx8SQZH9JH8GAD1af5CJFvdJ1AB6QvnTSPoEGVDVlAJhq0CIakMdA/b
HALiM1+o7M39HyHv2f8UZ2CsESmCpgxVsISCKkVeGt4VrsvgxmJU+NQPGci8Vgwx
Vv5KueenzfmyX1DYRm1IJz4IufG3wypGSMWwrIDFCLfFhBm1buJLdU+mLddD+jA3
tc0JnxB7VINEhb0DiK1OuxeRhRrp6IjDUurMdQ+euyTToJAttfm0USUQx+43aNot
hd4ZwfX43oN//N+wGr0gKENmO5mF95mQTmPdH+1JlKsyMgXoWerezE8kFsCfK6Z6
1eEvaFtqsPYN/dmXQRQQGW80iQKPFdmwk33KyH5TLBSLDlJCuz/ml9HC6CSQ+zMC
MIIE6zCCAtOgAwIBAgIUYwGtP4yx0u86Vhmz/QMYny9UZNkwDQYJKoZIhvcNAQEL
BQAwFDESMBAGA1UEAwwJMTAuNTUuMC4yMB4XDTIyMDEyMTA3NTI1M1oXDTMyMDEx
OTA3NTI1M1owFDESMBAGA1UEAwwJMTAuNTUuMC4yMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEA8WLjrsuY8F1dAIVxYDwZSl8IXh2msJJw/mQlpKXS4UKm
ypwYNuV/onEwqX+J4j09+IKFD5CDOXJ6ttUkdYRBt+sJ3irR82PBJWw1VN0Hx4XX
4ln8nVyZzM5DXERGjk9odN0B0ItKrYR7IoX4peabuU8mHamLbnO0k2TOjChFqFC1
1C7m2KRJ8RSAP17oYnwi7zUs8ZCBHaoxD1mhcCrCTgA2fGiv1CAtkoYuPLabxgwA
o9flmw+s2f95dGmWAybKzRGHXXy26CfU0HWwujkEPWORwuh2aISY+nVY+jigqae8
5SuL2qHnQW5CxViUjG8tzsuSq/Tad+EbQ8UsxjPgzoD3NdK0Ynk4vUKoBShVPqkk
Psut7eaVykJ7E3Epv/BnJlvfTvqnR0VwCI5A0QQd37inBU2Qlv5cK3sKKmN4xdMt
r26eVYG05u+d3PbC7GW/Ocydu74U8vUtBN/ev5QzYFPwjz6shabfIRdjNy1o38tX
CZjCvdh19WJinQjCoRqBMqD29pM7QBb4ubn4Yj2xTdGu5jbeHwSwk5aof3kZi7OD
yZJvidkz1xwvTfhDFIMmGwdEofeVcn3UpYzTN8/+6dQVk1SyGHf1+UOe3d8xcXQf
KEHOJsOlq9W54VtAj+WfPvAEF6dI8GdIMc9rjvPVUWtJdEYIVA1RL20tt0CL1BkC
AwEAAaM1MDMwCwYDVR0PBAQDAgQwMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1Ud
EQQIMAaHBAo3AAIwDQYJKoZIhvcNAQELBQADggIBAAMB4ykzYA6bAPRftL82VrkM
Ls8p5xdXogiE68QegoGVIV1R4j6JEotPSdDsvt5B77RVgL1aJ/rIsjfX26IkN9me
wTE0NlhOSWY2ShsPJ9YRHPV0UAyrzE0KPVqnpeQWuS6Vt7aNaAcNXR/Xgs+DJCab
SfWN6uZHbgYxoMzbV7Xk5HOinJmxt2r31+LZL4rCUajobpNdod6a1s2XQz8vwKgA
c7tUEfTe48YOXeLT4GcugYDL+JliaDTwXWJ5VzQByJeBvwLsggVRBtsxT2tbr0iT
FBPRK+vT20vZVACzxUlRpvzUGau16IdzF2u8/KO+0Zbpm9k/EzPRvJcxt5mBp+Mh
joqTtp3SG/nCbs+6z8FYzZYHzWPHg1YdcZcnWj7YUDDIZLLJMX+0hGUcWLKV9+MV
VCGpRGY8IZ+Ke3KN0J0IkJLfERezQdyVrSJlgvKAjICQ4dboLCFFm1EvEp/beSnW
9STGWRREyId7e3UeL0EBnISd3ym7O+oY2QcbCTj+WPaFefovwBfixG4AFEJlJsYp
1gQClz28AvDT6aDYSKWodQKXSbz5j0BLG5ez7IBEdvXzmcZU53kKmn5oW9pE7q2M
0OCu628xx51ePG2FgF50vvA5rzJjDIN+vwS+oBSNKG8KscsxGt3V4g3Hmzzh9qg+
LUHIEflezPJoCBc1CBBm
EQQIMAaHBAo3AAIwDQYJKoZIhvcNAQELBQADggIBABElHiY1vOY2ksNNAr/McpgH
1OHhQhMt91Ah1fXsyo25MebTq2MUz5E/csBaHU+iRHVJ2IDhKh9xQtzvvnuLHSHe
of7Tm4GkHpeTq8p8FuCP7r6BN7ehJm4z9zewExPP6QtRXgkJsOeud47yKCgW/9sH
UVwUSB0pBpz8E87VbxnAqbjpfAWY2L5y/7o/g6iaX5Kwn5mNtgWHrjTD1Itdl738
+ESurei7JDBF0zJAEDxqvIuuVl1rkoTru7MaCT12Y9tfWYUyYDbXgZ3daIrAhnWs
ZZveNOLbtpB1099L/sdsbITfNg4pDtMvOTp3NCN4jkt+vFopwMpUYxXSADrJ14MJ
3dUdYtlFcqtP7j2Da74ldw+5U7T8DJi8fOQ+KpNpGaE+OG+X9pl+1QPdisRBADuc
pCDFgAitiL9XUnErlm6G+pbgFdC2sXRDsBfawp9ApWOCdNb5VQ9KwJPoD1ZxQBkx
x/7eCtKy6q6XyPkT/Feib0R1Fsiet6PYaCt9sWercvEogqgJSVbtihebj0z5Bl2W
q3j22H7UL/P5yiQlDs4t+OUfDVd3wk9l5DD+b8jhawuOSYwbUU8X+fex+8nt08AY
MxKS3xXoO872XiW4zq6ymOyGzpTZRkPywQzrQdpjrs4umJa8hFf207liMWdHflte
sr09NMvxcPr+WNEuKV6r
-----END CERTIFICATE-----

45
conf/colors.nix Normal file
View File

@@ -0,0 +1,45 @@
#Catpuccin Mocha
let
colors = rec {
rosewater = "#F5E0DC";
flamingo = "#F2CDCD";
pink = "#F5C2E7";
mauve = "#CBA6F7";
red = "#F38BA8";
maroon = "#EBA0AC";
peach = "#FAB387";
yellow = "#F9E2AF";
green = "#A6E3A1";
teal = "#94E2D5";
sky = "#89DCEB";
sapphire = "#74C7EC";
blue = "#89B4FA";
lavender = "#B4BEFE";
text = "#CDD6F4";
subtext1 = "#BAC2DE";
subtext0 = "#A6ADC8";
overlay2 = "#9399B2";
overlay1 = "#7F849C";
overlay0 = "#6C7086";
surface2 = "#585B70";
surface1 = "#45475A";
surface0 = "#313244";
base = "#1E1E2E";
mantle = "#181825";
crust = "#11111B";
background = base;
foreground = text;
};
in
rec {
default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
hex = colors; # hex with hash
argb =
{
a ? "ff",
}:
builtins.mapAttrs (_: color: a + color) default; # ARGB
}

11
conf/default.nix Normal file
View File

@@ -0,0 +1,11 @@
{ inputs, self, ... }:
{
config._module.args.globalArgs = {
inherit inputs self;
flake = self;
conf = {
colors = import ./colors.nix;
network = import ./network.nix;
};
};
}

31
conf/network.nix Normal file
View File

@@ -0,0 +1,31 @@
{
addresses = rec {
wireguard = rec {
ipPrefix = "10.55.0";
prefixLength = 24;
ipsWithPrefixLength = "10.55.0.0/24";
ips = {
remilia = "${ipPrefix}.1";
marisa = "${ipPrefix}.2";
satori = "${ipPrefix}.3";
hina = "${ipPrefix}.4";
okina = "${ipPrefix}.5";
suwako = "${ipPrefix}.6";
};
};
domain = {
natto = "weirdnatto.in";
amneesh = "amneesh.com";
chutiya = "chutiya.online";
};
};
commonSSHKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHingN2Aho+KGgEvBMjtoez+W1svl9uVoa4vG0d646j"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPX1HDzWpoaOcU8GDEGuDzXgxkCpyeqxRR6gLs/8JgHw"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOSQnDNrNP69tIK7U2D7qaMjycfIjpgx0at4U2D5Ufib"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5V/hdkTTQSkDLXaEwY8xb/T8+sWtw5c6UjYOPaTrO8"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFyKi0HYfkgvEDvjzmDRGwAq2z2KOkfv7scTVSnonBh"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICEow6+G9F0JjvVwnyrFoObFAKKBQQ2wwScST0Xzs1l"
];
}

18
consul-agent-ca.pem Normal file
View File

@@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC7jCCApSgAwIBAgIRAMFIx6TUVrRAUeIXb57HF3gwCgYIKoZIzj0EAwIwgbkx
CzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj
bzEaMBgGA1UECRMRMTAxIFNlY29uZCBTdHJlZXQxDjAMBgNVBBETBTk0MTA1MRcw
FQYDVQQKEw5IYXNoaUNvcnAgSW5jLjFAMD4GA1UEAxM3Q29uc3VsIEFnZW50IENB
IDI1NjkxODg5NzgxODk0ODY5MDk5NjUyNTU0MzM3NjIzMzYzMzY1NjAeFw0yMjEw
MjMxMjUxMDRaFw0yNzEwMjIxMjUxMDRaMIG5MQswCQYDVQQGEwJVUzELMAkGA1UE
CBMCQ0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xGjAYBgNVBAkTETEwMSBTZWNv
bmQgU3RyZWV0MQ4wDAYDVQQREwU5NDEwNTEXMBUGA1UEChMOSGFzaGlDb3JwIElu
Yy4xQDA+BgNVBAMTN0NvbnN1bCBBZ2VudCBDQSAyNTY5MTg4OTc4MTg5NDg2OTA5
OTY1MjU1NDMzNzYyMzM2MzM2NTYwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQv
tcFGqOowIT/b5BefJv01uQaRCnaGnFJVC1TXe9WEyA4Lw1/+N8LQwiPSv4jp+IUF
ec8n6fHbX0XgHxQYgeMYo3sweTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUw
AwEB/zApBgNVHQ4EIgQgNli2bO4+L+2+K/cSffjSKMGowla+pq5nW2ygI94ies8w
KwYDVR0jBCQwIoAgNli2bO4+L+2+K/cSffjSKMGowla+pq5nW2ygI94ies8wCgYI
KoZIzj0EAwIDSAAwRQIhAO9CkARtyOsZnTNgTUOwKX28UV0YEYus12iv/rDVpK0y
AiBgmfIEzC+Lkitst6O3pahAneltSKid65Racp8lGKrRhg==
-----END CERTIFICATE-----

1182
flake.lock generated

File diff suppressed because it is too large Load Diff

203
flake.nix
View File

@@ -1,138 +1,85 @@
{
inputs = {
stable.url = github:nixos/nixpkgs/nixos-21.11;
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
master.url = github:nixos/nixpkgs/master;
home-manager.url = github:nix-community/home-manager;
home-manager-stable.url = github:nix-community/home-manager/release-21.11;
nur.url = github:nix-community/NUR;
agenix.url = github:ryantm/agenix;
utils.url = github:numtide/flake-utils;
nvim.url = github:nix-community/neovim-nightly-overlay;
mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver;
nbfc.url = github:natto1784/nbfc-linux/yawr;
emacs.url = github:nix-community/emacs-overlay;
nix-gaming.url = github:fufexan/nix-gaming;
rust.url = github:oxalica/rust-overlay;
};
{
description = "dotfiles";
outputs = inputs@{self, nixpkgs, stable, master, ... }:
inputs.utils.lib.eachDefaultSystem (system:
let
mkPkgs = channel: system: import channel {
inherit system;
config.allowUnfree = true;
};
channels = final: prev: {
stable = mkPkgs stable prev.system;
unstable = mkPkgs nixpkgs prev.system;
master = mkPkgs master prev.system;
};
overlays = [
(import ./overlays/overridesandshit.nix)
(import ./overlays/packages.nix)
];
in
{
legacyPackages = import nixpkgs {
inherit system;
overlays = overlays ++ [
inputs.nur.overlay
inputs.nvim.overlay
inputs.rust.overlay
inputs.emacs.overlay
channels
( _: _: {
nbfc-linux=inputs.nbfc.defaultPackage.${system};
games = inputs.nix-gaming.packages.${system};
})
outputs =
inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
config.allowUnfree = true;
config.allowBroken = true;
};
}) //
(
let
personalModules = [
./modules/nvidia-offload.nix
./modules/sound.nix
./modules/xorg.nix
./modules/emacs
];
commonModules = [
./modules/nvim
./modules/vault-agent.nix
];
serverModules = [
./modules/builder.nix
./modules/min-pkgs.nix
./modules/min-stuff.nix
];
in
{
hm-configs = {
natto = inputs.home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
configuration = { lib, ... }: {
imports = [
./home/natto.nix
];
nixpkgs = {
overlays = self.legacyPackages.x86_64-linux.overlays;
config.allowUnfree = true;
config.allowBroken = true;
config.permittedInsecurePackages = [
"electron-9.4.4"
];
imports = [
./hosts
./home
./pkgs
./conf
];
perSystem =
{ system, pkgs, ... }:
rec {
formatter = pkgs.nixfmt-tree;
devShells.default =
with pkgs;
mkShell {
packages = [
nixd
formatter
];
};
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
};
};
homeDirectory = "/home/natto";
username = "natto";
};
};
nixosConfigurations = {
#Home laptop
Satori = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/satori
inputs.agenix.nixosModules.age
{
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
}
]
++ personalModules
++ commonModules;
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
#Home server (RPi4)
Marisa = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./hosts/servers/marisa.nix
#inputs.mailserver.nixosModules.mailserver
{
nixpkgs.pkgs = self.legacyPackages.aarch64-linux;
}
]
++ commonModules
++ serverModules;
};
stable.url = "github:nixos/nixpkgs/release-24.05";
#Oracle Cloud VM
Remilia = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/servers/remilia.nix
inputs.mailserver.nixosModules.mailserver
{
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
}
]
++ commonModules
++ serverModules;
};
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
});
mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs";
};
filehost = {
url = "github:natto1784/yamaf";
};
nix-gaming.url = "github:fufexan/nix-gaming";
nbfc = {
url = "github:nbfc-linux/nbfc-linux";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay";
nvim-overlay.url = "github:nix-community/neovim-nightly-overlay";
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
};
agenix.url = "github:ryantm/agenix";
ags.url = "github:Aylur/ags/v1";
nixgl.url = "github:nix-community/nixGL";
};
}

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env bash
echo "You're about to switch your home-manager configuration as '$USER'"
read -p "Continue (y/n)?" conf
if [ ${conf,,} != "y" ]; then
echo "If this is not you, then log into your profile first!"
exit 1
else
read -p "Do you want to use sudo instead of doas? (y/n)" conf2
elev="doas"
if [ ${conf2,,} == "y" ]; then
elev="sudo"
fi
$elev nix build .\#hm-configs.$USER.activationPackage -o hm-result
./hm-result/activate
$elev unlink hm-result
fi

8
home/README Normal file
View File

@@ -0,0 +1,8 @@
natto : default user for okina (desktop - NixOS Unstable)
natto-laptop : default user for satori (laptop - NixOS Unstable)
bat : default user for remilia (Oracle VM - NixOS Unstable)
spin : default user for hina (Oracle VM - NixOS Unstable)
spark : default user for marisa (RPi4 - NixOS Unstable)
kero : default user for suwako (ARM OracleVM - NixOS Unstable)
amneesh : default user for nightbug (Workplace PC - Arch Linux)

37
home/amneesh/default.nix Normal file
View File

@@ -0,0 +1,37 @@
{
config,
pkgs,
inputs,
...
}:
{
home = {
homeDirectory = "/home/amneesh";
username = "amneesh";
stateVersion = "24.05";
};
targets.genericLinux.enable = true;
imports = [
./pkgs.nix
./nixgl.nix
./screen.nix
./wayvnc.nix
# From personal
../natto/ags
../natto/emacs.nix
../natto/browser.nix
../natto/dunst.nix
../natto/gtk.nix
../natto/cursor.nix
../natto/wayland.nix
../natto/hypridle.nix
../natto/hyprlock.nix
../natto/hyprpaper.nix
../natto/hyprland.nix
../natto/tofi.nix
../natto/foot.nix
];
}

29
home/amneesh/nixgl.nix Normal file
View File

@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
inputs,
...
}:
let
inherit (inputs) nixgl;
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
inherit (config.lib.nixGL) wrap;
in
{
nixGL = {
packages = nixgl.packages;
defaultWrapper = "mesa";
offloadWrapper = "nvidiaPrime";
installScripts = [
"mesa"
"nvidiaPrime"
];
};
# hyprland
wayland.windowManager.hyprland.package = lib.mkForce (wrap hyprland);
# hypridle
services.hypridle.package = lib.mkForce (wrap pkgs.hypridle);
}

29
home/amneesh/pkgs.nix Normal file
View File

@@ -0,0 +1,29 @@
{
pkgs,
inputs,
...
}:
{
xdg.mime.enable = true;
programs = {
bash.enable = true;
};
home.packages = with pkgs; [
cmake
corkscrew
dtc
file
htop
llvmPackages.clang
(nattovim.override { nvimPackage = inputs.nvim-overlay.packages.${pkgs.system}.neovim; })
meson
ninja
thunderbird
wget
xfce.thunar
libreoffice
git-repo
];
}

12
home/amneesh/screen.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home = {
packages = [ pkgs.screen ];
file = {
".screenrc".text = ''
defscrollback 10000
'';
};
};
}

13
home/amneesh/wayvnc.nix Normal file
View File

@@ -0,0 +1,13 @@
{
...
}:
{
services.wayvnc = rec {
enable = true;
autoStart = enable;
settings = {
address = "0.0.0.0";
port = 5900;
};
};
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.direnv.enable = true;
}

View File

@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
fira-code
fira-mono
monoid
font-awesome
material-icons
material-design-icons
lohit-fonts.devanagari
lohit-fonts.gurmukhi
office-code-pro
eb-garamond
noto-fonts-cjk-sans
takao
liberation_ttf
];
fonts.fontconfig.enable = true;
}

9
home/common/laptop.nix Normal file
View File

@@ -0,0 +1,9 @@
{ lib, ... }:
{
options.isLaptop = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether this device is a laptop or not";
};
}

View File

@@ -0,0 +1,28 @@
{ lib, ... }:
{
programs.zsh = {
enable = true;
autocd = true;
history = rec {
expireDuplicatesFirst = true;
size = 30000;
save = size;
};
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
prezto = {
enable = true;
prompt.theme = "pure";
autosuggestions.color = "fg=yellow,bold";
utility.safeOps = false;
extraConfig = lib.mkBefore ''
export GREP_COLORS="mt=01;31"
'';
};
initContent = lib.mkAfter ''
unsetopt extendedGlob
[[ -f ~/.zsh_custom ]] && source ~/.zsh_custom
'';
};
}

View File

@@ -1,30 +0,0 @@
#! /bin/sh
bspc rule -r "*"
##Autostart
pgrep -x sxhkd > /dev/null || sxhkd &
picom --experimental-backends &
feh --bg-scale ~/Downloads/gruvbox.jpg &
killall "polybar"
polybar main &
killall node
node /mnt/Stuff/code/muhbot
bspc monitor -d          
#bspc monitor -d I II III IV V VI VII VIII IX X
bspc config border_width 2
bspc config window_gap 10
bspc config focus_follows_pointer true
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config single_monocle true
bspc config top_padding 50
bspc config normal_border_color "#ffffff"
bspc config active_border_color "#1bb1b1"
bspc config focused_border_color "#fe8019"
bspc config urgent_border_color "#fe8019"

View File

@@ -1,66 +0,0 @@
[global]
monitor = 0
follow = mouse
geometry = "250x20-50+20"
# Turn on the progess bar
progress_bar = true
progress_bar_height = 3
progress_bar_frame_width = 1
progress_bar_min_width = 125
progress_bar_max_width = 250
indicate_hidden = yes
shrink = no
transparency = 0.8
separator_height = 2
padding = 5
text_icon_padding = 4
frame_width = 3
frame_color = "#ebdbb2"
separator_color = frame
sort = yes
idle_threshold = 120
font = Fira Mono 10
markup = full
format = "<b>%a<b> - %s\n%b"
alignment = left
vertical_alignment = center
show_age_threshold = 60
word_wrap = yes
ellipsize = middle
ignore_newline = no
stack_duplicates = true
hide_duplicate_count = false
show_indicators = yes
icon_position = left
min_icon_size = 0
max_icon_size = 32
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
sticky_history = yes
history_length = 20
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/firefox -new-tab
always_run_script = true
title = Dunst
class = Dunst
startup_notification = false
verbosity = mesg
corner_radius = 1
ignore_dbusclose = false
[urgency_low]
background = "#222222"
foreground = "#888888"
timeout = 10
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 10

View File

@@ -1 +0,0 @@
../../../modules/emacs/init.el

View File

@@ -1,2 +0,0 @@
Shamelessly taken from https://github.com/mut-ex/minimal-functional-fox
and added gruvbox colors

View File

@@ -1,355 +0,0 @@
:root {
/* Minimal Functional Fox variables*/
--mff-bg: #1d2021;
--mff-icon-color: #bbbbbb;
--mff-nav-toolbar-padding: 8px;
--mff-sidebar-bg: var(--mff-bg);
--mff-sidebar-color: #e0fbfc;
--mff-tab-border-radius: 0px;
--mff-tab-color: #ebdbb2;
--mff-tab-font-family: "Fira Mono for Powerline", sans;
--mff-tab-font-size: 11pt;
--mff-tab-font-weight: 400;
--mff-tab-height: 32px;
--mff-tab-pinned-bg: #70c1b3;
--mff-tab-selected-bg: #ebdbb2;
--mff-tab-selected-color: #1d2021;
--mff-tab-soundplaying-bg: #818181;
--mff-tab-soundplaying-color: #1d2021;
--mff-urlbar-color: #98c1d9;
--mff-urlbar-focused-color: #e0fbfc;
--mff-urlbar-font-family: "Fira Mono for Powerline", serif;
--mff-urlbar-font-size: 12pt;
--mff-urlbar-font-weight: 500;
--mff-urlbar-results-color: #e0fbfc;
--mff-urlbar-results-font-family: "Fira Mono for Powerline", serif;
--mff-urlbar-results-font-size: 12pt;
--mff-urlbar-results-font-weight: 500;
--mff-urlbar-results-url-color: #98c1d9;
/* --mff-tab-selected-bg: linear-gradient(90deg, rgba(232,74,95,1) 0%, rgba(255,132,124,1) 50%, rgba(254,206,168,1) 100%); */
/* --mff-urlbar-font-weight: 600; */
/* Overriden Firefox variables*/
--autocomplete-popup-background: var(--mff-bg) !important;
--default-arrowpanel-background: var(--mff-bg) !important;
--default-arrowpanel-color: #fefefa !important;
--lwt-toolbarbutton-icon-fill: var(--mff-icon-color) !important;
--panel-disabled-color: #f9f9fa80;
--toolbar-bgcolor: var(--mff-bg) !important;
--urlbar-separator-color: transparent !important;
}
/*
_____ _ ___ ___
|_ _/_\ | _ ) __|
| |/ _ \| _ \__ \
|_/_/ \_\___/___/
*/
.tab-background[selected="true"] {
background: var(--mff-tab-selected-bg) !important;
}
.tab-text[selected="true"] {
color: var(--mff-tab-selected-color) !important;
font-weight: bold !important;
}
.tab-background:not[visuallyselected] {
background: var(--mff-tab-selected-bg) !important;
opacity: 0.5 !important;
}
/* This positions the tabs under the navaigator container */
#titlebar {
-moz-box-ordinal-group: 3 !important;
}
.tabbrowser-tab::after,
.tabbrowser-tab::before {
border-left: none !important;
}
.tab-background {
border: none !important;
}
.tabbrowser-arrowscrollbox {
margin-inline-start: 4px !important;
margin-inline-end: 0px !important;
}
.tab-close-button {
display: none !important;
}
.tab-text {
font-family: var(--mff-tab-font-family);
font-weight: var(--mff-tab-font-weight);
font-size: var(--mff-tab-font-size) !important;
color: var(--mff-tab-color);
}
/* Hide the favicon for tabs */
hbox.tab-content .tab-icon-image {
display: none !important;
}
/* Show the favicon for tabs that are pinned */
hbox.tab-content[pinned=true] .tab-icon-image {
display: initial !important;
}
hbox.tab-content[pinned=true] .tab-text {
display: none !important;
}
#tabbrowser-tabs {
--tab-loading-fill: #033433 !important;
}
.tab-label-container:not([textoverflow]) {
display: flex;
overflow: hidden;
justify-content: center;
width: 50% !important;
max-width: 50% !important;
min-width: 50% !important;
}
/* .tab-label-container::after {
content: "?" !important;
} */
.tab-line {
display: none !important;
}
.tabbrowser-tab {
border-radius: var(--mff-tab-border-radius) !important;
border-width: 0;
height: var(--mff-tab-height) !important;
margin-bottom: 4px !important;
margin-inline-end: 4px !important;
margin-top: 4px !important;
max-height: var(--mff-tab-height) !important;
min-height: var(--mff-tab-height) !important;
}
.tabbrowser-tab[soundplaying="true"] {
background-color: var(--mff-tab-soundplaying-bg) !important;
}
#tabs-newtab-button {
list-style-image: url("https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/add.svg") !important;
opacity: 0.7;
}
.tab-icon-sound {
display: none !important;
}
/*
_____ ___ ___ _ ___ _ ___
|_ _/ _ \ / _ \| | | _ ) /_\ | _ \
| || (_) | (_) | |__| _ \/ _ \| /
|_| \___/ \___/|____|___/_/ \_\_|_\
*/
.urlbar-icon > image {
fill: var(--mff-icon-color) !important;
color: var(--mff-icon-color) !important;
}
.toolbarbutton-text {
color: var(--mff-icon-color) !important;
}
.urlbar-icon {
color: var(--mff-icon-color) !important;
}
.toolbarbutton-icon {
/* filter: drop-shadow(0 0 0.75rem crimson); */
}
#urlbar-results {
font-family: var(--mff-urlbar-results-font-family);
font-weight: var(--mff-urlbar-results-font-weight);
font-size: var(--mff-urlbar-results-font-size) !important;
color: var(--mff-urlbar-results-color) !important;
}
.urlbarView-row[type="bookmark"] > span{
color: green !important;
}
.urlbarView-row[type="switchtab"] > span{
color: orange !important;
}
.urlbarView-url, .search-panel-one-offs-container {
color: var(--mff-urlbar-results-url-color) !important;
font-family: var(--mff-urlbar-font-family);
font-weight: var(--mff-urlbar-results-font-weight);
font-size: var(--mff-urlbar-font-size) !important;
}
.urlbarView-favicon, .urlbarView-type-icon {
display: none !important;
}
#urlbar-input {
font-size: var(--mff-urlbar-font-size) !important;
color: var(--mff-urlbar-color) !important;
font-family: var(--mff-urlbar-font-family) !important;
font-weight: var(--mff-urlbar-font-weight)!important;
text-align: center !important;
}
#tracking-protection-icon-container, #identity-box {
display: none;
}
#back-button > .toolbarbutton-icon{
--backbutton-background: transparent !important;
border: none !important;
}
#back-button {
list-style-image: url("https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/left-arrow.svg") !important;
}
#forward-button {
list-style-image: url("https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/right-arrow.svg") !important;
}
toolbar {
background-image: none !important;
}
#urlbar-background {
opacity: .98 !important;
}
#navigator-toolbox, toolbaritem {
border: none !important;
}
#urlbar-background {
background-color: var(--mff-bg) !important;
border: none !important;
}
.toolbar-items {
background-color: var(--mff-bg) !important;
}
#sidebar-search-container {
background-color: var(--mff-sidebar-bg) !important;
}
box.panel-arrowbox {
display: none;
}
box.panel-arrowcontent {
border-radius: 8px !important;
border: none !important;
}
tab.tabbrowser-tab {
overflow: hidden;
}
tab.tabbrowser-tab:hover {
box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
image#star-button {
display: none;
}
toolbar#nav-bar {
padding: var(--mff-nav-toolbar-padding) !important;
}
toolbar#nav-bar {
padding: 4px !important;
}
#urlbar {
max-width: 70% !important;
margin: 0 15% !important;
/* position: unset!important; */;
}
#urlbar-input:focus {
color: var(--mff-urlbar-focused-color) !important;
}
.megabar[breakout-extend="true"]:not([open="true"]) > #urlbar-background {
box-shadow: none !important;
background-color: transparent !important;
}
toolbarbutton {
box-shadow: none !important;
}
/*
___ ___ ___ ___ ___ _ ___
/ __|_ _| \| __| _ ) /_\ | _ \
\__ \| || |) | _|| _ \/ _ \| /
|___/___|___/|___|___/_/ \_\_|_\
*/
.close-icon, .urlbar-icon {
fill: var(--mff-icon-color) !important;
}
.sidebar-placesTree {
color: var(--mff-sidebar-color) !important;
}
#sidebar-switcher-target {
/* color: white !important; */
}
#sidebar-box {
--sidebar-background-color: var(--mff-sidebar-bg) !important;
}
splitter#sidebar-splitter {
opacity: 0 !important;
}
splitter#sidebar-splitter {
border: none !important;
background-color: transparent !important;
}
image#sidebar-icon {
display: none;
}
/*
_ ___ ___ _____ _____ _ _ _ ___ _
/_\ | _ \ _ \/ _ \ \ / / _ \/_\ | \| | __| |
/ _ \| / / (_) \ \/\/ /| _/ _ \| .` | _|| |__
/_/ \_\_|_\_|_\\___/ \_/\_/ |_|/_/ \_\_|\_|___|____|
*/
.panel-arrowcontent {
padding: 0px !important;
margin: 0px !important;
}
toolbarseparator {
display: none;
}

View File

@@ -1,23 +0,0 @@
@import url("userChrome.css");
/* Removes white loading page */
@-moz-document url(about:blank), url(about:newtab), url(about:home) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: var(--mff-bg) !important;
}
}
/* Hide scrollbar */
:root{
scrollbar-width: none !important;
}
@-moz-document url(about:privatebrowsing) {
:root{
scrollbar-width: none !important;
}
}

View File

@@ -1,154 +0,0 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
st
# program launcher
super + d
rofi -show drun
# make sxhkd reload its configuration files:
super + alt + c
pkill -USR1 -x sxhkd
# quit/restart bspwm
super + shift + {e,r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }q
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + shift + f
bspc desktop -l next
# send the newest marked node to the newest preselected node
#super + y
# bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
#super + g
# bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {\~tiled,\~pseudo_tiled,\~floating,\~fullscreen}
# set the node flags
#super + ctrl + {m,x,y,z}
# bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + shift + {h,j,k,l}
bspc node -s {west,south,north,east}
super + {h,j,k,l}
bspc node -f {west,south,north,east}
# focus the code for the given path jump
#super + {p,b,comma,period}
# bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
#super + {grave,Tab}
# bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
#
# Screenshotting
#
@Print
flameshot & flameshot full -p ~/Pictures
# exec scrot '%d-%m-%Y_%I-%M-%S%p.png' -e 'mv ~/$f ~/Pictures/'
shift + @Print
flameshot & flameshot gui -p ~/Pictures
# exec scrot -s '%d-%m-%Y_%I-%M-%S%p.png' -e 'mv ~/$f ~/Pictures/'
#super + @Print
#flameshot gui full -p ~/Pictures
# exec scrot -u '%d-%m-%Y_%I-%M-%S%p.png' -e 'mv ~/$f ~/Pictures/'
alt + @Print
flameshot & flameshot gui -d 10000 -p ~/Pictures
# exec scrot -d 10 '%d-%m-%Y_%I-%M-%S%p.png' -e 'mv ~/$f ~/Pictures/'
#
#mpd/ncmpcpp
#
super + shift + n
mpc prev
super + shift + m
mpc next
super + shift + space
mpc toggle
super + A
mpc seek +00:00:05
super + D
mpc seek -00:00:05

View File

@@ -1,28 +0,0 @@
Config {
position = Static { xpos = 0 , ypos = 0, width = 1805, height = 23 },
font = "xft:Fira Mono:style=Regular:antialias=true:pixelsize=16,Font Awesome 5 Brands:pixelsize=16,Font Awesome 5 Free:pixelsize=16:style=Solid,Lohit Devanagari:style=Regular:pixelsize=16,Lohit Gurmukhi:style=Regular:pixelsize=16,Noto Sans CJK JP:style=Regular:pixelsize=16,Noto Sans CJK KR:style=Regular:pixelsize=16,Noto Sans CJK SC:style=Regular:pixelsize=16"
additionalFonts = [ "xft:Font Awesome 5 Free:pixelsize=15:style=Solid",
"xft:Font Awesome 5 Brands:pixelsize=15"
]
bgColor = "#1d2021",
fgColor = "#d5c4a1",
lowerOnStart = False,
overrideRedirect = False,
allDesktops = True,
persistent = True,
commands = [
Run MultiCpu ["-t","<fn=1>\xf2db</fn> <total>%","-L","20","-H","80","-h","#D3869B","-l","#8EC07C","-n","#EBDBB2"] 10,
Run Memory ["-t","<fn=1>\xf538</fn> <usedratio>%","-H","12288","-L","6144","-h","#D3869B","-l","#8EC07C","-n","#EBDBB2"] 20,
Run BatteryP ["BAT1","BAT0","BAT2"] ["-t", "<acstatus>", "-L", "10", "-H", "80", "-l", "#D3869B", "-h", "#8EC07C", "-n", "#EBDBB2", "--", "-O", "Charging", "-o", "<left>%", "-a", "notify-send -u critical 'Battery running out!'", "-A", "5", "--lows", "<fn=1>\xf243</fn> ", "--mediums", "<fn=1>\xf242</fn> ", "--highs", "<fn=1>\xf240</fn> "] 300,
Run Network "wlp0s20f3" ["-t","<fn=1>\xf1eb</fn> <fc=#fabd2f><rx>/<tx></fc>"] 10,
Run Date "<fn=1>\xf073 </fn> %a - %b, %_d ║ %H:%M:%S " "date" 100,
Run MPD ["-t", "<statei><title>", "--", "-P", ">> ", "-Z", "|| ", "-S", "Stopped", "-h", "127.0.0.1", "-p", "6600"] 10,
-- Run Com "playerctl" ["--player", "playerctld", "metadata", "--format", "{{status}}: {{title}}"] "" 10,
Run Com "pamixer" ["--get-volume"] "" 600,
Run UnsafeStdinReader
],
sepChar = "*",
alignSep = "--",
template = "<action=`dmenu_run` button=1><icon=/home/natto/.xmonad/lib/nixos.xpm/></action> *UnsafeStdinReader* | <fn=1></fn> *mpd* -- *multicpu* | *memory* | *wlp0s20f3* | *battery* | <fn=1></fn> <fc=#83a598>*pamixer*%</fc> | <fc=#ebdbb2>*date*</fc>"
}

122
home/default.nix Normal file
View File

@@ -0,0 +1,122 @@
{
self,
inputs,
globalArgs,
...
}:
let
common = [
{ programs.home-manager.enable = true; }
./common/zsh
./common/direnv
./common/laptop.nix
inputs.agenix.homeManagerModules.default
];
mkPkgs =
system: overlays:
import inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowBroken = true;
allowInsecure = true;
};
overlays = overlays ++ [ self.overlays.default ];
};
extraSpecialArgs = globalArgs;
in
{
flake.homeConfigurations = {
natto-laptop = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
./natto
./common/fonts
{ isLaptop = true; }
]
++ common;
pkgs = mkPkgs "x86_64-linux" [ ];
};
natto = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
./natto
./common/fonts
]
++ common;
pkgs = mkPkgs "x86_64-linux" [ ];
};
spark = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
{
home = {
homeDirectory = "/home/spark";
username = "spark";
stateVersion = "23.05";
};
}
]
++ common;
pkgs = mkPkgs "aarch64-linux" [ ];
};
bat = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
{
home = {
homeDirectory = "/home/bat";
username = "bat";
stateVersion = "23.05";
};
}
]
++ common;
pkgs = mkPkgs "x86_64-linux" [ ];
};
spin = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
{
home = {
homeDirectory = "/home/spin";
username = "spin";
stateVersion = "23.05";
};
}
]
++ common;
pkgs = mkPkgs "x86_64-linux" [ ];
};
kero = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
{
home = {
homeDirectory = "/home/kero";
username = "kero";
stateVersion = "24.05";
};
}
]
++ common;
pkgs = mkPkgs "aarch64-linux" [ ];
};
amneesh = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs;
modules = [
./amneesh
]
++ common;
pkgs = mkPkgs "x86_64-linux" [ (import ./overlays/standalone.nix) ];
};
};
}

View File

@@ -1,125 +0,0 @@
{ config, pkgs, lib, ... }:
let
home = config.home.homeDirectory;
in
{
imports = [
./stuff/programs.nix ./stuff/xsession.nix
./stuff/secret.nix
./stuff/services.nix
];
nixpkgs = {
config = {
allowUnfree = true;
};
};
age = {
sshKeyPaths = [ "${home}/.ssh/id_ed25519" ];
secrets = {
/* fish_variables = {
file = ./secrets/fish_variables.age;
path = "${home}/.config/fish/fish_variables";
mode = "660";
};
*/
mpdasrc = {
file = ./secrets/mpdasrc.age;
path = "${home}/.config/mpdasrc";
};
zshrc = {
file = ./secrets/.zshrc.age;
path = "${home}/.zshrc";
mode = "660";
};
};
};
home = {
packages = with pkgs; [
ffmpeg-full
sox
rage
curl
pamixer
mpdas
pavucontrol
unstable.anup
xfce.thunar
xfce.xfconf
xfce.tumbler
master.discord
mpd_discord_richpresence
sox
qbittorrent
#tor-browser-bundle-bin
mpc_cli
hexchat
luajit
mpv
jmtpfs
dunst
flameshot
youtube-dl
xclip
xorg.xkbcomp
xorg.xmodmap
p7zip
unrar
glxinfo
sxiv
vim
feh
dmenu
st
neofetch
xmobar
xdotool
arc-theme
arc-icon-theme
tor-browser-bundle-bin
wineWowPackages.stable
master.winetricks
games.winestreamproxy
/* (games.osu-stable.overrideAttrs (_:{
tricks = [ "gdiplus" "dotnet46" "meiryo" ];
}))*/
csvtool
pmidi
dosbox
authy
unstable.premid
(master.tauon.override { withDiscordRPC = true; })
nbfc-linux
pulseaudio
(texlive.combine { inherit (texlive) scheme-small babel lm graphics-def url; })
(qjackctl.override { jackSession = true; })
carla
electrum
anki-bin
spotify
deluge
teams
libreoffice
google-drive-ocamlfuse
customscripts
stable.ardour
stable.calf
stable.blender
];
file = {
dwm-autostart = {
source = ./config/dwm/autostart.sh;
target = "${home}/.dwm/autostart.sh";
};
dwm-status = {
source = ./config/dwm/bruhstatus.sh;
target = "${home}/.dwm/bruhstatus.sh";
};
dunstrc = {
source = ./config/dunst/dunstrc;
target = "${home}/.config/dunst/dunstrc";
};
};
};
}

11
home/natto/ags/README.md Normal file
View File

@@ -0,0 +1,11 @@
# My AGS configuration
Currently has a bar, a media box, an unstyled calendar and a settings(?) menu.
## Notes
- Works only on 1.8.2 (current)
- audio: requires pipewire-pulse
- mpris: requires gvfs for art
- hyprland: requires hyprland (🤯)
- battery: requires upower
- system-tray: requires libdbusmenu-gtk3
- systemd: for power commands

31
home/natto/ags/config.js Normal file
View File

@@ -0,0 +1,31 @@
import Bar from "./windows/bar/index.js";
import Settings from "./windows/settings/index.js";
import MusicBox from "./windows/music-box/index.js";
import Calendar from "./windows/calendar.js";
const configDir = App.configDir;
const scssStyle = `${configDir}/style.scss`;
const cssStyle = `${configDir}/style.css`;
const compileSass = () => {
Utils.exec(`scss ${scssStyle} ${cssStyle}`);
console.log("sass compiled to css");
};
compileSass();
Utils.monitorFile(`${configDir}/styles`, () => {
console.log("change detected in style");
compileSass();
App.resetCss();
App.applyCss(cssStyle);
console.log("new style applied");
});
App.config({
style: "./style.css",
windows: [Bar(), MusicBox(), Settings(), Calendar()],
});
export {};

View File

@@ -0,0 +1,6 @@
export const WindowNames = {
BAR: "bar",
SETTINGS: "settings",
MUSIC_BOX: "music-box",
CALENDAR: "calendar",
};

View File

@@ -0,0 +1,66 @@
{
pkgs,
lib,
config,
inputs,
...
}:
let
cfg = config.programs.ags;
deps =
with pkgs;
[
sass
gawk
bash
procps
coreutils
imagemagick
systemd
config.wayland.windowManager.hyprland.package
]
++ lib.optional config.isLaptop brightnessctl;
configDir = lib.cleanSourceWith {
src = ./.;
filter =
name: _:
let
baseName = baseNameOf (toString name);
in
!(lib.hasSuffix ".nix" baseName);
};
in
{
imports = [
inputs.ags.homeManagerModules.default
];
programs.ags = {
enable = true;
# package = pkgs.ags_1;
};
xdg.configFile."ags" = {
source = configDir;
recursive = true;
};
systemd.user.services.ags = {
Unit = {
Description = "Aylur's Gtk Shell";
PartOf = [
"tray.target"
"graphical-session.target"
];
};
Service = {
Environment = "PATH=${lib.makeBinPath deps}";
ExecStart = "${cfg.package}/bin/ags";
Restart = "on-failure";
RestartSec = 10;
};
Install.WantedBy = [ "graphical-session.target" ];
};
}

View File

@@ -0,0 +1,5 @@
@import "styles/global.scss";
@import "styles/bar.scss";
@import "styles/music-box.scss";
@import "styles/settings.scss";
@import "styles/calendar.scss";

View File

@@ -0,0 +1,40 @@
.bar {
background: $background;
.hyprland {
background: none;
button.focused {
transition-duration: 0;
color: $mauve;
box-shadow: 0 0 0 9999px rgba($mauve, 0.08) inset;
}
button.unfocused {
background: none;
color: $flamingo;
}
}
.music {
.music-title {
color: $sapphire;
}
.music-controls button {
color: $yellow;
}
}
.network .network-icon {
color: $lavender;
}
.date-wrapper {
color: $text;
}
.tray-button {
color: $flamingo;
}
}

View File

@@ -0,0 +1,8 @@
.calendar {
.calendar-unwrapped {
margin-top: 10px;
border: 2px solid $mauve;
border-radius: 4px;
background: rgba($base, 0.9);
}
}

View File

@@ -0,0 +1,57 @@
$rosewater: #f5e0dc;
$flamingo: #f2cdcd;
$pink: #f5c2e7;
$mauve: #cba6f7;
$red: #f38ba8;
$maroon: #eba0ac;
$peach: #fab387;
$yellow: #f9e2af;
$green: #a6e3a1;
$teal: #94e2d5;
$sky: #89dceb;
$sapphire: #74c7ec;
$blue: #89b4fa;
$lavender: #b4befe;
$text: #cdd6f4;
$subtext1: #bac2de;
$subtext0: #a6adc8;
$overlay2: #9399b2;
$overlay1: #7f849c;
$overlay0: #6c7086;
$surface2: #585b70;
$surface1: #45475a;
$surface0: #313244;
$base: #1e1e2e;
$mantle: #181825;
$crust: #11111b;
$background: $base;
$foreground: $text;
* {
font-weight: bold;
}
button {
background: none;
border-radius: 0px;
}
icon {
font-size: 24px;
}
.bar,
.music-box,
.calendar,
.settings {
font-size: 16px;
font-family: "Fira Mono";
}
.bar {
.hyprland {
font-size: 18px;
font-family: "Lohit Gurmukhi";
}
}

View File

@@ -0,0 +1,79 @@
.music-box {
.music-box-unwrapped {
margin-top: 15px;
.music-player {
background: $base;
border: 2px solid $mauve;
border-radius: 13px;
.cover-art {
margin: 2em;
border-radius: 13px;
background-size: cover;
background-position: center;
}
.music-details {
$shadow: 0px 0px 10px rgba(black, 0.8);
padding: 2em;
.title {
font-size: 30px;
color: $pink;
text-shadow: $shadow;
}
.icon-wrapper {
.icon {
font-size: 24px;
color: $yellow;
}
.artist {
color: $yellow;
text-shadow: $shadow;
}
}
.length-label,
.position-label {
text-shadow: $shadow;
}
.music-controls {
border-radius: 20px 8px 20px 8px;
padding: 5px;
margin: 0px 10px;
background: rgba($base, 0.5);
button {
font-size: 30px;
&:hover {
box-shadow: none;
}
}
}
scale trough {
min-height: 10px;
margin: 0 15px;
highlight {
background-image: linear-gradient(to right, $sapphire, $blue);
}
slider {
border-radius: 4px;
background: $background;
margin: -10px -10px;
transition: 0.1s;
&:hover {
border: 2px $mauve solid;
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}
&:active {
box-shadow:
0 0 0 1px inset,
0 0 0 8px rgba(255, 255, 255, 0.1);
}
}
}
}
}
}
}

View File

@@ -0,0 +1,116 @@
.settings {
.settings-unwrapped {
margin-top: 10px;
margin-right: 10px;
border: 2px solid $mauve;
border-radius: 4px;
background: $base;
.metrics {
& > * {
background-color: rgba(255, 255, 255, 0.03);
border-radius: 4px;
margin: 10px;
padding: 10px;
.metric-progress {
min-width: 40px;
min-height: 40px;
font-size: 4px;
margin: 4px;
.metric-icon {
font-size: 15px;
}
}
}
.cpu-metric {
color: $mauve;
}
.memory-metric {
color: $flamingo;
}
.disk-metric {
color: $pink;
}
.battery-metric {
color: $yellow;
}
}
.settings-col {
.sliders {
$icon-size: 15px;
$scale-height: 20px;
margin: 10px;
scale trough {
min-height: $scale-height;
min-width: 160px;
border-radius: 3px;
highlight {
all: unset;
border-radius: 3px;
}
slider {
$slider-height: $scale-height + 5px;
min-width: $slider-height;
min-height: $slider-height;
border-radius: $slider-height;
background: $text;
box-shadow: 0 2px 0 0 rgba(255, 255, 255, 0.1);
}
}
.volume {
.volume-icon {
font-size: $icon-size;
color: $green;
}
scale trough highlight {
background-color: $green;
}
}
.brightness {
.brightness-icon {
font-size: $icon-size;
color: $yellow;
}
scale trough highlight {
background-color: $yellow;
}
}
}
.settings-col-temps {
.temperature {
color: $blue;
}
.temperature-hot {
color: $red;
}
.weather {
color: $rosewater;
}
& > * {
margin: 0px 10px;
}
}
.power-menu {
margin: 20px;
button {
&:hover {
color: $red;
box-shadow: none;
}
font-size: 24px;
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"lib": [
"ES2022"
],
"allowJs": true,
"checkJs": false,
"strict": true,
"noImplicitAny": false,
"baseUrl": ".",
"typeRoots": [
"./types"
],
"skipLibCheck": true
}
}

View File

@@ -0,0 +1,42 @@
import GLib from "gi://GLib";
export const lengthStr = (length) => {
if (length < 0) return "0:00";
const min = Math.floor(length / 60);
const sec = Math.floor(length % 60);
const sec0 = sec < 10 ? "0" : "";
return `${min}:${sec0}${sec}`;
};
export const blurBg = (cover) => {
if (!cover) return "";
const cachePath = Utils.CACHE_DIR + "/media";
const blurPath = cachePath + "/blur";
const bgPath = blurPath + cover.substring(cachePath.length);
if (!GLib.file_test(bgPath, GLib.FileTest.EXISTS)) {
Utils.ensureDirectory(blurPath);
Utils.exec(
`convert ${cover} -scale 10% -blur 0x2 -resize 1000% ${bgPath}`,
);
}
return `
background-image: url('${bgPath}');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
`;
};
export const findPlayer = (players) => {
const active = players.find((p) => p.playBackStatus === "Playing");
if (active) return active;
for (const p of players) if (p) return p;
return undefined;
};

View File

@@ -0,0 +1,41 @@
export const Padding = (name, { hexpand = true, vexpand = true } = {}) =>
Widget.EventBox({
hexpand,
vexpand,
can_focus: false,
setup: (w) => w.on("button-press-event", () => App.closeWindow(name)),
});
export const Revealer = ({
name,
child,
transition = "slide_down",
transitionDuration = 200,
}) =>
Widget.Box({
css: "padding: 1px;",
child: Widget.Revealer({
transition,
transitionDuration,
child: Widget.Box({
child,
}),
setup: (self) =>
self.hook(App, (_, window, visible) => {
if (window === name) self.reveal_child = visible;
}),
}),
});
export default ({ name, layout, ...props }) =>
Widget.Window({
name,
setup: (w) => w.keybind("Escape", () => App.closeWindow(name)),
visible: false,
keymode: "on-demand",
exclusivity: "normal",
layer: "top",
anchor: ["top", "bottom", "right", "left"],
child: layout,
...props,
});

View File

@@ -0,0 +1,5 @@
export const shrinkText = (str, n) => {
let newStr = str.substring(0, n);
if (str.length > n) newStr = newStr + "...";
return newStr;
};

View File

@@ -0,0 +1,19 @@
const bluetooth = await Service.import("bluetooth");
export default () =>
Widget.Icon({
setup: (self) =>
self.hook(
bluetooth,
(self) => {
self.tooltipText = bluetooth.connected_devices
.map(({ name }) => name)
.join("\n");
self.visible = bluetooth.connected_devices.length > 0;
},
"notify::connected-devices",
),
icon: bluetooth
.bind("enabled")
.as((on) => `bluetooth-${on ? "active" : "disabled"}-symbolic`),
});

View File

@@ -0,0 +1,38 @@
const hyprland = await Service.import("hyprland");
const gurmukhiNums = {
1: "",
2: "੨",
3: "੩",
4: "",
5: "੫",
6: "੬",
7: "੭",
8: "੮",
9: "੯",
10: "",
};
export default () => {
const activeId = hyprland.active.workspace.bind("id");
const workspaces = hyprland.bind("workspaces").as((ws) =>
ws
.sort((a, b) => a.id - b.id)
.map(({ id }) =>
Widget.Button({
onClicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
child: Widget.Label(gurmukhiNums[id]),
className: activeId.as(
(i) => `${i === id ? "focused" : "unfocused"}`,
),
cursor: "pointer",
}),
),
);
return Widget.Box({
css: "padding: 1px;",
className: "hyprland",
children: workspaces,
});
};

View File

@@ -0,0 +1,56 @@
import Hyprland from "./hyprland.js";
import Music from "./music.js";
import Tray from "./tray.js";
import Time from "./time.js";
import Network from "./network.js";
import Bluetooth from "./bluetooth.js";
import Settings from "./settings.js";
import { WindowNames } from "../../constants.js";
const { BAR } = WindowNames;
const Left = () => {
return Widget.Box({
className: "bar-left",
spacing: 8,
children: [Hyprland()],
});
};
const Center = (monitor) => {
return Widget.Box({
className: "bar-center",
spacing: 8,
children: [Music(monitor)],
});
};
const Right = (monitor) => {
return Widget.Box({
className: "bar-right",
hpack: "end",
spacing: 10,
children: [
Tray(),
Bluetooth(),
Network(),
Time(monitor),
Settings(monitor),
],
});
};
export default (monitor = 0) =>
Widget.Window({
name: `${BAR}-${monitor}`,
className: BAR,
monitor,
anchor: ["top", "left", "right"],
exclusivity: "exclusive",
child: Widget.CenterBox({
startWidget: Left(),
centerWidget: Center(monitor),
endWidget: Right(monitor),
}),
});

View File

@@ -0,0 +1,65 @@
import Controls from "../music-box/music-controls.js";
import { shrinkText } from "../../utils/text.js";
import { findPlayer } from "../../utils/music.js";
import { WindowNames } from "../../constants.js";
const mpris = await Service.import("mpris");
const players = mpris.bind("players");
/** @param {import('types/service/mpris').MprisPlayer} player */
const Player = (player, monitor) => {
const revealer = Widget.Revealer({
revealChild: false,
transitionDuration: 300,
transition: "slide_left",
child: Controls(player),
});
return Widget.EventBox({
visible: player.bus_name === findPlayer(mpris.players).bus_name,
cursor: "pointer",
setup: (self) => {
self.on("leave-notify-event", () => {
revealer.reveal_child = false;
});
self.on("enter-notify-event", () => {
revealer.reveal_child = true;
});
},
child: Widget.Box({
className: "music",
children: [
Widget.Button({
onClicked: () =>
App.toggleWindow(`${WindowNames.MUSIC_BOX}-${monitor}`),
className: "music-title",
child: Widget.Label().hook(player, (self) => {
self.tooltip_text = player.track_title;
self.label = shrinkText(self.tooltip_text, 50);
}),
}),
revealer,
],
}),
})
.hook(
mpris,
(self, bus_name) => {
self.visible = player.bus_name === bus_name;
},
"player-changed",
)
.hook(
mpris,
(self) => {
self.visible = player === findPlayer(mpris.players);
},
"player-closed",
);
};
export default (monitor) =>
Widget.Box({
visible: players.as((p) => p.length > 0),
children: players.as((ps) => ps.map((p) => Player(p, monitor))),
});

View File

@@ -0,0 +1,40 @@
const network = await Service.import("network");
const WifiIndicator = () =>
Widget.Box({
tooltipText: network.wifi.bind("state").as((s) => `State: ${s}`),
children: [
Widget.Icon({
className: "network-icon",
icon: network.wifi.bind("icon_name"),
}),
Widget.Label({
visible: network.wifi.bind("ssid"),
label: network.wifi.bind("ssid"),
}),
],
});
const WiredIndicator = () =>
Widget.Icon({
className: "network-icon",
tooltipText: network.wired.bind("internet").as((a) => `Internet: ${a}`),
icon: network.wired.bind("icon_name"),
});
export default () =>
Widget.Stack({
className: "network",
children: {
wifi: WifiIndicator(),
wired: WiredIndicator(),
},
shown: Utils.merge(
[network.bind("primary"), network.wired.bind("state")],
(primary, wired) => {
if (primary) return primary;
if (wired == "activated") return "wired";
return "wifi";
},
),
});

View File

@@ -0,0 +1,8 @@
import { WindowNames } from "../../constants.js";
export default (monitor) =>
Widget.Button({
child: Widget.Icon("open-menu-symbolic"),
onPrimaryClick: () =>
App.toggleWindow(`${WindowNames.SETTINGS}-${monitor}`),
});

View File

@@ -0,0 +1,42 @@
const time = Variable("", {
poll: [1000, 'date "+%H:%M:%S"'],
});
const getDate = () => " " + Utils.exec('date "+%a, %b %e"');
const date = Variable(getDate());
export default () => {
const revealer = Widget.Revealer({
revealChild: false,
transitionDuration: 300,
transition: "slide_left",
child: Widget.Label({
label: date.bind(),
}),
});
return Widget.EventBox({
cursor: "pointer",
setup: (self) => {
self.on("leave-notify-event", () => {
revealer.reveal_child = false;
});
self.on("enter-notify-event", () => {
date.value = getDate();
revealer.reveal_child = true;
});
},
child: Widget.Button({
className: "date-wrapper",
onPrimaryClick: () => App.toggleWindow("calendar-0"),
child: Widget.Box({
children: [
Widget.Label({
label: time.bind(),
}),
revealer,
],
}),
}),
});
};

View File

@@ -0,0 +1,17 @@
const systemtray = await Service.import("systemtray");
const SysTrayItem = (item) =>
Widget.Button({
className: "system-tray-item",
child: Widget.Icon().bind("icon", item, "icon"),
tooltipMarkup: item.bind("tooltip_markup"),
onPrimaryClick: (_, event) => item.activate(event),
onSecondaryClick: (_, event) => item.openMenu(event),
cursor: "pointer",
});
export default () =>
Widget.Box({
className: "system-tray-unwrapped",
children: systemtray.bind("items").as((i) => i.map(SysTrayItem)),
});

View File

@@ -0,0 +1,37 @@
import Popup, { Padding, Revealer } from "../utils/popup.js";
import { WindowNames } from "../constants.js";
const Tray = Widget.Calendar({
className: "calendar-unwrapped",
showDayNames: true,
showHeading: true,
});
export default (monitor = 0) => {
const { CALENDAR } = WindowNames;
const name = `${CALENDAR}-${monitor}`;
return Popup({
name,
className: CALENDAR,
monitor,
layout: Widget.Box({
children: [
Padding(name),
Widget.Box({
hexpand: false,
vertical: true,
children: [
Revealer({
name,
child: Tray,
transition: "slide_down",
transitionDuration: 400,
}),
Padding(name),
],
}),
],
}),
});
};

View File

@@ -0,0 +1,183 @@
// Mostly taken from https://github.com/Aylur/ags/blob/11150225e62462bcd431d1e55185e810190a730a/example/media-widget/Media.js
import Popup, { Padding, Revealer } from "../../utils/popup.js";
import { shrinkText } from "../../utils/text.js";
import { lengthStr, blurBg } from "../../utils/music.js";
import { findPlayer } from "../../utils/music.js";
import { WindowNames } from "../../constants.js";
import Controls from "./music-controls.js";
const FALLBACK_ICON = "audio-x-generic-symbolic";
const { MUSIC_BOX } = WindowNames;
const mpris = await Service.import("mpris");
const Player = (player) => {
const img = Widget.Box({
visible: player.bind("cover_path"),
className: "cover-art",
vpack: "start",
css: player
.bind("cover_path")
.as(
(p) =>
(p ? "min-width: 200px; min-height: 200px;" : "") +
`background-image: url('${p}');`,
),
});
const title = Widget.Label({
className: "title",
wrap: true,
hpack: "start",
label: player.bind("track_title").as((t) => shrinkText(t, 40)),
});
const artist = Widget.Label({
className: "artist",
wrap: true,
hpack: "start",
label: player.bind("track_artists").as((a) => shrinkText(a.join(", "), 80)),
});
const positionSlider = Widget.Slider({
className: "position",
drawValue: false,
onChange: ({ value }) => (player.position = value * player.length),
visible: player.bind("length").as((l) => l > 0),
setup: (self) => {
const update = () => {
if (self.dragging) return;
const value = player.position / player.length;
self.value = value > 0 ? value : 0;
};
self
.hook(player, update)
.hook(player, update, "position")
.poll(1000, update);
},
});
const positionLabel = Widget.Label({
ypad: 0,
hpack: "start",
className: "position-label",
setup: (self) => {
const update = (_, time) => {
self.label = lengthStr(time || player.position);
self.visible = player.length > 0;
};
self.hook(player, update, "position");
self.poll(1000, update);
},
});
const lengthLabel = Widget.Label({
ypad: 0,
hpack: "end",
className: "length-label",
visible: player.bind("length").as((l) => l > 0),
label: player.bind("length").as(lengthStr),
});
const icon = Widget.Icon({
className: "icon",
hexpand: true,
hpack: "end",
vpack: "start",
tooltipText: player.identity || "",
icon: player.bind("entry").as((entry) => {
const name = `${entry}-symbolic`;
return Utils.lookUpIcon(name) ? name : FALLBACK_ICON;
}),
});
return Widget.Box(
{
className: "music-player",
visible: player.bus_name === findPlayer(mpris.players).bus_name,
css: player.bind("cover_path").as(blurBg),
},
img,
Widget.CenterBox({
className: "music-details",
vertical: true,
hexpand: true,
spacing: 25,
startWidget: Widget.Box(
{
vertical: true,
spacing: 6,
},
title,
Widget.Box({
className: "icon-wrapper",
spacing: 10,
children: [artist, icon],
}),
),
centerWidget: positionSlider,
endWidget: Widget.CenterBox({
spacing: 6,
startWidget: positionLabel,
centerWidget: Controls(player),
endWidget: lengthLabel,
}),
}),
)
.hook(
mpris,
(self, bus_name) => {
self.visible = player.bus_name === bus_name;
},
"player-changed",
)
.hook(
mpris,
(self) => {
self.visible = player.bus_name === findPlayer(mpris.players).bus_name;
},
"player-closed",
);
};
const PlayerBox = () =>
Widget.Box({
className: `${MUSIC_BOX}-unwrapped`,
vertical: true,
css: "padding: 1px;",
children: mpris.bind("players").as((ps) => ps.map(Player)),
});
export default (monitor = 0) => {
const name = `${MUSIC_BOX}-${monitor}`;
return Popup({
name,
className: MUSIC_BOX,
monitor,
layout: Widget.Box({
children: [
Padding(name), // left
Widget.Box({
hexpand: false,
vexpand: false,
vertical: true,
children: [
Revealer({
name,
child: PlayerBox(),
transition: "slide_down",
transitionDuration: 400,
}),
Padding(name), // down
],
}),
Padding(name), // right
],
}),
});
};

View File

@@ -0,0 +1,47 @@
const PLAY_ICON = "media-playback-start-symbolic";
const PAUSE_ICON = "media-playback-pause-symbolic";
const PREV_ICON = "go-previous-symbolic";
const NEXT_ICON = "go-next-symbolic";
export default (player) => {
const playPause = Widget.Button({
class_name: "play-pause",
on_clicked: () => player.playPause(),
visible: player.bind("can_play"),
cursor: "pointer",
child: Widget.Icon({
icon: player.bind("play_back_status").transform((s) => {
switch (s) {
case "Playing":
return PAUSE_ICON;
case "Paused":
case "Stopped":
return PLAY_ICON;
}
}),
}),
});
const prev = Widget.Button({
yalign: 0.5,
onClicked: () => player.previous(),
visible: player.bind("can_go_prev"),
child: Widget.Icon(PREV_ICON),
cursor: "pointer",
});
const next = Widget.Button({
onClicked: () => player.next(),
visible: player.bind("can_go_next"),
child: Widget.Icon(NEXT_ICON),
cursor: "pointer",
});
return Widget.CenterBox({
vertical: true,
centerWidget: Widget.Box({
className: "music-controls",
children: [prev, playPause, next],
}),
});
};

View File

@@ -0,0 +1,69 @@
const audio = await Service.import("audio");
export default () => {
const isSpeaker = Variable(true);
/** @param {'speaker' | 'microphone'} type */
const VolumeSlider = (type = "speaker") =>
Widget.Slider({
hexpand: true,
drawValue: false,
onChange: ({ value }) => (audio[type].volume = value),
value: audio[type].bind("volume"),
});
const speakerSlider = VolumeSlider("speaker");
const micSlider = VolumeSlider("microphone");
const speakerIndicator = Widget.Button({
on_clicked: () => (audio.speaker.is_muted = !audio.speaker.is_muted),
child: Widget.Icon().hook(audio.speaker, (self) => {
self.className = "volume-icon";
const vol = audio.speaker.volume * 100;
let icon = [
[101, "overamplified"],
[67, "high"],
[34, "medium"],
[1, "low"],
[0, "muted"],
].find(([threshold]) => threshold <= vol)?.[1];
if (audio.speaker.is_muted) icon = "muted";
self.icon = `audio-volume-${icon}-symbolic`;
self.tooltip_text = `Volume ${Math.floor(vol)}%`;
}),
});
const micIndicator = Widget.Button({
on_clicked: () => (audio.microphone.is_muted = !audio.microphone.is_muted),
child: Widget.Icon().hook(audio.microphone, (self) => {
self.className = "volume-icon";
const vol = audio.microphone.volume * 100;
let icon = [
[67, "high"],
[34, "medium"],
[1, "low"],
[0, "muted"],
].find(([threshold]) => threshold <= vol)?.[1];
if (audio.microphone.is_muted) icon = "muted";
self.icon = `microphone-sensitivity-${icon}-symbolic`;
self.tooltip_text = `Volume ${Math.floor(vol)}%`;
}),
});
return Widget.EventBox({
cursor: "pointer",
className: "volume",
onSecondaryClick: () => (isSpeaker.value = !isSpeaker.value),
child: Widget.Stack({
children: {
speaker: Widget.Box({}, speakerSlider, speakerIndicator),
microphone: Widget.Box({}, micSlider, micIndicator),
},
shown: isSpeaker.bind().as((s) => (s ? "speaker" : "microphone")),
}),
});
};

View File

@@ -0,0 +1,48 @@
const hasBacklight = Variable(Utils.exec("ls /sys/class/backlight"));
export default () => {
const getBrightness = () => {
try {
return (
Number(Utils.exec("brightnessctl get")) /
Number(Utils.exec("brightnessctl max"))
);
} catch {
console.log("settings/backlight: failed to get brightness");
}
return 0;
};
const setBrightness = (b) => {
if (b < 0.05) b = 0.05;
else if (b > 1) b = 1;
Utils.exec(`brightnessctl set ${b * 100}%`);
};
const brightness = Variable(getBrightness());
const Slider = Widget.Slider({
hexpand: true,
drawValue: false,
onChange: ({ value }) => setBrightness(value),
value: brightness.bind(),
});
const Indicator = Widget.Button({
on_clicked: brightness.bind().as((b) => () => {
if (b <= 0.5) brightness.value = 1;
else brightness.value = 0.5;
}),
child: Widget.Icon().hook(brightness, (self) => {
self.className = "brightness-icon";
self.icon = `display-brightness-symbolic`;
self.tooltip_text = `Brightness: ${Math.floor(brightness.value * 100)}%`;
}),
});
return Widget.Box({
className: "brightness",
visible: hasBacklight.bind().as((b) => !!b),
children: [Slider, Indicator],
});
};

View File

@@ -0,0 +1,72 @@
import Popup, { Padding, Revealer } from "../../utils/popup.js";
import { WindowNames } from "../../constants.js";
import Audio from "./audio.js";
import Backlight from "./backlight.js";
import {
cpuMetric,
memoryMetric,
diskMetric,
batteryMetric,
} from "./metrics.js";
import Temperature from "./temperature.js";
import Weather from "./weather.js";
import PowerMenu from "./power-menu.js";
const metrics = Widget.Box({
className: "metrics",
vertical: true,
children: [cpuMetric, memoryMetric, diskMetric, batteryMetric],
});
const sliders = Widget.Box({
className: "sliders",
vertical: true,
children: [Audio(), Backlight()],
});
const settingsCol = Widget.CenterBox({
className: "settings-col",
vertical: true,
spacing: 8,
startWidget: sliders,
centerWidget: Widget.CenterBox({
className: "settings-col-temps",
startWidget: Temperature(),
endWidget: Weather(),
}),
endWidget: PowerMenu(),
});
const settings = Widget.Box({
className: "settings-unwrapped",
children: [metrics, settingsCol],
});
export default (monitor = 0) => {
const { SETTINGS } = WindowNames;
const name = `${SETTINGS}-${monitor}`;
return Popup({
name,
className: SETTINGS,
monitor,
layout: Widget.Box({
children: [
Padding(name),
Widget.Box({
hexpand: false,
vertical: true,
children: [
Revealer({
name,
child: settings,
transition: "slide_down",
transitionDuration: 400,
}),
Padding(name),
],
}),
],
}),
});
};

View File

@@ -0,0 +1,104 @@
const battery = await Service.import("battery");
const divide = ([total, free]) => free / total;
const cpuValue = Variable(0, {
poll: [
2000,
"top -b -n 1",
(out) =>
divide([
100,
out
.split("\n")
.find((line) => line.includes("Cpu(s)"))
.split(/\s+/)[1]
.replace(",", "."),
]),
],
});
const memoryValue = Variable([0, 0], {
poll: [
2000,
"free",
(out) => {
const data = out
.split("\n")
.find((line) => line.includes("Mem:"))
.split(/\s+/)
.splice(1, 2);
return [(data[1] / (1024 * 1024)).toFixed(2), divide(data)];
},
],
});
const diskValue = Variable(["0G", "0%"], {
poll: [
120000,
"df -kh /",
(out) => out.split("\n")[1].split(/\s+/).splice(3, 2),
],
});
const mkMetric = ({
className,
tooltipText,
value,
label,
icon,
visible = true,
}) =>
Widget.Box(
{
spacing: 10,
className,
tooltipText,
visible,
},
Widget.CircularProgress({
className: "metric-progress",
child: Widget.Icon({
icon,
className: "metric-icon",
}),
value,
}),
Widget.Label({
wrap: true,
label,
}),
);
export const cpuMetric = mkMetric({
className: "cpu-metric",
tooltipText: cpuValue.bind().as((c) => `CPU: ${(c * 100).toFixed(2)}%`),
value: cpuValue.bind(),
label: cpuValue.bind().as((c) => `${(c * 100).toFixed(2)}%`),
icon: "cpu-symbolic",
});
export const memoryMetric = mkMetric({
className: "memory-metric",
tooltipText: memoryValue.bind().as((m) => `RAM :${m[0]}G`),
value: memoryValue.bind().as((m) => m[1]),
label: memoryValue.bind().as((m) => `${m[0]}G`),
icon: "memory-symbolic",
});
export const diskMetric = mkMetric({
className: "disk-metric",
tooltipText: diskValue.bind().as((d) => `Free Space :${d[0]}`),
value: diskValue.bind().as((d) => Number(d[1]) / 100),
label: diskValue.bind().as((d) => d[1]),
icon: "drive-harddisk-symbolic",
});
export const batteryMetric = mkMetric({
className: "battery-metric",
tooltipText: battery.bind("percent").as((p) => `Battery: ${p}%`),
value: battery.bind("percent").as((p) => (p > 0 ? p / 100 : 0)),
label: battery.bind("percent").as((p) => `${p}%`),
icon: battery.bind("icon_name"),
visible: battery.bind("available"),
});

View File

@@ -0,0 +1,94 @@
export default () => {
const isLocked = Variable(true);
const power = Variable("poweroff");
const suspend = Variable("sleep");
const cursor = "pointer";
const unlockButton = Widget.Button({
onPrimaryClick: () => {
isLocked.value = false;
},
tooltipText: "Unock power menu",
child: Widget.Icon("system-lock-screen-symbolic"),
cursor,
});
const lockButton = Widget.Button({
onPrimaryClick: () => {
isLocked.value = true;
},
tooltipText: "Lock power menu",
child: Widget.Icon("system-lock-screen-symbolic"),
cursor,
});
const poweroffButton = Widget.Button({
onPrimaryClick: () => {
Utils.exec("poweroff");
},
onSecondaryClick: () => (power.value = "reboot"),
tooltipText: "Shutdown",
child: Widget.Icon("system-shutdown-symbolic"),
cursor,
});
const rebootButton = Widget.Button({
onPrimaryClick: () => {
Utils.exec("reboot");
},
onSecondaryClick: () => (power.value = "poweroff"),
tooltipText: "Reboot",
child: Widget.Icon("system-reboot-symbolic"),
cursor,
});
const sleepButton = Widget.Button({
onPrimaryClick: () => {
Utils.exec("systemctl suspend");
},
onSecondaryClick: () => (suspend.value = "hibernate"),
tooltipText: "Sleep",
child: Widget.Icon("weather-clear-night-symbolic"),
cursor,
});
const hibernateButton = Widget.Button({
onPrimaryClick: () => {
Utils.exec("systemctl hibernate");
},
onSecondaryClick: () => (suspend.value = "sleep"),
tooltipText: "Hibernate",
child: Widget.Icon("computer-symbolic"),
cursor,
});
const powerStack = Widget.Stack({
children: {
poweroff: poweroffButton,
reboot: rebootButton,
},
shown: power.bind(),
});
const suspendStack = Widget.Stack({
children: {
sleep: sleepButton,
hibernate: hibernateButton,
},
shown: suspend.bind(),
});
return Widget.Stack({
className: "power-menu",
children: {
locked: Widget.CenterBox({ centerWidget: unlockButton }),
unlocked: Widget.CenterBox({
startWidget: powerStack,
centerWidget: lockButton,
endWidget: suspendStack,
}),
},
shown: isLocked.bind().as((l) => (l ? "locked" : "unlocked")),
});
};

View File

@@ -0,0 +1,62 @@
export default () => {
const getThermalZone = () => {
try {
return Utils.exec([
"bash",
"-c",
`awk '{print FILENAME ":" $0}' /sys/class/thermal/thermal_zone*/type`,
])
.split("\n")
.find((line) => line.includes("x86_pkg_temp"))
.split(":")[0]
.slice(0, -4);
} catch (e) {
console.error(e);
console.log("settings/temperature: cannot get thermal zone");
}
return undefined;
};
const thermalZone = Variable(getThermalZone());
const tempValue = thermalZone.value
? Variable(0, {
poll: [
5000,
() => {
try {
return (
Utils.readFile(`${thermalZone.value}/temp`) / 1000
).toFixed(2);
} catch {
console.log(
"settings/temperature: specified thermal zone does not exist",
);
}
return 0;
},
],
})
: Variable(undefined);
return Widget.CenterBox({
vertical: true,
visible: thermalZone.bind().as((t) => !!t),
centerWidget: Widget.Box(
{
vertical: true,
spacing: 8,
tooltipText: tempValue.bind().as((t) => `CPU Temperature: ${t}°C`),
className: tempValue
.bind()
.as((t) => `temperature${t > 65 ? "-hot" : ""}`),
},
Widget.Icon({
icon: "sensors-temperature-symbolic",
}),
Widget.Label({
label: tempValue.bind().as((t) => `${t}°C`),
}),
),
});
};

View File

@@ -0,0 +1,78 @@
const conditionIcons = {
Clear: "clear",
Sunny: "clear",
"Partly Cloudy": "few-clouds",
Cloudy: "overcast",
Overcast: "overcast",
"Light Rain": "showers-scattered",
Drizzle: "showers-scattered",
Rain: "showers",
"Heavy Rain": "showers",
Showers: "showers",
Thunderstorm: "storm",
Snow: "snow",
"Light Snow": "snow",
"Heavy Snow": "snow",
Mist: "fog",
Fog: "fog",
Haze: "fog",
Dust: "fog",
Smoke: "fog",
Sand: "fog",
Wind: "windy",
Tornado: "tornado",
undefined: "clear",
};
const fetchWeather = async () => {
return await Utils.fetch("http://wttr.in/?format=j1")
.then((res) => res.json())
.then((j) => j["current_condition"][0])
.catch((e) => {
console.error(e);
console.log("settings/weather: error fetching weather data");
});
};
export default () => {
const data = Variable(undefined, {
poll: [600000, async () => await fetchWeather()],
});
return Widget.Box(
{
vertical: true,
visible: data.bind().as((d) => !!d),
className: "weather",
},
Widget.Icon({
icon: data.bind().as((d) => {
const condition = d?.["weatherDesc"]?.[0]?.["value"]?.split(/[\s,]+/)?.[0];
return `weather-${conditionIcons[condition]}-symbolic`;
}),
}),
Widget.Label({
label: data.bind().as((d) => {
const conditions = d?.["weatherDesc"]?.map((w) => w["value"]) || [];
return conditions.join(" ");
}),
}),
Widget.Label({
label: data.bind().as((d) => {
const temperature = d?.["temp_C"];
const feelsLike = d?.["FeelsLikeC"];
return `${temperature}°C (${feelsLike}°C)`;
}),
}),
Widget.Label({
label: data.bind().as((d) => {
const humidity = d?.["humidity"];
const precipitation = d?.["precipMM"];
return `${humidity}%, ${precipitation}mm`;
}),
}),
);
};

18
home/natto/browser.nix Normal file
View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
programs = {
firefox = {
enable = true;
profiles.natto = {
name = "natto";
};
};
chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
};
};
home.sessionVariables = {
BROWSER = "firefox";
};
}

1
home/natto/config/README Normal file
View File

@@ -0,0 +1 @@
Some of these are copied as-it-is. The rest are managed via home-manager and are just here for legacy purposes.

File diff suppressed because one or more lines are too long

View File

View File

View File

@@ -0,0 +1 @@
config.org

View File

@@ -0,0 +1,622 @@
#+TITLE: My Emacs Configuration
#+AUTHOR: natto1784
#+PROPERTY: header-args :emacs-lisp :tangle yes
* Settings
** Setting the default face
#+begin_src emacs-lisp
; -*- lexical-binding: t; -*-
(set-frame-font "Fira Code 13" nil t)
(add-to-list 'default-frame-alist '(font . "Fira Code-13"))
#+end_src
** Some mode settings based on personal preferences
#+begin_src emacs-lisp
(add-hook 'prog-mode-hook #'hl-line-mode)
(add-hook 'text-mode-hook #'hl-line-mode)
(scroll-bar-mode 0)
(tool-bar-mode 0)
(menu-bar-mode 0)
(fringe-mode 0)
(global-display-line-numbers-mode 1)
(xterm-mouse-mode 1)
(electric-pair-mode)
(setq ring-bell-function 'ignore
gc-cons-threshold most-positive-fixnum
initial-major-mode 'fundamental-mode)
#+end_src
** Setting some variables
#+begin_src emacs-lisp
(setq initial-major-mode 'emacs-lisp-mode
frame-resize-pixelwise t
auto-window-vscroll nil
scroll-step 1
display-line-numbers-type 'relative
confirm-kill-processes nil
inhibit-startup-screen t
isearch-lazy-count t
lazy-count-prefix-format "[%s/%s] ")
(setq-default tab-width 2
indent-tabs-mode nil)
#+end_src
** Emacs startup hook
#+begin_src emacs-lisp
(add-hook 'emacs-startup-hook
(lambda () (delete-other-windows)) t)
#+end_src
* Packages
** Add Melpa to package archives
#+begin_src emacs-lisp
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(require 'use-package)
#+end_src
*** Profiling
#+begin_src emacs-lisp
(use-package benchmark-init
:config
(add-hook 'after-init-hook 'benchmark-init/deactivate) )
#+end_src
** Visual packages
*** Add solaire mode
#+begin_src emacs-lisp
(use-package solaire-mode
:config
(solaire-mode))
#+end_src
*** Set theme
#+begin_src emacs-lisp
(use-package catppuccin-theme
:config
(load-theme 'catppuccin t)
:custom
(dark-theme t))
#+end_src
*** Indent guides
#+begin_src emacs-lisp
(use-package highlight-indent-guides
:config
(setq highlight-indent-guides-method 'column)
:hook
(prog-mode . highlight-indent-guides-mode))
#+end_src
** Minibuffer
Enable vertico
#+begin_src emacs-lisp
(use-package vertico
:init
(vertico-mode)
:bind (:map vertico-map
("C-j" . vertico-next)
("C-k" . vertico-previous)))
#+end_src
Save history over restarts
#+begin_src emacs-lisp
(use-package savehist
:init
(savehist-mode))
#+end_src
Marginalia for description
#+begin_src emacs-lisp
(use-package marginalia
:after vertico
:config
(marginalia-mode 1))
#+end_src
Orderless
#+begin_src emacs-lisp
(use-package orderless
:after vertico
:config
(setq completion-styles '(orderless basic)))
#+end_src
Consult
#+begin_src emacs-lisp
(use-package consult
:bind (("M-s M-g" . consult-grep)
("M-s M-f" . consult-find)
("M-s M-b" . consult-buffer)))
#+end_src
** Evil
*** Configure evil mode
#+begin_src emacs-lisp
(defun my/evil-shift-right ()
(interactive)
(evil-shift-right evil-visual-beginning evil-visual-end)
(evil-normal-state)
(evil-visual-restore))
(defun my/evil-shift-left ()
(interactive)
(evil-shift-left evil-visual-beginning evil-visual-end)
(evil-normal-state)
(evil-visual-restore))
(use-package evil
:init
(setq-default evil-shift-width 2)
(setq evil-want-keybinding nil)
:config
(evil-set-initial-state 'vterm-mode 'insert)
(evil-set-undo-system 'undo-tree)
(evil-define-key 'visual global-map (kbd ">") 'my/evil-shift-right)
(evil-define-key 'visual global-map (kbd "<") 'my/evil-shift-left)
(evil-mode 1))
#+end_src
*** Evil related packages
#+begin_src emacs-lisp
(use-package evil-collection
:after evil
:ensure t
:config
(evil-collection-init))
(use-package evil-terminal-cursor-changer
:after evil
:if (not (display-graphic-p))
:config
(evil-terminal-cursor-changer-activate))
(use-package evil-anzu :after evil)
#+end_src
*** Configure undo tree
To undo and redo easily like vi
#+begin_src emacs-lisp
(use-package undo-tree
:init
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
:config
(global-undo-tree-mode 1))
#+end_src
** Treemacs
*** Configure treemacs
#+begin_src emacs-lisp
(use-package treemacs
:defer t
:config
(treemacs-project-follow-mode))
(use-package treemacs-evil :after treemacs)
(use-package treemacs-projectile :after treemacs)
(use-package treemacs-all-the-icons :after treemacs)
#+end_src
** LSP
*** Configure lsp-mode
#+begin_src emacs-lisp
(use-package lsp-mode
:defer t
:commands lsp
:init (setq lsp-enable-on-type-formatting nil)
:hook (prog-mode . lsp-deferred))
#+end_src
*** Configure lsp-ui
#+begin_src emacs-lisp
(use-package lsp-ui
:defer t
:init
(setq lsp-ui-doc-delay 1.0
lsp-ui-doc-show-with-mouse t
pgtk-wait-for-event-timeout nil
lsp-ui-doc-show-with-cursor t)
:config
(lsp-ui-peek-enable 1)
(lsp-ui-doc-enable 1)
:hook (lsp-mode . lsp-ui-mode))
#+end_src
*** Configure flycheck
#+begin_src emacs-lisp
(use-package flycheck
:defer t)
#+end_src
*** Configure dap-mode
#+begin_src emacs-lisp
(use-package dap-mode
:defer t
:hook ((lsp-mode . dap-mode)
(lsp-mode . dap-ui-mode)))
#+end_src
** Company
*** Configure company
For autocomplete
#+begin_src emacs-lisp
(use-package company
:after lsp-mode
:config
(add-to-list 'company-backends 'company-dabbrev)
(setq company-backends (append '(company-files) (remove 'company-files company-backends)))
:hook (after-init . global-company-mode))
#+end_src
*** Configure company-quickhelp
#+begin_src emacs-lisp
(use-package company-quickhelp
:hook (company-mode . company-quickhelp-mode))
#+end_src
** Treesitter
#+begin_src emacs-lisp
(use-package tree-sitter-langs :defer t)
(use-package tree-sitter
:after tree-sitter-langs
:defer t
:config
(global-tree-sitter-mode)
:init
(add-to-list 'tree-sitter-major-mode-language-alist '(fundamental-mode . bash))
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
#+end_src
** Direnv
#+begin_src emacs-lisp
(use-package direnv
:config
(direnv-mode))
#+end_src
** Languages
#+begin_src emacs-lisp
(use-package dts-mode
:mode ("\\.dts\\'" "\\.dtsi\\'" "\\.overlay\\'"))
(use-package lsp-haskell
:mode "\\.hs\\'")
(use-package lsp-latex
:mode "\\.tex\\'")
(use-package rustic
:mode "\\.rs\\'")
(use-package typescript-mode
:mode ("\\.ts\\'" "\\.tsx\\'"))
(use-package wgsl-mode
:mode "\\.wgsl\\'")
(use-package nix-mode
:mode "\\.nix\\'")
(use-package hcl-mode
:mode
"\\.hcl\\'"
"\\.nomad\\'")
(use-package go-mode
:mode "\\.go\\'")
#+end_src
** Git
magit for git operations
#+begin_src emacs-lisp
(use-package magit :defer t)
#+end_src
blamer for git blame
#+begin_src emacs-lisp
(use-package blamer
:defer 20
:custom
(blamer-idle-time 0.3)
(blamer-min-offset 70)
:config
(global-blamer-mode 1)
:init
(setq blamer-show-avatar-p nil
blamer-max-commit-message-length 72))
#+end_src
** VTerm
*** Configure vterm
#+begin_src emacs-lisp
(use-package vterm
:config
(evil-define-key 'normal vterm-mode-map (kbd "p") 'vterm-yank)
(evil-define-key 'insert vterm-mode-map (kbd "C-y") 'vterm-yank)
(setq vterm-timer-delay 0.005))
(use-package vterm-toggle
:after vterm
:config
(setq vterm-toggle-fullscreen-p nil)
(add-to-list 'display-buffer-alist
'((lambda (buffer-or-name _)
(let ((buffer (get-buffer buffer-or-name)))
(with-current-buffer buffer
(or (equal major-mode 'vterm-mode)
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
(display-buffer-reuse-window display-buffer-in-side-window)
(side . bottom)
(reusable-frames . visible)
(window-height . 0.4))))
#+end_src
** Centaur Tabs
Do not use centaur tabs for now
#+begin_src emacs-lisp :tangle no
(use-package centaur-tabs
:defer t
:custom
(centaur-tabs-style "rounded")
(centaur-tabs-height 18)
(centaur-tabs-set-modified-marker t)
(centaur-tabs-set-icons t)
:config
(centaur-tabs-mode t)
(centaur-tabs-group-by-projectile-project)
(set-face-attribute 'tab-line nil :inherit 'centaur-tabs-unselected)
(centaur-tabs-headline-match)
:bind
(:map evil-normal-state-map
("M-," . centaur-tabs-forward)
("M-." . centaur-tabs-backward))
(:map evil-motion-state-map
("M-," . centaur-tabs-forward)
("M-." . centaur-tabs-backward)))
#+end_src
** Misc packages
*** Icons
For installing icons
#+begin_src emacs-lisp
(use-package all-the-icons
:defer t
:if (display-graphic-p))
#+end_src
*** Projectile
For tracking project root
#+begin_src emacs-lisp
(use-package projectile
:defer t
:config
(define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map)
(projectile-mode +1))
#+end_src
*** Rainbow
For highlighting colors
#+begin_src emacs-lisp
(use-package rainbow-mode :defer t)
#+end_src
*** Rainbow delimiters
To make distinguishing parens easier
#+begin_src emacs-lisp
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
#+end_src
*** Olivetti
When you want write prose or something similar
#+begin_src emacs-lisp
(use-package olivetti
:defer t
:diminish olivetti-mode
:custom
(olivetti-body-width 100)
(olivetti-minimum-body-width 50)
(olivetti-style 'fancy)
(olivetti-recall-visual-line-mode-entry-state t)
:config
(defvar-local my/olivetti--saved-line-numbers nil
"Stores the previous value of `display-line-numbers` before enabling Olivetti.")
(defun my/olivetti-toggle-line-numbers ()
"Hide line numbers when entering Olivetti, restore when exiting."
(if olivetti-mode
(progn
(setq my/olivetti--saved-line-numbers display-line-numbers)
(setq display-line-numbers nil))
(setq display-line-numbers my/olivetti--saved-line-numbers)))
(add-hook 'olivetti-mode-hook #'my/olivetti-toggle-line-numbers))
#+end_src
** Org
** Add org-mode
#+begin_src emacs-lisp
(use-package org
:defer t
:after evil
:config
(define-key org-mode-map (kbd "RET") 'org-return-and-maybe-indent)
(evil-define-key 'normal org-mode-map (kbd "TAB") 'org-cycle)
:custom
(evil-want-C-i-jump nil)
(org-adapt-indentation t)
(org-src-fontify-natively t)
(org-src-strip-leading-and-trailing-blank-lines t)
(org-src-preserve-indentation t)
(org-src-tab-acts-natively t))
#+end_src
** Add org-bullets
#+begin_src emacs-lisp
(use-package org-bullets
:defer t
:hook ((org-mode . org-bullets-mode)))
#+end_src
** Babel and exports
#+begin_src emacs-lisp
(use-package htmlize :defer t)
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(setq org-src-fontify-natively t)
(setq org-confirm-babel-evaluate nil)
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)
(C . t)
(sql . t)
(latex . t)))
#+end_src
* Random eye candy stuff
* Mode line
** Doom modeline
Switched to doom modeline after using my own modeline for a while
#+begin_src emacs-lisp
(use-package doom-modeline
:init (doom-modeline-mode 1))
#+end_src
Also show columns
#+begin_src emacs-lisp
(column-number-mode 1)
#+end_src
** Nyan Mode
#+begin_src emacs-lisp
(use-package nyan-mode
:ensure t
:init
(when (display-graphic-p)
(nyan-mode 1))
:custom
(nyan-animate-nyancat t)
:config
(nyan-start-animation))
#+end_src
* Pop-up terminal
Stolen from [[https://www.reddit.com/r/emacs/comments/ft84xy/run_shell_command_in_new_vterm/][this]] reddit post
#+begin_src emacs-lisp
(defun run-in-vterm-kill (process event)
"A process sentinel. Kills PROCESS's buffer if it is live."
(let ((b (process-buffer process)))
(and (buffer-live-p b)
(kill-buffer b))))
(defun run-in-vterm (command)
(interactive
(list
(let* ((f (cond (buffer-file-name)
((eq major-mode 'dired-mode)
(dired-get-filename nil t))))
(filename (concat " " (shell-quote-argument (and f (file-relative-name f))))))
(read-shell-command "Terminal command: "
(cons filename 0)
(cons 'shell-command-history 1)
(list filename)))))
(with-current-buffer (vterm-toggle)
(set-process-sentinel vterm--process #'run-in-vterm-kill)
(vterm-send-string (concat command))
(vterm-send-return)))
#+end_src
* LLMs
** gptel
#+begin_src emacs-lisp
(use-package gptel
:defer t
:config
(setq gptel-model 'claude-sonnet-4-20250514
gptel-backend (gptel-make-anthropic "Claude"
:stream t
:protocol "https"
:key (getenv "ANTHROPIC_API_KEY")
:host (getenv "ANTHROPIC_API_BASE_DOMAIN")))
(setq gptel-default-mode 'org-mode)
:bind (("C-c g" . gptel)))
#+end_src
** Aidermacs
#+begin_src emacs-lisp
(use-package aidermacs
:defer t
:bind (("C-c a" . aidermacs-transient-menu))
:custom
; See the Configuration section below
(aidermacs-default-chat-mode 'architect)
(aidermacs-default-model "sonnet"))
#+end_src
* Keybinds
** General
*** Colemak translations
not using this anymore
#+begin_src emacs-lisp :tangle no
(use-package evil-colemak-basics
:init
(setq evil-colemak-basics-layout-mod 'mod-dh)
:config
(global-evil-colemak-basics-mode))
#+end_src
*** Misc binds
#+begin_src emacs-lisp
(use-package general
:ensure t)
(setq evil-states
'(visual normal motion))
(with-eval-after-load 'general
(general-define-key
:states evil-states
"M-c" 'comment-line
"C-c M-c" 'comment-box)
(general-define-key
:states '(normal insert)
"M-C-f" 'lsp-format-buffer
"C-S-v" 'yank)
(general-define-key
:keymaps '(global override vterm-mode-map)
:states evil-states
"M-o" 'treemacs
"M-s-v" 'split-window-vertically
"M-s-h" 'split-window-horizontally
"M-h" 'windmove-left
"M-j" 'windmove-down
"M-k" 'windmove-up
"M-l" 'windmove-right
"M-C-h" 'shrink-window-horizontally
"M-C-l" 'enlarge-window-horizontally
"M-C-j" 'shrink-window
"M-C-k" 'enlarge-window
"C-q" 'delete-window
"M-C-S-q" 'kill-buffer-and-window
"M-w" (lambda () (interactive) (kill-buffer (current-buffer)))
"M-S-w" 'kill-window)
#+end_src
*** Pop-up terminal specific keybinds
#+begin_src emacs-lisp
(with-eval-after-load 'vterm-toggle
(general-define-key
:keymaps '(global override vterm-mode-map)
:states evil-states
"<f4>" (lambda () (interactive) (vterm t))
"C-S-t" 'vterm-toggle-cd
"C-t" 'vterm-toggle
"<f1>" 'vterm-toggle)
(general-define-key
:keymaps 'vterm-mode-map
"<f3>" 'vterm-toggle-forward
"<f2>" 'vterm-toggle-backward)))
#+end_src

View File

@@ -0,0 +1,8 @@
(defconst config-org (expand-file-name "config.org" user-emacs-directory))
(defconst config-el (expand-file-name "config.el" user-emacs-directory))
(unless (file-exists-p config-el)
(require 'org)
(org-babel-tangle-file config-org config-el))
(load-file config-el)

View File

@@ -0,0 +1,26 @@
[colors]
background=11111B
bright0=585B70
bright1=F38BA8
bright2=A6E3A1
bright3=F9E2AF
bright4=89B4FA
bright5=F5C2E7
bright6=94E2D5
bright7=A6ADC8
foreground=CDD6F4
regular0=45475A
regular1=F38BA8
regular2=A6E3A1
regular3=F9E2AF
regular4=89B4FA
regular5=F5C2E7
regular6=94E2D5
regular7=BAC2DE
[main]
font=Fira Mono:style=Regular:pixelsize=12
font-bold=Fira Mono:style=Bold:pixelsize=12
[scrollback]
lines=4000

10
home/natto/config/mailcap Normal file
View File

@@ -0,0 +1,10 @@
text/plain; $EDITOR %s ;
text/html; $BROWSER %s; test=test -n "$DISPLAY"
text/html; w3m %s; nametemplate=%s.html; needsterminal
text/html; w3m -v -F -T text/html -dump %s; copiousoutput
image/*; sxiv %s ;
video/*; setsid mpv --quiet %s &; copiousoutput
audio/*; mpv %s ;
application/pdf; zathura %s ;
application/pgp-encrypted; gpg -d '%s'; copiousoutput;
application/pgp-keys; gpg --import '%s'; copiousoutput;

View File

@@ -0,0 +1,36 @@
music_directory "~/Music"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
log_file "~/.config/mpd/log"
pid_file "~/.config/mpd/pid"
bind_to_address "0.0.0.0"
bind_to_address "~/.config/mpd/socket"
restore_paused "yes"
input {
plugin "curl"
}
audio_output {
type "pulse"
name "pulse audio"
}
audio_output {
type "fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
encoder "vorbis"
type "httpd"
quality "9"
name "Vorbis Stream"
port "8001"
max_clients "0"
always_on "yes"
}
filesystem_charset "UTF-8"

View File

@@ -0,0 +1,3 @@
force-window=yes
keep-open=yes
save-position-on-quit=yes

View File

@@ -0,0 +1,39 @@
active_window_border=blue
autocenter_mode=yes
browser_sort_mode=mtime
centered_cursor=yes
colors_enabled=yes
cyclic_scrolling=yes
display_bitrate=yes
empty_tag_marker=
enable_window_title=yes
fetch_lyrics_for_current_song_in_background=yes
follow_now_playing_lyrics=yes
header_visibility=yes
header_window_color=green
lines_scrolled=2
locked_screen_width_part=25
lyrics_directory=~/.lyrics
main_window_color=white
mpd_music_dir=/home/natto/Music
now_playing_prefix=>
playlist_display_mode=columns
playlist_editor_display_mode=classic
progressbar_elapsed_color=magenta
progressbar_color=green
progressbar_look=▃▃▃
regular_expressions=extended
song_columns_list_format=(4)[red]{l} (40)[cyan]{t} (15)[green]{a} (25)[magenta]{b}
song_list_format=$(yellow){%a} - $(blue){%t}
song_status_format= $6%a $7⟫⟫ $3%t $7⟫⟫ $4%b
statusbar_visibility=yes
system_encoding=utf-8
titles_visibility=yes
user_interface=alternative
visualizer_data_source=/tmp/mpd.fifo
visualizer_fps=144
visualizer_in_stereo=yes
visualizer_look=◆▋
visualizer_spectrum_smooth_look=yes
visualizer_type=spectrum
volume_color=yellow

View File

@@ -0,0 +1,37 @@
set editor="nvim"
#set index_format="%4C %Z %{%b %d %R} %-15.15L (%?l?%4l&%4c?) %s"
set sidebar_visible
#set sidebar_format="%B%?F? [%F]?%* %?N?%N/?%S"
set mail_check_stats
bind attach,index,pager \CU next-page
bind attach,index,pager \CD previous-page
bind attach,index,pager 9 group-reply
bind pager g top
bind pager G bottom
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
bind attach,index g first-entry
bind attach,index G last-entry
bind index,pager \CK sidebar-prev
bind index,pager \CJ sidebar-next
bind index,pager \CI sidebar-open
bind index,pager \CB sidebar-toggle-visible
set sleep_time = 0
set markers = no
set mark_old = no
set mime_forward = yes
set wait_key = no
set fast_reply
set fcc_attach
set forward_format = "Fwd: %s"
set forward_quote
set reverse_name
set include
set mail_check=60
auto_view text/html
alternative_order text/enriched text/plain text/html text
macro index,pager U "<shell-escape>mbsync -a<enter>" "run mbsync to sync all emails"
macro index A \
"<tag-pattern>~N<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" \
"mark all new as read"

View File

@@ -0,0 +1,73 @@
# A convenient colorscheme(r) I got from somewhere but forgot from where
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# New mail is boldened:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Tagged mail is highlighted:
color index brightyellow blue "~T"
color index_author brightred blue "~T"
color index_subject brightcyan blue "~T"
# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
# Regex highlighting:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"

View File

@@ -0,0 +1,10 @@
background "#002b36"
geometry "1x1-0"
grow_gravity "E"
icon_gravity "E"
icon_size "23"
kludges "force_icons_size"
max_geometry "10x0"
sticky true
window_layer "top"
window_type "dock"

View File

@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Taken from https://github.com/jaor/xmobar/blob/master/examples/padding-icon.sh
# Detects the width of running window with name given as first
# argument (xprop name '$1') and creates an XPM icon of that width,
# 1px height, and transparent. Outputs an <icon>-tag for use in
# xmobar to display the generated XPM icon.
#
# Run script from xmobar and trayer:
# `Run Com "/where/ever/padding-icon.sh" ["panel"] "trayerpad" 10`
# and use `%trayerpad%` in your template.
# or, if you're using for instance stalonetray:
# `Run Com "/where/ever/padding-icon.sh" ["stalonetray"] "tray" 10`
# Very heavily based on Jonas Camillus Jeppensen code
# https://github.com/jaor/xmobar/issues/239#issuecomment-233206552
# Function to create a transparent Wx1 px XPM icon
create_xpm_icon () {
timestamp=$(date)
pixels=$(for i in `seq $1`; do echo -n "."; done)
cat << EOF > "$2"
/* XPM *
static char * trayer_pad_xpm[] = {
/* This XPM icon is used for padding in xmobar to */
/* leave room for trayer-srg. It is dynamically */
/* updated by by trayer-pad-icon.sh which is run */
/* by xmobar. */
/* Created: ${timestamp} */
/* <w/cols> <h/rows> <colors> <chars per pixel> */
"$1 1 1 1",
/* Colors (none: transparent) */
". c none",
/* Pixels */
"$pixels"
};
EOF
}
# panel window name
pname=${1:-panel}
# Width of the trayer window
width=$(xprop -name $pname | grep 'program specified minimum size' | cut -d ' ' -f 5)
# Icon file name
iconfile="/tmp/$pname-padding-${width:-0}px.xpm"
# If the desired icon does not exist create it
if [ ! -f $iconfile ]
then
create_xpm_icon $width $iconfile
fi
# Output the icon tag for xmobar
echo "<icon=${iconfile}/>"

View File

@@ -0,0 +1,50 @@
import Xmobar
bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String
sep = "<fc=" ++ cyan ++ ">║</fc>"
bg = "#002b36"
fg = "#839496"
grey = "#073642"
red = "#dc322f"
green = "#859900"
yellow = "#b58900"
blue = "#268bd2"
magenta = "#d33682"
cyan = "#2aa198"
white = "#eee8d5"
config :: Config
config =
defaultConfig
{
font = "xft:Fira Mono:style=Regular:antialias=true:pixelsize,Font Awesome 6 Brands:pixelsize=16,Font Awesome 6 Free:pixelsize=16:style=Solid,Lohit Devanagari:style=Regular:pixelsize=16,Lohit Gurmukhi:style=Regular:pixelsize=16,Noto Sans CJK JP:style=Regular:pixelsize=16,Noto Sans CJK KR:style=Regular:pixelsize=16,Noto Sans CJK SC:style=Regular:pixelsize=16",
additionalFonts =
[ "xft:Font Awesome 6 Free:pixelsize=15:style=Solid",
"xft:Font Awesome 6 Brands:pixelsize=15"
],
position = Static { xpos = 0, ypos = 0, height = 23, width = 1920 },
bgColor = bg,
fgColor = fg,
lowerOnStart = False,
overrideRedirect = False,
allDesktops = True,
persistent = True,
commands =
[ Run $ MultiCpu ["-t", "<fn=1>\xf2db</fn> <total>%", "-L", "20", "-H", "80", "-h", magenta, "-l", green, "-n", yellow] 10,
Run $ Memory ["-t", "<fn=1>\xf538</fn> <usedratio>%", "-H", "10240", "-L", "6144", "-h", magenta, "-l", green, "-n", yellow] 20,
Run $ BatteryP ["BAT1", "BAT0", "BAT2"] ["-t", "<acstatus>", "-L", "10", "-H", "80", "-l", magenta, "-h", green, "-n", yellow, "--", "-O", "Charging", "-o", "<left>%", "-a", "notify-send -u critical 'Battery running out!'", "-A", "5", "--lows", "<fn=1>\xf243</fn> ", "--mediums", "<fn=1>\xf242</fn> ", "--highs", "<fn=1>\xf240</fn> "] 300,
Run $ DynNetwork ["-t", "<fn=1>\xf1eb</fn> <fc=" ++ magenta ++ "><rx>/<tx></fc>"] 10,
Run $ Date "<fn=1>\xf073</fn> %-d/%-m/%-y/%w" "date" 10000,
Run $ Date "%H:%M:%S" "time" 10,
Run $ MPD ["-t", "<statei><title><fn=" ++ magenta ++ "> \xf001</fn>", "--", "-P", ">> ", "-Z", "|| ", "-S", "Stopped", "-h", "127.0.0.1", "-p", "6600"] 10,
Run $ Com "~/.xmonad/lib/padding-icon.sh" ["stalonetray"] "tray" 10,
Run $ Com "pamixer" ["--get-volume"] "" 100,
Run UnsafeStdinReader
],
sepChar = "*",
alignSep = "--",
template = "<action=`dmenu_run` button=1><icon=~/.xmonad/lib/nixos.xpm/></action> *UnsafeStdinReader* " ++ sep ++ " <fn=1></fn>*mpd* -- *multicpu* " ++ sep ++ " *memory* " ++ sep ++ " *dynnetwork* " ++ sep ++ " *battery* " ++ sep ++ " <fn=1>\xf028</fn> <fc=" ++ green ++ ">*pamixer*%</fc> " ++ sep ++ " *date* - *time* " ++ sep ++ "*tray*"
}
main :: IO ()
main = xmobar config

View File

@@ -19,20 +19,30 @@ import XMonad.Actions.CycleWindows
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myBorderWidth = 2
myTerminal = "/usr/bin/env st"
myFocusFollowsMouse = True
myNormalBorderColor = "#1d2021"
myModMask = mod4Mask
myFocusedBorderColor = "#d5c4a1"
myManageHook = composeAll
[ className =? "Discord" --> doFloat ]
--colors
bgColor = "#002b36"
fgColor = "#eee8d5"
inactiveWinColor = "#2aa198"
activeWinColor = "#d33682"
urgentWinColor = "#dc322f"
miscColor = inactiveWinColor
tabConfig = defaultTheme {
activeTextColor = "#1d2021",
activeColor = "#d5c4a1",
inactiveTextColor = "#d5c4a1",
inactiveColor = "#1d2021"
myBorderWidth = 2
myTerminal = "st"
myFocusFollowsMouse = True
myNormalBorderColor = bgColor
myModMask = mod4Mask
myFocusedBorderColor = fgColor
myManageHook = composeAll
[ className =? "Discord" --> doFloat
, className =? "Anki" --> doFloat
]
tabConfig = def {
activeTextColor = bgColor,
activeColor = fgColor,
inactiveTextColor = fgColor,
inactiveColor = bgColor
}
myXmobarrc = "~/.xmonad/lib/xmobar.hs"
@@ -40,54 +50,67 @@ myXmobarrc = "~/.xmonad/lib/xmobar.hs"
myWorkspaces = clickable $ ["\xf269", "\xf120", "\xf121", "\xf392", "\xf008", "\xf07b", "\xf11b", "\xf086", "\xf074" ]
where clickable l = ["<action=`xdotool key super+" ++ show (n) ++ "`>" ++ ws ++ "</action>" | (i,ws) <- zip [1..9] l, let n = i ]
playerctl = "playerctl -p 'playerctld,%any'"
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask, xK_Return),
spawn $ XMonad.terminal conf)
, ((modMask, xK_d),
spawn "/usr/bin/env dmenu_run -l 20")
spawn "dmenu_run -l 20")
, ((modMask, xK_s),
spawn "dmenu_websearch")
, ((shiftMask, xK_Print),
spawn "flameshot gui -p /home/natto/Pictures")
spawn "flameshot gui")
, ((0, xK_Print),
spawn "flameshot full -p /home/natto/Pictures")
, ((mod1Mask, xK_Print),
spawn "flameshot full -p /home/natto/Pictures -d 10000")
spawn "flameshot gui -d 10000")
, ((modMask, xK_p),
spawn "mpc toggle")
spawn (playerctl ++ " play-pause"))
, ((modMask, xK_h),
spawn "mpc next")
, ((0, xF86XK_AudioPlay),
spawn (playerctl ++ " play-pause"))
, ((modMask, xK_k),
spawn "mpc prev")
, ((modMask, xF86XK_AudioNext),
spawn (playerctl ++ " next"))
, ((modMask .|. shiftMask, xK_a),
spawn "mpc seek -00:00:05")
, ((modMask, xF86XK_AudioPrev),
spawn (playerctl ++ " previous"))
, ((modMask .|. shiftMask, xK_s),
spawn "mpc seek +00:00:05")
, ((0, xF86XK_AudioPrev),
spawn (playerctl ++ " position 5-"))
, ((modMask .|. shiftMask, xK_period),
spawn "pamixer --allow-boost -i 5")
, ((0, xF86XK_AudioNext),
spawn (playerctl ++ " position 5+"))
, ((modMask .|. shiftMask, xK_comma),
spawn "pamixer --allow-boost -d 5")
, ((0, xF86XK_AudioRaiseVolume),
spawn "pamixer --allow-boost -ui 5")
, ((0, xF86XK_AudioLowerVolume),
spawn "pamixer --allow-boost -ud 5")
, ((0, xF86XK_AudioMute),
spawn "pamixer -t")
, ((modMask .|. shiftMask, xK_q), kill)
, ((mod1Mask, xK_Tab),
cycleRecentWindows [xK_Alt_L] xK_Tab xK_q)
, ((modMask .|. mod1Mask, xK_0), spawn "light -A 5")
, ((0, xF86XK_MonBrightnessUp),
spawn "light -A 5")
, ((modMask .|. mod1Mask, xK_9), spawn "light -U 5")
, ((0, xF86XK_MonBrightnessDown),
spawn "light -U 5")
, ((modMask .|. shiftMask, xK_F1),
spawn "setxkbmap us-colemak")
spawn "setxkbmap us colemak_dh")
, ((modMask .|. shiftMask, xK_F2),
spawn "setxkbmap us basic")
@@ -98,6 +121,9 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
, ((modMask .|. shiftMask, xK_F4),
spawn "setxkbmap in guru")
, ((modMask .|. shiftMask, xK_F5),
spawn "setxkbmap colemak dhz")
, ((modMask, xK_space),
sendMessage NextLayout)
@@ -190,39 +216,8 @@ toggleFullscreen =
windows $ if isFullFloat then W.sink w else W.float w fullRect
--}}}
--{{{
--couldnt get fullScreenEventHook to work normally so using this for now
--source code: https://github.com/xmonad/xmonad-contrib/blob/v0.16/XMonad/Hooks/EwmhDesktops.hs
fullscreenFix :: XConfig a -> XConfig a
fullscreenFix c = c {
startupHook = startupHook c +++ setSupportedWithFullscreen
}
where x +++ y = mappend x y
setSupportedWithFullscreen :: X ()
setSupportedWithFullscreen = withDisplay $ \dpy -> do
r <- asks theRoot
a <- getAtom "_NET_SUPPORTED"
c <- getAtom "ATOM"
supp <- mapM getAtom ["_NET_WM_STATE_HIDDEN"
,"_NET_WM_STATE_FULLSCREEN"
,"_NET_NUMBER_OF_DESKTOPS"
,"_NET_CLIENT_LIST"
,"_NET_CLIENT_LIST_STACKING"
,"_NET_CURRENT_DESKTOP"
,"_NET_DESKTOP_NAMES"
,"_NET_ACTIVE_WINDOW"
,"_NET_WM_DESKTOP"
,"_NET_WM_STRUT"
]
io $ changeProperty32 dpy r a c propModeReplace (fmap fromIntegral supp)
setWMName "xmonad"
--}}}
main = do xmproc <- spawnPipe ("xmobar " ++ myXmobarrc)
xmonad $ docks $ fullscreenFix $ ewmh def
xmonad $ docks $ ewmh def
{ borderWidth = myBorderWidth
, manageHook = manageDocks <+> myManageHook
, handleEventHook = handleEventHook def <+> fullscreenEventHook
@@ -236,12 +231,12 @@ main = do xmproc <- spawnPipe ("xmobar " ++ myXmobarrc)
, workspaces = myWorkspaces
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppCurrent = xmobarColor "#b8bb26" "" . wrap "+" ""
, ppVisible = xmobarColor "#b8bb26" ""
, ppHidden = xmobarColor "#d3869b" ""
, ppTitle = xmobarColor "#ebdbb2" "" . shorten 60
, ppCurrent = xmobarColor activeWinColor "" . wrap "(" ")"
, ppVisible = xmobarColor activeWinColor ""
, ppHidden = xmobarColor inactiveWinColor ""
, ppTitle = xmobarColor fgColor "" . shorten 40
, ppLayout = const ""
, ppUrgent = xmobarColor "#fabd2f" "" . wrap "!" ""
, ppSep = "<fc=#83a598> ║ </fc>"
, ppUrgent = xmobarColor urgentWinColor "" . wrap "!" ""
, ppSep = "<fc=" ++ miscColor ++ "> ║ </fc>"
}
}

View File

@@ -8,7 +8,4 @@ map S rotate
map f zoom in
map q zoom out
map p follow link
#map m scroll left
#map i scroll right
#map n scroll down
#map e scroll up
set selection-clipboard clipboard

13
home/natto/cursor.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
home.pointerCursor = {
package = pkgs.catppuccin-cursors.mochaFlamingo;
name = "catppuccin-mocha-flamingo-cursors";
size = 32;
x11 = {
enable = true;
defaultCursor = "crosshair";
};
gtk.enable = true;
};
}

39
home/natto/default.nix Normal file
View File

@@ -0,0 +1,39 @@
{ ... }:
{
home = {
homeDirectory = "/home/natto";
username = "natto";
stateVersion = "22.11";
};
imports = [
./email.nix
./pass.nix
./browser.nix
./pdf.nix
./mpv.nix
./pkgs.nix
./stuff.nix
./gtk.nix
./dunst.nix
./git.nix
./music.nix
./zsh.nix
./games.nix
./cursor.nix
./emacs.nix
# when xserver
# ./xsession.nix
# when wayland
./wayland.nix
./hyprpaper.nix
./hyprlock.nix
./hypridle.nix
./hyprland.nix
./foot.nix
./tofi.nix
./ags
];
}

40
home/natto/dunst.nix Normal file
View File

@@ -0,0 +1,40 @@
{ config, conf, ... }:
{
services = {
dunst = {
enable = true;
iconTheme = with config.gtk.iconTheme; {
inherit name package;
};
settings = with conf.colors.hex; {
global = {
mouse_left_click = "close_current";
mouse_right_click = "do_action";
mouse_middle_click = "close_all";
font = "Monospace 10";
separator_color = "auto";
shrink = true;
word_wrap = "yes";
};
urgency_low = {
inherit background foreground;
frame_color = sky;
timeout = 5;
};
urgency_normal = {
inherit background foreground;
frame_color = mauve;
timeout = 5;
};
urgency_critical = {
inherit background foreground;
frame_color = red;
timeout = 0;
};
};
};
};
}

49
home/natto/emacs.nix Normal file
View File

@@ -0,0 +1,49 @@
{ pkgs, inputs, ... }:
let
emacs = pkgs.emacs-git-pgtk;
configFile = ./config/emacs/config.org;
enable = true;
in
{
nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ];
home = {
shellAliases = rec {
e = "emacs";
enw = e + " -nw";
ec = "emacsclient";
ecc = ec + " -c";
ecnw = ec + " -nw";
};
};
programs.emacs = {
inherit enable;
package = pkgs.emacsWithPackagesFromUsePackage {
config = configFile;
package = emacs;
alwaysEnsure = true;
alwaysTangle = true;
defaultInitFile = true;
extraEmacsPackages = epkgs: with epkgs; [
use-package
(tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
];
override = final: prev: {
evil = prev.melpaPackages.evil.overrideAttrs(_: {
src = pkgs.fetchFromGitHub {
owner = "natto1784";
repo = "evil";
rev = "isearch-lazy-count";
sha256 = "sha256-YqXoqPqOWRvszzktb0MYHMe590mzTQxCMgBloy3MHkQ=";
};
});
};
};
};
services.emacs = {
inherit enable;
defaultEditor = true;
};
systemd.user.services.emacs.Service.Environment = "COLORTERM=truecolor";
}

121
home/natto/email.nix Normal file
View File

@@ -0,0 +1,121 @@
{
config,
lib,
pkgs,
inputs,
conf,
...
}:
let
realName = "Amneesh Singh";
in
{
accounts.email = {
accounts = {
natto =
let
domain = conf.network.addresses.domain.natto;
address = "natto@${domain}";
host = "mail.${domain}";
in
{
inherit realName address;
primary = true;
userName = address;
gpg = {
key = "3C4BDBE7BBF45B52C14EA193007257B05FCC86A8";
signByDefault = true;
};
imap = {
inherit host;
tls.enable = true;
};
imapnotify.enable = true;
smtp = {
inherit host;
tls.enable = true;
};
mbsync = {
enable = true;
create = "both";
};
passwordCommand = "pass show email/${address}";
neomutt = {
enable = true;
extraMailboxes = [
"Sent"
"Drafts"
"Trash"
"Junk"
];
};
};
amneesh =
let
domain = conf.network.addresses.domain.amneesh;
address = "me@${domain}";
host = "mail.${domain}";
in
{
inherit address realName;
userName = address;
gpg = {
key = "0C2FDA374F2D48D9F9F0F7788EAAB36980C424C2";
signByDefault = true;
};
imap = {
inherit host;
tls.enable = true;
};
imapnotify.enable = true;
smtp = {
inherit host;
tls.enable = true;
};
mbsync = {
enable = true;
create = "both";
};
passwordCommand = "pass show email/${address}";
neomutt = {
enable = true;
extraMailboxes = [
"Sent"
"Drafts"
"Junk"
];
};
};
};
};
services = {
imapnotify.enable = true;
};
programs = {
mbsync.enable = true;
neomutt = rec {
enable = true;
package = pkgs.neomutt;
sort = "reverse-date";
extraConfig = lib.concatMapStringsSep "\n" builtins.readFile [
./config/neomutt/neomuttrc
./config/neomutt/theme
];
};
};
home = {
packages = with pkgs; [
mailcap
w3m
];
file = {
mailcap = {
source = ./config/mailcap;
target = "${config.home.homeDirectory}/.mailcap";
};
};
};
}

View File

@@ -0,0 +1,4 @@
#+OPTIONS: toc:nil
Inspired by
+ [[https://github.com/saimoomedits/eww-widgets/tree/cfb2523a4e37ed2979e964998d9a4c37232b2975][saimoomedits]]
+ [[https://github.com/fufexan/dotfiles/tree/db777ae5a76db34608dd486ed9238e9129252bbc/home/programs/eww][fufexan]]

242
home/natto/eww/bar/bar.scss Normal file
View File

@@ -0,0 +1,242 @@
* {
all: unset;
}
tooltip {
background: $background;
border: 1px solid $pink;
border-radius: 2px;
label {
padding: 5px;
}
}
@mixin color-shadow($color, $opacity: 0.08, $on-hover: 1) {
color: $color;
@if $on-hover == 0 {
box-shadow: 0 0 0 9999px rgba($color, $opacity) inset;
} @else {
&:hover {
box-shadow: 0 0 0 9999px rgba($color, $opacity) inset;
}
}
}
.bar, .music-large {
font-family: "Fira Mono";
background: $background;
button:hover {
transition: 0.15s;
}
scale trough, circular-progress {
background: $surface1;
}
}
.workspaces {
font-size: 16px;
font-family: "Lohit Devanagari";
button {
background: none;
}
.workspace-active {
@include color-shadow($mauve, $on-hover: 0);
font-size: 20px;
font-weight: bold;
}
.workspace-inactive {
@include color-shadow($flamingo);
}
}
.music {
button {
background: none;
padding: 0 10px;
}
.music-control {
@include color-shadow($mauve);
font-family: "Font Awesome 6 Free";
font-size: 18px;
}
.music-title {
@include color-shadow($sapphire);
font-size: 16px;
}
}
.music-large {
border: solid 3px $sapphire;
color: $mauve;
border-radius: 8px;
.music-large-cover {
background-size: cover;
background-position: center;
border-radius: 5px;
margin: 15px 0 15px 15px;
min-height: 200px;
min-width: 200px;
}
.music-large-controls {
margin: 15px;
scale trough {
min-height: 5px;
margin: 0 15px;
highlight {
background-image: linear-gradient(to right, $sapphire, $teal);
}
slider {
border-radius: 4px;
background: $background;
border: 2px $mauve solid;
margin: -10px -10px;
transition: 0.2s;
&:hover {
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}
&:active {
box-shadow: 0 0 0 1px inset, 0 0 0 8px rgba(255, 255, 255, 0.1);
}
}
}
.music-large-artist {
font-size: 18px;
color: $mauve;
}
.music-large-album {
font-size: 16px;
color: $sapphire;
}
}
}
.system {
button {
background: none;
font-size: 20px;
padding: 0 10px;
}
.system-scale {
min-width: 100px;
}
scale trough {
min-height: 20px;
min-width: 120px;
border-radius: 3px;
highlight {
all: unset;
border-radius: 3px;
}
slider {
all:unset;
border: none;
min-width: 0;
min-height: 0;
}
}
.system-sound {
button {
@include color-shadow($green);
padding-right: 5px;
}
scale trough highlight {
background-color: $green;
}
}
.system-bright {
button {
@include color-shadow($yellow);
}
scale trough highlight {
background-color: $yellow;
}
}
.system-temp {
button {
@include color-shadow($red);
}
}
.system-net {
button {
@include color-shadow($mauve);
}
}
.system-separator {
min-width: 5px;
background-color: $sapphire;
}
.system-metrics {
transition: 0.2s;
label {
padding: 0 5px;
font-size: 20px;
}
circular-progress {
margin: 0 5px;
}
.system-metric-cpu {
color: $teal;
}
.system-metric-battery {
color: $yellow;
}
.system-metric-memory {
color: $pink;
}
.system-metric-disk {
color: $blue;
}
}
}
.system-time {
label {
color: $foreground;
padding: 0 5px;
font-weight: bold;
}
.system-time-time {
font-size: 18px;
}
.system-time-date {
font-size: 20px;
}
}

View File

@@ -0,0 +1,20 @@
(include "bar/music.yuck")
(include "bar/hyprworkspaces.yuck")
(include "bar/system.yuck")
(defwidget bar []
(box :class "bar" :orientation "h" :spacing 40
(workspaces)
(music_compact)
(system)))
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "40px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar))

View File

@@ -0,0 +1,13 @@
pkgs: with pkgs; [
coreutils
bash
jq
less
gawk
socat
playerctl
networkmanager
light
iwgtk
wireplumber
]

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
##########################################
# workspace script to work with hyprland #
##########################################
# i dont really have multiple monitors rn
# active workspace
current=1
list_workspaces() {
workspace_list=$(hyprctl -j workspaces | jq -rc '[.[]|.id]|sort' || "[]")
}
workspaces() {
echo '{"current": '"${current}"',"list": '"${workspace_list}"'}'
}
list_workspaces
workspaces
hyprctl dispatch workspace $current &>/dev/null || true
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
case ${event%>>*} in
"workspace")
current=${event##*>>}
workspaces
;;
"createworkspace"|"destroyworkspace")
list_workspaces
workspaces
;;
esac
done

View File

@@ -0,0 +1,13 @@
(deflisten workspace :initial "{}" "bar/hyprworkspaces")
(defvar numerals "[\"१\", \"२\", \"३\", \"४\", \"५\", \"६\", \"७\", \"८\", \"९\", \"\"]")
(defwidget workspaces []
(eventbox
:cursor "pointer"
(box
:class "workspaces"
(for ws in {workspace.list}
(button
:class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
:onclick "hyprctl dispatch workspace ${ws}"
{ws <= 10 ? numerals[ws - 1] : ws })))))

View File

@@ -0,0 +1,92 @@
(defvar playerctl "playerctl -p 'playerctld,%any'")
; https://github.com/elkowar/eww/issues/518
(deflisten music :initial ""
"playerctl -p 'playerctld,%any' --follow metadata --format '{\"artist\":\"{{artist}}\",\"album\":\"{{album}}\",\"title\":\"{{trunc(title,40)}}\",\"full_title\":\"{{title}}\",\"cover\":\"{{mpris:artUrl}}\", \"status\":\"{{lc(status)}}\",\"duration\":\"{{duration(mpris:length)}}\",\"raw_duration\":\"{{mpris:length}}\",\"position\":\"{{duration(position)}}\",\"raw_position\":\"{{position}}\"}'")
(defwidget music_controls[]
(box
(button :class "music-control" :onclick "${playerctl} previous" "")
(button :class "music-control" :onclick "${playerctl} play-pause" {music.status == "playing" ? "" : "" })
(button :class "music-control" :onclick "${playerctl} next" "")))
(defwidget music_large []
(box
:halign "center"
:class "music-large"
:orientation "h"
(box
:class "music-large-cover"
:visible {music.cover != ""}
:style "background-image: url(\"${music.cover}\");")
(box
:orientation "v"
:class "music-large-controls"
:spacing {music.cover == "" ? 10 : 0}
(label
:visible {music.artist != ""}
:class "music-large-artist"
:text {music.artist})
(label
:visible {music.album != ""}
:class "music-large-album"
:text {music.album})
(eventbox
:cursor "pointer"
(music_controls))
(box
(label
:visible {music.position != ""}
:xalign {music.duration == "" ? 0.5 : 0}
:style {music.duration == "" ? "font-size: 18px;": ""}
:text {music.position})
(label
:visible {music.duration != ""}
:xalign {music.position == "" ? 0.5 : 1}
:style {music.position == "" ? "font-size: 18px;": ""}
:text {music.duration}))
(eventbox
:class "music-large-scale"
:cursor "pointer"
:visible {music.raw_duration != "" && music.raw_position != "" }
(scale
:min 0
:max {music.raw_duration / 1000000}
:onchange "${playerctl} position {}"
:value {music.raw_position / 1000000})))))
(defvar music_control false)
(defwidget music_compact []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update music_control=true"
:onhoverlost "${EWW_CMD} update music_control=false"
:visible {music.title != "" && music.status != "stopped" && music != ""}
:halign "center"
(box
:class "music"
:space-evenly "false"
(button
:class "music-title"
:onclick "${EWW_CMD} open --toggle music"
:tooltip "${music.title} by ${music.artist}"
:onrightclick "wl-copy \"${music.artist} - ${music.full_title}\""
{music.title})
(revealer
:transition "slideright"
:reveal music_control
:duration "200ms"
(music_controls)
))))
(defwindow music
:stacking "overlay"
:monitor 0
:geometry (geometry
:x "0%"
:y "10px"
:width "0%"
:height "0%"
:anchor "top center")
(music_large))

View File

@@ -0,0 +1,183 @@
(defvar system_sound_control false)
(defvar system_sound_mute false)
(defpoll volume :interval "3s"
"wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}'")
(defwidget system_sound []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update system_sound_control=true"
:onhoverlost "${EWW_CMD} update system_sound_control=false"
:tooltip "${ system_sound_mute ? 'Muted' : 'Volume: ${volume}%'}"
(box
:space-evenly false
:orientation "h"
:class "system-sound"
(revealer
:transition "slideleft"
:reveal system_sound_control
:duration "250ms"
(scale
:class "system-scale"
:min 0
:max 151
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%"
:value {volume}
))
(button
; since we do not know the initial state, we will just update the variable
:onclick "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ${EWW_CMD} update system_sound_mute=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $3 ~ /MUTED/ ? \"true\" : \"false\"}')"
{system_sound_mute ? "" : volume > 75 ? "" : "" })
)))
(defvar system_bright_control false)
(defpoll bright :interval "3s" "light")
(defwidget system_bright []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update system_bright_control=true"
:onhoverlost "${EWW_CMD} update system_bright_control=false"
:tooltip "Brightness: ${round(bright,0)}%"
(box
:space-evenly false
:orientation "h"
:class "system-bright"
(revealer
:transition "slideleft"
:reveal system_bright_control
:duration "250ms"
(scale
:class "system-scale"
:min 5
:max 101
:onchange "light -S {}"
:value {bright}
))
(button
:onclick "light -S ${bright < 51 ? 100 : 50}"
""))))
(defwidget system_temp []
(eventbox
:cursor "pointer"
:tooltip {EWW_TEMPS["CORETEMP_PACKAGE_ID_0"] != "" ? "CPU: ${EWW_TEMPS['CORETEMP_PACKAGE_ID_0']} C" : EWW_TEMPS}
:class "system-temp"
(button
"")))
(defpoll system_net_ethernet :interval "4s" :initial ""
"nmcli -f NAME,TYPE con show --active | awk '$NF == \"ethernet\" {NF--; print}'")
(defpoll system_net_wifi :interval "4s" :initial ""
"nmcli -f NAME,TYPE con show --active | awk '$NF == \"wifi\" { NF--; print}'")
(defwidget system_net []
(eventbox
:cursor "pointer"
:class "system-net"
:visible {system_net_ethernet != "" || system_net_wifi != ""}
:tooltip {EWW_NET}
(box
:orientation "h"
(button
:visible {system_net_ethernet != ""}
:tooltip {system_net_ethernet}
"")
(button
:visible {system_net_wifi != ""}
:tooltip {system_net_wifi}
""))))
(defwidget system_info []
(box
:orientation "h"
:space-evenly false
:spacing 5
(system_sound)
(system_bright)
(system_temp)))
(defwidget system_metric [value class tooltip]
(box
:orientation "h"
:space-evenly false
:class "system-metric-${class}"
:tooltip "${tooltip}"
(circular-progress
:value value
:start-at 0
:thickness 4
(label :text ""))))
(defwidget system_metrics []
(eventbox
:cursor "pointer"
:class "system-metrics"
:tooltip "test"
:onclick "${EWW_CMD} open --toggle system"
(box
:space-evenly false
(system_metric
:value {EWW_CPU.avg}
:tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%
CPU Freq: ${EWW_CPU.cores[0].freq} MHz}"
:class "cpu")
(system_metric
:value {EWW_RAM.used_mem_perc}
:tooltip "Free Memory: ${round(EWW_RAM.free_mem / 1024 / 1024, 2)} MB
Available Memory: ${round(EWW_RAM.available_mem / 1024 / 1024, 2)} MB
Free %: ${round(100 - EWW_RAM.used_mem_perc, 2)}%"
:class "memory")
(system_metric
:value {EWW_BATTERY.total_avg}
:tooltip "Battery ${round(EWW_BATTERY.total_avg, 0)}%"
:class "battery")
(system_metric
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024 / 1024, 2)} GB
Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%"
:class "disk"))))
(defvar system_date_reveal false)
(defpoll time :interval "1s"
"date '+%H:%M:%S'")
(defpoll date :interval "10m"
"date '+%b %d'")
(defwidget system_time []
(eventbox
:onhover "${EWW_CMD} update system_date_reveal=true"
:onhoverlost "${EWW_CMD} update system_date_reveal=false"
(box
:space-evenly false
:orientation "h"
:class "system-time"
(label :class "system-time-time" :text {time})
(revealer
:transition "slideright"
:reveal system_date_reveal
:duration "250ms"
(label :class "system-time-date" :text {date})))))
(defwidget system_separator [?visible] (box :class "system-separator" :visible {visible == "false" ? false : true}))
(defwidget system []
(box
:halign "end"
:class "system"
:space-evenly false
:spacing 5
(system_separator)
(system_info)
(system_separator
:visible "${system_net_ethernet != "" || system_net_wifi != ""}")
(system_net)
(system_separator)
(system_metrics)
(system_separator)
(system_time)))

View File

@@ -0,0 +1,55 @@
{
config,
pkgs,
lib,
...
}:
{
programs.eww = {
enable = true;
package = pkgs.eww;
configDir = lib.cleanSourceWith {
src = ./.;
filter =
name: _:
let
baseName = baseNameOf (toString name);
in
!(lib.hasSuffix ".nix" baseName);
};
};
systemd.user.services.eww = {
Unit = {
Description = "EWW Daemon";
PartOf = [ "graphical-session.target" ];
};
Service =
let
deps = [
config.programs.eww.package
]
++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package
++ (with pkgs; [
coreutils
bash
jq
less
gawk
socat
playerctl
networkmanager
iwgtk
wireplumber
])
++ lib.optional config.laptop pkgs.light;
in
{
Type = "simple";
Environment = "PATH=${lib.makeBinPath deps}";
Restart = "on-failure";
ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize";
};
Install.WantedBy = [ "graphical-session.target" ];
};
}

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