Compare commits
572 Commits
addBenModu
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 35475da5b8 | |||
| 6d283347ee | |||
| 0d47dba590 | |||
| 657a80ac52 | |||
| b1284f787d | |||
| de64062078 | |||
| b1c1cf9ddc | |||
| 304376397b | |||
| 68f9809798 | |||
| 71b38811dd | |||
| 3ff056e6d9 | |||
| 98c85c5727 | |||
| 3a405c0520 | |||
| 65a329258e | |||
| 46f16c406c | |||
| b78c7b7f2c | |||
| 9f554b3976 | |||
| 239013386f | |||
| 1e3321c2b0 | |||
| f1142f58a8 | |||
| 2a24fde229 | |||
| 7f61090a82 | |||
| 56c9ddf508 | |||
| 5c3c55c582 | |||
| b234cbec56 | |||
| e3ad0d857e | |||
| 2f2bb59693 | |||
| 9b42d002cf | |||
| 9187b7381a | |||
| 0c47603d8d | |||
| 0aa3dc14f3 | |||
| c25da8d505 | |||
| 389f746a94 | |||
| ae5036721a | |||
| d3259bbb26 | |||
| d87da32dee | |||
| b2ff5f1ae5 | |||
| 478ceed777 | |||
| 31b7174624 | |||
| ab8cf11b80 | |||
| b3b405ec7e | |||
| 0e16fbaeb0 | |||
| af9c3299cb | |||
| b1f578b248 | |||
| ebfbca4827 | |||
| 8620cc6287 | |||
| c75d1e59e0 | |||
| 781c3b8297 | |||
| 5d44ec0aaa | |||
| f52635d139 | |||
| 2bcfa3df1a | |||
| dd3931249f | |||
| daf2911540 | |||
| 8bce7b05c6 | |||
| 3e8ff68f15 | |||
| f22a96e37b | |||
| 8045c4cc9d | |||
| ff90c0ab3f | |||
| baf8b17098 | |||
| cd51704a0c | |||
| 03c8fd52a3 | |||
| 11cbe51ab8 | |||
| aacb4e5e99 | |||
| dd3c638461 | |||
| ba91ff5b82 | |||
| 0493a60f95 | |||
| 68d554d2b2 | |||
| 5b92b7ee01 | |||
|
|
0d21252693 | ||
|
|
8794829f81 | ||
| e12f65de10 | |||
| 06dde4652d | |||
| 91db521dfd | |||
| 9c51555847 | |||
| 89ce2116cf | |||
| 3b7c053575 | |||
| 865957d9ac | |||
| 22360ddeea | |||
| 301e2a1479 | |||
| 34cacdc40d | |||
| 7a1a612397 | |||
| 317019d5bc | |||
| ad5c3fc8ed | |||
| 6b1e5a1aec | |||
| f28a78b053 | |||
| c4867e7845 | |||
| c36ae5f4a8 | |||
| 4d8447ccb2 | |||
| f241d76734 | |||
| bf02a7ee4c | |||
| a716ec1694 | |||
| e7a455ced9 | |||
| 53afba8b40 | |||
| 4d7350b3fe | |||
| df2c033d0f | |||
| 9cdd201c41 | |||
| 50fc48ec36 | |||
| 595dc39945 | |||
| e1a5d2af5d | |||
| fc481ababa | |||
| 4c6ff0bd10 | |||
| 0d13dd022a | |||
| 43e118b3e3 | |||
| 504ec1a105 | |||
| ccd63ba066 | |||
| 96e019310b | |||
| fc2903eb5d | |||
| 71580f3a84 | |||
| f280b91595 | |||
| d64a97e2c1 | |||
| f692c9f6c4 | |||
| 1876c22b46 | |||
| aecc7afb4c | |||
| b9f4a8731e | |||
| 180d9e7c50 | |||
| b383cd0cd2 | |||
| 28ead6994d | |||
| 205d9528b3 | |||
| 91e36cd0ba | |||
| f3871b233a | |||
| 674b6ca7cb | |||
| 08cf4ae492 | |||
| 986966bbc1 | |||
| b3b425833b | |||
| 658f424cf8 | |||
| cc05a1d790 | |||
| 68b3e5d83c | |||
| c70d6a9e99 | |||
| 3e805b172e | |||
| b27ff12180 | |||
| fb2cc5672c | |||
| 2291a14e84 | |||
| e7ee6c7d3d | |||
| 74d95edcae | |||
| 4954c40f85 | |||
| d0c92889ee | |||
| ff3bb1e492 | |||
| 94216a3ec0 | |||
| a848468d09 | |||
| 5d73857125 | |||
| 3f88a30149 | |||
| b81e2699d6 | |||
| 323ffb935e | |||
| ec5411df87 | |||
| 6b54747f9a | |||
| 76755b24e1 | |||
| 231f84364c | |||
| 535a6c2521 | |||
| 7a471048dc | |||
| ccc49ce341 | |||
| 5304640c79 | |||
| 3e9f67c432 | |||
| 3e121b2944 | |||
| 7627ae7361 | |||
| 58f727b65d | |||
| 57fc6a4d53 | |||
| 444af768fc | |||
| f2ca4f3530 | |||
| 62cc99e951 | |||
| 049d0ca45c | |||
| 7a55c32da2 | |||
| d2a0b86024 | |||
| f79e7a527c | |||
| b2230c993a | |||
| 91e8fcb06a | |||
| 03356b9280 | |||
| c3f4f92a09 | |||
| 8799310710 | |||
| 493bd42966 | |||
| d98e7ae597 | |||
| bfd4a53b85 | |||
| 643096d98c | |||
| 32cd05a2b8 | |||
| 23afe4a8b6 | |||
| acf683f334 | |||
| 4b7fdcd68f | |||
| 9ecb62e13d | |||
| ce9910daed | |||
| cb2598af14 | |||
| ea4a577076 | |||
| 7d15907ee3 | |||
| 9c5dab9ecc | |||
| 8b9c71b77e | |||
| b3c3a7249c | |||
| 82f3a0eda3 | |||
| 7d603e3d4f | |||
| 612c0ef78d | |||
| db7e115542 | |||
| 7c25d8d578 | |||
| 37070171c2 | |||
| 5dc82b90e2 | |||
| 2cc0a54e07 | |||
| f9d7375f7b | |||
| 4d714d4416 | |||
| 96f35ab9d6 | |||
| f092bc782e | |||
| e84d333ea6 | |||
| 05ab80c13f | |||
| 8a972a72f3 | |||
| 01081d25c7 | |||
| 25a1afa317 | |||
| 17efe79dfa | |||
| 90f7a5dc90 | |||
| 6dc320ff1c | |||
| ff4c9c8e9a | |||
| 2bcd5dc9bd | |||
| e130df3c70 | |||
| 307710e7a5 | |||
| 4349671e14 | |||
| 33e4758389 | |||
| 0004a1d715 | |||
| abfc369407 | |||
| 9d61a15337 | |||
| 733beb094b | |||
| 4848a20a8d | |||
| 24346c9e88 | |||
| bb3ba5d702 | |||
| 77d0a8504e | |||
| 6ec03f7821 | |||
| d4db3b81a8 | |||
| 69f982526d | |||
| c952702742 | |||
| 5963113964 | |||
| 4cc07c65ae | |||
| 5c2b810a4f | |||
| 33ca6d490a | |||
| 2acc6d25c7 | |||
| a74e5ab4b6 | |||
| 39af365839 | |||
| 973c5dc134 | |||
| a244ee2223 | |||
| 1eaf5166d9 | |||
| a081f743a5 | |||
| aa19cc3204 | |||
| 8d92c45ffe | |||
| 96c74ac95e | |||
| b5ffc833fb | |||
| e18c41cf90 | |||
| 291e77b4b4 | |||
| 5cbf3ac32e | |||
| e7d06c8b91 | |||
| 07a367dc67 | |||
| a0e6ecd222 | |||
| 331ce9eec5 | |||
| 3ed35fd553 | |||
| 2df1d71367 | |||
| 5341a75a08 | |||
| d33fc584d0 | |||
| 375a7ed910 | |||
| 81e88f6610 | |||
| 3da6262856 | |||
| f8cb82fd60 | |||
| 3a3dbad845 | |||
| 017d47ca41 | |||
| 78046685f9 | |||
| 2046f360a6 | |||
| e70146fd1d | |||
| ea9d4145d4 | |||
| d1814a3072 | |||
| 08db2c3a75 | |||
| 2c384fb003 | |||
| 8ae53c14bd | |||
| b189e1fa3e | |||
| 107d3cfdb3 | |||
| e31f684f7b | |||
| ab87bb325f | |||
| fd9ceb1dda | |||
| 6fe2f72025 | |||
| 94e3c08f88 | |||
| 7138b67f59 | |||
| 1958d2ebf7 | |||
| a744a8fc2d | |||
| 30d50d72ec | |||
| a938447b8a | |||
| 9408eeff52 | |||
| 947eaad2f1 | |||
| eb6f67559e | |||
| 166c3a24ea | |||
| 3f3de17097 | |||
| d7ceec572f | |||
| 50bb8561d8 | |||
| 6ece92b75d | |||
| accb330589 | |||
| 9d8777e85c | |||
| 6b7a428145 | |||
| 6278da83fa | |||
| bf5009fdd4 | |||
| 4f573be120 | |||
| aba47c6ce9 | |||
| 14d24534f9 | |||
| e1752368b4 | |||
| ce9c752cbe | |||
| 0b1591642b | |||
| 998099ae10 | |||
| d01659c1b0 | |||
| 251f03838b | |||
| 2a303c445c | |||
| 7515a871a7 | |||
| 1ead310c05 | |||
| 76253e34ef | |||
| bbb0017bee | |||
| 718cf756b9 | |||
| 05e135d61d | |||
| 9a66f3fc5a | |||
| 0d3b15c072 | |||
| ebc7c2ede5 | |||
| 8035ae008b | |||
| a6d9bdb7a9 | |||
| 4f4168768d | |||
| eb61989a59 | |||
| 3dcb49fc1b | |||
| 442ed2aca4 | |||
| 5df6c5aecf | |||
| 884a8b31ae | |||
| fef852f4bf | |||
| 8453cc92b6 | |||
| e273e34662 | |||
| b681e4b5b4 | |||
| 24c5bb3ec6 | |||
| 70c5c011f8 | |||
| fcae542755 | |||
| 0e20737cb3 | |||
| 58ea719bed | |||
| 15ffb7355e | |||
| ca1b22ba98 | |||
| d2add34317 | |||
| 5da32bceea | |||
| 92c2d613af | |||
| c1a2c404e9 | |||
| 5b3915ad27 | |||
| 2d4c1df31f | |||
| 0f1895c5d2 | |||
| 990b7f0180 | |||
| a895c2471d | |||
| 8fd220c919 | |||
| 626d719e16 | |||
| 7873981341 | |||
| fca6d487f0 | |||
| e297235517 | |||
| 29ab9150f8 | |||
| 953d57be15 | |||
| 7b63af8aae | |||
| 697d216397 | |||
| 794f3c1eb8 | |||
| 4a8e077b5d | |||
| 7d76728651 | |||
| 957b94e1cc | |||
| 2445e6e7d6 | |||
| f5ddd2e4c5 | |||
| f071068e6d | |||
| c8ffe51c66 | |||
| e12d261a9f | |||
| 2557a2b538 | |||
| ea3cfe9604 | |||
| 8f3802a010 | |||
| 4d42e5c89d | |||
| b8872e957f | |||
| fe8b6caf3c | |||
| 3f0311b127 | |||
| 0b56680911 | |||
| 9fbdead63f | |||
| 5db03a0695 | |||
| c697b5684a | |||
| 95bd8dd280 | |||
| aa9d7b2d88 | |||
| a1b5f3838d | |||
| fe710dac80 | |||
| 18aee952be | |||
| 728e5ee02f | |||
| cb9f478cbc | |||
| 6654470109 | |||
| 4913622bad | |||
| ed9bed85d9 | |||
| 8881b704ca | |||
| 89bd7e9a4c | |||
| 354b54b772 | |||
| 7e445e7fd3 | |||
| a0f75a0f4d | |||
| 04b7672f0e | |||
| b643092237 | |||
| f4b753d750 | |||
| 0d14cc41a8 | |||
| 3904b09b8c | |||
| 36e43c3f27 | |||
| e178958e4f | |||
| e89501f139 | |||
| 7f3fe70cac | |||
| 8acb093f34 | |||
| d2ff285109 | |||
| 80c6ec0080 | |||
| af706c8f40 | |||
| 01d2d1d31b | |||
| df045e44b5 | |||
| 1c8def8999 | |||
| f40788cd15 | |||
| f077cc647b | |||
| 6428ec9f2a | |||
| a97cd99394 | |||
| 27258da627 | |||
| ce962bad1a | |||
| 1b29407793 | |||
| 81f9cb6cf9 | |||
| 37d1109bc3 | |||
| 5cb32ff923 | |||
| f972642cfa | |||
| 3e774e37f9 | |||
| 574885f327 | |||
| 46899bf76a | |||
| f7af858e16 | |||
| 5e3452c091 | |||
| bb87510a0c | |||
| 4d554f50c1 | |||
| 4d72cbc1b4 | |||
| 88d85f11b2 | |||
| be7448b710 | |||
| b742fc78cb | |||
| b703588b79 | |||
| 8e4d8ac662 | |||
| 27888a7a3e | |||
| 0d6624bc09 | |||
| 50c28d68c2 | |||
| 7e301c1452 | |||
| ad73cfebde | |||
| 2ba7a7f805 | |||
| 867ebad8ea | |||
| ebf91de2d8 | |||
| e6832e3c1e | |||
| 15499b292a | |||
| 1af9a5497b | |||
| a7b24c0fa4 | |||
| 661a6b6c2f | |||
| d4faa061dc | |||
| a2bbd4e04e | |||
| 7e62881c4d | |||
| 9f69f16471 | |||
| 5525fda4bf | |||
| ee7c0ed11c | |||
| e2875e1741 | |||
| 57e13b8319 | |||
| 1d31f870c5 | |||
| 9f3f835253 | |||
| 066902e37a | |||
| d790bc9e25 | |||
| 1ea8333994 | |||
| e464d8fec5 | |||
| 14a32c151c | |||
| bfdf5f221e | |||
| ae29832dbc | |||
| ae6ce6b19c | |||
| 8e1abde359 | |||
| c25cd05b15 | |||
| 5deba06fb0 | |||
| 7dcc785da6 | |||
| 5eb3654d0c | |||
|
|
cbcf03c784 | ||
|
|
a9d5ee5eb0 | ||
|
|
8402c6f1d2 | ||
|
|
da8b6b3b75 | ||
|
|
526bf6e2a9 | ||
|
|
04870cd682 | ||
|
|
46108ab249 | ||
|
|
a8e23460f9 | ||
|
|
a88018fe47 | ||
|
|
5757681ce0 | ||
|
|
6c393b3837 | ||
|
|
618f927cb9 | ||
|
|
bb259bf358 | ||
|
|
3f7de563db | ||
|
|
6ae5f4c503 | ||
|
|
e6c3d55fc8 | ||
|
|
36331ea60c | ||
|
|
6b18d0accf | ||
|
|
9a764fc7c8 | ||
|
|
9100167e4d | ||
|
|
e0e98bc237 | ||
|
|
4c989fcda3 | ||
|
|
35f8c10e7c | ||
|
|
ac49823b4c | ||
| daaead9c1e | |||
|
|
c5c86145b1 | ||
|
|
32755e1411 | ||
|
|
de27a133e7 | ||
|
|
f89155e4d2 | ||
|
|
f345cf8f18 | ||
|
|
4cb9c006d7 | ||
| 1dd54ba638 | |||
| 517c2f333e | |||
| d850ba999d | |||
| dd9f5ccf88 | |||
| 59da59c74f | |||
| 1f36c4942b | |||
| eaa46e7034 | |||
| f00d9bdb12 | |||
| 1003c33dee | |||
| a493a530be | |||
| 01361b7217 | |||
| cdd8ed60e9 | |||
| fd033ba72c | |||
| 9aae7c0c16 | |||
| aa9be16abf | |||
| 342fc4f4c6 | |||
| d62d538562 | |||
| ffb55c157b | |||
| cd7698bebf | |||
| 700cccfd60 | |||
| 814966b172 | |||
| c4a9a60112 | |||
| 9b9da29b7a | |||
| 6cced9dad4 | |||
| 50542d9b24 | |||
| 701e8d7d82 | |||
| 10b8f61d27 | |||
| 58432fe908 | |||
| 79908fae93 | |||
| b597b6e239 | |||
| 9e8cd58d7f | |||
| 6643428fca | |||
| 10a732ad75 | |||
| e6a75734fb | |||
| eb22968ab4 | |||
| b12f84c007 | |||
| 54645ba497 | |||
| 6cb9597df7 | |||
| 51e6116100 | |||
| 4fd99eae63 | |||
| b8f2452d11 | |||
| ddb4a257cf | |||
| 3a6c9fbb49 | |||
| f3b8a769c6 | |||
| 4a27118f24 | |||
| 7ddc215dcc | |||
| 3559edb3a5 | |||
| 0e611dbb57 | |||
| 3a71c8600c | |||
| 280debd530 | |||
| e34248ede3 | |||
| ea3ba8e2d6 | |||
| 69411c14f6 | |||
| f560d87aa3 | |||
| e188936253 | |||
| f91ff8c987 | |||
| f4b87c40eb | |||
| 26fb168ec5 | |||
| 16e6b980ba | |||
| 204569fff1 | |||
| fb671d1401 | |||
| a18188d3b1 | |||
| 4515ea2e05 | |||
| 60e1947dd8 | |||
| 0305fa4683 | |||
| 84a1f22326 | |||
| 4cb057109f | |||
| 51d2863cdc | |||
| 0c1cd15391 | |||
| cef3b04ebd | |||
| b9f87ac490 | |||
| 3b55c26a2c | |||
| dcd38e777a | |||
| 2116f650f7 | |||
| 00139ef2fe | |||
| 2af8204750 | |||
| cd64244bd8 | |||
| 4cc68dedea | |||
| 77fe614b7b | |||
| 6bbe7f186a | |||
| 77fc296e9e | |||
| 807944f182 | |||
| 97c2779d1b | |||
| 9d900057f6 | |||
| 86b545761f | |||
| a8a66916f4 | |||
| 32d68061a5 |
54
.github/workflows/gh-pages.yml
vendored
Normal file
54
.github/workflows/gh-pages.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Emacs
|
||||
uses: purcell/setup-emacs@master
|
||||
with:
|
||||
version: 29.1
|
||||
|
||||
- name: Setup Cask
|
||||
uses: conao3/setup-cask@master
|
||||
with:
|
||||
version: snapshot
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: gen-gh-pages
|
||||
run: cask install
|
||||
|
||||
- name: Generate HTML
|
||||
working-directory: gen-gh-pages
|
||||
run: |
|
||||
cask exec emacs --script generate-html.el
|
||||
mv ../dotfiles/emacs.d/README.html ./index.html
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./gen-gh-pages
|
||||
publish_branch: gh-pages
|
||||
user_name: 'github-actions[bot]'
|
||||
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||
commit_message: 'Deploy to GitHub Pages: ${{ github.sha }}'
|
||||
keep_files: false
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@ gotools
|
||||
/dotfiles/config/gtk-3.0/colors.css
|
||||
/dotfiles/emacs.d/.cache/
|
||||
/dotfiles/config/fontconfig/conf.d/10-hm-fonts.conf
|
||||
/dotfiles/config/fontconfig/conf.d/52-hm-default-fonts.conf
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
language: generic
|
||||
|
||||
script: bash ./gen-gh-pages/deploy.sh
|
||||
env:
|
||||
global:
|
||||
- ENCRYPTION_LABEL: "73e6c870aa87"
|
||||
- COMMIT_AUTHOR_EMAIL: "IvanMalison@gmail.com"
|
||||
- COMMIT_AUTHOR_NAME: "Ivan Malison"
|
||||
152
docs/plans/2026-01-28-org-agenda-api-consolidation-design.md
Normal file
152
docs/plans/2026-01-28-org-agenda-api-consolidation-design.md
Normal file
@@ -0,0 +1,152 @@
|
||||
# Org-Agenda-API Consolidation Design
|
||||
|
||||
## Overview
|
||||
|
||||
Consolidate org-agenda-api container builds and fly.io deployment into the dotfiles repository. This eliminates the separate `colonelpanic-org-agenda-api` repo and provides:
|
||||
|
||||
- Container outputs available to NixOS machines directly
|
||||
- Fly.io deployment from the same repo
|
||||
- Fewer repos to maintain
|
||||
- Cachix integration for faster builds
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
/home/imalison/dotfiles/
|
||||
├── nixos/
|
||||
│ ├── flake.nix # Main flake, adds container output
|
||||
│ ├── org-agenda-api.nix # Existing tangling module (stays here)
|
||||
│ └── ...
|
||||
├── org-agenda-api/
|
||||
│ ├── container.nix # Container build logic (mkContainer, etc.)
|
||||
│ ├── configs/
|
||||
│ │ ├── colonelpanic/
|
||||
│ │ │ ├── custom-config.el
|
||||
│ │ │ └── overrides.el (optional)
|
||||
│ │ └── kat/
|
||||
│ │ └── custom-config.el
|
||||
│ ├── fly/
|
||||
│ │ ├── fly.toml
|
||||
│ │ ├── deploy.sh
|
||||
│ │ └── config-{instance}.env
|
||||
│ └── secrets/
|
||||
│ ├── secrets.nix # agenix declarations
|
||||
│ └── *.age # encrypted secrets
|
||||
└── dotfiles/emacs.d/
|
||||
└── org-config.org # Source of truth for org config
|
||||
```
|
||||
|
||||
## Flake Integration
|
||||
|
||||
The main dotfiles flake at `/home/imalison/dotfiles/nixos/flake.nix` exposes container outputs:
|
||||
|
||||
```nix
|
||||
outputs = inputs @ { self, nixpkgs, flake-utils, ... }:
|
||||
{
|
||||
nixosConfigurations = { ... }; # existing
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
containerLib = import ../org-agenda-api/container.nix {
|
||||
inherit pkgs system;
|
||||
tangledConfig = (import ./org-agenda-api.nix {
|
||||
inherit pkgs system;
|
||||
inputs = inputs;
|
||||
}).org-agenda-custom-config;
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
container-colonelpanic = containerLib.mkInstanceContainer "colonelpanic";
|
||||
container-kat = containerLib.mkInstanceContainer "kat";
|
||||
};
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Build with: `nix build .#container-colonelpanic`
|
||||
|
||||
## Custom Elisp & Tangling
|
||||
|
||||
Single source of truth: `org-config.org` tangles to elisp files loaded by containers.
|
||||
|
||||
**What stays in custom-config.el (container-specific glue):**
|
||||
- Path overrides (`/data/org` instead of `~/org`)
|
||||
- Stubs for unavailable packages (`org-bullets-mode` no-op)
|
||||
- Customize-to-setq format conversion
|
||||
- Template conversion for org-agenda-api format
|
||||
- Instance-specific settings
|
||||
|
||||
**Audit:** During implementation, verify no actual org logic is duplicated in custom-config.el.
|
||||
|
||||
## Cachix Integration
|
||||
|
||||
### Phase 1: Use upstream cache as substituter
|
||||
|
||||
Add to dotfiles flake's `nixConfig`:
|
||||
|
||||
```nix
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://org-agenda-api.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"org-agenda-api.cachix.org-1:PUBLIC_KEY_HERE"
|
||||
];
|
||||
};
|
||||
```
|
||||
|
||||
Benefits:
|
||||
- `container-base` (~500MB+ dependencies) fetched from cache
|
||||
- Rebuilds only process the small custom config layer
|
||||
|
||||
### Phase 2 (future): Push custom builds
|
||||
|
||||
Set up GitHub Action or local push for colonelpanic-specific container builds.
|
||||
|
||||
## Fly.io Deployment
|
||||
|
||||
**What moves:**
|
||||
- `fly.toml` → `dotfiles/org-agenda-api/fly/fly.toml`
|
||||
- `deploy.sh` → `dotfiles/org-agenda-api/fly/deploy.sh`
|
||||
- `configs/*/config.env` → `dotfiles/org-agenda-api/fly/config-{instance}.env`
|
||||
- Agenix secrets → `dotfiles/org-agenda-api/secrets/`
|
||||
|
||||
**Deploy script changes:**
|
||||
- Build path: `nix build "../nixos#container-${INSTANCE}"`
|
||||
- Secrets path adjusts to new location
|
||||
- Otherwise same logic
|
||||
|
||||
## Implementation Phases
|
||||
|
||||
### Phase 1: Pull latest & verify current state
|
||||
- Pull latest changes in org-agenda-api and colonelpanic-org-agenda-api
|
||||
- Build container, verify it works
|
||||
- Fix any issues before restructuring
|
||||
|
||||
### Phase 2: Create dotfiles structure
|
||||
- Create `/home/imalison/dotfiles/org-agenda-api/` directory
|
||||
- Move container.nix logic (adapted from current colonelpanic-org-agenda-api flake)
|
||||
- Move instance configs (colonelpanic/, kat/)
|
||||
- Move fly.io deployment files
|
||||
- Move agenix secrets
|
||||
|
||||
### Phase 3: Integrate with dotfiles flake
|
||||
- Update `/home/imalison/dotfiles/nixos/flake.nix` to expose container outputs
|
||||
- Add cachix substituter configuration
|
||||
- Test build from dotfiles: `nix build .#container-colonelpanic`
|
||||
|
||||
### Phase 4: Verify deployment
|
||||
- Test deploy.sh from new location
|
||||
- Verify fly.io deployment works
|
||||
- Run the container locally on a NixOS machine
|
||||
|
||||
### Phase 5: Audit & cleanup
|
||||
- Review custom-config.el for any duplicated org logic
|
||||
- Archive colonelpanic-org-agenda-api repo
|
||||
- Update any references/documentation
|
||||
|
||||
## Repos Affected
|
||||
|
||||
- **dotfiles** - Receives container build + fly.io deployment
|
||||
- **colonelpanic-org-agenda-api** - Becomes obsolete after migration
|
||||
- **org-agenda-api** (upstream) - No changes, used as flake input
|
||||
21
dotfiles/agents/AGENTS.md
Normal file
21
dotfiles/agents/AGENTS.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Agentic Session Preferences
|
||||
|
||||
## Tmux session titling
|
||||
- If the TMUX environment variable is set, treat this chat as the controller for the current tmux session.
|
||||
- Maintain a session/window/pane title that updates when the task focus changes substantially.
|
||||
- Prefer automatic titling: infer a concise <task> from the current user request and context without asking.
|
||||
- Title format: "<project> - <task>".
|
||||
- <project> is the basename of the current project directory.
|
||||
- Prefer git repo root basename if available; otherwise use basename of the current working directory.
|
||||
- <task> is a short, user-friendly description of what we are doing.
|
||||
- Ask for a short descriptive <task> only when the task is ambiguous or you are not confident in an inferred title.
|
||||
- When the task changes substantially, update the <task> automatically if clear; otherwise ask for an updated <task>.
|
||||
- When a title is provided or updated, immediately run this one-liner:
|
||||
|
||||
tmux rename-session '<project> - <task>' \; rename-window '<project> - <task>' \; select-pane -T '<project> - <task>'
|
||||
|
||||
- Assume you are inside tmux, so do not use -t unless the user asks to target a specific session.
|
||||
- For Claude Code sessions, a UserPromptSubmit hook will also update titles automatically based on the latest prompt.
|
||||
|
||||
## Pane usage
|
||||
- Do not create extra panes or windows unless the user asks.
|
||||
70
dotfiles/agents/hooks/tmux-title.sh
Executable file
70
dotfiles/agents/hooks/tmux-title.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "${TMUX:-}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
input=$(cat)
|
||||
|
||||
read -r cwd prompt <<'PY' < <(python3 - <<'PY'
|
||||
import json, os, sys
|
||||
try:
|
||||
data = json.load(sys.stdin)
|
||||
except Exception:
|
||||
data = {}
|
||||
|
||||
cwd = data.get("cwd") or os.getcwd()
|
||||
prompt = (data.get("prompt") or "").strip()
|
||||
print(cwd)
|
||||
print(prompt)
|
||||
PY
|
||||
)
|
||||
|
||||
if [[ -z "${cwd}" ]]; then
|
||||
cwd="$PWD"
|
||||
fi
|
||||
|
||||
project_root=$(git -C "$cwd" rev-parse --show-toplevel 2>/dev/null || true)
|
||||
if [[ -n "$project_root" ]]; then
|
||||
project=$(basename "$project_root")
|
||||
else
|
||||
project=$(basename "$cwd")
|
||||
fi
|
||||
|
||||
prompt_first_line=$(printf '%s' "$prompt" | head -n 1 | tr '\n' ' ' | sed -e 's/[[:space:]]\+/ /g' -e 's/^ *//; s/ *$//')
|
||||
|
||||
lower=$(printf '%s' "$prompt_first_line" | tr '[:upper:]' '[:lower:]')
|
||||
case "$lower" in
|
||||
""|"ok"|"okay"|"thanks"|"thx"|"cool"|"yep"|"yes"|"no"|"sure"|"done"|"k")
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
task="$prompt_first_line"
|
||||
if [[ -z "$task" ]]; then
|
||||
task="work"
|
||||
fi
|
||||
|
||||
# Trim to a reasonable length for tmux status bars.
|
||||
if [[ ${#task} -gt 60 ]]; then
|
||||
task="${task:0:57}..."
|
||||
fi
|
||||
|
||||
title="$project - $task"
|
||||
|
||||
state_dir="${HOME}/.agents/state"
|
||||
state_file="$state_dir/tmux-title"
|
||||
mkdir -p "$state_dir"
|
||||
|
||||
if [[ -f "$state_file" ]]; then
|
||||
last_title=$(cat "$state_file" 2>/dev/null || true)
|
||||
if [[ "$last_title" == "$title" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
printf '%s' "$title" > "$state_file"
|
||||
|
||||
# Update session, window, and pane titles.
|
||||
tmux rename-session "$title" \; rename-window "$title" \; select-pane -T "$title"
|
||||
1
dotfiles/claude/CLAUDE.md
Symbolic link
1
dotfiles/claude/CLAUDE.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../agents/AGENTS.md
|
||||
18
dotfiles/claude/settings.json
Normal file
18
dotfiles/claude/settings.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"enabledPlugins": {
|
||||
"superpowers@superpowers-marketplace": true,
|
||||
"agent-browser@agent-browser": true
|
||||
},
|
||||
"hooks": {
|
||||
"UserPromptSubmit": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "~/.agents/hooks/tmux-title.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
51
dotfiles/claude/settings.local.json
Normal file
51
dotfiles/claude/settings.local.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(find:*)",
|
||||
"Bash(cat:*)"
|
||||
],
|
||||
"deny": []
|
||||
},
|
||||
"mcp": {
|
||||
"servers": {
|
||||
"gitea-mcp": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITEA_ACCESS_TOKEN=ad1e513137d5a15b638f7b4b5f65e1bda1c70cd7",
|
||||
"-e",
|
||||
"GITEA_BASE_URL=https://dev.railbird.ai",
|
||||
"docker.gitea.com/gitea-mcp-server"
|
||||
],
|
||||
"env": {
|
||||
"GITEA_ACCESS_TOKEN": "ad1e513137d5a15b638f7b4b5f65e1bda1c70cd7",
|
||||
"GITEA_BASE_URL": "https://dev.railbird.ai"
|
||||
}
|
||||
},
|
||||
"chrome-devtools": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--auto-connect"
|
||||
]
|
||||
},
|
||||
"imap-email": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "imap-email-mcp"],
|
||||
"env": {
|
||||
"IMAP_USER": "IvanMalison@gmail.com",
|
||||
"IMAP_PASSWORD": "iiobqyuuczibsnmi",
|
||||
"IMAP_HOST": "imap.gmail.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"enabledMcpjsonServers": [
|
||||
"chrome-devtools",
|
||||
"imap-email"
|
||||
],
|
||||
"enableAllProjectMcpServers": true
|
||||
}
|
||||
1
dotfiles/codex/AGENTS.md
Symbolic link
1
dotfiles/codex/AGENTS.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../agents/AGENTS.md
|
||||
56
dotfiles/codex/config.toml
Normal file
56
dotfiles/codex/config.toml
Normal file
@@ -0,0 +1,56 @@
|
||||
model = "gpt-5.2-codex"
|
||||
model_reasoning_effort = "high"
|
||||
personality = "pragmatic"
|
||||
[projects."/home/imalison/Projects/nixpkgs"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/dotfiles"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/Projects/railbird"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/Projects/subtr-actor"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/Projects/google-messages-api"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/Projects/scrobble-scrubber"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/temp"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[projects."/home/imalison/Projects/org-agenda-api"]
|
||||
trust_level = "untrusted"
|
||||
|
||||
[projects."/home/imalison/org"]
|
||||
trust_level = "trusted"
|
||||
|
||||
[notice]
|
||||
hide_gpt5_1_migration_prompt = true
|
||||
"hide_gpt-5.1-codex-max_migration_prompt" = true
|
||||
|
||||
[notice.model_migrations]
|
||||
"gpt-5.2" = "gpt-5.2-codex"
|
||||
|
||||
[mcp_servers.chrome-devtools]
|
||||
command = "npx"
|
||||
args = ["-y", "chrome-devtools-mcp@latest", "--auto-connect"]
|
||||
|
||||
[mcp_servers.observability]
|
||||
command = "npx"
|
||||
args = ["-y", "@google-cloud/observability-mcp"]
|
||||
|
||||
[mcp_servers.gmail]
|
||||
command = "nix"
|
||||
args = ["run", "/home/imalison/Projects/gmail-mcp#gmail-mcp-server"]
|
||||
|
||||
[features]
|
||||
unified_exec = true
|
||||
apps = true
|
||||
steer = true
|
||||
@@ -1,7 +1,8 @@
|
||||
import = ["/home/imalison/.config/alacritty/themes/themes/dracula.toml"]
|
||||
[general]
|
||||
import = ["~/.config/alacritty/themes/themes/dracula.toml"]
|
||||
|
||||
[font]
|
||||
size = 8
|
||||
size = 12
|
||||
|
||||
[scrolling]
|
||||
history = 10000
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
output DP-1
|
||||
off
|
||||
output HDMI-1
|
||||
off
|
||||
output DP-2
|
||||
off
|
||||
output HDMI-2
|
||||
off
|
||||
output DP-1-0
|
||||
off
|
||||
output DP-1-1
|
||||
off
|
||||
output DP-1-2
|
||||
off
|
||||
output DP-1-3
|
||||
off
|
||||
output DP-1-4
|
||||
off
|
||||
output DP-1-5
|
||||
off
|
||||
output DP-1-6
|
||||
off
|
||||
output eDP-1
|
||||
crtc 0
|
||||
mode 2560x1600
|
||||
pos 0x0
|
||||
primary
|
||||
rate 240.00
|
||||
x-prop-broadcast_rgb Automatic
|
||||
x-prop-colorspace Default
|
||||
x-prop-max_bpc 12
|
||||
x-prop-non_desktop 0
|
||||
x-prop-scaling_mode Full aspect
|
||||
output HDMI-1-0
|
||||
crtc 4
|
||||
mode 3440x1440
|
||||
pos 2560x0
|
||||
rate 99.98
|
||||
x-prop-non_desktop 0
|
||||
@@ -0,0 +1,2 @@
|
||||
HDMI-1-0 00ffffffffffff0010ace3a1535a333016210103805123782a25a1b14d3db7250e505421080001010101010101010101010101010101e77c70a0d0a029503020350029623100001a000000ff00237442737a474441594542634e000000fd0018781e963c010a202020202020000000fc0044656c6c204157333432334457015f020337f148101f04130312013f230907018301000068030c002000383c006ad85dc401788000000278e305c000e2006ae60605018d4b004ed470a0d0a046503020350029623100001a9d6770a0d0a022503020350029623100001a565e00a0a0a029503020350029623100001a6fc200a0a0a055503020350029623100001a3c
|
||||
eDP-1 00ffffffffffff0009e5580c0000000001210104b527187803bbc5ae503fb7250c515500000001010101010101010101010101010101c07200a0a040c8603020360084f21000001a000000fd0c30f0b1b176010a202020202020000000fe00424f452043510a202020202020000000fc004e4531383051444d2d4e4d310a029602030f00e3058080e606050195731000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa702079020021001d280f7409000a400680dd2a511824b249120e023554b060ec64662a1378220014ffed1185ff099f002f001f003f06c700020005002b000c27003cef00002700303b0000810015741a0000030b30f0006095107310f0000000008d00000000000000000000000000000000000000000000000000000000bc90
|
||||
@@ -0,0 +1,39 @@
|
||||
output DP-1
|
||||
off
|
||||
output HDMI-1
|
||||
off
|
||||
output DP-2
|
||||
off
|
||||
output HDMI-2
|
||||
off
|
||||
output DP-1-0
|
||||
off
|
||||
output DP-1-1
|
||||
off
|
||||
output DP-1-2
|
||||
off
|
||||
output DP-1-3
|
||||
off
|
||||
output DP-1-4
|
||||
off
|
||||
output DP-1-5
|
||||
off
|
||||
output DP-1-6
|
||||
off
|
||||
output eDP-1
|
||||
crtc 0
|
||||
mode 2560x1600
|
||||
pos 0x0
|
||||
primary
|
||||
rate 240.00
|
||||
x-prop-broadcast_rgb Automatic
|
||||
x-prop-colorspace Default
|
||||
x-prop-max_bpc 12
|
||||
x-prop-non_desktop 0
|
||||
x-prop-scaling_mode Full aspect
|
||||
output HDMI-1-0
|
||||
crtc 4
|
||||
mode 3440x1440
|
||||
pos 2560x0
|
||||
rate 99.98
|
||||
x-prop-non_desktop 0
|
||||
@@ -0,0 +1,2 @@
|
||||
HDMI-1-0 00ffffffffffff0010ace3a1535a333016210103805123782a25a1b14d3db7250e505421080001010101010101010101010101010101e77c70a0d0a029503020350029623100001a000000ff00237442737a474441594542634e000000fd0018781e963c010a202020202020000000fc0044656c6c204157333432334457015f020337f148101f04130312013f230907018301000068030c003000383c006ad85dc401788000000278e305c000e2006ae60605018d4b004ed470a0d0a046503020350029623100001a9d6770a0d0a022503020350029623100001a565e00a0a0a029503020350029623100001a6fc200a0a0a055503020350029623100001a2c
|
||||
eDP-1 00ffffffffffff0009e5580c0000000001210104b527187803bbc5ae503fb7250c515500000001010101010101010101010101010101c07200a0a040c8603020360084f21000001a000000fd0c30f0b1b176010a202020202020000000fe00424f452043510a202020202020000000fc004e4531383051444d2d4e4d310a029602030f00e3058080e606050195731000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa702079020021001d280f7409000a400680dd2a511824b249120e023554b060ec64662a1378220014ffed1185ff099f002f001f003f06c700020005002b000c27003cef00002700303b0000810015741a0000030b30f0006095107310f0000000008d00000000000000000000000000000000000000000000000000000000bc90
|
||||
@@ -1,27 +0,0 @@
|
||||
[rc]
|
||||
use_copy=true
|
||||
use_primary=true
|
||||
synchronize=false
|
||||
automatic_paste=false
|
||||
show_indexes=true
|
||||
save_uris=true
|
||||
use_rmb_menu=false
|
||||
save_history=true
|
||||
history_limit=1000
|
||||
history_timeout_seconds=30
|
||||
history_timeout=false
|
||||
items_menu=50
|
||||
statics_show=true
|
||||
statics_items=10
|
||||
hyperlinks_only=false
|
||||
confirm_clear=false
|
||||
single_line=false
|
||||
reverse_history=false
|
||||
item_length=50
|
||||
ellipsize=2
|
||||
history_key=
|
||||
actions_key=
|
||||
menu_key=
|
||||
search_key=
|
||||
offline_key=
|
||||
offline_mode=false
|
||||
@@ -1,63 +0,0 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.3.0
|
||||
config_reader_min_version=3
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
hide_running_in_container=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_deleted_exe=1
|
||||
shadow_distribution_path_prefix=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=0
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=0
|
||||
header_margin=1
|
||||
screen_tabs=0
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_one=1
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
hide_function_bar=0
|
||||
header_layout=two_50_50
|
||||
column_meters_0=AllCPUs Memory Swap
|
||||
column_meter_modes_0=1 1 1
|
||||
column_meters_1=Tasks LoadAverage Uptime
|
||||
column_meter_modes_1=2 2 2
|
||||
tree_view=0
|
||||
sort_key=48
|
||||
tree_sort_key=46
|
||||
sort_direction=1
|
||||
tree_sort_direction=-1
|
||||
tree_view_always_by_pid=0
|
||||
all_branches_collapsed=0
|
||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||
.sort_key=USER
|
||||
.tree_sort_key=PERCENT_CPU
|
||||
.tree_view_always_by_pid=0
|
||||
.tree_view=0
|
||||
.sort_direction=1
|
||||
.tree_sort_direction=-1
|
||||
.all_branches_collapsed=0
|
||||
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
|
||||
.sort_key=IO_RATE
|
||||
.tree_sort_key=PID
|
||||
.tree_view_always_by_pid=0
|
||||
.tree_view=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
||||
573
dotfiles/config/hypr/hyprland.conf
Normal file
573
dotfiles/config/hypr/hyprland.conf
Normal file
@@ -0,0 +1,573 @@
|
||||
# Hyprland Configuration
|
||||
# XMonad-like dynamic tiling using hy3 plugin
|
||||
# Based on XMonad configuration from xmonad.hs
|
||||
|
||||
# =============================================================================
|
||||
# PLUGINS (Hyprland pinned to 0.53.0 to match hy3)
|
||||
# =============================================================================
|
||||
# Load the plugin before parsing keybinds/layouts that depend on it
|
||||
plugin = /run/current-system/sw/lib/libhy3.so
|
||||
plugin = /run/current-system/sw/lib/libhyprexpo.so
|
||||
|
||||
# =============================================================================
|
||||
# MONITORS
|
||||
# =============================================================================
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
# =============================================================================
|
||||
# PROGRAMS
|
||||
# =============================================================================
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$menu = rofi -show drun -show-icons
|
||||
$runMenu = rofi -show run
|
||||
|
||||
# =============================================================================
|
||||
# ENVIRONMENT VARIABLES
|
||||
# =============================================================================
|
||||
env = XCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
|
||||
# =============================================================================
|
||||
# INPUT CONFIGURATION
|
||||
# =============================================================================
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0
|
||||
}
|
||||
|
||||
# Cursor warping behavior
|
||||
cursor {
|
||||
persistent_warps = true
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# GENERAL SETTINGS
|
||||
# =============================================================================
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 2
|
||||
col.active_border = rgba(edb443ee) rgba(33ccffee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
# Use hy3 layout for XMonad-like dynamic tiling
|
||||
layout = hy3
|
||||
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# DECORATION
|
||||
# =============================================================================
|
||||
decoration {
|
||||
rounding = 5
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
|
||||
# Fade inactive windows (like XMonad's fadeInactive)
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 0.9
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# ANIMATIONS
|
||||
# =============================================================================
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier = linear, 0, 0, 1, 1
|
||||
|
||||
animation = windows, 1, 4, myBezier
|
||||
animation = windowsOut, 1, 4, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 4, default
|
||||
animation = workspaces, 1, 4, default
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# MASTER LAYOUT CONFIGURATION
|
||||
# =============================================================================
|
||||
master {
|
||||
new_status = slave
|
||||
mfact = 0.5
|
||||
orientation = left
|
||||
}
|
||||
|
||||
# Dwindle layout (alternative - binary tree like i3)
|
||||
dwindle {
|
||||
pseudotile = yes
|
||||
preserve_split = yes
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# WORKSPACE RULES (SMART GAPS)
|
||||
# =============================================================================
|
||||
# Replace no_gaps_when_only (removed in newer Hyprland)
|
||||
# Remove gaps when there's only one visible tiled window (ignore special workspaces)
|
||||
workspace = w[tv1]s[false], gapsout:0, gapsin:0
|
||||
workspace = f[1]s[false], gapsout:0, gapsin:0
|
||||
|
||||
# Group/tabbed window configuration (built-in alternative to hy3 tabs)
|
||||
group {
|
||||
col.border_active = rgba(edb443ff)
|
||||
col.border_inactive = rgba(091f2eff)
|
||||
|
||||
groupbar {
|
||||
enabled = true
|
||||
font_size = 12
|
||||
height = 22
|
||||
col.active = rgba(edb443ff)
|
||||
col.inactive = rgba(091f2eff)
|
||||
text_color = rgba(091f2eff)
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# HY3/HYPREXPO PLUGIN CONFIG
|
||||
# =============================================================================
|
||||
plugin {
|
||||
hy3 {
|
||||
# Disable autotile to get XMonad-like manual control
|
||||
autotile {
|
||||
enable = false
|
||||
}
|
||||
|
||||
# Tab configuration
|
||||
tabs {
|
||||
height = 22
|
||||
padding = 6
|
||||
render_text = true
|
||||
text_font = "Sans"
|
||||
text_height = 10
|
||||
text_padding = 3
|
||||
col.active = rgba(edb443ff)
|
||||
col.inactive = rgba(091f2eff)
|
||||
col.urgent = rgba(ff0000ff)
|
||||
col.text.active = rgba(091f2eff)
|
||||
col.text.inactive = rgba(ffffffff)
|
||||
col.text.urgent = rgba(ffffffff)
|
||||
}
|
||||
}
|
||||
|
||||
hyprexpo {
|
||||
# Always include workspace 1 in the overview grid
|
||||
workspace_method = first 1
|
||||
# Only show workspaces with windows
|
||||
skip_empty = true
|
||||
# 3 columns -> 3x3 grid when 9 workspaces are visible
|
||||
columns = 3
|
||||
}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# MISC
|
||||
# =============================================================================
|
||||
misc {
|
||||
force_default_wallpaper = 0
|
||||
disable_hyprland_logo = true
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# BINDS OPTIONS
|
||||
# =============================================================================
|
||||
binds {
|
||||
# Keep workspace history so "previous" can toggle back reliably.
|
||||
allow_workspace_cycles = true
|
||||
workspace_back_and_forth = true
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# WINDOW RULES
|
||||
# =============================================================================
|
||||
# Float dialogs
|
||||
windowrulev2 = float, class:^()$,title:^()$
|
||||
windowrulev2 = float, title:^(Picture-in-Picture)$
|
||||
windowrulev2 = float, title:^(Open File)$
|
||||
windowrulev2 = float, title:^(Save File)$
|
||||
windowrulev2 = float, title:^(Confirm)$
|
||||
|
||||
# Scratchpad windows - float and size
|
||||
windowrulev2 = workspace special:htop silent, class:^(htop-scratch)$
|
||||
windowrulev2 = float, class:^(htop-scratch)$
|
||||
windowrulev2 = size 90% 90%, class:^(htop-scratch)$
|
||||
windowrulev2 = center, class:^(htop-scratch)$
|
||||
|
||||
windowrulev2 = workspace special:volume silent, class:^(?i)(pavucontrol|pavucontrol-qt|org\.pulseaudio\.pavucontrol)$
|
||||
windowrulev2 = float, class:^(?i)(pavucontrol|pavucontrol-qt|org\.pulseaudio\.pavucontrol)$
|
||||
windowrulev2 = size 90% 90%, class:^(?i)(pavucontrol|pavucontrol-qt|org\.pulseaudio\.pavucontrol)$
|
||||
windowrulev2 = center, class:^(?i)(pavucontrol|pavucontrol-qt|org\.pulseaudio\.pavucontrol)$
|
||||
|
||||
windowrulev2 = workspace special:spotify silent, class:^(spotify)$
|
||||
windowrulev2 = float, class:^(spotify)$
|
||||
windowrulev2 = size 90% 90%, class:^(spotify)$
|
||||
windowrulev2 = center, class:^(spotify)$
|
||||
|
||||
windowrulev2 = workspace special:element silent, class:^(Element)$
|
||||
windowrulev2 = float, class:^(Element)$
|
||||
windowrulev2 = size 90% 90%, class:^(Element)$
|
||||
windowrulev2 = center, class:^(Element)$
|
||||
|
||||
windowrulev2 = workspace special:slack silent, class:^(Slack)$
|
||||
windowrulev2 = float, class:^(Slack)$
|
||||
windowrulev2 = size 90% 90%, class:^(Slack)$
|
||||
windowrulev2 = center, class:^(Slack)$
|
||||
|
||||
windowrulev2 = workspace special:transmission silent, class:^(transmission-gtk)$
|
||||
windowrulev2 = float, class:^(transmission-gtk)$
|
||||
windowrulev2 = size 90% 90%, class:^(transmission-gtk)$
|
||||
windowrulev2 = center, class:^(transmission-gtk)$
|
||||
|
||||
# Gmail and Messages (Chrome windows)
|
||||
windowrulev2 = workspace special:gmail silent, class:^(google-chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
windowrulev2 = float, class:^(google-chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
windowrulev2 = size 90% 90%, class:^(google-chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
windowrulev2 = center, class:^(google-chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
|
||||
windowrulev2 = workspace special:messages silent, class:^(google-chrome)$,title:^(Messages.*)$
|
||||
windowrulev2 = float, class:^(google-chrome)$,title:^(Messages.*)$
|
||||
windowrulev2 = size 90% 90%, class:^(google-chrome)$,title:^(Messages.*)$
|
||||
windowrulev2 = center, class:^(google-chrome)$,title:^(Messages.*)$
|
||||
|
||||
# =============================================================================
|
||||
# KEY BINDINGS
|
||||
# =============================================================================
|
||||
|
||||
# Modifier keys
|
||||
$mainMod = SUPER
|
||||
$modAlt = SUPER ALT
|
||||
$hyper = SUPER CTRL ALT
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Program Launching
|
||||
# -----------------------------------------------------------------------------
|
||||
bind = $mainMod, P, exec, $menu
|
||||
bind = $mainMod SHIFT, P, exec, $runMenu
|
||||
bind = $mainMod SHIFT, Return, exec, $terminal
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Overview (Hyprexpo)
|
||||
# -----------------------------------------------------------------------------
|
||||
bind = $mainMod, TAB, hyprexpo:expo, toggle
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod SHIFT, C, killactive,
|
||||
bind = $mainMod SHIFT, Q, exit,
|
||||
# Emacs-everywhere (like XMonad's emacs-everywhere)
|
||||
bind = $mainMod, E, exec, emacsclient --eval '(emacs-everywhere)'
|
||||
bind = $mainMod, V, exec, wl-paste | xdotool type --file -
|
||||
|
||||
# Chrome/Browser (raise or spawn like XMonad's bindBringAndRaise)
|
||||
bind = $modAlt, C, exec, ~/.config/hypr/scripts/raise-or-run.sh google-chrome google-chrome-stable
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# SCRATCHPADS (Special Workspaces)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Toggle scratchpads
|
||||
bind = $modAlt, E, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh element '^Element$' - element-desktop
|
||||
bind = $modAlt, G, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh gmail '^google-chrome$' '.*@gmail.com.*Gmail.*' google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox
|
||||
bind = $modAlt, H, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh htop '^htop-scratch$' - alacritty --class htop-scratch --title htop -e htop
|
||||
bind = $modAlt, M, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh messages '^google-chrome$' '^Messages.*' google-chrome-stable --new-window https://messages.google.com/web/conversations
|
||||
bind = $modAlt, K, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh slack '^Slack$' - slack
|
||||
bind = $modAlt, S, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh spotify '^spotify$' - spotify
|
||||
bind = $modAlt, T, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh transmission '^transmission-gtk$' - transmission-gtk
|
||||
bind = $modAlt, V, exec, ~/.config/hypr/scripts/toggle-scratchpad.sh volume '^(pavucontrol|pavucontrol-qt|org\.pulseaudio\.pavucontrol)$' - pavucontrol
|
||||
|
||||
# Move windows to scratchpads
|
||||
bind = $modAlt SHIFT, E, movetoworkspace, special:element
|
||||
bind = $modAlt SHIFT, G, movetoworkspace, special:gmail
|
||||
bind = $modAlt SHIFT, H, movetoworkspace, special:htop
|
||||
bind = $modAlt SHIFT, M, movetoworkspace, special:messages
|
||||
bind = $modAlt SHIFT, K, movetoworkspace, special:slack
|
||||
bind = $modAlt SHIFT, S, movetoworkspace, special:spotify
|
||||
bind = $modAlt SHIFT, T, movetoworkspace, special:transmission
|
||||
bind = $modAlt SHIFT, V, movetoworkspace, special:volume
|
||||
|
||||
# Hidden workspace (like XMonad's NSP)
|
||||
bind = $mainMod, X, movetoworkspace, special:NSP
|
||||
bind = $mainMod SHIFT, X, togglespecialworkspace, NSP
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# DIRECTIONAL NAVIGATION (WASD - like XMonad Navigation2D)
|
||||
# Using hy3 dispatchers for proper tree-based navigation
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Focus movement (Mod + WASD) - hy3:movefocus navigates the tree
|
||||
bind = $mainMod, W, hy3:movefocus, u
|
||||
bind = $mainMod, S, hy3:movefocus, d
|
||||
bind = $mainMod, A, hy3:movefocus, l
|
||||
bind = $mainMod, D, hy3:movefocus, r
|
||||
|
||||
# Move windows (Mod + Shift + WASD) - hy3:movewindow with once=true for swapping
|
||||
bind = $mainMod SHIFT, W, hy3:movewindow, u, once
|
||||
bind = $mainMod SHIFT, S, hy3:movewindow, d, once
|
||||
bind = $mainMod SHIFT, A, hy3:movewindow, l, once
|
||||
bind = $mainMod SHIFT, D, hy3:movewindow, r, once
|
||||
|
||||
# Resize windows (Mod + Ctrl + WASD)
|
||||
binde = $mainMod CTRL, W, resizeactive, 0 -50
|
||||
binde = $mainMod CTRL, S, resizeactive, 0 50
|
||||
binde = $mainMod CTRL, A, resizeactive, -50 0
|
||||
binde = $mainMod CTRL, D, resizeactive, 50 0
|
||||
|
||||
# Screen/Monitor focus (Hyper + WASD)
|
||||
bind = $hyper, W, focusmonitor, u
|
||||
bind = $hyper, S, focusmonitor, d
|
||||
bind = $hyper, A, focusmonitor, l
|
||||
bind = $hyper, D, focusmonitor, r
|
||||
|
||||
# Move window to monitor and follow (Hyper + Shift + WASD)
|
||||
bind = $hyper SHIFT, W, movewindow, mon:u
|
||||
bind = $hyper SHIFT, S, movewindow, mon:d
|
||||
bind = $hyper SHIFT, A, movewindow, mon:l
|
||||
bind = $hyper SHIFT, D, movewindow, mon:r
|
||||
|
||||
# Shift to empty workspace on screen direction (Hyper + Ctrl + WASD)
|
||||
# Like XMonad's shiftToEmptyOnScreen
|
||||
bind = $hyper CTRL, W, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh u
|
||||
bind = $hyper CTRL, S, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh d
|
||||
bind = $hyper CTRL, A, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh l
|
||||
bind = $hyper CTRL, D, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh r
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# LAYOUT CONTROL (XMonad-like with hy3)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Create groups with different orientations (like XMonad layouts)
|
||||
# hy3:makegroup creates a split/tab group from focused window
|
||||
bind = $mainMod, Space, hy3:changegroup, toggletab
|
||||
bind = $mainMod SHIFT, Space, hy3:changegroup, opposite
|
||||
|
||||
# Create specific group types
|
||||
bind = $mainMod, H, hy3:makegroup, h
|
||||
bind = $mainMod SHIFT, V, hy3:makegroup, v
|
||||
# Mod+Ctrl+Space mirrors Mod+Space (tabs instead of fullscreen)
|
||||
bind = $mainMod CTRL, Space, hy3:changegroup, toggletab
|
||||
|
||||
# Change group type (cycle h -> v -> tab)
|
||||
bind = $mainMod, slash, hy3:changegroup, h
|
||||
bind = $mainMod SHIFT, slash, hy3:changegroup, v
|
||||
|
||||
# Tab navigation (like XMonad's focus next/prev in tabbed)
|
||||
bind = $mainMod, bracketright, hy3:focustab, r, wrap
|
||||
bind = $mainMod, bracketleft, hy3:focustab, l, wrap
|
||||
|
||||
# Move window within tab group (hy3 has no movetab dispatcher)
|
||||
bind = $mainMod SHIFT, bracketright, hy3:movewindow, r, visible
|
||||
bind = $mainMod SHIFT, bracketleft, hy3:movewindow, l, visible
|
||||
|
||||
# Expand focus to parent group (like XMonad's focus parent)
|
||||
bind = $mainMod, grave, hy3:expand, expand
|
||||
bind = $mainMod SHIFT, grave, hy3:expand, base
|
||||
|
||||
# Fullscreen (like XMonad's NBFULL toggle)
|
||||
bind = $mainMod, F, fullscreen, 0
|
||||
bind = $mainMod SHIFT, F, fullscreen, 1
|
||||
|
||||
# Toggle floating
|
||||
bind = $mainMod, T, togglefloating,
|
||||
|
||||
# Resize split ratio (hy3 uses resizeactive for splits)
|
||||
binde = $mainMod, comma, resizeactive, -50 0
|
||||
binde = $mainMod, period, resizeactive, 50 0
|
||||
|
||||
# Equalize window sizes on workspace (hy3)
|
||||
bind = $mainMod SHIFT, equal, hy3:equalize, workspace
|
||||
|
||||
# Kill group - removes the focused window from its group
|
||||
bind = $mainMod, N, hy3:killactive
|
||||
|
||||
# hy3:setswallow - set a window to swallow newly spawned windows
|
||||
bind = $mainMod, M, hy3:setswallow, toggle
|
||||
|
||||
# Minimize to special workspace (like XMonad's minimizeWindow)
|
||||
bind = $mainMod SHIFT, M, movetoworkspace, special:minimized
|
||||
# Restore last minimized
|
||||
bind = $modAlt, Return, togglespecialworkspace, minimized
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# WORKSPACE CONTROL
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Switch workspaces (1-9, 0=10)
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move window to workspace
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Move and follow to workspace (like XMonad's shiftThenView)
|
||||
bind = $mainMod CTRL, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod CTRL, 1, workspace, 1
|
||||
bind = $mainMod CTRL, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod CTRL, 2, workspace, 2
|
||||
bind = $mainMod CTRL, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod CTRL, 3, workspace, 3
|
||||
bind = $mainMod CTRL, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod CTRL, 4, workspace, 4
|
||||
bind = $mainMod CTRL, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod CTRL, 5, workspace, 5
|
||||
bind = $mainMod CTRL, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod CTRL, 6, workspace, 6
|
||||
bind = $mainMod CTRL, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod CTRL, 7, workspace, 7
|
||||
bind = $mainMod CTRL, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod CTRL, 8, workspace, 8
|
||||
bind = $mainMod CTRL, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod CTRL, 9, workspace, 9
|
||||
bind = $mainMod CTRL, 0, movetoworkspacesilent, 10
|
||||
bind = $mainMod CTRL, 0, workspace, 10
|
||||
|
||||
# Workspace cycling (like XMonad's cycleWorkspaceOnCurrentScreen)
|
||||
bind = $mainMod, backslash, exec, ~/.config/hypr/scripts/workspace-back.sh
|
||||
|
||||
# Swap current workspace with another (like XMonad's swapWithCurrent)
|
||||
bind = $hyper, 5, exec, ~/.config/hypr/scripts/swap-workspaces.sh
|
||||
|
||||
# Go to next empty workspace (like XMonad's moveTo Next emptyWS)
|
||||
bind = $hyper, E, workspace, empty
|
||||
|
||||
# Move to next screen (like XMonad's shiftToNextScreenX)
|
||||
bind = $mainMod, Z, focusmonitor, +1
|
||||
bind = $mainMod SHIFT, Z, movewindow, mon:+1
|
||||
|
||||
# Shift to empty workspace and view (like XMonad's shiftToEmptyAndView)
|
||||
bind = $mainMod SHIFT, H, movetoworkspace, empty
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# WINDOW MANAGEMENT
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Go to window (rofi window switcher)
|
||||
bind = $mainMod, G, exec, rofi -show window -show-icons
|
||||
|
||||
# Bring window (move to current workspace)
|
||||
bind = $mainMod, B, exec, ~/.config/hypr/scripts/bring-window.sh
|
||||
|
||||
# Replace window (swap focused with selected - like XMonad's myReplaceWindow)
|
||||
bind = $mainMod SHIFT, B, exec, ~/.config/hypr/scripts/replace-window.sh
|
||||
|
||||
# Gather windows of same class (like XMonad's gatherThisClass)
|
||||
bind = $hyper, G, exec, ~/.config/hypr/scripts/gather-class.sh
|
||||
|
||||
# Focus next window of different class (like XMonad's focusNextClass)
|
||||
bind = $mainMod, apostrophe, exec, ~/.config/hypr/scripts/focus-next-class.sh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# MEDIA KEYS
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Volume control (matching XMonad: Mod+I=up, Mod+K=down, Mod+U=mute)
|
||||
binde = , XF86AudioRaiseVolume, exec, set_volume --unmute --change-volume +5
|
||||
binde = , XF86AudioLowerVolume, exec, set_volume --unmute --change-volume -5
|
||||
bind = , XF86AudioMute, exec, set_volume --toggle-mute
|
||||
binde = $mainMod, I, exec, set_volume --unmute --change-volume +5
|
||||
binde = $mainMod, K, exec, set_volume --unmute --change-volume -5
|
||||
bind = $mainMod, U, exec, set_volume --toggle-mute
|
||||
|
||||
# Media player controls (matching XMonad: Mod+;=play, Mod+L=next, Mod+J=prev)
|
||||
bind = $mainMod, semicolon, exec, playerctl play-pause
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioPause, exec, playerctl play-pause
|
||||
bind = $mainMod, L, exec, playerctl next
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = $mainMod, J, exec, playerctl previous
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
# Mute current window (like XMonad's toggle_mute_current_window)
|
||||
bind = $hyper SHIFT, Q, exec, toggle_mute_current_window.sh
|
||||
bind = $hyper CTRL, Q, exec, toggle_mute_current_window.sh only
|
||||
|
||||
# Brightness control
|
||||
binde = , XF86MonBrightnessUp, exec, brightness.sh up
|
||||
binde = , XF86MonBrightnessDown, exec, brightness.sh down
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# UTILITY BINDINGS
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
bind = $hyper, V, exec, cliphist list | rofi -dmenu -p "Clipboard" | cliphist decode | wl-copy
|
||||
bind = $hyper, P, exec, rofi-pass
|
||||
bind = $hyper, H, exec, grim -g "$(slurp)" - | swappy -f -
|
||||
bind = $hyper, C, exec, shell_command.sh
|
||||
bind = $hyper, X, exec, rofi_command.sh
|
||||
bind = $hyper SHIFT, L, exec, hyprlock
|
||||
bind = $hyper, K, exec, rofi_kill_process.sh
|
||||
bind = $hyper SHIFT, K, exec, rofi_kill_all.sh
|
||||
bind = $hyper, R, exec, rofi-systemd
|
||||
bind = $hyper, 9, exec, start_synergy.sh
|
||||
bind = $hyper, I, exec, rofi_select_input.hs
|
||||
bind = $hyper, O, exec, rofi_paswitch
|
||||
|
||||
# Reload config
|
||||
bind = $mainMod, R, exec, hyprctl reload
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# MOUSE BINDINGS
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Scroll through workspaces
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# =============================================================================
|
||||
# AUTOSTART
|
||||
# =============================================================================
|
||||
|
||||
# Start Hyprland session target for systemd user services (e.g., waybar)
|
||||
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
|
||||
exec-once = systemctl --user start hyprland-session.target
|
||||
exec-once = ~/.config/hypr/scripts/workspace-history.sh
|
||||
|
||||
# Scratchpad applications (spawn on demand via keybinds)
|
||||
# exec-once = [workspace special:element silent] element-desktop
|
||||
# exec-once = [workspace special:gmail silent] google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox
|
||||
# exec-once = [workspace special:htop silent] alacritty --class htop-scratch --title htop -e htop
|
||||
# exec-once = [workspace special:messages silent] google-chrome-stable --new-window https://messages.google.com/web/conversations
|
||||
# exec-once = [workspace special:slack silent] slack
|
||||
# exec-once = [workspace special:spotify silent] spotify
|
||||
# exec-once = [workspace special:transmission silent] transmission-gtk
|
||||
# exec-once = [workspace special:volume silent] pavucontrol
|
||||
|
||||
# Clipboard history daemon
|
||||
exec-once = wl-paste --type text --watch cliphist store
|
||||
exec-once = wl-paste --type image --watch cliphist store
|
||||
|
||||
# Night light (optional - comment out if not needed)
|
||||
# exec-once = wlsunset -l 37.7 -L -122.4
|
||||
30
dotfiles/config/hypr/scripts/bring-window.sh
Executable file
30
dotfiles/config/hypr/scripts/bring-window.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Bring window to current workspace (like XMonad's bringWindow)
|
||||
# Uses rofi to select a window and moves it to the current workspace
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get current workspace
|
||||
CURRENT_WS=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
|
||||
# Get all windows and format for rofi
|
||||
WINDOWS=$(hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0 and .workspace.id != '"$CURRENT_WS"') | "\(.title) [\(.class)] - WS:\(.workspace.id) |\(.address)"')
|
||||
|
||||
if [ -z "$WINDOWS" ]; then
|
||||
notify-send "Bring Window" "No windows on other workspaces"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Show rofi menu
|
||||
SELECTION=$(echo "$WINDOWS" | rofi -dmenu -i -p "Bring window" -format 's')
|
||||
|
||||
if [ -n "$SELECTION" ]; then
|
||||
# Extract the window address (after the last |)
|
||||
ADDRESS=$(echo "$SELECTION" | sed 's/.*|//')
|
||||
|
||||
# Move window to current workspace
|
||||
hyprctl dispatch movetoworkspace "$CURRENT_WS,address:$ADDRESS"
|
||||
|
||||
# Focus the window
|
||||
hyprctl dispatch focuswindow "address:$ADDRESS"
|
||||
fi
|
||||
15
dotfiles/config/hypr/scripts/cycle-layout.sh
Executable file
15
dotfiles/config/hypr/scripts/cycle-layout.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Cycle between master and dwindle layouts
|
||||
# Like XMonad's NextLayout
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CURRENT=$(hyprctl getoption general:layout -j | jq -r '.str')
|
||||
|
||||
if [ "$CURRENT" = "master" ]; then
|
||||
hyprctl keyword general:layout dwindle
|
||||
notify-send "Layout" "Switched to Dwindle (binary tree)"
|
||||
else
|
||||
hyprctl keyword general:layout master
|
||||
notify-send "Layout" "Switched to Master (XMonad-like)"
|
||||
fi
|
||||
48
dotfiles/config/hypr/scripts/focus-next-class.sh
Executable file
48
dotfiles/config/hypr/scripts/focus-next-class.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
# Focus next window of a different class (like XMonad's focusNextClass)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get focused window class
|
||||
FOCUSED_CLASS=$(hyprctl activewindow -j | jq -r '.class')
|
||||
FOCUSED_ADDR=$(hyprctl activewindow -j | jq -r '.address')
|
||||
|
||||
if [ "$FOCUSED_CLASS" = "null" ] || [ -z "$FOCUSED_CLASS" ]; then
|
||||
# No focused window, just focus any window
|
||||
hyprctl dispatch cyclenext
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get all unique classes
|
||||
ALL_CLASSES=$(hyprctl clients -j | jq -r '[.[] | select(.workspace.id >= 0) | .class] | unique | .[]')
|
||||
|
||||
# Get sorted list of classes
|
||||
CLASSES_ARRAY=()
|
||||
while IFS= read -r class; do
|
||||
CLASSES_ARRAY+=("$class")
|
||||
done <<< "$ALL_CLASSES"
|
||||
|
||||
# Find current class index and get next class
|
||||
CURRENT_INDEX=-1
|
||||
for i in "${!CLASSES_ARRAY[@]}"; do
|
||||
if [ "${CLASSES_ARRAY[$i]}" = "$FOCUSED_CLASS" ]; then
|
||||
CURRENT_INDEX=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $CURRENT_INDEX -eq -1 ] || [ ${#CLASSES_ARRAY[@]} -le 1 ]; then
|
||||
# Only one class or class not found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get next class (wrapping around)
|
||||
NEXT_INDEX=$(( (CURRENT_INDEX + 1) % ${#CLASSES_ARRAY[@]} ))
|
||||
NEXT_CLASS="${CLASSES_ARRAY[$NEXT_INDEX]}"
|
||||
|
||||
# Find first window of next class
|
||||
NEXT_WINDOW=$(hyprctl clients -j | jq -r ".[] | select(.class == \"$NEXT_CLASS\" and .workspace.id >= 0) | .address" | head -1)
|
||||
|
||||
if [ -n "$NEXT_WINDOW" ]; then
|
||||
hyprctl dispatch focuswindow "address:$NEXT_WINDOW"
|
||||
fi
|
||||
30
dotfiles/config/hypr/scripts/gather-class.sh
Executable file
30
dotfiles/config/hypr/scripts/gather-class.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Gather all windows of the same class as focused window (like XMonad's gatherThisClass)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get focused window class
|
||||
FOCUSED_CLASS=$(hyprctl activewindow -j | jq -r '.class')
|
||||
CURRENT_WS=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
|
||||
if [ "$FOCUSED_CLASS" = "null" ] || [ -z "$FOCUSED_CLASS" ]; then
|
||||
notify-send "Gather Class" "No focused window"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Find all windows with same class on other workspaces
|
||||
WINDOWS=$(hyprctl clients -j | jq -r ".[] | select(.class == \"$FOCUSED_CLASS\" and .workspace.id != $CURRENT_WS and .workspace.id >= 0) | .address")
|
||||
|
||||
if [ -z "$WINDOWS" ]; then
|
||||
notify-send "Gather Class" "No other windows of class '$FOCUSED_CLASS'"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Move each window to current workspace
|
||||
COUNT=0
|
||||
for ADDR in $WINDOWS; do
|
||||
hyprctl dispatch movetoworkspace "$CURRENT_WS,address:$ADDR"
|
||||
((COUNT++))
|
||||
done
|
||||
|
||||
notify-send "Gather Class" "Gathered $COUNT windows of class '$FOCUSED_CLASS'"
|
||||
19
dotfiles/config/hypr/scripts/raise-or-run.sh
Executable file
19
dotfiles/config/hypr/scripts/raise-or-run.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Raise existing window or run command (like XMonad's raiseNextMaybe)
|
||||
# Usage: raise-or-run.sh <class-pattern> <command>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CLASS_PATTERN="$1"
|
||||
COMMAND="$2"
|
||||
|
||||
# Find windows matching the class pattern
|
||||
MATCHING=$(hyprctl clients -j | jq -r ".[] | select(.class | test(\"$CLASS_PATTERN\"; \"i\")) | .address" | head -1)
|
||||
|
||||
if [ -n "$MATCHING" ]; then
|
||||
# Window exists, focus it
|
||||
hyprctl dispatch focuswindow "address:$MATCHING"
|
||||
else
|
||||
# No matching window, run the command
|
||||
exec $COMMAND
|
||||
fi
|
||||
33
dotfiles/config/hypr/scripts/replace-window.sh
Executable file
33
dotfiles/config/hypr/scripts/replace-window.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
# Replace focused window with selected window (like XMonad's myReplaceWindow)
|
||||
# Swaps the positions of focused window and selected window
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get current workspace and focused window
|
||||
CURRENT_WS=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
FOCUSED=$(hyprctl activewindow -j | jq -r '.address')
|
||||
|
||||
if [ "$FOCUSED" = "null" ] || [ -z "$FOCUSED" ]; then
|
||||
notify-send "Replace Window" "No focused window"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get all windows except focused
|
||||
WINDOWS=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id >= 0 and .address != \"$FOCUSED\") | \"\(.title) [\(.class)] - WS:\(.workspace.id) |\(.address)\"")
|
||||
|
||||
if [ -z "$WINDOWS" ]; then
|
||||
notify-send "Replace Window" "No other windows available"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Show rofi menu
|
||||
SELECTION=$(echo "$WINDOWS" | rofi -dmenu -i -p "Replace with" -format 's')
|
||||
|
||||
if [ -n "$SELECTION" ]; then
|
||||
# Extract the window address
|
||||
ADDRESS=$(echo "$SELECTION" | sed 's/.*|//')
|
||||
|
||||
# Swap windows using hy3
|
||||
hyprctl dispatch hy3:movewindow "address:$ADDRESS"
|
||||
fi
|
||||
39
dotfiles/config/hypr/scripts/shift-to-empty-on-screen.sh
Executable file
39
dotfiles/config/hypr/scripts/shift-to-empty-on-screen.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# Shift window to empty workspace on screen in given direction
|
||||
# Like XMonad's shiftToEmptyOnScreen
|
||||
# Usage: shift-to-empty-on-screen.sh <direction: u|d|l|r>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DIRECTION="$1"
|
||||
|
||||
# Track the current monitor so we can return
|
||||
ORIG_MONITOR=$(hyprctl activeworkspace -j | jq -r '.monitor')
|
||||
|
||||
# Move focus to the screen in that direction
|
||||
hyprctl dispatch focusmonitor "$DIRECTION"
|
||||
|
||||
# Get the monitor we're now on (target monitor)
|
||||
MONITOR=$(hyprctl activeworkspace -j | jq -r '.monitor')
|
||||
|
||||
# If there is no monitor in that direction, bail
|
||||
if [ "$MONITOR" = "$ORIG_MONITOR" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Find an empty workspace or create one
|
||||
# First check if there's an empty workspace on this monitor
|
||||
EMPTY_WS=$(hyprctl workspaces -j | jq -r ".[] | select(.windows == 0 and .monitor == \"$MONITOR\") | .id" | head -1)
|
||||
|
||||
if [ -z "$EMPTY_WS" ]; then
|
||||
# No empty workspace, find next available workspace number
|
||||
MAX_WS=$(hyprctl workspaces -j | jq -r 'map(.id) | max')
|
||||
EMPTY_WS=$((MAX_WS + 1))
|
||||
fi
|
||||
|
||||
# Ensure the workspace exists on the target monitor
|
||||
hyprctl dispatch workspace "$EMPTY_WS"
|
||||
|
||||
# Go back to original monitor and move the window (without following)
|
||||
hyprctl dispatch focusmonitor "$ORIG_MONITOR"
|
||||
hyprctl dispatch movetoworkspacesilent "$EMPTY_WS"
|
||||
45
dotfiles/config/hypr/scripts/swap-workspaces.sh
Executable file
45
dotfiles/config/hypr/scripts/swap-workspaces.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# Swap the contents of the current workspace with another workspace.
|
||||
# Intended to mirror XMonad's swapWithCurrent behavior.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
CURRENT_WS="$(hyprctl activeworkspace -j | jq -r '.id')"
|
||||
if [[ -z "${CURRENT_WS}" || "${CURRENT_WS}" == "null" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TARGET_WS="${1:-}"
|
||||
|
||||
if [[ -z "${TARGET_WS}" ]]; then
|
||||
WS_LIST="$({
|
||||
seq 1 10
|
||||
hyprctl workspaces -j | jq -r '.[].id' 2>/dev/null || true
|
||||
} | awk 'NF {print $1}' | awk '!seen[$0]++' | sort -n)"
|
||||
|
||||
TARGET_WS="$(printf "%s\n" "${WS_LIST}" | rofi -dmenu -p "Swap with workspace")"
|
||||
fi
|
||||
|
||||
if [[ -z "${TARGET_WS}" || "${TARGET_WS}" == "null" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${TARGET_WS}" == "${CURRENT_WS}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! [[ "${TARGET_WS}" =~ ^-?[0-9]+$ ]]; then
|
||||
notify-send "Swap Workspace" "Invalid workspace: ${TARGET_WS}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WINDOWS_CURRENT="$(hyprctl clients -j | jq -r --arg ws "${CURRENT_WS}" '.[] | select((.workspace.id|tostring) == $ws) | .address')"
|
||||
WINDOWS_TARGET="$(hyprctl clients -j | jq -r --arg ws "${TARGET_WS}" '.[] | select((.workspace.id|tostring) == $ws) | .address')"
|
||||
|
||||
for ADDR in ${WINDOWS_CURRENT}; do
|
||||
hyprctl dispatch movetoworkspace "${TARGET_WS},address:${ADDR}"
|
||||
done
|
||||
|
||||
for ADDR in ${WINDOWS_TARGET}; do
|
||||
hyprctl dispatch movetoworkspace "${CURRENT_WS},address:${ADDR}"
|
||||
done
|
||||
51
dotfiles/config/hypr/scripts/toggle-scratchpad.sh
Executable file
51
dotfiles/config/hypr/scripts/toggle-scratchpad.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
# Toggle a named Hyprland scratchpad, spawning it if needed.
|
||||
# Usage: toggle-scratchpad.sh <name> <class_regex|-> <title_regex|-> <command...>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "usage: $0 <name> <class_regex|-> <title_regex|-> <command...>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NAME="$1"
|
||||
shift
|
||||
CLASS_REGEX="$1"
|
||||
shift
|
||||
TITLE_REGEX="$1"
|
||||
shift
|
||||
COMMAND=("$@")
|
||||
|
||||
if [ "$CLASS_REGEX" = "-" ]; then
|
||||
CLASS_REGEX=""
|
||||
fi
|
||||
if [ "$TITLE_REGEX" = "-" ]; then
|
||||
TITLE_REGEX=""
|
||||
fi
|
||||
|
||||
if [ -z "$CLASS_REGEX" ] && [ -z "$TITLE_REGEX" ]; then
|
||||
echo "toggle-scratchpad: provide a class or title regex" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MATCHING=$(hyprctl clients -j | jq -r --arg cre "$CLASS_REGEX" --arg tre "$TITLE_REGEX" '
|
||||
.[]
|
||||
| select(
|
||||
(($cre == "") or (.class | test($cre; "i")))
|
||||
and
|
||||
(($tre == "") or (.title | test($tre; "i")))
|
||||
)
|
||||
| .address
|
||||
')
|
||||
|
||||
if [ -z "$MATCHING" ]; then
|
||||
"${COMMAND[@]}" &
|
||||
else
|
||||
while IFS= read -r ADDR; do
|
||||
[ -n "$ADDR" ] || continue
|
||||
hyprctl dispatch movetoworkspacesilent "special:$NAME,address:$ADDR"
|
||||
done <<< "$MATCHING"
|
||||
fi
|
||||
|
||||
hyprctl dispatch togglespecialworkspace "$NAME"
|
||||
13
dotfiles/config/hypr/scripts/workspace-back.sh
Executable file
13
dotfiles/config/hypr/scripts/workspace-back.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
runtime_dir="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
||||
state_dir="${runtime_dir}/hypr"
|
||||
prev_file="${state_dir}/prev-workspace"
|
||||
|
||||
prev="$(cat "${prev_file}" 2>/dev/null || true)"
|
||||
if [[ -z "${prev}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
hyprctl dispatch workspace "${prev}" >/dev/null 2>&1 || true
|
||||
60
dotfiles/config/hypr/scripts/workspace-history.sh
Executable file
60
dotfiles/config/hypr/scripts/workspace-history.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
runtime_dir="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
||||
sig="${HYPRLAND_INSTANCE_SIGNATURE:-}"
|
||||
if [[ -z "$sig" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sock="${runtime_dir}/hypr/${sig}/.socket2.sock"
|
||||
state_dir="${runtime_dir}/hypr"
|
||||
last_file="${state_dir}/last-workspace"
|
||||
prev_file="${state_dir}/prev-workspace"
|
||||
|
||||
mkdir -p "${state_dir}"
|
||||
|
||||
# Initialize current workspace to avoid empty state.
|
||||
if command -v hyprctl >/dev/null 2>&1; then
|
||||
cur_id="$(hyprctl activeworkspace -j | jq -r '.id' 2>/dev/null || true)"
|
||||
if [[ -n "${cur_id}" && "${cur_id}" != "null" ]]; then
|
||||
echo "${cur_id}" > "${last_file}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Wait for the event socket to be ready.
|
||||
while [[ ! -S "${sock}" ]]; do
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
nc -U "${sock}" | while read -r line; do
|
||||
case "${line}" in
|
||||
workspace*">>"*)
|
||||
payload="${line#*>>}"
|
||||
# Handle workspacev2 payloads: id,name
|
||||
if [[ "${payload}" == *","* ]]; then
|
||||
ws_id="${payload%%,*}"
|
||||
ws_name="${payload#*,}"
|
||||
else
|
||||
ws_id="${payload}"
|
||||
ws_name="${payload}"
|
||||
fi
|
||||
|
||||
# Ignore special/negative workspaces.
|
||||
if [[ "${ws_id}" =~ ^- ]] || [[ "${ws_name}" == special:* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
ws_ident="${ws_name}"
|
||||
if [[ -z "${ws_ident}" ]]; then
|
||||
ws_ident="${ws_id}"
|
||||
fi
|
||||
|
||||
prev="$(cat "${last_file}" 2>/dev/null || true)"
|
||||
if [[ -n "${prev}" && "${ws_ident}" != "${prev}" ]]; then
|
||||
echo "${prev}" > "${prev_file}"
|
||||
fi
|
||||
echo "${ws_ident}" > "${last_file}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Noto Sans 10";
|
||||
font: "Fira Code 10";
|
||||
show-icons: true;
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
@@ -25,7 +25,7 @@ window {
|
||||
border: 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 12px;
|
||||
width: 30%;
|
||||
width: 40%;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
@@ -36,7 +36,6 @@ prompt {
|
||||
padding: 0.30% 1% 0% -0.5%;
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
font: "Fira Code 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
|
||||
@@ -5,7 +5,8 @@ configuration {
|
||||
terminal: "alacritty";
|
||||
sidebar-mode: false;
|
||||
fullscreen: true;
|
||||
dpi: 100;
|
||||
/* Let rofi auto-detect DPI under Wayland/Xwayland to avoid blurry scaling. */
|
||||
dpi: 0;
|
||||
}
|
||||
|
||||
@theme "colorful/style_7.rasi"
|
||||
|
||||
525
dotfiles/config/taffybar/flake.lock
generated
525
dotfiles/config/taffybar/flake.lock
generated
@@ -3,11 +3,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -21,11 +21,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -39,11 +39,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -57,11 +57,11 @@
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -70,80 +70,16 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fourmolu-011": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-g/yDZXeLCHq/iXoZTaTYSb8l9CMny3AKsRQgWElagZI=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/fourmolu-0.11.0.0/fourmolu-0.11.0.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/fourmolu-0.11.0.0/fourmolu-0.11.0.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"fourmolu-012": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-yru8ls67DMM6WSeVU6xDmmwa48I8S9CUv9NBaxSQ29M=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/fourmolu-0.12.0.0/fourmolu-0.12.0.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/fourmolu-0.12.0.0/fourmolu-0.12.0.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"git-ignore-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"lastModified": 1762808025,
|
||||
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"ref": "master",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-ignore-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703887061,
|
||||
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
|
||||
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -154,13 +90,20 @@
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"flake": false,
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"weeder-nix",
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -170,30 +113,13 @@
|
||||
}
|
||||
},
|
||||
"gtk-sni-tray": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"taffybar",
|
||||
"flake-utils"
|
||||
],
|
||||
"git-ignore-nix": [
|
||||
"taffybar",
|
||||
"git-ignore-nix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
],
|
||||
"status-notifier-item": [
|
||||
"taffybar",
|
||||
"status-notifier-item"
|
||||
]
|
||||
},
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663379298,
|
||||
"narHash": "sha256-m18+G7V1N+g/pPeKJG9hkblGA5c8QTnUYnsU5t14sOw=",
|
||||
"lastModified": 1760550917,
|
||||
"narHash": "sha256-oELopLiVb7D1fzYHAiw/cbfNPHLQcOJ3Rz/I1gbk8IY=",
|
||||
"owner": "taffybar",
|
||||
"repo": "gtk-sni-tray",
|
||||
"rev": "1927d86308d34b5d21a709cf8ff5332ec5d37de4",
|
||||
"rev": "f6d1bf5dd64ac0f532b03ae01f5e1cc051116f09",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -204,26 +130,13 @@
|
||||
}
|
||||
},
|
||||
"gtk-strut": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"taffybar",
|
||||
"flake-utils"
|
||||
],
|
||||
"git-ignore-nix": [
|
||||
"taffybar",
|
||||
"git-ignore-nix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663377859,
|
||||
"narHash": "sha256-UrBd+R3NaJIDC2lt5gMafS3KBeLs83emm2YorX2cFCo=",
|
||||
"lastModified": 1760550944,
|
||||
"narHash": "sha256-S0saDsCA3aosU23jO5+jSXkbyrv7/C48o8GjsZrqF0I=",
|
||||
"owner": "taffybar",
|
||||
"repo": "gtk-strut",
|
||||
"rev": "d946eb230cdccf5afc063642b3215723e555990b",
|
||||
"rev": "5e0bf7f4b93b931a9c4b4a48b5d39de3ca8f02ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -233,197 +146,39 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-hie-bios": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1686930638,
|
||||
"narHash": "sha256-gfcxxHtZ2jUsiKNn/O4jEkfWF/2H04aTnaIvPDbtNlQ=",
|
||||
"owner": "haskell",
|
||||
"repo": "hie-bios",
|
||||
"rev": "3d4fadfb0dc44cb287db9897ecfb503899d33513",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "haskell",
|
||||
"repo": "hie-bios",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-implicit-hie-cradle": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1686495518,
|
||||
"narHash": "sha256-OAe+zOkMZuoTfVEMnxnCT1cmPgRF/riAR8nVdomnwxo=",
|
||||
"owner": "smunix",
|
||||
"repo": "implicit-hie-cradle",
|
||||
"rev": "d6aa00355898469af56cfd5e62f7fc8bd9959ded",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "smunix",
|
||||
"ref": "smunix-patch-hls-0.5-1",
|
||||
"repo": "implicit-hie-cradle",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-language-server": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"fourmolu-011": "fourmolu-011",
|
||||
"fourmolu-012": "fourmolu-012",
|
||||
"gitignore": "gitignore",
|
||||
"haskell-hie-bios": "haskell-hie-bios",
|
||||
"haskell-implicit-hie-cradle": "haskell-implicit-hie-cradle",
|
||||
"hiedb": "hiedb",
|
||||
"hlint-35": "hlint-35",
|
||||
"hlint-36": "hlint-36",
|
||||
"lsp": "lsp",
|
||||
"lsp-test": "lsp-test",
|
||||
"lsp-types": "lsp-types",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"ormolu-052": "ormolu-052",
|
||||
"ormolu-07": "ormolu-07",
|
||||
"stylish-haskell-0145": "stylish-haskell-0145"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693851896,
|
||||
"narHash": "sha256-799JUHpBd2iMRCrTYDme5RsROKnIwSKBe2xYxgVN7QI=",
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "haskell-language-server",
|
||||
"rev": "ea368cef0673059fff95e953ef983109b5979dbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "colonelpanic8",
|
||||
"ref": "goto-dependency-definition-2",
|
||||
"repo": "haskell-language-server",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hiedb": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1691542357,
|
||||
"narHash": "sha256-90ftphhoIo0CklJrjfCGQrZIUKZfdMJ2Og6tep9dmJ8=",
|
||||
"owner": "nlander",
|
||||
"repo": "HieDb",
|
||||
"rev": "4eebfcf8fab54f24808e6301227d77ae64d2509c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nlander",
|
||||
"ref": "all-new-functions",
|
||||
"repo": "HieDb",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hlint-35": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-qQNUlQQnahUGEO92Lm0RwjTGBGr2Yaw0KRuFRMoc5No=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/hlint-3.5/hlint-3.5.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/hlint-3.5/hlint-3.5.tar.gz"
|
||||
}
|
||||
},
|
||||
"hlint-36": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-fH4RYnWeuBqJI5d3Ba+Xs0BxYr0IYFH1OWO3k2iHGlU=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/hlint-3.6.1/hlint-3.6.1.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/hlint-3.6.1/hlint-3.6.1.tar.gz"
|
||||
}
|
||||
},
|
||||
"lsp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-HcEfdYUrCHufEa+10M2wESjnK41xM/msd+t6r6JwQO0=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-2.2.0.0/lsp-2.2.0.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-2.2.0.0/lsp-2.2.0.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"lsp-test": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-E1D3X2+I9ZTZLpHDEDTXexQFYpyG5byOFRIvRTeBsn8=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-test-0.16.0.0/lsp-test-0.16.0.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-test-0.16.0.0/lsp-test-0.16.0.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"lsp-types": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-Oa5HuKdsdTSQUKtuSt06zVAq19Qxq5IJZObrnPwlB6s=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-types-2.0.2.0/lsp-types-2.0.2.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/lsp-types-2.0.2.0/lsp-types-2.0.2.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1702312524,
|
||||
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||
"path": "/nix/store/4fgs7yzsy2dqnjw8j42qlp9i1vgarzy0-source",
|
||||
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||
"type": "path"
|
||||
"lastModified": 1764252443,
|
||||
"narHash": "sha256-U4G4dUSYWZYKtrF7/ozebD1B96at08SIhY4R9OaK1nw=",
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e1fc6c25b91d3d49dd02a156237721f12dbd86b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
"owner": "colonelpanic8",
|
||||
"ref": "remove-gi-gtk-hs-patch",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1686874404,
|
||||
"narHash": "sha256-u2Ss8z+sGaVlKtq7sCovQ8WvXY+OoXJmY1zmyxITiaY=",
|
||||
"lastModified": 1730768919,
|
||||
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "efc10371d5c5b8d2d58bab6c1100753efacfe550",
|
||||
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "haskell-updates",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1689098530,
|
||||
"narHash": "sha256-fxc/9f20wRyo/5ydkmZkX/Sh/ULa7RcT8h+cUv8p/44=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f2406198ea0e4e37d4380d0e20336c575b8f8ef9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1666603677,
|
||||
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
|
||||
@@ -437,41 +192,38 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1702312524,
|
||||
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||
"path": "/nix/store/4fgs7yzsy2dqnjw8j42qlp9i1vgarzy0-source",
|
||||
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||
"type": "path"
|
||||
"lastModified": 1764230294,
|
||||
"narHash": "sha256-Z63xl5Scj3Y/zRBPAWq1eT68n2wBWGCIEF4waZ0bQBE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0d59e0290eefe0f12512043842d7096c4070f30e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"ormolu-052": {
|
||||
"flake": false,
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"narHash": "sha256-H7eqId488RBRxcf7flgJefAZmRgFJASJva+Oy7GG4q4=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/ormolu-0.5.2.0/ormolu-0.5.2.0.tar.gz"
|
||||
"lastModified": 1747372754,
|
||||
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/ormolu-0.5.2.0/ormolu-0.5.2.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"ormolu-07": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-5M5gNzSvsiQH1+0oexRByzf5EIET+0BFwR4fLIr2P7g=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/ormolu-0.7.1.0/ormolu-0.7.1.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/ormolu-0.7.1.0/ormolu-0.7.1.0.tar.gz"
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@@ -479,24 +231,11 @@
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"taffybar": "taffybar",
|
||||
"xmonad": "xmonad_2"
|
||||
"xmonad": "xmonad"
|
||||
}
|
||||
},
|
||||
"status-notifier-item": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"taffybar",
|
||||
"flake-utils"
|
||||
],
|
||||
"git-ignore-nix": [
|
||||
"taffybar",
|
||||
"git-ignore-nix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641783528,
|
||||
"narHash": "sha256-wJymJfYPFj4/r1e4kT/wt9FEsyCXo5JkkcOoozpuhag=",
|
||||
@@ -511,18 +250,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"stylish-haskell-0145": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-EE7RFQ6q4Ek8daRgOpNMGepYLa9o8cM4OLjTNUSHQf0=",
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/stylish-haskell-0.14.5.0/stylish-haskell-0.14.5.0.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://hackage.haskell.org/package/stylish-haskell-0.14.5.0/stylish-haskell-0.14.5.0.tar.gz"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
@@ -568,53 +295,42 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"taffybar": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"gtk-sni-tray": "gtk-sni-tray",
|
||||
"gtk-strut": "gtk-strut",
|
||||
"haskell-language-server": "haskell-language-server",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"status-notifier-item": "status-notifier-item",
|
||||
"xmonad": "xmonad"
|
||||
"weeder-nix": "weeder-nix",
|
||||
"xmonad": [
|
||||
"xmonad"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696612500,
|
||||
"narHash": "sha256-Q19F91yVQviqxgY+FkvEwtX2vcw414eVtK8erim0NrU=",
|
||||
"lastModified": 1760591109,
|
||||
"narHash": "sha256-O21ayp5v2eccXdcwNjTK5ZB99ruK0Zt9CUaw5Rye42g=",
|
||||
"owner": "taffybar",
|
||||
"repo": "taffybar",
|
||||
"rev": "46eba89c2a4d4ffefe42c3ee4506d1b74c8e61fd",
|
||||
"rev": "b256a711416036ca124fc9b3f89e7c957535e465",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"ref": "master",
|
||||
"repo": "taffybar",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1689098530,
|
||||
"narHash": "sha256-fxc/9f20wRyo/5ydkmZkX/Sh/ULa7RcT8h+cUv8p/44=",
|
||||
"lastModified": 1764242076,
|
||||
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f2406198ea0e4e37d4380d0e20336c575b8f8ef9",
|
||||
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -624,66 +340,41 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable_2": {
|
||||
"weeder-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1704538339,
|
||||
"narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701",
|
||||
"lastModified": 1748252779,
|
||||
"narHash": "sha256-kSyD/VDUX2m9c2vcuLBT2wnpYiVSHHlP9vuDTtsAtD8=",
|
||||
"owner": "NorfairKing",
|
||||
"repo": "weeder-nix",
|
||||
"rev": "388df7a6f00220d1960118e1ad37cd86150d2c5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"owner": "NorfairKing",
|
||||
"repo": "weeder-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xmonad": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"taffybar",
|
||||
"flake-utils"
|
||||
],
|
||||
"git-ignore-nix": [
|
||||
"taffybar",
|
||||
"git-ignore-nix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
],
|
||||
"flake-utils": "flake-utils_3",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"unstable": "unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687976934,
|
||||
"narHash": "sha256-hUZmKy3jJ1+5rTGeQzfNR+LxgzmLaaeRVnbsJMEVw0Q=",
|
||||
"lastModified": 1763949843,
|
||||
"narHash": "sha256-aJXmGPWKjXs7cagVzUE3fd2Fpc+sXnknM446AxHgvH0=",
|
||||
"owner": "xmonad",
|
||||
"repo": "xmonad",
|
||||
"rev": "1aac6611d82065c9198e5584176058a9483fcbb0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "xmonad",
|
||||
"ref": "master",
|
||||
"repo": "xmonad",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xmonad_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"git-ignore-nix": "git-ignore-nix_2",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"unstable": "unstable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702895348,
|
||||
"narHash": "sha256-ADRTw4DTfDCmsSFFWZKmvdmIjnEVY7pjjUxYytKXy1E=",
|
||||
"owner": "xmonad",
|
||||
"repo": "xmonad",
|
||||
"rev": "c4cf4715f736fed77fb2af622c0760259ac2cf43",
|
||||
"rev": "97edef37a3ae10012272d692b5e1bc9b7013fc14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,15 +1,30 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
xmonad.url = github:xmonad/xmonad/master;
|
||||
taffybar.url = "github:taffybar/taffybar";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:colonelpanic8/nixpkgs/remove-gi-gtk-hs-patch";
|
||||
xmonad.url = "github:xmonad/xmonad/master";
|
||||
taffybar = {
|
||||
url = "github:taffybar/taffybar/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.xmonad.follows = "xmonad";
|
||||
};
|
||||
};
|
||||
outputs = { self, flake-utils, taffybar, nixpkgs, xmonad }:
|
||||
let
|
||||
hoverlay = final: prev: hself: hsuper: {
|
||||
taffybar = hsuper.taffybar.overrideAttrs (old: {
|
||||
hoverlay = final: prev: hself: hsuper:
|
||||
{
|
||||
taffybar = prev.haskell.lib.overrideCabal hsuper.taffybar (oa: {
|
||||
doHaddock = false;
|
||||
doCheck = false;
|
||||
# Fix for GHC 9.4 where liftA2 is not in Prelude
|
||||
postPatch = (oa.postPatch or "") + ''
|
||||
substituteInPlace src/System/Taffybar/DBus/Client/Util.hs \
|
||||
--replace-fail "import Control.Monad (forM)" \
|
||||
"import Control.Monad (forM)
|
||||
import Control.Applicative (liftA2)"
|
||||
'';
|
||||
});
|
||||
# gi-gtk-hs patching is now handled by taffybar's fixVersionNamePackages overlay
|
||||
imalison-taffybar = prev.haskell.lib.addPkgconfigDepends (
|
||||
hself.callCabal2nix "imalison-taffybar"
|
||||
(
|
||||
@@ -34,12 +49,12 @@
|
||||
};
|
||||
defComp = { compiler = "ghc94"; };
|
||||
overlay = xmonad.lib.fromHOL hoverlay defComp;
|
||||
overlays = [ taffybar.overlay overlay ];
|
||||
overlayList = [ taffybar.overlays.default overlay ];
|
||||
in flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
|
||||
let pkgs = import nixpkgs { inherit system; overlays = overlayList; config.allowBroken = true; };
|
||||
hpkgs = pkgs.lib.attrsets.getAttrFromPath (xmonad.lib.hpath defComp) pkgs;
|
||||
in
|
||||
rec {
|
||||
{
|
||||
devShell = hpkgs.shellFor {
|
||||
packages = p: [ p.imalison-taffybar p.taffybar ];
|
||||
nativeBuildInputs = with hpkgs; [
|
||||
@@ -48,5 +63,11 @@
|
||||
];
|
||||
};
|
||||
defaultPackage = hpkgs.imalison-taffybar;
|
||||
}) // { inherit overlay overlays; } ;
|
||||
}) // {
|
||||
inherit overlay;
|
||||
overlays = {
|
||||
default = overlay;
|
||||
taffybar = taffybar.overlays.default;
|
||||
};
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ executable taffybar
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, gi-gtk
|
||||
, gi-gtk3
|
||||
, gtk-sni-tray
|
||||
, gtk-strut
|
||||
, haskell-gi-base
|
||||
|
||||
Submodule dotfiles/config/taffybar/taffybar updated: 9c8540a564...220cb5a34d
@@ -28,7 +28,6 @@ import System.Log.Handler.Simple
|
||||
import System.Log.Logger
|
||||
import System.Process
|
||||
import System.Taffybar
|
||||
import System.Taffybar.Auth
|
||||
import System.Taffybar.Context (appendHook)
|
||||
import System.Taffybar.DBus
|
||||
import System.Taffybar.DBus.Toggle
|
||||
@@ -40,7 +39,6 @@ import System.Taffybar.Information.X11DesktopInfo
|
||||
import System.Taffybar.SimpleConfig
|
||||
import System.Taffybar.Util
|
||||
import System.Taffybar.Widget
|
||||
import System.Taffybar.Widget.Crypto
|
||||
import System.Taffybar.Widget.Generic.Icon
|
||||
import System.Taffybar.Widget.Generic.PollingGraph
|
||||
import System.Taffybar.Widget.Generic.PollingLabel
|
||||
@@ -174,9 +172,6 @@ main = do
|
||||
{ clockUpdateStrategy = RoundedTargetInterval 60 0.0
|
||||
, clockFormatString = "%a %b %_d, 🕑%I:%M %p"
|
||||
}
|
||||
myICP = deocrateWithSetClassAndBoxes "icp" $ cryptoPriceLabelWithIcon @"ICP-USD"
|
||||
myBTC = deocrateWithSetClassAndBoxes "btc" $ cryptoPriceLabelWithIcon @"BTC-USD"
|
||||
myETH = deocrateWithSetClassAndBoxes "eth" $ cryptoPriceLabelWithIcon @"ETH-USD"
|
||||
myTray = deocrateWithSetClassAndBoxes "tray" $
|
||||
sniTrayNewFromParams defaultTrayParams { trayLeftClickAction = PopupMenu
|
||||
, trayRightClickAction = Activate
|
||||
@@ -194,9 +189,6 @@ main = do
|
||||
batteryWidgets = [myBatteryIcon, myBatteryText]
|
||||
baseEndWidgets =
|
||||
[ myTray
|
||||
, myICP
|
||||
, myBTC
|
||||
, myETH
|
||||
, myMpris
|
||||
]
|
||||
fullEndWidgets = baseEndWidgets ++ [ myCPU, myMem, myNet, myMpris ]
|
||||
@@ -210,7 +202,6 @@ main = do
|
||||
, barPadding = 0
|
||||
, barHeight = ScreenRatio $ 1/27
|
||||
, cssPaths = cssFiles
|
||||
, startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329"
|
||||
, centerWidgets = [ myClock ]
|
||||
}
|
||||
selectedConfig =
|
||||
@@ -218,7 +209,7 @@ main = do
|
||||
[ ( "uber-loaner"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
)
|
||||
, ( "adele"
|
||||
, ( "adell"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
)
|
||||
, ( "stevie-nixos"
|
||||
|
||||
103
dotfiles/config/waybar/config.jsonc
Normal file
103
dotfiles/config/waybar/config.jsonc
Normal file
@@ -0,0 +1,103 @@
|
||||
// -*- mode: jsonc -*-
|
||||
{
|
||||
"height": 42,
|
||||
"spacing": 4,
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"hyprland/submap"
|
||||
],
|
||||
"modules-center": [
|
||||
"hyprland/window"
|
||||
],
|
||||
"modules-right": [
|
||||
"idle_inhibitor",
|
||||
"pulseaudio",
|
||||
"network",
|
||||
"power-profiles-daemon",
|
||||
"cpu",
|
||||
"memory",
|
||||
"custom/diskfree",
|
||||
"temperature",
|
||||
"backlight",
|
||||
"battery",
|
||||
"clock",
|
||||
"tray"
|
||||
],
|
||||
"idle_inhibitor": {
|
||||
"format": "INHIB {icon}",
|
||||
"format-icons": {
|
||||
"activated": "ON",
|
||||
"deactivated": "OFF"
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%H:%M}",
|
||||
"tooltip-format": "{:%Y %B}\n{calendar}",
|
||||
"format-alt": "{:%Y-%m-%d}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "CPU {usage}%",
|
||||
"tooltip": false
|
||||
},
|
||||
"memory": {
|
||||
"format": "MEM {}%"
|
||||
},
|
||||
"custom/diskfree": {
|
||||
"exec": "~/.config/waybar/scripts/diskfree",
|
||||
"interval": 30,
|
||||
"format": "DISK {text}",
|
||||
"tooltip": false
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 80,
|
||||
"format": "TEMP {temperatureC}C"
|
||||
},
|
||||
"backlight": {
|
||||
"format": "BL {percent}%"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "BAT {capacity}%",
|
||||
"format-full": "BAT {capacity}%",
|
||||
"format-charging": "BAT {capacity}% charging",
|
||||
"format-plugged": "BAT {capacity}% plugged",
|
||||
"format-alt": "BAT {time}"
|
||||
},
|
||||
"power-profiles-daemon": {
|
||||
"format": "PWR {profile}",
|
||||
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
||||
"tooltip": true
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "WIFI {essid} {signalStrength}%",
|
||||
"format-ethernet": "ETH {ipaddr}/{cidr}",
|
||||
"tooltip-format": "{ifname} via {gwaddr}",
|
||||
"format-linked": "{ifname} (No IP)",
|
||||
"format-disconnected": "NET disconnected",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "VOL {volume}%",
|
||||
"format-muted": "VOL muted",
|
||||
"format-source": "MIC {volume}%",
|
||||
"format-source-muted": "MIC muted",
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"format": "{id} {windows}",
|
||||
"on-click": "activate",
|
||||
"workspace-taskbar": {
|
||||
"enable": true,
|
||||
"update-active-window": true,
|
||||
"format": "{icon}",
|
||||
"icon-size": 24,
|
||||
"on-click-window": "hyprctl dispatch focuswindow address:{address}"
|
||||
}
|
||||
}
|
||||
}
|
||||
45
dotfiles/config/waybar/scripts/diskfree
Executable file
45
dotfiles/config/waybar/scripts/diskfree
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/waybar"
|
||||
list_file="${config_dir}/disks"
|
||||
|
||||
mounts=()
|
||||
|
||||
if [[ -n "${WAYBAR_DISKS:-}" ]]; then
|
||||
# Accept comma or space separated values.
|
||||
IFS=', ' read -r -a mounts <<< "${WAYBAR_DISKS//:/,}"
|
||||
elif [[ -f "$list_file" ]]; then
|
||||
while IFS= read -r line; do
|
||||
line="${line%%#*}"
|
||||
line="${line#"${line%%[![:space:]]*}"}"
|
||||
line="${line%"${line##*[![:space:]]}"}"
|
||||
[[ -z "$line" ]] && continue
|
||||
mounts+=("$line")
|
||||
done < "$list_file"
|
||||
fi
|
||||
|
||||
if [[ ${#mounts[@]} -eq 0 ]]; then
|
||||
mounts=("/")
|
||||
fi
|
||||
|
||||
items=()
|
||||
for mount in "${mounts[@]}"; do
|
||||
if df_out=$(df -h --output=avail,target "$mount" 2>/dev/null | awk 'NR==2 {print $2, $1}'); then
|
||||
items+=("$df_out")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#items[@]} -eq 0 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
output=""
|
||||
for item in "${items[@]}"; do
|
||||
if [[ -n "$output" ]]; then
|
||||
output+=" | "
|
||||
fi
|
||||
output+="$item"
|
||||
done
|
||||
|
||||
printf '%s\n' "$output"
|
||||
361
dotfiles/config/waybar/style.css
Normal file
361
dotfiles/config/waybar/style.css
Normal file
@@ -0,0 +1,361 @@
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/*
|
||||
window#waybar.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
window#waybar.solo {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
/* you can set a style on hover for any module like this */
|
||||
#pulseaudio:hover {
|
||||
background-color: #a37800;
|
||||
}
|
||||
|
||||
#workspaces button,
|
||||
#taskbar button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button:hover,
|
||||
#taskbar button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#workspaces button.focused,
|
||||
#taskbar button.active,
|
||||
#taskbar button.focused {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent,
|
||||
#taskbar button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#workspaces .workspace-label {
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#workspaces .taskbar-window {
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#workspaces .taskbar-window.active {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces .taskbar-window label {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces .taskbar-window image {
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#custom-diskfree,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#power-profiles-daemon,
|
||||
#mpd {
|
||||
padding: 0 8px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces,
|
||||
#taskbar {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces,
|
||||
.modules-left > widget:first-child > #taskbar {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces,
|
||||
.modules-right > widget:last-child > #taskbar {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#power-profiles-daemon {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.performance {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.balanced {
|
||||
background-color: #2980b9;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.power-saver {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #9b59b6;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background-color: #964B00;
|
||||
}
|
||||
|
||||
#custom-diskfree {
|
||||
background-color: #964B00;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #fff0f5;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #97e1ad;
|
||||
color: #000000;
|
||||
padding: 0 0px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#privacy {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#privacy-item {
|
||||
padding: 0 5px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#privacy-item.screenshare {
|
||||
background-color: #cf5700;
|
||||
}
|
||||
|
||||
#privacy-item.audio-in {
|
||||
background-color: #1ca000;
|
||||
}
|
||||
|
||||
#privacy-item.audio-out {
|
||||
background-color: #0069d4;
|
||||
}
|
||||
199
dotfiles/config/xmonad/flake.lock
generated
199
dotfiles/config/xmonad/flake.lock
generated
@@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -23,11 +23,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -41,29 +41,11 @@
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -74,19 +56,18 @@
|
||||
},
|
||||
"git-ignore-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694102001,
|
||||
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
||||
"lastModified": 1762808025,
|
||||
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
||||
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"ref": "master",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -96,11 +77,11 @@
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694102001,
|
||||
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
||||
"lastModified": 1762808025,
|
||||
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
||||
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -115,11 +96,11 @@
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694102001,
|
||||
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
||||
"lastModified": 1762808025,
|
||||
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
||||
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -131,11 +112,12 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693099187,
|
||||
"narHash": "sha256-FXCc6OIghv9k4xYOhSMZI6bj7o56S8BJKzKtTKzdUVQ=",
|
||||
"path": "/nix/store/wr9zk0l6xw1bi0zjrrsj998b5wgykyz5-source",
|
||||
"rev": "cf2004afe4d4b95a295c63c911e949e40915eedb",
|
||||
"type": "path"
|
||||
"lastModified": 1666603677,
|
||||
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "074da18a72269cc5a6cf444dce42daea5649b2fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
@@ -144,11 +126,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1666603677,
|
||||
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
|
||||
"lastModified": 1769740369,
|
||||
"narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "074da18a72269cc5a6cf444dce42daea5649b2fe",
|
||||
"rev": "6308c3b21396534d8aaeac46179c14c439a89b8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -184,23 +166,11 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1693099187,
|
||||
"narHash": "sha256-FXCc6OIghv9k4xYOhSMZI6bj7o56S8BJKzKtTKzdUVQ=",
|
||||
"path": "/nix/store/wr9zk0l6xw1bi0zjrrsj998b5wgykyz5-source",
|
||||
"rev": "cf2004afe4d4b95a295c63c911e949e40915eedb",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"xmonad": "xmonad",
|
||||
"xmonad-contrib": "xmonad-contrib"
|
||||
}
|
||||
@@ -250,44 +220,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1696019113,
|
||||
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
|
||||
"lastModified": 1769461804,
|
||||
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1696019113,
|
||||
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
|
||||
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -300,56 +239,18 @@
|
||||
"xmonad": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"git-ignore-nix": "git-ignore-nix_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"unstable": "unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-dOrvPpypuNn/fAWY2XjMacpsAXEiMZ4Dll3Ot81iQL4=",
|
||||
"path": "./xmonad",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "./xmonad",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
"xmonad-contrib": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"git-ignore-nix": "git-ignore-nix_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"xmonad": "xmonad_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-MwbeBTfcf6vE7bQvha4ueg5zLZxBiU3678ESYrXD4lw=",
|
||||
"path": "./xmonad-contrib",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "./xmonad-contrib",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
"xmonad_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"git-ignore-nix": "git-ignore-nix_3",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"unstable": "unstable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695471545,
|
||||
"narHash": "sha256-3EK3rWNuPsc4FwkY7S1sPVI4hr9O7/AXI5AqdO0gJ/A=",
|
||||
"lastModified": 1767819257,
|
||||
"narHash": "sha256-U7MIHr0B10wDSNgUvq4QTK22HZ4pl2oIYkdOKEMnxC4=",
|
||||
"owner": "xmonad",
|
||||
"repo": "xmonad",
|
||||
"rev": "327c2cf0c14f8eec234ec74d1a657d3e2fd5df11",
|
||||
"rev": "bb33042d408c15d8727011b1ed4aa22b2716d73d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -357,6 +258,32 @@
|
||||
"repo": "xmonad",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xmonad-contrib": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"git-ignore-nix": "git-ignore-nix_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"xmonad": [
|
||||
"xmonad"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755152326,
|
||||
"narHash": "sha256-47gGXt1TxzfQx/6X895t/T8Ozj+7fmQdU1i4cwyxcSg=",
|
||||
"owner": "IvanMalison",
|
||||
"repo": "xmonad-contrib",
|
||||
"rev": "1a8da46855ca83e11cfb31cbbaed980ed7a8dfcc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "IvanMalison",
|
||||
"ref": "withMyChanges",
|
||||
"repo": "xmonad-contrib",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
xmonad-contrib = {
|
||||
url = path:./xmonad-contrib;
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
git-ignore-nix.url = "github:hercules-ci/gitignore.nix";
|
||||
xmonad = {
|
||||
url = "github:xmonad/xmonad";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
xmonad = {
|
||||
url = path:./xmonad;
|
||||
xmonad-contrib = {
|
||||
url = "github:IvanMalison/xmonad-contrib/withMyChanges";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.xmonad.follows = "xmonad";
|
||||
};
|
||||
};
|
||||
outputs = { self, flake-utils, nixpkgs, xmonad, xmonad-contrib }:
|
||||
outputs = { self, flake-utils, nixpkgs, xmonad, xmonad-contrib, git-ignore-nix }:
|
||||
let
|
||||
overlay = import ./overlay.nix;
|
||||
overlays = [ overlay xmonad.overlay xmonad-contrib.overlay ];
|
||||
in flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
|
||||
in
|
||||
rec {
|
||||
{
|
||||
devShell = pkgs.haskellPackages.shellFor {
|
||||
packages = p: [ p.imalison-xmonad p.xmonad-contrib ];
|
||||
buildInputs = with pkgs.haskellPackages; [
|
||||
|
||||
Submodule dotfiles/config/xmonad/xmonad updated: 5c2ba06902...8113e0fe55
Submodule dotfiles/config/xmonad/xmonad-contrib updated: 229c7baf00...1a8da46855
@@ -1019,7 +1019,7 @@ addKeys conf@XConfig { modMask = modm } =
|
||||
-- Non-XMonad
|
||||
|
||||
, ((modm, xK_v), spawn "xclip -o | xdotool type --file -")
|
||||
, ((hyper, xK_v), spawn "rofi_clipit.sh")
|
||||
, ((hyper, xK_v), spawn "rofi -modi 'clipboard:greenclip print' -show clipboard")
|
||||
, ((hyper, xK_p), spawn "rofi-pass")
|
||||
, ((hyper, xK_h), spawn "rofi_shutter")
|
||||
, ((hyper, xK_c), spawn "shell_command.sh")
|
||||
@@ -1059,8 +1059,8 @@ addKeys conf@XConfig { modMask = modm } =
|
||||
, ((hyper .|. shiftMask, xK_q), spawn "toggle_mute_current_window.sh")
|
||||
, ((hctrl, xK_q), spawn "toggle_mute_current_window.sh only")
|
||||
|
||||
, ((0, xF86XK_MonBrightnessUp), spawn "brightness.sh 5")
|
||||
, ((0, xF86XK_MonBrightnessDown), spawn "brightness.sh -5")
|
||||
, ((0, xF86XK_MonBrightnessUp), spawn "brightness.sh up")
|
||||
, ((0, xF86XK_MonBrightnessDown), spawn "brightness.sh down")
|
||||
|
||||
] ++
|
||||
|
||||
|
||||
1
dotfiles/emacs.d/.gitignore
vendored
1
dotfiles/emacs.d/.gitignore
vendored
@@ -9,6 +9,7 @@
|
||||
.tern-port
|
||||
.tutor
|
||||
/eln-cache
|
||||
/elpaca
|
||||
/transient
|
||||
/tree-sitter
|
||||
README.el
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
(setq mc/cmds-to-run-for-all
|
||||
'(
|
||||
TeX-insert-backslash
|
||||
align
|
||||
backward-sexp
|
||||
beginning-of-buffer
|
||||
beginning-of-visual-line
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
39
dotfiles/emacs.d/elpaca-installer.el
Normal file
39
dotfiles/emacs.d/elpaca-installer.el
Normal file
@@ -0,0 +1,39 @@
|
||||
;; Elpaca Installer -*- lexical-binding: t; -*-
|
||||
(defvar elpaca-installer-version 0.11)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil :depth 1 :inherit ignore
|
||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (<= emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let* ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
@@ -1,49 +1,19 @@
|
||||
;; -*- no-byte-compile: t -*-
|
||||
|
||||
(let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el"))
|
||||
(bootstrap-version 2))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
;; -*- no-byte-compile: t; lexical-binding: t; -*-
|
||||
|
||||
(setq native-comp-deferred-compilation-deny-list '("magit"))
|
||||
(setq native-comp-always-compile t)
|
||||
(setq load-no-native t)
|
||||
(setq no-native-compile t)
|
||||
(setq warning-minimum-level :emergency)
|
||||
(setq straight-disable-native-compile t)
|
||||
|
||||
;; This is a workaround for an issue in emacs28 with symlinks. See https://github.com/radian-software/straight.el/issues/701
|
||||
(defun my-patch-package-find-file-visit-truename (oldfun &rest r)
|
||||
(let ((find-file-visit-truename nil))
|
||||
(apply oldfun r)))
|
||||
|
||||
(advice-add #'straight--build-autoloads :around
|
||||
#'my-patch-package-find-file-visit-truename)
|
||||
|
||||
(setq package-enable-at-startup nil
|
||||
straight-use-package-by-default t
|
||||
straight-vc-git-default-protocol 'ssh)
|
||||
(straight-use-package 'use-package)
|
||||
(require 'use-package)
|
||||
(setq use-package-enable-imenu-support t)
|
||||
(setq use-package-ensure-function 'straight-use-package-ensure-function)
|
||||
|
||||
(defvar imalison:do-benchmark nil)
|
||||
|
||||
(let ((bench-file (concat (file-name-directory user-init-file) "benchmark.el")))
|
||||
(when (file-exists-p bench-file) (load bench-file)))
|
||||
(defun emacs-directory-filepath (filename)
|
||||
(concat (file-name-directory load-file-name) filename))
|
||||
|
||||
(use-package benchmark-init
|
||||
:if imalison:do-benchmark
|
||||
:demand t
|
||||
:config
|
||||
(setq max-specpdl-size 99999999))
|
||||
(load-file (expand-file-name "elpaca-installer.el" user-emacs-directory))
|
||||
(elpaca elpaca-use-package (elpaca-use-package-mode))
|
||||
(setq use-package-enable-imenu-support t)
|
||||
(setq use-package-always-ensure t)
|
||||
|
||||
(defvar imalison:kat-mode nil)
|
||||
(setq custom-file "~/.emacs.d/custom-before.el")
|
||||
@@ -55,36 +25,81 @@
|
||||
(setq mac-option-modifier 'meta)
|
||||
(setq mac-command-modifier 'super))
|
||||
|
||||
;; See https://github.com/magit/magit/discussions/4997 . Without this magit is broken.
|
||||
(use-package magit
|
||||
;;The packages in this section are used to as utilities in the rest of this init file.
|
||||
;;Ensure they are installed/activated first.
|
||||
(use-package s
|
||||
:ensure (:wait t)
|
||||
:demand t)
|
||||
|
||||
;; This seems to fix issues with helm not explicitly declaring its dependency on async
|
||||
(use-package async :demand t)
|
||||
(use-package dash
|
||||
:ensure (:wait t)
|
||||
:demand t
|
||||
:config
|
||||
(progn (dash-enable-font-lock)))
|
||||
|
||||
(use-package gh
|
||||
:defer t
|
||||
:ensure (:host github :repo "IvanMalison/gh.el"))
|
||||
|
||||
(use-package shut-up
|
||||
:config
|
||||
(defun imalison:shut-up-around (function &rest args)
|
||||
(shut-up (apply function args))))
|
||||
|
||||
(use-package parse-csv :demand t)
|
||||
|
||||
(use-package emit
|
||||
:ensure (emit :type git :host github :repo "colonelpanic8/emit")
|
||||
:demand t
|
||||
:config
|
||||
(progn
|
||||
(emit-prefix-selector imalison:mark-ring mark-ring)
|
||||
(emit-prefix-selector imalison:shell-command-on-region
|
||||
imalison:copy-shell-command-on-region
|
||||
imalison:shell-command-on-region-replace
|
||||
imalison:jq-replace)
|
||||
|
||||
(defun imalison:jq-replace (start end)
|
||||
(interactive (region-if-active-otherwise-buffer))
|
||||
(imalison:shell-command-on-region-replace start end "jq ."))
|
||||
(emit-compose
|
||||
imalison:copy-eval-last-sexp kill-new prin1-to-string eval-last-sexp)
|
||||
|
||||
(emit-prefix-selector imalison:eval-last-sexp
|
||||
eval-region-or-last-sexp
|
||||
imalison:copy-eval-last-sexp)))
|
||||
|
||||
(use-package request :defer t)
|
||||
|
||||
;; Without this, org can behave very strangely
|
||||
(use-package org
|
||||
:straight
|
||||
:ensure
|
||||
(org :type git :host github :repo "colonelpanic8/org-mode" :local-repo "org"
|
||||
:branch "my-main"
|
||||
:depth full :pre-build (straight-recipes-org-elpa--build) :build
|
||||
(:not autoloads) :files
|
||||
(:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*")))
|
||||
:defer t)
|
||||
:branch "my-main-2025"
|
||||
:depth full
|
||||
:build (:not autoloads)
|
||||
:files (:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*"))
|
||||
:wait t))
|
||||
|
||||
(use-package dash :demand t)
|
||||
(elpaca-wait)
|
||||
|
||||
;; Install transient early to prevent built-in version from loading
|
||||
(use-package transient
|
||||
:ensure (:host github :repo "magit/transient" :wait t)
|
||||
:demand t)
|
||||
(elpaca-wait)
|
||||
|
||||
(when (or (equal (s-trim (shell-command-to-string "whoami")) "kat")
|
||||
imalison:kat-mode)
|
||||
(let ((debug-on-error t))
|
||||
(org-babel-load-file
|
||||
(concat (file-name-directory load-file-name) "kat-mode.org"))))
|
||||
|
||||
(let ((debug-on-error t))
|
||||
(org-babel-load-file
|
||||
(concat (file-name-directory load-file-name) "README.org")))
|
||||
(expand-file-name "README.org" user-emacs-directory)))
|
||||
|
||||
(when (or (equal (s-trim (shell-command-to-string "whoami")) "kat")
|
||||
imalison:kat-mode)
|
||||
(let ((debug-on-error t))
|
||||
(org-babel-load-file
|
||||
(concat (file-name-directory load-file-name) "kat-mode.org"))))
|
||||
|
||||
(when imalison:do-benchmark (benchmark-init/deactivate))
|
||||
;; (when imalison:do-benchmark (benchmark-init/deactivate))
|
||||
|
||||
;; Local Variables:
|
||||
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
|
||||
|
||||
@@ -58,41 +58,11 @@ This makes evil-mode play nice with org-fc
|
||||
(file+datetree "~/org/weekly_reviews.org")
|
||||
(file "~/org/weekly_review_template.org")))))
|
||||
#+end_src
|
||||
|
||||
** Daily Journal Entries
|
||||
** Journal
|
||||
#+begin_src emacs-lisp
|
||||
(defun imalison:journal-filepath-for-date (&optional date)
|
||||
(interactive (list (org-read-date)))
|
||||
(let ((date-str (or date (format-time-string "%Y-%m-%d"))))
|
||||
(imalison:join-paths
|
||||
org-directory "journal" (concat date-str ".org"))))
|
||||
|
||||
(defun imalison:open-todays-org-journal ()
|
||||
(interactive)
|
||||
(imalison:open-org-journal (format-time-string "%Y-%m-%d")))
|
||||
|
||||
(defun imalison:get-journal-template ()
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (imalison:join-paths org-directory "templates" "daily-journal-template.org"))
|
||||
(buffer-string)))
|
||||
|
||||
(defun imalison:open-org-journal (&optional date)
|
||||
(interactive (list (org-read-date nil nil nil "Select a date:")))
|
||||
(let* ((filepath (imalison:journal-filepath-for-date date))
|
||||
(file-existed (file-exists-p filepath))
|
||||
(date-str (or date (format-time-string "%Y-%m-%d")))
|
||||
(time-vals (append '(0 0 0) (nthcdr 3 (parse-time-string date-str))))
|
||||
(original-format-time-string (symbol-function 'format-time-string)))
|
||||
(find-file filepath)
|
||||
(when (not file-existed)
|
||||
(cl-letf (((symbol-function 'format-time-string)
|
||||
(lambda (format-string &optional _time _universal)
|
||||
(funcall original-format-time-string format-string (apply #'encode-time time-vals)))))
|
||||
(insert (org-capture-fill-template (imalison:get-journal-template)))))))
|
||||
|
||||
(bind-key "C-c j" 'imalison:open-todays-org-journal)
|
||||
(setq imalison:journal-template-filepath
|
||||
(imalison:join-paths org-directory "templates" "daily-journal-template.org"))
|
||||
#+end_src
|
||||
|
||||
** Insert a link to a task selected from agenda
|
||||
#+begin_src emacs-lisp
|
||||
(defun imalison:insert-link-to-agenda ()
|
||||
@@ -120,7 +90,7 @@ This makes evil-mode play nice with org-fc
|
||||
*** javascript
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ob-js
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:after org
|
||||
:config
|
||||
(progn
|
||||
@@ -161,5 +131,46 @@ This makes evil-mode play nice with org-fc
|
||||
* Packages
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-drill)
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
#+end_src
|
||||
|
||||
* Disable wild notifactions
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-wild-notifier-day-wide-alert-times nil)
|
||||
#+end_src
|
||||
|
||||
* Swift
|
||||
#+begin_src emacs-lisp
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
(unless (package-installed-p 'swift-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'swift-mode))
|
||||
|
||||
(unless (package-installed-p 'lsp-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'lsp-mode))
|
||||
|
||||
;; Swift Mode
|
||||
(require 'swift-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.swift\\'" . swift-mode))
|
||||
|
||||
;; LSP Mode
|
||||
(require 'lsp-mode)
|
||||
(add-hook 'swift-mode-hook #'lsp)
|
||||
|
||||
;; Set the path to SourceKit-LSP if it's not in your PATH
|
||||
(setq lsp-sourcekit-executable "/path/to/sourcekit-lsp")
|
||||
|
||||
;; Optional: Set the path to your Swift toolchain if necessary
|
||||
(setq lsp-sourcekit-executable-args '("-toolchain" "/path/to/swift-toolchain"))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
43
dotfiles/emacs.d/org-api.el
Normal file
43
dotfiles/emacs.d/org-api.el
Normal file
@@ -0,0 +1,43 @@
|
||||
;;; org-api.el --- org-agenda-api server configuration -*- lexical-binding: t; -*-
|
||||
|
||||
;; Load main emacs config to get org settings, custom commands, etc.
|
||||
(let ((current-dir (if load-file-name (file-name-directory load-file-name) "~/.emacs.d/")))
|
||||
(load (expand-file-name "init.el" current-dir)))
|
||||
|
||||
;; Ensure dependencies are loaded
|
||||
(require 'simple-httpd)
|
||||
(require 'org-agenda-api)
|
||||
|
||||
;; Configure capture templates for the API
|
||||
;; These use the org-agenda-api format with :prompts for API parameters
|
||||
(setq org-agenda-api-capture-templates
|
||||
`(("gtd-todo"
|
||||
:name "GTD Todo"
|
||||
:template ("t" "Todo" entry (file "~/org/inbox.org")
|
||||
(function (lambda ()
|
||||
(imalison:make-org-todo-template :content "%^{Title}")))
|
||||
:immediate-finish t)
|
||||
:prompts (("Title" :type string :required t)))
|
||||
("scheduled-todo"
|
||||
:name "Scheduled Todo"
|
||||
:template ("s" "Scheduled" entry (file "~/org/inbox.org")
|
||||
"* TODO %^{Title}\nSCHEDULED: %^{When}t\n"
|
||||
:immediate-finish t)
|
||||
:prompts (("Title" :type string :required t)
|
||||
("When" :type date :required t)))
|
||||
("tagged-todo"
|
||||
:name "Tagged Todo"
|
||||
:template ("g" "Tagged" entry (file "~/org/inbox.org")
|
||||
"* TODO %^{Title} %^{Tags}g\n"
|
||||
:immediate-finish t)
|
||||
:prompts (("Title" :type string :required t)
|
||||
("Tags" :type tags :required nil)))))
|
||||
|
||||
;; Configure the server
|
||||
(setq org-agenda-api-port 2025)
|
||||
(setq org-agenda-api-inbox-file "~/org/inbox.org")
|
||||
|
||||
;; Start the server
|
||||
(message "Starting org-agenda-api server on port %d" org-agenda-api-port)
|
||||
(org-agenda-api-start)
|
||||
(message "org-agenda-api server started")
|
||||
@@ -1,6 +1,6 @@
|
||||
* include-file-as-forms
|
||||
We're going to use this to write separate parts of our config to different sections that will then be provided to our use package statment
|
||||
#+begin_src emacs-lisp
|
||||
#+begin_src emacs-lisp :tangle org-config.el
|
||||
(defun imalison:include-file-as-forms (filename)
|
||||
"Include the contents of FILENAME into the source as s-expressions."
|
||||
(with-temp-buffer
|
||||
@@ -15,9 +15,10 @@ We're going to use this to write separate parts of our config to different secti
|
||||
`,@(nreverse forms))))
|
||||
#+end_src
|
||||
* use-package
|
||||
#+begin_src emacs-lisp
|
||||
#+begin_src emacs-lisp :tangle org-config.el
|
||||
(defmacro imalison:org-config ()
|
||||
`(use-package org
|
||||
:ensure nil
|
||||
:commands (org-mode org org-mobile-push org-mobile-pull org-agenda)
|
||||
:mode ("\\.org\\'" . org-mode)
|
||||
:preface (progn ,@(imalison:include-file-as-forms (imalison:join-paths user-emacs-directory "org-config-preface.el")))
|
||||
@@ -28,9 +29,25 @@ We're going to use this to write separate parts of our config to different secti
|
||||
(imalison:org-config)
|
||||
#+end_src
|
||||
* My Customization Variables
|
||||
#+begin_src emacs-lisp :tangle org-config.el
|
||||
;; Load org-config-preface when org-config.el is loaded directly.
|
||||
(let ((preface (expand-file-name "org-config-preface.el" user-emacs-directory)))
|
||||
(when (file-exists-p preface)
|
||||
(load-file preface)))
|
||||
|
||||
;; Fallbacks in case preface isn't available yet.
|
||||
(unless (boundp 'imalison:org-dir)
|
||||
(defvar imalison:org-dir "~/org"))
|
||||
(unless (boundp 'imalison:created-property-string)
|
||||
(defvar imalison:created-property-string "
|
||||
:PROPERTIES:
|
||||
:ID: %(org-id-new)
|
||||
:CREATED: %U
|
||||
:END:"))
|
||||
#+end_src
|
||||
#+begin_src emacs-lisp :tangle org-config-preface.el
|
||||
(defvar imalison:org-dir "~/org")
|
||||
(defvar imalison:shared-org-dir "~/katnivan")
|
||||
(defvar imalison:shared-org-dir "~/org")
|
||||
(defvar imalison:org-whoami "Ivan Malison")
|
||||
(defvar imalison:org-people (list nil "Ivan Malison" "Kat Huang"))
|
||||
(defvar imalison:org-people-associated-states
|
||||
@@ -62,6 +79,11 @@ We're going to use this to write separate parts of our config to different secti
|
||||
(imalison:join-paths imalison:shared-org-dir "ivan_orgzly.org")
|
||||
(imalison:join-paths imalison:org-dir "orgzly.org")))
|
||||
|
||||
(defvar imalison:repeating-org-files
|
||||
(list imalison:org-habits-file imalison:shared-habits-file imalison:shared-repeating-file))
|
||||
|
||||
(defvar imalison:include-repeating-in-agenda t)
|
||||
|
||||
(defun imalison:add-to-org-agenda-files (incoming-files)
|
||||
(setq org-agenda-files
|
||||
(delete-dups
|
||||
@@ -71,6 +93,7 @@ We're going to use this to write separate parts of our config to different secti
|
||||
|
||||
(defvar imalison:created-property-string "
|
||||
:PROPERTIES:
|
||||
:ID: %(org-id-new)
|
||||
:CREATED: %U
|
||||
:END:")
|
||||
#+end_src
|
||||
@@ -91,7 +114,7 @@ We're going to use this to write separate parts of our config to different secti
|
||||
#+end_src
|
||||
* Org Variable Customization
|
||||
#+begin_src emacs-lisp :tangle org-config-custom.el
|
||||
(org-agenda-log-mode-items '(closed))
|
||||
(org-agenda-log-mode-items '(closed state))
|
||||
(org-agenda-skip-deadline-if-done t)
|
||||
(org-agenda-skip-scheduled-if-done t)
|
||||
(org-agenda-span 10)
|
||||
@@ -199,6 +222,35 @@ We're going to use this to write separate parts of our config to different secti
|
||||
((current-time (&rest args) time))
|
||||
(funcall fn)))
|
||||
#+end_src
|
||||
** Reschedule Past Items to Today
|
||||
This function finds all incomplete items in the agenda files that are scheduled
|
||||
in the past and reschedules them to today. Useful for catching up on tasks that
|
||||
have slipped past their original scheduled date.
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(defun imalison:reschedule-past-to-today ()
|
||||
"Reschedule all incomplete items scheduled in the past to today.
|
||||
Iterates through all org-agenda files and reschedules any TODO items
|
||||
that have a SCHEDULED date before today to the current date."
|
||||
(interactive)
|
||||
(let* ((today-time (org-time-string-to-time (format-time-string "<%Y-%m-%d>")))
|
||||
(rescheduled-count 0))
|
||||
(org-map-entries
|
||||
(lambda ()
|
||||
(let* ((scheduled (org-entry-get nil "SCHEDULED"))
|
||||
(scheduled-time (when scheduled (org-time-string-to-time scheduled))))
|
||||
(when (and scheduled-time
|
||||
(not (org-entry-is-done-p))
|
||||
(time-less-p scheduled-time today-time))
|
||||
(org-schedule nil ".")
|
||||
(cl-incf rescheduled-count))))
|
||||
nil
|
||||
'agenda)
|
||||
(message "Rescheduled %d items to today" rescheduled-count)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: imalison:reschedule-past-to-today
|
||||
|
||||
** Miscellaneous
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(add-to-list 'org-show-context-detail '(org-goto . lineage))
|
||||
@@ -366,12 +418,13 @@ We're going to use this to write separate parts of our config to different secti
|
||||
*** Agenda Files
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(imalison:add-to-org-agenda-files
|
||||
(nconc (list imalison:org-gtd-file imalison:org-habits-file
|
||||
imalison:org-calendar-file imalison:org-inbox-file
|
||||
imalison:shared-org-gtd-file imalison:shared-habits-file
|
||||
imalison:shared-calendar-file imalison:shared-shopping-file
|
||||
imalison:shared-repeating-file)
|
||||
(nconc (list imalison:org-gtd-file imalison:org-calendar-file
|
||||
imalison:org-inbox-file imalison:shared-org-gtd-file
|
||||
imalison:shared-calendar-file imalison:shared-shopping-file)
|
||||
imalison:orgzly-files))
|
||||
|
||||
(when imalison:include-repeating-in-agenda
|
||||
(imalison:add-to-org-agenda-files imalison:repeating-org-files))
|
||||
#+end_src
|
||||
*** Predicates
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
@@ -464,7 +517,11 @@ We're going to use this to write separate parts of our config to different secti
|
||||
(missing-priority
|
||||
'(tags-todo "-PRIORITY={.}/!"
|
||||
((org-agenda-overriding-header
|
||||
"These don't have priorities:")))))
|
||||
"These don't have priorities:"))))
|
||||
(high-priority-unscheduled
|
||||
'(tags-todo "+PRIORITY<\"C\"-SCHEDULED={.}-DEADLINE={.}/!"
|
||||
((org-agenda-overriding-header
|
||||
"High priority without scheduled/deadline:")))))
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
`(("M" "Main agenda view"
|
||||
@@ -493,7 +550,12 @@ We're going to use this to write separate parts of our config to different secti
|
||||
((org-agenda-overriding-header "Completion History:")
|
||||
(org-agenda-ndays 5)
|
||||
(org-agenda-entry-types '(:none))
|
||||
(org-agenda-start-with-log-mode '(state))))))))
|
||||
(org-agenda-start-with-log-mode '(state)))))
|
||||
,(cons "i" (cons "Inbox" inbox))
|
||||
,(cons "n" (cons "Next" next))
|
||||
("w" "Wait" todo "WAIT"
|
||||
((org-agenda-overriding-header "Waiting:")))
|
||||
,(cons "u" (cons "High priority unscheduled" high-priority-unscheduled)))))
|
||||
#+end_src
|
||||
*** Filters
|
||||
**** Regexp Presets
|
||||
@@ -556,6 +618,7 @@ specific time, they should appear in the agenda at that time!
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(insert content)
|
||||
(org-set-property "ID" (org-id-new))
|
||||
(org-set-property "CREATED"
|
||||
(with-temp-buffer
|
||||
(org-insert-time-stamp
|
||||
@@ -572,6 +635,7 @@ specific time, they should appear in the agenda at that time!
|
||||
(org-insert-heading)
|
||||
(insert content)
|
||||
(org-todo creation-state)
|
||||
(org-set-property "ID" (org-id-new))
|
||||
(org-set-property "CREATED"
|
||||
(with-temp-buffer
|
||||
(org-insert-time-stamp
|
||||
@@ -588,10 +652,47 @@ specific time, they should appear in the agenda at that time!
|
||||
(defun imalison:make-org-linked-todo-template ()
|
||||
(imalison:make-org-todo-template "[#C] %? %A"))
|
||||
#+end_src
|
||||
*** Journal
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(defun imalison:journal-filepath-for-date (&optional date)
|
||||
(interactive (list (org-read-date)))
|
||||
(let ((date-str (or date (format-time-string "%Y-%m-%d"))))
|
||||
(imalison:join-paths
|
||||
org-directory "journal" (concat date-str ".org"))))
|
||||
|
||||
(defun imalison:open-todays-org-journal ()
|
||||
(interactive)
|
||||
(imalison:open-org-journal (format-time-string "%Y-%m-%d")))
|
||||
|
||||
(defvar imalison:journal-template-filepath
|
||||
(imalison:join-paths org-directory "capture-templates" "journal.org"))
|
||||
|
||||
(defun imalison:get-journal-template ()
|
||||
(with-temp-buffer
|
||||
(insert-file-contents imalison:journal-template-filepath)
|
||||
(buffer-string)))
|
||||
|
||||
(defun imalison:open-org-journal (&optional date)
|
||||
(interactive (list (org-read-date nil nil nil "Select a date:")))
|
||||
(let* ((filepath (imalison:journal-filepath-for-date date))
|
||||
(file-existed (file-exists-p filepath))
|
||||
(date-str (or date (format-time-string "%Y-%m-%d")))
|
||||
(time-vals (append '(0 0 0) (nthcdr 3 (parse-time-string date-str))))
|
||||
(original-format-time-string (symbol-function 'format-time-string)))
|
||||
(find-file filepath)
|
||||
(when (not file-existed)
|
||||
(cl-letf (((symbol-function 'format-time-string)
|
||||
(lambda (format-string &optional _time _universal)
|
||||
(funcall original-format-time-string format-string (apply #'encode-time time-vals)))))
|
||||
(insert (org-capture-fill-template (imalison:get-journal-template)))))))
|
||||
|
||||
(bind-key "C-c j" 'imalison:open-todays-org-journal)
|
||||
#+end_src
|
||||
|
||||
*** Templates
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(use-package org-capture
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:config
|
||||
(add-to-list 'org-capture-templates
|
||||
`("t" "GTD Todo (Linked)" entry (file ,imalison:org-gtd-file)
|
||||
@@ -624,9 +725,25 @@ specific time, they should appear in the agenda at that time!
|
||||
"* TODO
|
||||
SCHEDULED: %^t
|
||||
:PROPERTIES:
|
||||
:ID: %(org-id-new)
|
||||
:CREATED: %U
|
||||
:STYLE: habit
|
||||
:END:")))
|
||||
:END:"))
|
||||
(add-to-list 'org-capture-templates
|
||||
'("w" "Weekly Planning and Self Assesment"
|
||||
plain
|
||||
(function (lambda ()
|
||||
(find-file (let ((date (format-time-string "%Y-%m-%d")))
|
||||
(expand-file-name (concat date ".org")
|
||||
"~/org/weekly")))))
|
||||
(file "~/org/capture-templates/weekly.org")))
|
||||
(add-to-list 'org-capture-templates
|
||||
`("n" "Next (Scheduled Today)" entry (file ,imalison:org-gtd-file)
|
||||
,(format "%s%s\n%s" "* NEXT %?" imalison:created-property-string
|
||||
"SCHEDULED: %(format-time-string \"<%Y-%m-%d %a>\")")))
|
||||
(add-to-list 'org-capture-templates
|
||||
`("i" "Inbox" entry (file ,imalison:org-gtd-file)
|
||||
(function (lambda (&rest args) (imalison:make-org-todo-template :creation-state "INBOX"))))))
|
||||
#+end_src
|
||||
** Babel
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
@@ -661,6 +778,7 @@ SCHEDULED: %^t
|
||||
Note that this does not go into org-config-config.el. This is on purpose
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:after frame-mode
|
||||
:config
|
||||
(progn
|
||||
@@ -674,7 +792,7 @@ Note that this does not go into org-config-config.el. This is on purpose
|
||||
** Disable yasnippet in org-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package org
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:config
|
||||
(progn
|
||||
(defun imalison:disable-yas ()
|
||||
@@ -685,6 +803,7 @@ Note that this does not go into org-config-config.el. This is on purpose
|
||||
This was taken from [[http://emacs.stackexchange.com/questions/3374/set-the-background-of-org-exported-code-blocks-according-to-theme][here]].
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:config
|
||||
(progn
|
||||
(defun imalison:org-inline-css-hook (exporter)
|
||||
@@ -732,7 +851,7 @@ This function replaces the default naming scheme with a call to
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ox
|
||||
:defer t
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:config
|
||||
(defun org-export-get-reference (datum info)
|
||||
"Return a unique reference for DATUM, as a string.
|
||||
@@ -760,7 +879,7 @@ alphanumeric characters only."
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ox-html
|
||||
:commands (org-html-export-as-html org-html-export-as-html)
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:preface
|
||||
(progn
|
||||
(defvar imalison:link-svg-html
|
||||
@@ -792,7 +911,7 @@ alphanumeric characters only."
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ox-html
|
||||
:defer t
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:config
|
||||
(setq org-html-inline-image-rules
|
||||
'(("file" . "\\.\\(jpeg\\|jpg\\|png\\|gif\\|svg\\)\\(\\?.*?\\)?\\'")
|
||||
@@ -803,7 +922,7 @@ alphanumeric characters only."
|
||||
** Use org-tempo to allow inserting templates using e.g. <s
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-tempo
|
||||
:straight nil
|
||||
:ensure nil
|
||||
:after org)
|
||||
#+end_src
|
||||
* Packages
|
||||
@@ -901,8 +1020,6 @@ alphanumeric characters only."
|
||||
:config
|
||||
(progn
|
||||
(when (version<= "29.0" emacs-version)
|
||||
(use-package emacsql-sqlite-builtin
|
||||
:demand t)
|
||||
(setq org-roam-database-connector 'sqlite-builtin))
|
||||
(org-roam-db-autosync-mode +1)
|
||||
|
||||
@@ -924,22 +1041,22 @@ alphanumeric characters only."
|
||||
((get-buffer org-roam-buffer) 'exists)
|
||||
(t 'none)))
|
||||
|
||||
(use-package frame-mode
|
||||
:if imalison:use-frame-mode
|
||||
:demand t
|
||||
:config
|
||||
(progn
|
||||
(emit-variable-set-mode
|
||||
imalison:org-roam-set-frame-visibility-mode
|
||||
org-roam-buffer-visibility-fn 'imalison:org-roam-frame-based-buffer-visibility-fn)
|
||||
(emit-make-mode-dependent imalison:org-roam-set-frame-visibility-mode frame-mode))))
|
||||
;; org-roam-buffer-visibility-fn was removed in newer org-roam versions
|
||||
(when (and imalison:use-frame-mode (boundp 'org-roam-buffer-visibility-fn))
|
||||
(require 'frame-mode)
|
||||
(emit-variable-set-mode
|
||||
imalison:org-roam-set-frame-visibility-mode
|
||||
org-roam-buffer-visibility-fn 'imalison:org-roam-frame-based-buffer-visibility-fn)
|
||||
(emit-make-mode-dependent imalison:org-roam-set-frame-visibility-mode frame-mode)))
|
||||
:custom
|
||||
(org-roam-directory (file-truename "~/org/roam/")))
|
||||
#+end_src
|
||||
***** ui
|
||||
#+begin_src emacs-lisp
|
||||
(use-package emacs-http-server
|
||||
:demand t)
|
||||
(use-package simple-httpd
|
||||
:ensure (:host github :repo "skeeto/emacs-web-server"
|
||||
:local-repo "simple-httpd"
|
||||
:files ("simple-httpd.el")))
|
||||
|
||||
(use-package org-roam-ui
|
||||
:after org-roam
|
||||
@@ -1004,7 +1121,7 @@ alphanumeric characters only."
|
||||
:config
|
||||
(progn
|
||||
(require 'org-fc-hydra))
|
||||
:straight (org-fc :type git :host github :repo "l3kn/org-fc"
|
||||
:ensure (:host github :repo "l3kn/org-fc"
|
||||
:files ("*.el" "awk" "demo.org")))
|
||||
#+end_src
|
||||
** org-ql
|
||||
@@ -1017,11 +1134,10 @@ alphanumeric characters only."
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-window-habit
|
||||
:demand t
|
||||
:straight
|
||||
(org-window-habit
|
||||
:repo "colonelpanic8/org-window-habit"
|
||||
:ensure
|
||||
(:repo "colonelpanic8/org-window-habit"
|
||||
:host github
|
||||
:files ("org-window-habit.el"))
|
||||
:files (:defaults "*.el"))
|
||||
:custom
|
||||
((org-window-habit-property-prefix nil)
|
||||
(org-window-habit-repeat-to-scheduled t)
|
||||
|
||||
5
dotfiles/emacs.d/snippets/python-mode/ign
Normal file
5
dotfiles/emacs.d/snippets/python-mode/ign
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ign
|
||||
# key: ign
|
||||
# --
|
||||
# type: ignore
|
||||
5
dotfiles/emacs.d/snippets/python-mode/inp
Normal file
5
dotfiles/emacs.d/snippets/python-mode/inp
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: inp
|
||||
# key: inp
|
||||
# --
|
||||
import numpy as np
|
||||
5
dotfiles/emacs.d/snippets/python-mode/isa
Normal file
5
dotfiles/emacs.d/snippets/python-mode/isa
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: isa
|
||||
# key: isa
|
||||
# --
|
||||
import sqlalchemy as sa
|
||||
5
dotfiles/emacs.d/snippets/python-mode/logg
Normal file
5
dotfiles/emacs.d/snippets/python-mode/logg
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: logg
|
||||
# key: logg
|
||||
# --
|
||||
logger = logging.getLogger(__name__)
|
||||
5
dotfiles/emacs.d/snippets/python-mode/noqa
Normal file
5
dotfiles/emacs.d/snippets/python-mode/noqa
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: 401
|
||||
# key: 401
|
||||
# --
|
||||
# noqa: F401
|
||||
@@ -24,7 +24,6 @@ pom.xml
|
||||
TAGS
|
||||
|
||||
# Vim
|
||||
*.sw*
|
||||
*.tmp*
|
||||
|
||||
# JavaScript
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
binding "gtk-emacs-text-entry"
|
||||
{
|
||||
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) }
|
||||
}
|
||||
|
||||
gtk-theme-name="Paper"
|
||||
gtk-icon-theme-name="Paper"
|
||||
gtk-font-name="Roboto 11"
|
||||
gtk-cursor-theme-name="Paper"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintfull"
|
||||
|
||||
164
dotfiles/lib/bin/brightness.hs
Executable file
164
dotfiles/lib/bin/brightness.hs
Executable file
@@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env runhaskell
|
||||
|
||||
import System.Environment (getArgs)
|
||||
import System.Process
|
||||
import System.Exit
|
||||
import Data.List (isPrefixOf, isSuffixOf)
|
||||
import Data.Maybe (mapMaybe, fromMaybe)
|
||||
import Text.Read (readMaybe)
|
||||
import Control.Monad (forM, when)
|
||||
import Data.Time.Clock
|
||||
import Data.Time.Format
|
||||
import System.IO
|
||||
|
||||
-- Types
|
||||
data Device = Device { deviceName :: String, deviceBrightness :: Int }
|
||||
deriving (Show)
|
||||
|
||||
data BrightnessCommand = Absolute Int | Increase Int | Decrease Int | Query
|
||||
deriving (Show)
|
||||
|
||||
-- Logging
|
||||
logAction :: String -> IO ()
|
||||
logAction arg = do
|
||||
time <- getCurrentTime
|
||||
let timeStr = formatTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" time
|
||||
ppid <- readProcess "sh" ["-c", "ps -p $PPID -o comm= 2>/dev/null || echo unknown"] ""
|
||||
pwd <- readProcess "pwd" [] ""
|
||||
let logEntry = "[" ++ timeStr ++ "] Called with: '" ++ arg ++ "' | Parent: " ++
|
||||
filter (/= '\n') ppid ++ " | PWD: " ++ filter (/= '\n') pwd ++ "\n"
|
||||
appendFile "/tmp/brightness.log" logEntry
|
||||
|
||||
-- Parse command line argument
|
||||
parseArg :: String -> BrightnessCommand
|
||||
parseArg "" = Query
|
||||
parseArg ('+':rest) = case readMaybe rest of
|
||||
Just n -> Increase n
|
||||
Nothing -> Query
|
||||
parseArg ('-':rest) = case readMaybe rest of
|
||||
Just n -> Decrease n
|
||||
Nothing -> Query
|
||||
parseArg s = case readMaybe s of
|
||||
Just n -> Absolute n
|
||||
Nothing -> Query
|
||||
|
||||
-- Get list of backlight devices
|
||||
getBacklightDevices :: IO [String]
|
||||
getBacklightDevices = do
|
||||
output <- readProcess "brightnessctl" ["--list"] ""
|
||||
return $ mapMaybe extractDevice (lines output)
|
||||
where
|
||||
extractDevice line
|
||||
| "Device '" `isInfixOf` line && "class 'backlight'" `isInfixOf` line =
|
||||
let afterDevice = drop (length "Device '") line
|
||||
deviceName = takeWhile (/= '\'') afterDevice
|
||||
in if null deviceName then Nothing else Just deviceName
|
||||
| otherwise = Nothing
|
||||
|
||||
-- Get brightness percentage for a device
|
||||
getDeviceBrightness :: String -> IO (Maybe Int)
|
||||
getDeviceBrightness device = do
|
||||
output <- readProcess "brightnessctl" ["-d", device] ""
|
||||
return $ extractPercentage output
|
||||
where
|
||||
extractPercentage s = case dropWhile (/= '(') s of
|
||||
('(':rest) -> readMaybe (takeWhile (/= '%') rest)
|
||||
_ -> Nothing
|
||||
|
||||
-- Set brightness for a device
|
||||
setDeviceBrightness :: String -> String -> IO ()
|
||||
setDeviceBrightness device cmd = do
|
||||
_ <- readProcess "brightnessctl" ["-d", device, "set", cmd] ""
|
||||
return ()
|
||||
|
||||
-- Build brightness command string
|
||||
buildCommand :: BrightnessCommand -> String
|
||||
buildCommand (Absolute n) = show n ++ "%"
|
||||
buildCommand (Increase n) = show n ++ "%+"
|
||||
buildCommand (Decrease n) = show n ++ "%-"
|
||||
buildCommand Query = ""
|
||||
|
||||
-- Apply brightness change to all devices
|
||||
applyBrightness :: BrightnessCommand -> IO ()
|
||||
applyBrightness Query = return ()
|
||||
applyBrightness cmd = do
|
||||
devices <- getBacklightDevices
|
||||
let cmdStr = buildCommand cmd
|
||||
|
||||
-- Log what we're about to do
|
||||
appendFile "/tmp/brightness.log" $
|
||||
" Applying: " ++ cmdStr ++ " to devices: " ++ show devices ++ "\n"
|
||||
|
||||
-- Apply to all devices
|
||||
mapM_ (\dev -> setDeviceBrightness dev cmdStr) devices
|
||||
|
||||
-- Sync devices if needed
|
||||
when (length devices > 1) $ do
|
||||
brightnesses <- forM devices $ \dev -> do
|
||||
mbBright <- getDeviceBrightness dev
|
||||
return (dev, mbBright)
|
||||
|
||||
let validBrightnesses = [(d, b) | (d, Just b) <- brightnesses]
|
||||
when (not $ null validBrightnesses) $ do
|
||||
let values = map snd validBrightnesses
|
||||
maxBright = maximum values
|
||||
minBright = minimum values
|
||||
|
||||
-- If devices are out of sync
|
||||
when (maxBright /= minBright) $ do
|
||||
-- Use minimum when brightness is low (15% or below)
|
||||
let syncValue = if maxBright <= 15 then minBright else maxBright
|
||||
-- Log sync decision for debugging
|
||||
appendFile "/tmp/brightness.log" $
|
||||
" Syncing: max=" ++ show maxBright ++ "%, min=" ++ show minBright ++
|
||||
"%, using=" ++ show syncValue ++ "%\n"
|
||||
mapM_ (\dev -> setDeviceBrightness dev (show syncValue ++ "%")) devices
|
||||
|
||||
-- Get average brightness across all devices
|
||||
getAverageBrightness :: IO Int
|
||||
getAverageBrightness = do
|
||||
devices <- getBacklightDevices
|
||||
if null devices
|
||||
then return 50 -- Default fallback
|
||||
else do
|
||||
brightnesses <- forM devices getDeviceBrightness
|
||||
let validValues = [b | Just b <- brightnesses]
|
||||
if null validValues
|
||||
then return 50
|
||||
else return $ sum validValues `div` length validValues
|
||||
|
||||
-- Send notification using rumno if available
|
||||
sendNotification :: Int -> IO ()
|
||||
sendNotification brightness = do
|
||||
rumnoExists <- (== ExitSuccess) <$>
|
||||
rawSystem "sh" ["-c", "command -v rumno >/dev/null 2>&1"]
|
||||
if rumnoExists
|
||||
then do
|
||||
_ <- readProcess "rumno" ["notify", "-b", show brightness] ""
|
||||
return ()
|
||||
else putStrLn (show brightness)
|
||||
|
||||
-- Check if a string contains another
|
||||
isInfixOf :: String -> String -> Bool
|
||||
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
|
||||
where
|
||||
tails [] = [[]]
|
||||
tails xs@(_:xs') = xs : tails xs'
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
let arg = case args of
|
||||
[] -> ""
|
||||
(x:_) -> x
|
||||
|
||||
-- Log the invocation
|
||||
logAction arg
|
||||
|
||||
-- Parse and apply command
|
||||
let cmd = parseArg arg
|
||||
applyBrightness cmd
|
||||
|
||||
-- Get current brightness and notify
|
||||
brightness <- getAverageBrightness
|
||||
sendNotification brightness
|
||||
@@ -1,3 +1,92 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
volnoti-show $(sudo brightness_manager.py -c "$@" -p)
|
||||
# Get the brightness argument (default to empty string to just show current)
|
||||
ARG="${1:-}"
|
||||
|
||||
# Log the incoming arguments for debugging
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] brightness.sh called with: '$ARG' (all args: $@)" >> /tmp/brightness_bash.log
|
||||
|
||||
# Function to get current brightness percentage
|
||||
get_brightness_percentage() {
|
||||
# Get list of display backlight devices only (filter by class 'backlight')
|
||||
local devices=$(brightnessctl --list 2>/dev/null | grep 'class.*backlight' | cut -d' ' -f2 | cut -d"'" -f2)
|
||||
local device_count=$(echo "$devices" | wc -w)
|
||||
|
||||
if [ "$device_count" -eq 0 ]; then
|
||||
echo "50" # Default fallback
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$device_count" -eq 1 ]; then
|
||||
# Single device - just output its percentage
|
||||
local info=$(brightnessctl 2>/dev/null | grep -oP '\d+%' | head -1 | tr -d '%')
|
||||
if [ -n "$info" ]; then
|
||||
echo "$info"
|
||||
else
|
||||
echo "50"
|
||||
fi
|
||||
else
|
||||
# Multiple devices - calculate average brightness
|
||||
local total=0
|
||||
local count=0
|
||||
for device in $devices; do
|
||||
local info=$(brightnessctl -d "$device" 2>/dev/null | grep -oP '\d+%' | head -1 | tr -d '%')
|
||||
if [ -n "$info" ]; then
|
||||
total=$((total + info))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$count" -gt 0 ]; then
|
||||
echo $((total / count))
|
||||
else
|
||||
echo "50"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Apply brightness change if argument provided
|
||||
if [ -n "$ARG" ]; then
|
||||
# Determine if it's absolute or relative
|
||||
if [[ "$ARG" == "up" ]]; then
|
||||
# Increase by 5%
|
||||
BRIGHTNESS_CMD="5%+"
|
||||
elif [[ "$ARG" == "down" ]]; then
|
||||
# Decrease by 5%
|
||||
BRIGHTNESS_CMD="5%-"
|
||||
elif [[ "$ARG" == +* ]]; then
|
||||
# Relative increase (e.g., +5)
|
||||
BRIGHTNESS_CMD="${ARG:1}%+"
|
||||
elif [[ "$ARG" == -* ]]; then
|
||||
# Relative decrease (e.g., -5)
|
||||
BRIGHTNESS_CMD="${ARG:1}%-"
|
||||
else
|
||||
# Absolute value (e.g., 50)
|
||||
BRIGHTNESS_CMD="${ARG}%"
|
||||
fi
|
||||
|
||||
# Try to apply to all devices
|
||||
# Get list of display backlight devices only (filter by class 'backlight')
|
||||
DEVICES=$(brightnessctl --list 2>/dev/null | grep 'class.*backlight' | cut -d' ' -f2 | cut -d"'" -f2)
|
||||
|
||||
if [ -n "$DEVICES" ]; then
|
||||
# Apply to each device independently without syncing
|
||||
# This allows each device to maintain its own brightness range
|
||||
for device in $DEVICES; do
|
||||
brightnessctl -d "$device" set "$BRIGHTNESS_CMD" >/dev/null 2>&1
|
||||
done
|
||||
else
|
||||
# Fallback: just run brightnessctl without specifying device
|
||||
brightnessctl set "$BRIGHTNESS_CMD" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get current brightness percentage for display
|
||||
BRIGHTNESS=$(get_brightness_percentage)
|
||||
|
||||
# Show notification if rumno is available
|
||||
if command -v rumno &> /dev/null; then
|
||||
rumno notify -b "$BRIGHTNESS"
|
||||
else
|
||||
echo "$BRIGHTNESS"
|
||||
fi
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class BrightnessManager(object):
|
||||
|
||||
@classmethod
|
||||
def find_brightness(cls):
|
||||
return cls.from_path(
|
||||
os.path.join("/sys/class/backlight", os.listdir("/sys/class/backlight")[0])
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_path(cls, path):
|
||||
return cls(
|
||||
set_brightness_filepath=os.path.join(path, "brightness"),
|
||||
actual_brightness_filepath=os.path.join(path, "actual_brightness"),
|
||||
max_brightness_filepath=os.path.join(path, "max_brightness"),
|
||||
)
|
||||
|
||||
def __init__(
|
||||
self, set_brightness_filepath, max_brightness_filepath, actual_brightness_filepath
|
||||
):
|
||||
self.set_brightness_filepath = set_brightness_filepath
|
||||
self.max_brightness_filepath = max_brightness_filepath
|
||||
self.actual_brightness_filepath = actual_brightness_filepath
|
||||
|
||||
@property
|
||||
def current_brightness(self):
|
||||
with open(self.actual_brightness_filepath) as fd:
|
||||
return int(fd.read())
|
||||
|
||||
@property
|
||||
def max_brightness(self):
|
||||
with open(self.max_brightness_filepath) as fd:
|
||||
return int(fd.read())
|
||||
|
||||
@current_brightness.setter
|
||||
def current_brightness(self, brightness):
|
||||
with open(self.set_brightness_filepath, 'w') as fd:
|
||||
fd.write(str(brightness))
|
||||
|
||||
def increment_by_proportion(self, proportion):
|
||||
new_brightness = self.current_brightness + int(self.max_brightness * proportion)
|
||||
new_brightness = min(new_brightness, self.max_brightness)
|
||||
self.current_brightness = new_brightness
|
||||
|
||||
@property
|
||||
def current_proportion(self):
|
||||
return float(self.current_brightness) / self.max_brightness
|
||||
|
||||
|
||||
def build_parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Interact with macbook brightness',
|
||||
)
|
||||
parser.add_argument(
|
||||
"--change", "-c",
|
||||
help="Change volume by the given percentage",
|
||||
default=0
|
||||
)
|
||||
parser.add_argument(
|
||||
"--print", "-p", dest="do_print",
|
||||
action='store_true',
|
||||
default=False
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = build_parser().parse_args()
|
||||
BrightnessManager.find_brightness().increment_by_proportion(float(args.change) / 100)
|
||||
if args.do_print:
|
||||
print(int(IntelBrightnessManager.current_proportion * 100))
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
import appdirs
|
||||
import argparse
|
||||
import os
|
||||
import struct
|
||||
|
||||
|
||||
clipit_history_file = os.path.join(
|
||||
appdirs.user_data_dir(), "clipit/history",
|
||||
)
|
||||
|
||||
|
||||
def get_clipit_history(filename):
|
||||
with open(filename, 'rb') as f:
|
||||
f.read(68)
|
||||
size, _ = struct.unpack('2i', f.read(8))
|
||||
while (size > 0):
|
||||
item = f.read(size)
|
||||
if item:
|
||||
yield item.decode('utf-8')
|
||||
_, _, _, size, _ = struct.unpack('5i', f.read(20))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='Lookup clipit history')
|
||||
parser.add_argument(
|
||||
'--separator', '-s',
|
||||
help='the separator to use when outputting history',
|
||||
type=str,
|
||||
default='\n',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--begin-index', '-b',
|
||||
type=int,
|
||||
default=0
|
||||
)
|
||||
parser.add_argument(
|
||||
'--end-index', '-e',
|
||||
type=int,
|
||||
default=None
|
||||
)
|
||||
parser.add_argument(
|
||||
'--index', '-i',
|
||||
type=int,
|
||||
default=None
|
||||
)
|
||||
parser.add_argument(
|
||||
'--separator-replacement', '-r',
|
||||
type=str,
|
||||
default=None
|
||||
)
|
||||
args = parser.parse_args()
|
||||
if not args.separator_replacement:
|
||||
args.separator_replacement = args.separator
|
||||
history = list(get_clipit_history(clipit_history_file))
|
||||
if args.index is not None:
|
||||
text = history[args.index]
|
||||
else:
|
||||
selected = history[args.begin_index:args.end_index]
|
||||
text = args.separator.join([s.replace(args.separator, args.separator_replacement)
|
||||
for s in selected])
|
||||
print(text, end='')
|
||||
2
dotfiles/lib/bin/rofi_clipboard.sh
Executable file
2
dotfiles/lib/bin/rofi_clipboard.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
rofi -modi "clipboard:greenclip print" -show clipboard
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SELECTED_INDEX="$(clipit_history.py -r '(newline)' | rofi -dmenu -format i)"
|
||||
|
||||
if [ "$SELECTED_INDEX" -eq "$SELECTED_INDEX" ] 2>/dev/null; then
|
||||
xdotool type "$(clipit_history.py -e 5 -i $SELECTED_INDEX)"
|
||||
fi
|
||||
|
||||
xdotool type
|
||||
@@ -1,13 +1,40 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
otherinputs () {
|
||||
get_sink_input_info.hs | jq 'select(.application_process_id != "'"$1"'")'
|
||||
}
|
||||
|
||||
thePID="$(xprop _NET_WM_PID -id $(xdotool getactivewindow) | grep -Eo '[0-9]*')"
|
||||
sinkInfo="$(pashowinputbypid $thePID)"
|
||||
sinkID="$(echo $sinkInfo | jq -r .sink_input_id)"
|
||||
muted="$(echo $sinkInfo | jq -r .Mute)"
|
||||
get_active_pid () {
|
||||
if [[ "${XDG_SESSION_TYPE:-}" == "wayland" ]] && command -v hyprctl >/dev/null 2>&1; then
|
||||
hyprctl activewindow -j | jq -r '.pid'
|
||||
else
|
||||
xprop _NET_WM_PID -id "$(xdotool getactivewindow)" | grep -Eo '[0-9]*'
|
||||
fi
|
||||
}
|
||||
|
||||
get_sink_info_by_pid () {
|
||||
local pid="$1"
|
||||
if command -v pashowinputbypid >/dev/null 2>&1; then
|
||||
pashowinputbypid "$pid"
|
||||
else
|
||||
pactl -f json list sink-inputs | jq -c --arg pid "$pid" '
|
||||
.[] | select(.properties."application.process.id" == ($pid|tonumber)) |
|
||||
{ sink_input_id: .index, Mute: (if .mute then "yes" else "no" end) }
|
||||
' | head -1
|
||||
fi
|
||||
}
|
||||
|
||||
thePID="$(get_active_pid)"
|
||||
sinkInfo="$(get_sink_info_by_pid "$thePID")"
|
||||
|
||||
if [[ -z "$sinkInfo" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sinkID="$(echo "$sinkInfo" | jq -r .sink_input_id)"
|
||||
muted="$(echo "$sinkInfo" | jq -r .Mute)"
|
||||
if [[ $muted == *"no"* ]]; then
|
||||
newState="1"
|
||||
else
|
||||
@@ -16,7 +43,7 @@ fi
|
||||
|
||||
echo "$sinkID"
|
||||
|
||||
if [[ $1 == *"only"* ]]; then
|
||||
if [[ "${1:-}" == *"only"* ]]; then
|
||||
pactl set-sink-input-mute "$sinkID" 0
|
||||
otherinputs "$thePID" | jq -r .sink_input_id | xargs -I theid sh -c 'pactl set-sink-input-mute theid 1'
|
||||
else
|
||||
|
||||
18
dotfiles/lib/functions/codex_tmux
Executable file
18
dotfiles/lib/functions/codex_tmux
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function codex_tmux {
|
||||
base=$(basename "$PWD")
|
||||
name="$base"
|
||||
|
||||
if tmux has-session -t "$name" 2>/dev/null; then
|
||||
i=2
|
||||
while tmux has-session -t "${name}-${i}" 2>/dev/null; do
|
||||
i=$((i+1))
|
||||
done
|
||||
name="${name}-${i}"
|
||||
fi
|
||||
|
||||
tmux new-session -s "$name" -c "$PWD" codex --dangerously-bypass-approvals-and-sandbox "$@"
|
||||
}
|
||||
|
||||
codex_tmux "$@"
|
||||
7
dotfiles/lib/functions/ns
Executable file
7
dotfiles/lib/functions/ns
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function ns {
|
||||
sk --ansi -i -c 'nix-search "{}"' | get_cols 1
|
||||
}
|
||||
|
||||
ns "$@"
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
function pashowvolume {
|
||||
if paismuted; then
|
||||
volnoti-show -m
|
||||
rumno notify -m
|
||||
else
|
||||
actual=$(pavolume)
|
||||
max=100
|
||||
show=$(( actual < max ? actual : max ))
|
||||
volnoti-show "$show"
|
||||
rumno notify -v "$show"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
18
dotfiles/lib/functions/passgen
Normal file
18
dotfiles/lib/functions/passgen
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function passgen {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: passgen <pass-entry-name>" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local base_pass upper symbol password
|
||||
base_pass="$(xkcdpass -n 3 | tr -d ' ')"
|
||||
upper="$(echo {A..Z} | tr ' ' '\n' | shuf -n1)"
|
||||
symbol="$(echo '!@#$%^&*' | fold -w1 | shuf -n1)"
|
||||
password="${base_pass}${upper}${symbol}"
|
||||
|
||||
echo "$password" | pass insert -e "$1"
|
||||
}
|
||||
|
||||
passgen
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function pavolume {
|
||||
pacmd list-sinks |
|
||||
awk '/^\s+name: /{indefault = $2 == "<'"$(pasink)"'>"}
|
||||
/^\s+volume: / && indefault {print $5; exit}' | grep -Eo "[0-9]*"
|
||||
pactl get-sink-volume $(pactl get-default-sink) | FS="/" get_cols 2 | grep -oE '[0-9]*'
|
||||
}
|
||||
|
||||
pavolume
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function set_volume {
|
||||
current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs)
|
||||
environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default"
|
||||
|
||||
# XXX: this does not prevent volumes higher than 100
|
||||
pulsemixer "$@"
|
||||
pashowvolume
|
||||
}
|
||||
|
||||
31
dotfiles/lib/functions/tn
Executable file
31
dotfiles/lib/functions/tn
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function tn {
|
||||
if [ -z "$TMUX" ]; then
|
||||
echo "Not in a tmux session"
|
||||
return 1
|
||||
fi
|
||||
|
||||
base=$(basename "$PWD")
|
||||
current=$(tmux display-message -p '#{session_name}')
|
||||
|
||||
# Don't rename if already named correctly
|
||||
if [ "$current" = "$base" ]; then
|
||||
echo "Session already named '$base'"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if tmux has-session -t "$base" 2>/dev/null; then
|
||||
i=2
|
||||
while tmux has-session -t "${base}-${i}" 2>/dev/null; do
|
||||
i=$((i+1))
|
||||
done
|
||||
tmux rename-session "${base}-${i}"
|
||||
echo "Renamed session to '${base}-${i}'"
|
||||
else
|
||||
tmux rename-session "$base"
|
||||
echo "Renamed session to '$base'"
|
||||
fi
|
||||
}
|
||||
|
||||
tn "$@"
|
||||
@@ -13,7 +13,7 @@ section: aliases
|
||||
tv:
|
||||
imalison-arch
|
||||
imalison-desktop
|
||||
imalison-home
|
||||
imalison-home justin-bieber-creek
|
||||
controlling:
|
||||
uber-loaner
|
||||
imalison-mpb-arch
|
||||
@@ -22,4 +22,5 @@ section: aliases
|
||||
kat-uber-loaner
|
||||
Dean-PC
|
||||
imalison-mbp
|
||||
strixi-minaj
|
||||
end
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Create a new Codex session from the current pane path and switch to it.
|
||||
# Prefix + C starts a new session without prompting for a name.
|
||||
bind-key C new-session -c '#{pane_current_path}' 'codex --dangerously-bypass-approvals-and-sandbox'
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Local compilation script for generating HTML from README.org
|
||||
# Note: For CI, this is now handled by GitHub Actions (.github/workflows/gh-pages.yml)
|
||||
|
||||
set -e
|
||||
|
||||
export PATH="$HOME/.cask/bin:$HOME/.evm/bin:$PATH"
|
||||
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
TARGET=$(readlink -f "$THIS_DIR/../dotfiles/emacs.d/README.org")
|
||||
# Use system emacs or EMACS environment variable
|
||||
EMACS="${EMACS:-emacs}"
|
||||
|
||||
git clone https://github.com/rejeep/evm.git "$HOME/.evm"
|
||||
evm config path /tmp
|
||||
evm install emacs-25.1-travis --use --skip
|
||||
export EMACS="$(evm bin)"
|
||||
cd "$THIS_DIR"
|
||||
|
||||
git clone https://github.com/cask/cask
|
||||
export PATH=$(pwd)/cask/bin:$PATH
|
||||
# Install cask dependencies if needed
|
||||
if [ ! -d ".cask" ]; then
|
||||
cask install
|
||||
fi
|
||||
|
||||
cask install
|
||||
# Generate HTML
|
||||
cask exec "$EMACS" --script generate-html.el
|
||||
|
||||
# Move the generated file
|
||||
mv "$THIS_DIR/../dotfiles/emacs.d/README.html" .
|
||||
|
||||
echo "Generated README.html in $THIS_DIR"
|
||||
|
||||
@@ -1,68 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# This approach was adapted from https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
||||
# DEPRECATED: This script was used for Travis CI deployments.
|
||||
# Deployment is now handled by GitHub Actions (.github/workflows/gh-pages.yml)
|
||||
#
|
||||
# This script is kept for reference only.
|
||||
# See: https://github.com/IvanMalison/dotfiles/blob/master/.github/workflows/gh-pages.yml
|
||||
|
||||
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $THIS_DIR
|
||||
|
||||
git config --global user.name "$COMMIT_AUTHOR_NAME"
|
||||
git config --global user.email "$COMMIT_AUTHOR_EMAIL"
|
||||
|
||||
set -e # Exit with nonzero exit code if anything fails
|
||||
|
||||
SOURCE_BRANCH="master"
|
||||
TARGET_BRANCH="gh-pages"
|
||||
|
||||
function doCompile {
|
||||
./compile.sh
|
||||
}
|
||||
|
||||
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
|
||||
echo "Skipping deploy; just doing a build."
|
||||
doCompile
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Save some useful information
|
||||
REPO=`git config remote.origin.url`
|
||||
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
||||
SHA=`git rev-parse --verify HEAD`
|
||||
|
||||
# Run our compile script
|
||||
doCompile
|
||||
|
||||
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
|
||||
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
|
||||
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
|
||||
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
|
||||
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
|
||||
|
||||
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in deploy_key.enc -out deploy_key -d
|
||||
chmod 600 deploy_key
|
||||
eval `ssh-agent -s`
|
||||
ssh-add deploy_key
|
||||
|
||||
# Clone the existing gh-pages for this repo into out/
|
||||
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
|
||||
git clone $REPO out
|
||||
cd out
|
||||
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
|
||||
|
||||
# Clean out existing contents
|
||||
git ls-files | xargs rm -rf
|
||||
|
||||
mv ../README.html ./index.html
|
||||
|
||||
# Commit the "changes", i.e. the new version.
|
||||
# The delta will show diffs between new and old versions.
|
||||
git add --all .
|
||||
git commit -m "Deploy to GitHub Pages: ${SHA}"
|
||||
|
||||
git fetch origin master
|
||||
|
||||
if [ "$(git rev-parse origin/master)" == "$SHA" ]; then
|
||||
git push "$SSH_REPO" "$TARGET_BRANCH"
|
||||
else
|
||||
echo "The commit this build was started for is not the one on master. Doing nothing."
|
||||
fi
|
||||
echo "ERROR: This script is deprecated."
|
||||
echo "Deployment is now handled by GitHub Actions."
|
||||
echo "See: .github/workflows/gh-pages.yml"
|
||||
exit 1
|
||||
|
||||
Binary file not shown.
@@ -19,12 +19,9 @@
|
||||
(require 's)
|
||||
(org-babel-tangle-file readme-src)
|
||||
|
||||
;; This makes it so that any dependencies specified with :straight, will
|
||||
;; actually just be installed with the default melpa use-package ensure logic.
|
||||
(defalias 'use-package-handler/:straight
|
||||
#'use-package-handler/:ensure)
|
||||
(add-to-list 'use-package-keywords :straight)
|
||||
|
||||
(require 'cl-lib)
|
||||
(load-file (concat emacs-dir "org-config-bootstrap.el"))
|
||||
(org-babel-tangle-file (concat emacs-dir "org-config.org"))
|
||||
(load-file (concat emacs-dir "org-config.el"))
|
||||
|
||||
(defun export-target (target)
|
||||
|
||||
403
nix-darwin/flake.lock
generated
Normal file
403
nix-darwin/flake.lock
generated
Normal file
@@ -0,0 +1,403 @@
|
||||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707830867,
|
||||
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763638478,
|
||||
"narHash": "sha256-n/IMowE9S23ovmTkKX7KhxXC2Yq41EAVFR2FBIXPcT8=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "fbfdbaba008189499958a7aeb1e2c36ab10c067d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "5.0.3",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"claude-code-nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770168651,
|
||||
"narHash": "sha256-SxzTEu49iaAA/nAT28Rsr4BmjC3eCkiaM4/ZYBVhhNQ=",
|
||||
"owner": "sadjow",
|
||||
"repo": "claude-code-nix",
|
||||
"rev": "f256f48c037a6e54afa332795328f753f2fafbaf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sadjow",
|
||||
"repo": "claude-code-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"codex-cli-nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770232831,
|
||||
"narHash": "sha256-C5e2wjd//pLJA1LqSYc/y9aZkM8wmZo/BAuzhZDuyFE=",
|
||||
"owner": "sadjow",
|
||||
"repo": "codex-cli-nix",
|
||||
"rev": "64805eb1d1afffcbbcef0ffc053295f0065cd51d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sadjow",
|
||||
"repo": "codex-cli-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767930051,
|
||||
"narHash": "sha256-YXtqo8h5bAbqC64XAPMMsZdYk8XkwkyNj/7XOsIyVf8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "297a08510894822ddd93ee2cfc66d6ac65a3cebb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703113217,
|
||||
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-cask": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767937441,
|
||||
"narHash": "sha256-hiGvxqI6npGOAnNwMXkF1628IkyKhhYsAqO5kmSAuqM=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"rev": "cc94d21fe7abb3cc93db50671bf5048176711be9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-core": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767948289,
|
||||
"narHash": "sha256-a6s+kRHOXRq4QoA4bDLZVKpC1woi6tTRqEt8Vk0ikGo=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"rev": "f268dcd932823c65f8feb2cfc533300ccbcc4541",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767718503,
|
||||
"narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764473698,
|
||||
"narHash": "sha256-C91gPgv6udN5WuIZWNehp8qdLqlrzX6iF/YyboOj6XI=",
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "6a8ab60bfd66154feeaa1021fc3b32684814a62a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767364772,
|
||||
"narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1709703039,
|
||||
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"railbird-secrets": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766173571,
|
||||
"narHash": "sha256-iYU5oTgXkZHqkb03IDPVMHA4Yte4AFhusTem0nf7pcc=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "5b42885b7c702fb30b4678e5cb51cc8501fd7830",
|
||||
"revCount": 139,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"claude-code-nix": "claude-code-nix",
|
||||
"codex-cli-nix": "codex-cli-nix",
|
||||
"home-manager": "home-manager",
|
||||
"homebrew-cask": "homebrew-cask",
|
||||
"homebrew-core": "homebrew-core",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"railbird-secrets": "railbird-secrets"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
240
nix-darwin/flake.nix
Normal file
240
nix-darwin/flake.nix
Normal file
@@ -0,0 +1,240 @@
|
||||
{
|
||||
description = "Example Darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
railbird-secrets = {
|
||||
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
|
||||
};
|
||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||
|
||||
# Optional: Declarative tap management
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
flake = false;
|
||||
};
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
flake = false;
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
codex-cli-nix = {
|
||||
url = "github:sadjow/codex-cli-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
claude-code-nix = {
|
||||
url = "github:sadjow/claude-code-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
libDir = ../dotfiles/lib;
|
||||
configuration = { pkgs, config, ... }: {
|
||||
networking.hostName = "mac-demarco-mini";
|
||||
imports = [ (import ./gitea-actions-runner.nix) ];
|
||||
services.gitea-actions-runner = {
|
||||
user = "gitea-runner";
|
||||
instances.nix = {
|
||||
enable = true;
|
||||
name = config.networking.hostName;
|
||||
url = "https://dev.railbird.ai";
|
||||
token = "H0A7YXAWsKSp9QzvMymfJI12hbxwR7UerEHpCJUe";
|
||||
labels = [
|
||||
"nix-darwin-${pkgs.system}:host"
|
||||
"macos-aarch64-darwin"
|
||||
"nix:host"
|
||||
];
|
||||
settings = {
|
||||
cache = {
|
||||
enabled = true;
|
||||
};
|
||||
host = {
|
||||
workdir_parent = "/var/lib/gitea-runner/action-cache-dir";
|
||||
};
|
||||
};
|
||||
hostPackages = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
direnv
|
||||
gawk
|
||||
just
|
||||
git-lfs
|
||||
isort
|
||||
gitFull
|
||||
gnused
|
||||
ncdu
|
||||
nixVersions.stable
|
||||
nodejs
|
||||
openssh
|
||||
wget
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
launchd.daemons.gitea-runner-nix.serviceConfig.EnvironmentVariables = {
|
||||
XDG_CONFIG_HOME = "/var/lib/gitea-runner";
|
||||
XDG_CACHE_HOME = "/var/lib/gitea-runner/.cache";
|
||||
XDG_RUNTIME_DIR = "/var/lib/gitea-runner/tmp";
|
||||
};
|
||||
|
||||
system.primaryUser = "kat";
|
||||
|
||||
# launchd.daemons.gitea-runner-restarter = {
|
||||
# serviceConfig = {
|
||||
# ProgramArguments = [
|
||||
# "/usr/bin/env"
|
||||
# "bash"
|
||||
# "-c"
|
||||
# ''
|
||||
# SERVICE_NAME="org.nixos.gitea-runner-nix"
|
||||
# while true; do
|
||||
# # Check the second column of launchctl list output for our service
|
||||
# EXIT_CODE=$(sudo launchctl list | grep "$SERVICE_NAME" | awk '{print $2}')
|
||||
# if [ -z "$EXIT_CODE" ]; then
|
||||
# echo "$(date): $SERVICE_NAME is running correctly. Terminating the restarter."
|
||||
# exit 0
|
||||
# else
|
||||
# echo "$(date): $SERVICE_NAME is not running or in error state. Attempting to restart..."
|
||||
# sudo launchctl bootout system/$SERVICE_NAME 2>/dev/null || true
|
||||
# sudo launchctl load /Library/LaunchDaemons/$SERVICE_NAME.plist
|
||||
# sleep 2 # Give the service some time to start
|
||||
# fi
|
||||
# done
|
||||
# ''
|
||||
# ];
|
||||
# RunAtLoad = true;
|
||||
# ThrottleInterval = 300;
|
||||
# };
|
||||
# };
|
||||
|
||||
launchd.daemons.does-anything-work = {
|
||||
serviceConfig = {
|
||||
ProgramArguments = ["/usr/bin/env" "bash" "-c" "date > /var/log/does-anything-work"];
|
||||
RunAtLoad = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import ../nixos/overlay.nix)
|
||||
# Use codex and claude-code from dedicated flakes with cachix
|
||||
(final: prev: {
|
||||
codex = inputs.codex-cli-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
claude-code = inputs.claude-code-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||
})
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
#python-with-my-packages
|
||||
emacs
|
||||
alejandra
|
||||
cocoapods
|
||||
gitFull
|
||||
just
|
||||
tmux
|
||||
htop
|
||||
nodePackages.prettier
|
||||
nodejs
|
||||
ripgrep
|
||||
slack
|
||||
claude-code
|
||||
codex
|
||||
typescript
|
||||
vim
|
||||
yarn
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
launchd.user.envVariables.PATH = config.environment.systemPath;
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://codex-cli.cachix.org"
|
||||
"https://claude-code.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"codex-cli.cachix.org-1:1Br3H1hHoRYG22n//cGKJOk3cQXgYobUel6O8DgSing="
|
||||
"claude-code.cachix.org-1:YeXf2aNu7UTX8Vwrze0za1WEDS+4DuI2kVeWEE4fsRk="
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing
|
||||
system.stateVersion = 4;
|
||||
|
||||
# The platform the configuration will be used on.
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
users.users.kat.openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys;
|
||||
users.users.gitea-runner = {
|
||||
name = "gitea-runner";
|
||||
isHidden = false;
|
||||
home = "/Users/gitea-runner";
|
||||
createHome = false;
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true;
|
||||
|
||||
users.users.kat = {
|
||||
name = "kat";
|
||||
home = "/Users/kat";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
fpath+="${libDir}/functions"
|
||||
for file in "${libDir}/functions/"*
|
||||
do
|
||||
autoload "''${file##*/}"
|
||||
done
|
||||
'';
|
||||
interactiveShellInit = ''
|
||||
# eval "$(register-python-argcomplete prb)"
|
||||
# eval "$(register-python-argcomplete prod-prb)"
|
||||
# eval "$(register-python-argcomplete railbird)"
|
||||
# [ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
||||
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.kat = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations."mac-demarco-mini" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
home-manager.darwinModules.home-manager
|
||||
configuration
|
||||
];
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
darwinPackages = self.darwinConfigurations."mac-demarco-mini".pkgs;
|
||||
};
|
||||
}
|
||||
176
nix-darwin/gitea-actions-runner.nix
Normal file
176
nix-darwin/gitea-actions-runner.nix
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.gitea-actions-runner;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml {};
|
||||
|
||||
hasDockerScheme = instance:
|
||||
instance.labels == [] || any (label: hasInfix ":docker:" label) instance.labels;
|
||||
wantsContainerRuntime = any hasDockerScheme (attrValues cfg.instances);
|
||||
|
||||
hasHostScheme = instance: any (label: hasSuffix ":host" label) instance.labels;
|
||||
|
||||
tokenXorTokenFile = instance:
|
||||
(instance.token == null && instance.tokenFile != null)
|
||||
|| (instance.token != null && instance.tokenFile == null);
|
||||
in {
|
||||
options.services.gitea-actions-runner = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gitea-actions-runner;
|
||||
defaultText = literalExpression "pkgs.gitea-actions-runner";
|
||||
description = "The gitea-actions-runner package to use.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "gitea-runner";
|
||||
description = "The user account under which the Gitea Actions Runner should run.";
|
||||
};
|
||||
|
||||
instances = mkOption {
|
||||
default = {};
|
||||
description = "Gitea Actions Runner instances.";
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
enable = mkEnableOption "Gitea Actions Runner instance";
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
example = "my-runner";
|
||||
description = "The name identifying the runner instance towards the Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
example = "https://forge.example.com";
|
||||
description = "Base URL of your Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
token = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Plain token to register at the configured Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
tokenFile = mkOption {
|
||||
type = types.nullOr (types.either types.str types.path);
|
||||
default = null;
|
||||
description = "Path to a file containing the token to register at the configured Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
labels = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = ["macos:host" "x86_64:host"];
|
||||
description = "Labels used to map jobs to their runtime environment.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
description = "Configuration for `act_runner daemon`.";
|
||||
type = types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
default = {};
|
||||
};
|
||||
|
||||
hostPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
gnused
|
||||
nodejs
|
||||
wget
|
||||
openssh
|
||||
];
|
||||
description = "List of packages available to actions when the runner is configured with a host execution label.";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.instances != {}) {
|
||||
assertions = [
|
||||
{
|
||||
assertion = all tokenXorTokenFile (attrValues cfg.instances);
|
||||
message = "Instances of gitea-actions-runner can have `token` or `tokenFile`, not both.";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.${cfg.user} = {
|
||||
name = cfg.user;
|
||||
description = "Gitea Actions Runner user";
|
||||
};
|
||||
|
||||
launchd.daemons =
|
||||
(mapAttrs' (
|
||||
name: instance:
|
||||
nameValuePair "gitea-runner-${name}" {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"/usr/bin/env"
|
||||
"bash"
|
||||
"-c"
|
||||
''
|
||||
cd /var/lib/gitea-runner/${name}
|
||||
exec ${cfg.package}/bin/act_runner daemon --config ${settingsFormat.generate "config.yaml" instance.settings}
|
||||
''
|
||||
];
|
||||
KeepAlive = true;
|
||||
ThrottleInterval = 5;
|
||||
SessionCreate = true;
|
||||
UserName = cfg.user;
|
||||
GroupName = "staff";
|
||||
WorkingDirectory = "/var/lib/gitea-runner/${name}";
|
||||
EnvironmentVariables = {
|
||||
PATH = (lib.makeBinPath (instance.hostPackages ++ [cfg.package])) + ":/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
cfg.instances)
|
||||
// (mapAttrs' (
|
||||
name: instance:
|
||||
nameValuePair "gitea-runner-setup-${name}"
|
||||
{
|
||||
serviceConfig = {
|
||||
EnvironmentVariables =
|
||||
{}
|
||||
// optionalAttrs (instance.token != null) {
|
||||
TOKEN = instance.token;
|
||||
};
|
||||
RunAtLoad = true;
|
||||
ProgramArguments = [
|
||||
"${pkgs.writeShellScript "gitea-runner-setup-${name}" ''
|
||||
mkdir -p /var/lib/gitea-runner/${name}
|
||||
cd /var/lib/gitea-runner/${name}
|
||||
if [ ! -e "/var/lib/gitea-runner/${name}/.runner" ]; then
|
||||
${cfg.package}/bin/act_runner register --no-interactive \
|
||||
--instance ${escapeShellArg instance.url} \
|
||||
--token "$TOKEN" \
|
||||
--name ${escapeShellArg instance.name} \
|
||||
--labels ${escapeShellArg (concatStringsSep "," instance.labels)} \
|
||||
--config ${settingsFormat.generate "config.yaml" instance.settings}
|
||||
fi
|
||||
|
||||
# Start the runner
|
||||
chown -R ${cfg.user} /var/lib/gitea-runner
|
||||
chown -R ${cfg.user} /var/log/gitea-runner
|
||||
''}"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
cfg.instances);
|
||||
};
|
||||
}
|
||||
2
nix-darwin/justfile
Normal file
2
nix-darwin/justfile
Normal file
@@ -0,0 +1,2 @@
|
||||
switch:
|
||||
nix run nix-darwin -- switch --flake .#
|
||||
80
nixos/.claude/skills/bump-overlay-versions/SKILL.md
Normal file
80
nixos/.claude/skills/bump-overlay-versions/SKILL.md
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
name: bump-overlay-versions
|
||||
description: Use when user asks to bump, update, or upgrade claude-code or codex versions in overlay.nix, or when checking if newer versions are available
|
||||
---
|
||||
|
||||
# Bump Overlay Versions
|
||||
|
||||
## Overview
|
||||
|
||||
Updates claude-code and/or codex to latest versions in `~/dotfiles/nixos/overlay.nix`. Nix requires correct hashes which must be discovered through failed builds.
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Package | Check Latest | Hash Fields |
|
||||
|---------|--------------|-------------|
|
||||
| claude-code | `npm view @anthropic-ai/claude-code version` | `hash`, `npmDepsHash` (keep empty) |
|
||||
| codex | `curl -s "https://api.github.com/repos/openai/codex/releases/latest" \| jq -r '.tag_name'` | `hash`, `cargoHash` |
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Check Current vs Latest Versions
|
||||
|
||||
```bash
|
||||
# Current versions are in overlay.nix claudeCodeVersion and codexVersion blocks
|
||||
# Check latest:
|
||||
npm view @anthropic-ai/claude-code version
|
||||
curl -s "https://api.github.com/repos/openai/codex/releases/latest" | jq -r '.tag_name'
|
||||
# codex tag format: rust-v0.92.0 -> version is 0.92.0
|
||||
```
|
||||
|
||||
### 2. Update Version and Clear Hashes
|
||||
|
||||
In `~/dotfiles/nixos/overlay.nix`:
|
||||
|
||||
**For claude-code:**
|
||||
```nix
|
||||
claudeCodeVersion = {
|
||||
version = "X.Y.Z"; # Update to new version
|
||||
hash = ""; # Clear - will get from build error
|
||||
npmDepsHash = ""; # Keep empty (no npm deps)
|
||||
};
|
||||
```
|
||||
|
||||
**For codex:**
|
||||
```nix
|
||||
codexVersion = {
|
||||
version = "X.Y.Z"; # Update to new version (without rust-v prefix)
|
||||
hash = ""; # Clear - will get from build error
|
||||
cargoHash = ""; # Clear - will get from build error
|
||||
};
|
||||
```
|
||||
|
||||
### 3. Build to Get Hashes
|
||||
|
||||
```bash
|
||||
just switch
|
||||
```
|
||||
|
||||
The build will fail with hash mismatch errors showing the correct hash. Copy the `got:` hash value.
|
||||
|
||||
**For codex:** You'll need to run twice - once for `hash` (source), once for `cargoHash` (cargo deps).
|
||||
|
||||
### 4. Update with Correct Hashes
|
||||
|
||||
Replace empty strings with the hashes from build errors, then run `just switch` again.
|
||||
|
||||
## Enable/Disable Overrides
|
||||
|
||||
The overlay uses boolean flags - set to `false` to use nixpkgs versions instead:
|
||||
|
||||
```nix
|
||||
enableCodexOverride = true; # Set false to use nixpkgs codex
|
||||
enableClaudeCodeOverride = true; # Set false to use nixpkgs claude-code
|
||||
```
|
||||
|
||||
**Never delete the override code** - just toggle the flags.
|
||||
|
||||
## File Location
|
||||
|
||||
`~/dotfiles/nixos/overlay.nix`
|
||||
@@ -3,10 +3,7 @@
|
||||
options = {
|
||||
};
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-udev-rules
|
||||
];
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
programs.adb.enable = true;
|
||||
environment.systemPackages = [ pkgs.android-tools ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{ config, pkgs, forEachUser, makeEnable, realUsers, ... }:
|
||||
makeEnable config "modules.base" true {
|
||||
{ config, pkgs, makeEnable, realUsers, ... }:
|
||||
makeEnable config "myModules.base" true {
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"openssl-1.0.2u"
|
||||
"electron-12.2.3"
|
||||
"etcher"
|
||||
"electron-19.1.9"
|
||||
"openssl-1.1.1w"
|
||||
"electron-32.3.3"
|
||||
"etcher"
|
||||
"nix-2.16.2"
|
||||
"openssl-1.0.2u"
|
||||
"openssl-1.1.1w"
|
||||
];
|
||||
|
||||
# Disabling these waits disables the stuck on boot up issue
|
||||
@@ -29,15 +30,26 @@ makeEnable config "modules.base" true {
|
||||
'';
|
||||
|
||||
networking.firewall.enable = false;
|
||||
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
enableStrongSwan = true;
|
||||
plugins = [ pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn ];
|
||||
};
|
||||
networking.resolvconf.enable = false;
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
# Audio
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
services.pulseaudio.enable = true;
|
||||
services.pipewire = {
|
||||
enable = false;
|
||||
systemWide = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
@@ -54,22 +66,32 @@ makeEnable config "modules.base" true {
|
||||
};
|
||||
|
||||
# Update timezone automatically
|
||||
# The tzupdate.timer handles triggering with OnStartupSec=30s delay.
|
||||
# We disable the service's direct WantedBy since network-online.target
|
||||
# is reached before network is actually online (because we disable
|
||||
# NetworkManager-wait-online.service to avoid boot hangs).
|
||||
services.tzupdate.enable = true;
|
||||
systemd.services.tzupdate.wantedBy = pkgs.lib.mkForce [];
|
||||
|
||||
# TODO: Add a comment explaining what this does.
|
||||
services.locate.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
services.orca.enable = false;
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
services.logind.extraConfig = "RuntimeDirectorySize=5G";
|
||||
|
||||
# For supporting gnome stuff
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
home-manager.users = forEachUser (import ./home-manager.nix);
|
||||
nix.settings.trusted-users = realUsers;
|
||||
nix.settings.trusted-users = realUsers ++ ["gitea-runner"];
|
||||
}
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{ pkgs, inputs, config, makeEnable, ... }:
|
||||
makeEnable config "modules.ben" true {
|
||||
makeEnable config "myModules.ben" true {
|
||||
home-manager.backupFileExtension = "backup"; # Add this line
|
||||
home-manager.users.ben = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -alF";
|
||||
la = "ls -A";
|
||||
l = "ls -CF";
|
||||
la = "ls -A";
|
||||
ll = "ls -lh";
|
||||
lla = "ls -alh";
|
||||
ls = "ls --color=auto";
|
||||
gts = "git status";
|
||||
gtl = "git log";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./essential.nix
|
||||
@@ -21,7 +21,7 @@
|
||||
enable = true;
|
||||
layout = "us";
|
||||
desktopManager = {
|
||||
plasma5.enable = true;
|
||||
plasma6.enable = true;
|
||||
};
|
||||
displayManager = {
|
||||
sddm = {
|
||||
@@ -36,7 +36,7 @@
|
||||
'';
|
||||
};
|
||||
};
|
||||
nix = rec {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
@@ -97,9 +97,7 @@
|
||||
specialArgs = rec {
|
||||
inherit inputs machineNames;
|
||||
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
|
||||
mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys);
|
||||
realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"];
|
||||
forEachUser = mapValueToKeys realUsers;
|
||||
} // specialArgs // (import ../keys.nix);
|
||||
});
|
||||
in
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.modules.cache-server;
|
||||
let cfg = config.myModules.cache-server;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.cache-server = {
|
||||
myModules.cache-server = {
|
||||
enable = mkEnableOption "nix cache server";
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
{ pkgs, config, makeEnable, ... }:
|
||||
makeEnable config "modules.code" true {
|
||||
makeEnable config "myModules.code" true {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# LLM Tools
|
||||
antigravity
|
||||
claude-code
|
||||
codex
|
||||
gemini-cli
|
||||
opencode
|
||||
|
||||
# MCP
|
||||
github-mcp-server
|
||||
gitea-mcp-server
|
||||
playwright-mcp
|
||||
|
||||
# C
|
||||
clang
|
||||
|
||||
@@ -24,6 +36,8 @@ makeEnable config "modules.code" true {
|
||||
# Node
|
||||
nodePackages.npm
|
||||
nodejs
|
||||
yarn
|
||||
prettier
|
||||
|
||||
# Typescript
|
||||
typescript
|
||||
@@ -34,6 +48,7 @@ makeEnable config "modules.code" true {
|
||||
|
||||
# Rust
|
||||
rustup
|
||||
cargo-sweep
|
||||
|
||||
# Clojure
|
||||
boot
|
||||
@@ -43,8 +58,13 @@ makeEnable config "modules.code" true {
|
||||
ruby
|
||||
|
||||
# python
|
||||
poetry
|
||||
black
|
||||
poetry
|
||||
uv
|
||||
|
||||
# kotlin
|
||||
kotlin
|
||||
kotlin-language-server
|
||||
|
||||
# dhall
|
||||
haskellPackages.dhall
|
||||
@@ -58,7 +78,7 @@ makeEnable config "modules.code" true {
|
||||
nixd
|
||||
nil
|
||||
alejandra
|
||||
] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [
|
||||
] ++ (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then with pkgs; [
|
||||
# purescript
|
||||
purescript
|
||||
# Broken
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, forEachUser, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./android.nix
|
||||
@@ -17,12 +17,17 @@
|
||||
./gitea-runner.nix
|
||||
./gitea.nix
|
||||
./gnome.nix
|
||||
./home-assistant.nix
|
||||
./imalison.nix
|
||||
./internet-computer.nix
|
||||
./k3s.nix
|
||||
./kat.nix
|
||||
./keybase.nix
|
||||
./kubelet.nix
|
||||
./laptop.nix
|
||||
./nix.nix
|
||||
./nixified.ai.nix
|
||||
./nvidia.nix
|
||||
./options.nix
|
||||
./plasma.nix
|
||||
./postgres.nix
|
||||
@@ -30,11 +35,14 @@
|
||||
./secrets.nix
|
||||
./ssh.nix
|
||||
./syncthing.nix
|
||||
./tts.nix
|
||||
./user-specific.nix
|
||||
./users.nix
|
||||
./vscode.nix
|
||||
./wsl.nix
|
||||
./wyoming.nix
|
||||
./xmonad.nix
|
||||
./org-agenda-api-host.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
@@ -42,17 +50,16 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf config.features.full.enable {
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.plasma.enable = true;
|
||||
modules.gnome.enable = false;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = true;
|
||||
modules.electron.enable = true;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = true;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.plasma.enable = true;
|
||||
myModules.gnome.enable = false;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.extra.enable = true;
|
||||
myModules.electron.enable = true;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{ config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "modules.desktop" true {
|
||||
{ inputs, config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "myModules.desktop" true {
|
||||
services.greenclip.enable = true;
|
||||
imports = [
|
||||
./fonts.nix
|
||||
./hyprland.nix
|
||||
./keyd.nix
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
@@ -32,17 +35,20 @@ makeEnable config "modules.desktop" true {
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Visual notification manager
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Appearance
|
||||
gnome.adwaita-icon-theme
|
||||
adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
libsForQt5.breeze-gtk
|
||||
# libsForQt5.breeze-gtk
|
||||
# materia-theme
|
||||
numix-icon-theme-circle
|
||||
papirus-icon-theme
|
||||
|
||||
# XOrg
|
||||
autorandr
|
||||
keyd
|
||||
wmctrl
|
||||
xclip
|
||||
xdotool
|
||||
@@ -53,57 +59,59 @@ makeEnable config "modules.desktop" true {
|
||||
|
||||
# Desktop
|
||||
alacritty
|
||||
ghostty
|
||||
blueman
|
||||
clipit
|
||||
# clipit
|
||||
d-spy
|
||||
dolphin
|
||||
kdePackages.dolphin
|
||||
|
||||
feh
|
||||
firefox
|
||||
gnome.cheese
|
||||
gnome.gpaste
|
||||
kleopatra
|
||||
cheese
|
||||
kdePackages.kleopatra
|
||||
libnotify
|
||||
libreoffice
|
||||
lxappearance
|
||||
lxqt.lxqt-powermanagement
|
||||
networkmanagerapplet
|
||||
notify-osd-customizable
|
||||
okular
|
||||
picom
|
||||
pinentry
|
||||
psensor
|
||||
kdePackages.okular
|
||||
pinentry-gnome3
|
||||
# mission-center
|
||||
quassel
|
||||
remmina
|
||||
rofi
|
||||
wofi
|
||||
rofi-pass
|
||||
rofi-systemd
|
||||
shutter
|
||||
simplescreenrecorder
|
||||
skippy-xd
|
||||
synergy
|
||||
transmission-gtk
|
||||
# TODO: reenable
|
||||
# transmission_3-gtk
|
||||
vlc
|
||||
volnoti
|
||||
xfce.thunar
|
||||
zulip
|
||||
thunar
|
||||
|
||||
# Audio
|
||||
picard
|
||||
pavucontrol
|
||||
playerctl
|
||||
pulsemixer
|
||||
espeak
|
||||
|
||||
#
|
||||
brightnessctl
|
||||
|
||||
# Visualization
|
||||
graphviz
|
||||
nodePackages.mermaid-cli
|
||||
] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [
|
||||
] ++ (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then with pkgs; [
|
||||
google-chrome
|
||||
pommed_light
|
||||
slack
|
||||
spicetify-cli
|
||||
spotify
|
||||
tor-browser-bundle-bin
|
||||
tor-browser
|
||||
vscode
|
||||
zulip
|
||||
] else []);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ pkgs, config, makeEnable, forEachUser, ... }:
|
||||
makeEnable config "modules.electron" false {
|
||||
{ pkgs, config, makeEnable, ... }:
|
||||
makeEnable config "myModules.electron" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
element-desktop
|
||||
# bitwarden
|
||||
@@ -8,21 +8,23 @@ makeEnable config "modules.electron" false {
|
||||
# keybase-gui
|
||||
zoom-us
|
||||
];
|
||||
home-manager.users = forEachUser (if pkgs.system == "x86_64-linux" then {
|
||||
# systemd.user.services.bitwarden = {
|
||||
# Unit = {
|
||||
# Description = "Bitwarden";
|
||||
# After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
home-manager.sharedModules = [
|
||||
(if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then {
|
||||
# systemd.user.services.bitwarden = {
|
||||
# Unit = {
|
||||
# Description = "Bitwarden";
|
||||
# After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
|
||||
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
||||
# Restart = "always";
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
} else {});
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
||||
# Restart = "always";
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
} else {})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -29,6 +29,25 @@ with lib;
|
||||
done
|
||||
fpath+="${pkgs.python-with-my-packages}/lib/python3.11/site-packages/argcomplete/bash_completion.d"
|
||||
'';
|
||||
interactiveShellInit = ''
|
||||
eval "$(register-python-argcomplete prb)"
|
||||
eval "$(register-python-argcomplete prod-prb)"
|
||||
eval "$(register-python-argcomplete railbird)"
|
||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
||||
|
||||
# Enable bracketed paste
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
'';
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
interactiveShellInit = ''
|
||||
eval "$(register-python-argcomplete prb)"
|
||||
eval "$(register-python-argcomplete prod-prb)"
|
||||
eval "$(register-python-argcomplete railbird)"
|
||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
automake
|
||||
bazel
|
||||
bento4
|
||||
bind
|
||||
binutils
|
||||
cachix
|
||||
@@ -16,16 +17,15 @@
|
||||
emacs
|
||||
fd
|
||||
ffmpeg
|
||||
bento4
|
||||
file
|
||||
gawk
|
||||
gcc
|
||||
gdb
|
||||
git-lfs
|
||||
gh
|
||||
git-fame
|
||||
git-lfs
|
||||
git-sync
|
||||
gitFull
|
||||
glxinfo
|
||||
gnumake
|
||||
gparted
|
||||
home-manager
|
||||
@@ -38,27 +38,33 @@
|
||||
lshw
|
||||
lsof
|
||||
magic-wormhole-rs
|
||||
mesa-demos
|
||||
ncdu
|
||||
neofetch
|
||||
neovim
|
||||
nix-index
|
||||
nix-search-cli
|
||||
pass
|
||||
patchelf
|
||||
pciutils
|
||||
pstree
|
||||
pulseaudio
|
||||
python-with-my-packages
|
||||
rclone
|
||||
rcm
|
||||
ripgrep
|
||||
runc
|
||||
silver-searcher
|
||||
sysz
|
||||
skim
|
||||
sshfs
|
||||
sysz
|
||||
tmux
|
||||
tzupdate
|
||||
udiskie
|
||||
unzip
|
||||
usbutils
|
||||
wget
|
||||
xkcdpass
|
||||
yubikey-manager
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{ config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "modules.extra" false {
|
||||
services.expressvpn.enable = true;
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
makeEnable config "myModules.extra" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
gradle
|
||||
@@ -10,7 +7,6 @@ makeEnable config "modules.extra" false {
|
||||
asciidoctor
|
||||
roomeqwizard
|
||||
razergenie
|
||||
expressvpn
|
||||
signal-desktop
|
||||
gource
|
||||
gimp
|
||||
|
||||
2171
nixos/flake.lock
generated
2171
nixos/flake.lock
generated
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user