Compare commits
229 Commits
v2
...
d0a450d4e8
| Author | SHA1 | Date | |
|---|---|---|---|
| d0a450d4e8 | |||
| 786d5c5fe0 | |||
| 5ba2894101 | |||
| 499bf793b2 | |||
| f1c57b8ecc | |||
| 20cc042b64 | |||
| ae9dcaa074 | |||
| 21b68b1e68 | |||
| fa4929a94b | |||
| 6b4d0e22b1 | |||
| d5615892e7 | |||
| 81d0df6023 | |||
| 9cf14d3b55 | |||
| 06325b09b8 | |||
| 539ec34b4c | |||
| 00d4f101fc | |||
| c9a89cf545 | |||
| 7ba9a65f19 | |||
| 52ced69697 | |||
| 47bbdd9f85 | |||
| 94a57be9f7 | |||
| 9d779269eb | |||
| da61dc869d | |||
| e44cc65f1f | |||
| 0392f8fc0f | |||
| 3c76f0412a | |||
| 627c005fe3 | |||
| 6540bda07a | |||
| a9c73ba9d9 | |||
| 30488edaed | |||
| 8ed711d300 | |||
| a8043a9899 | |||
| aa9ebaf22b | |||
| 2314a17066 | |||
| 7051688fa5 | |||
| 0f4f601a2d | |||
| f38e2ff94f | |||
| 50c5cf945d | |||
| 903da245ac | |||
| 2d15296597 | |||
| 3a619cbf92 | |||
| 530022ee59 | |||
| 5c01a5f806 | |||
| b6f5ad9bcf | |||
| 92dc644ee2 | |||
| ddc39f4928 | |||
| a93d7494d3 | |||
| 706cff40b3 | |||
| e35845099a | |||
| c44ef61cf2 | |||
| ef65f827a2 | |||
| 6b8f415703 | |||
| f7004d9f25 | |||
| 58d5b6cf69 | |||
| c55f70b852 | |||
| 97e02d81af | |||
| a545bb0066 | |||
| 35d51f80df | |||
| d638aa0434 | |||
| 258fc61669 | |||
| 6dc15047d4 | |||
| 0725763b95 | |||
| 29b8f188e9 | |||
| 959732ffd1 | |||
| be3497de77 | |||
| 17d83a53b7 | |||
| 122f3ab070 | |||
| 46a732e8f7 | |||
| 3373ae3b8c | |||
| edd2db313c | |||
| ecfd517a4a | |||
| 25419067d4 | |||
| 36faff6b5f | |||
| ffe516175c | |||
| f58f22cadd | |||
| 7e9faff6d6 | |||
| ffa25045e5 | |||
| 66dcd82952 | |||
| 40013a61d1 | |||
| ee26c0c5c2 | |||
| 02a351768f | |||
| 9539f09e83 | |||
| 25a78f126e | |||
| e0c339785d | |||
| e6f57831b1 | |||
| 4e323d932f | |||
| 64d8ca7ab4 | |||
| 7de17aaeb7 | |||
| 4f0c6a45cf | |||
| a2dbdd78d3 | |||
| e4a76c494c | |||
| 1ee3f01883 | |||
| a89ed00a17 | |||
| 64e671119d | |||
| 7b7955ac29 | |||
| 823a8d8fbc | |||
| 088562cd53 | |||
| e9b8c35b52 | |||
| 5a1811979e | |||
| 274890281c | |||
| 0606ec06f5 | |||
| f22f8da68c | |||
| 409078edf9 | |||
| 2840c9aa70 | |||
| f4aedf7b5e | |||
| f51cc0049a | |||
| c01529a599 | |||
| 121f02c785 | |||
| f6cd98e458 | |||
| cc9f38c71c | |||
| 606a1fec1b | |||
| d3bf33a142 | |||
| 91a6566d68 | |||
| ce0d951a54 | |||
| 106fe9cd9e | |||
| a199569aac | |||
| 80d16ab6ff | |||
| 1c8b72867e | |||
| 9d59b24995 | |||
| e78d07b25b | |||
| a2c11e5cd1 | |||
| 70aceee3ca | |||
| 8e6340e4c7 | |||
| 46a4d7628d | |||
| 2ec9356aca | |||
| 3c19159c23 | |||
| f6afd785fd | |||
| e20a33e132 | |||
| 4683a171b9 | |||
| 4189258def | |||
| 2e8f1ec9ae | |||
| 78c97c5d84 | |||
| 4540dc00e7 | |||
| 294d7a9a98 | |||
| 77dd4b4ca8 | |||
| 7394ab63bf | |||
| 7f851fac73 | |||
| a5a6d9a916 | |||
| 3967a4cd5c | |||
| f684f52d8f | |||
| 1079f62c06 | |||
| 1f460ccc38 | |||
| 8b7f15eddf | |||
| 0750c45111 | |||
| 0db1815665 | |||
| d028b027c5 | |||
| e91f5aa5d6 | |||
| 6105341234 | |||
| 6a362a963f | |||
| 9005bd089a | |||
| 1921545d08 | |||
| 05b463699f | |||
| 6f33358f4a | |||
| 909983d069 | |||
| a259206de8 | |||
| 3f058cbfd3 | |||
| 318fc39b61 | |||
| 6b1c8dec58 | |||
| 3541ec68e7 | |||
| 3a3674670b | |||
| b2c6d72a2f | |||
| b9c68535d4 | |||
| ae5226202a | |||
| 580aee4ad5 | |||
| a8bf678d45 | |||
| 73feae1142 | |||
| b26b870bb2 | |||
| 2d3a6ad33f | |||
| ef9439b92c | |||
| c635f3bfa9 | |||
| 7c3eb71150 | |||
| 4fef18041f | |||
| df3384c667 | |||
| 7a97d7425e | |||
| 73ca687358 | |||
| 88441958d9 | |||
| e59af388b1 | |||
| 39da9176ad | |||
| e4ee9c9dc8 | |||
| feef8452f4 | |||
| c3ff5a58d6 | |||
| a005189aef | |||
| e98f5c2bd7 | |||
| e7f6be4291 | |||
| 4fa7dc3c1a | |||
| 2ccb49f24b | |||
| ec04ebee66 | |||
| 2b2f1c2b66 | |||
| 21f7e53b2b | |||
| 5f09b7b915 | |||
| 688013a6b8 | |||
| 4e7c3ceee8 | |||
| 390874374e | |||
| 7f7a755e32 | |||
| ac6b47449a | |||
| ce5f530ed2 | |||
| 62789224a7 | |||
| 0b849bad4f | |||
| 0022880936 | |||
| 1d5240b7c6 | |||
| 0b0e83f505 | |||
| f4cfa20dea | |||
| d866102fcc | |||
| 921373f049 | |||
| 1c39478650 | |||
| a845e086fd | |||
| b363438f6a | |||
| 7d9da82b6c | |||
| c52c5b5a42 | |||
| 97c49f17e6 | |||
| 134519558a | |||
| 9e5ae7db83 | |||
| a31b3481c3 | |||
| 1c757d1173 | |||
| 89b97c4ba1 | |||
| 2ba627a370 | |||
| 995de3617c | |||
| a477078f16 | |||
| f93eeb5d87 | |||
| 5b0e3767bd | |||
| 51962c424b | |||
| a6ce7ccdce | |||
| 0f0e0e8671 | |||
| c6061e0f12 | |||
| cac0e41a2e | |||
| c4797dd592 | |||
| 8986ad894e | |||
| f127ea8a41 | |||
| bb75cfabaf |
43
README.md
43
README.md
@@ -1,4 +1,45 @@
|
||||
# janishutz Hyprland
|
||||
<div id="title" align="center">
|
||||
<img src="https://static.janishutz.com/logo.jpg" width="300">
|
||||
<h1>janishutz Hyprland</h1>
|
||||
</div>
|
||||
|
||||
Collection of dotfiles for my personal Hyprland setup, running on Arch Linux.
|
||||
Includes a setup and install script (that one is not complete yet though).
|
||||
For my neovim config, see [here](https://git.janishutz.com/janishutz/nvim)
|
||||
|
||||

|
||||
|
||||
I am currently working on redoing my keybinds for Hyprland, in what I call `hyprvim`:
|
||||
They are going to use submaps and will be significantly different, yet still familiar.
|
||||
This will enable me to have many more keybinds with reasonable starter bindings.
|
||||
I will also update Astal to have a mode indicator if `hyprvim` is enabled.
|
||||
|
||||
## Features
|
||||
- Astal4 based Status Bar and Quick Actions menu
|
||||
- System info
|
||||
- Hyprland info
|
||||
- Date & Time
|
||||
- Bluetooth picker
|
||||
- some networking settings (more coming later)
|
||||
- Audio and brightness control
|
||||
- battery monitoring
|
||||
- Logout, Reboot, Shutdown, etc
|
||||
- Rofi config for App launcher
|
||||
- Wlogout config
|
||||
- Theming script that generates a GTK theme and theming for bar, Hyprland, etc
|
||||
- Fish config (with some handy aliases, based on one from ohh-my-fish)
|
||||
- Fastfetch config
|
||||
- kitty config with cursor trail
|
||||
- Linter configs (currently only eslint, which is not complete yet)
|
||||
- mpv config
|
||||
- zathura configs
|
||||
- yazi configs with links to various directories I use commonly plus a few plugins and themes that are applied by the script
|
||||
- Astal3 based Notifications (due to be migrated to Astal4)
|
||||
|
||||
## Installing
|
||||
Clone your repo to any folder and adapt what you need. Some folders are still hard-coded, which I will be changing later on, so you will likely run into issues.
|
||||
|
||||
You may then run the `setup` script. That won't install all dependencies though. The `install` script is what serves that purpose, but that is not complete yet
|
||||
|
||||
|
||||
## Setting up to develop
|
||||
|
||||
BIN
assets/screenshot.png
Normal file
BIN
assets/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
@@ -9,7 +9,9 @@ const renderColourAsHex = util.renderColourAsHex;
|
||||
// │ Theme generator (returns theme as object) │
|
||||
// ╰───────────────────────────────────────────────╯
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
module.exports.generateTheme = ( theme, wallpaper, lockpaper, palette ) => {
|
||||
module.exports.generateTheme = (
|
||||
theme, wallpaper, lockpaper, palette
|
||||
) => {
|
||||
return {
|
||||
'wallpaper-path': wallpaper,
|
||||
'lockpaper-path': lockpaper,
|
||||
@@ -49,14 +51,30 @@ module.exports.generateTheme = ( theme, wallpaper, lockpaper, palette ) => {
|
||||
'colour-accent-rgba-007': renderColourAsRGBA( palette[ 0 ], 0.07 ),
|
||||
'colour-accent-hyprland': util.renderColourAsRGBAHex( palette[ 0 ], 0.8 ),
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
'colour-accent-gradient-1-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 1, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-2-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 2, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-3-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 3, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-4-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 4, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-5-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 5, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-inverse-1-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 1, 1 / gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-inverse-2-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 1, 1 / gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-inverse-3-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 1, 1 / gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-1-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 1, gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-2-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 2, gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-3-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 3, gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-4-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 4, gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-5-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 5, gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-inverse-1-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 1, 1 / gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-inverse-2-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 1, 1 / gradientMultipliers[ theme ]
|
||||
) ),
|
||||
'colour-accent-gradient-inverse-3-hex': renderColourAsHex( util.getGradientColour(
|
||||
palette[ 0 ], 1, 1 / gradientMultipliers[ theme ]
|
||||
) ),
|
||||
|
||||
// ── Secondary accent ─────────────────────────────────────────────
|
||||
'colour-accent-2-hex': renderColourAsHex( palette[ 1 ] ),
|
||||
@@ -155,8 +173,8 @@ module.exports.generateTheme = ( theme, wallpaper, lockpaper, palette ) => {
|
||||
// │ Path to this repo on disk │
|
||||
// └ ┘
|
||||
'path-to-dotfiles': __dirname.slice( 0, __dirname.length - 5 ),
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
@@ -171,74 +189,265 @@ const gradientMultipliers = {
|
||||
'light': 1.1,
|
||||
'bright': 1.15,
|
||||
'test': 0.75
|
||||
}
|
||||
};
|
||||
const colours = {
|
||||
foreground: {
|
||||
'nordic': [ 200, 220, 255 ],
|
||||
'deep-dark': [ 230, 230, 230 ],
|
||||
'material': [ 255, 255, 255 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 40, 40, 40 ],
|
||||
'bright': [ 0, 0, 0 ],
|
||||
'test': [ 0, 0, 0 ],
|
||||
'foreground': {
|
||||
'nordic': [
|
||||
200,
|
||||
220,
|
||||
255
|
||||
],
|
||||
'deep-dark': [
|
||||
230,
|
||||
230,
|
||||
230
|
||||
],
|
||||
'material': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
40,
|
||||
40,
|
||||
40
|
||||
],
|
||||
'bright': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
'test': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
},
|
||||
'foreground-accent': {
|
||||
'nordic': [ 255, 255, 255 ],
|
||||
'deep-dark': [ 255, 255, 255 ],
|
||||
'material': [ 200, 200, 200 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 0, 0, 0 ],
|
||||
'bright': [ 50, 50, 50 ],
|
||||
'test': [ 0, 0, 0 ],
|
||||
'nordic': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
'deep-dark': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
'material': [
|
||||
200,
|
||||
200,
|
||||
200
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
'bright': [
|
||||
50,
|
||||
50,
|
||||
50
|
||||
],
|
||||
'test': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
},
|
||||
background: {
|
||||
'nordic': [ 10, 10, 15 ],
|
||||
'deep-dark': [ 20, 20, 20 ],
|
||||
'material': [ 30, 30, 30 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 230, 230, 230 ],
|
||||
'bright': [ 255, 255, 255 ],
|
||||
'test': [ 255, 255, 255 ],
|
||||
'background': {
|
||||
'nordic': [
|
||||
10,
|
||||
10,
|
||||
15
|
||||
],
|
||||
'deep-dark': [
|
||||
20,
|
||||
20,
|
||||
20
|
||||
],
|
||||
'material': [
|
||||
30,
|
||||
30,
|
||||
30
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
230,
|
||||
230,
|
||||
230
|
||||
],
|
||||
'bright': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
'test': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
],
|
||||
},
|
||||
'background-alternative': {
|
||||
'nordic': [ 20, 20, 25 ],
|
||||
'deep-dark': [ 30, 30, 30 ],
|
||||
'material': [ 40, 40, 40 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 210, 210, 210 ],
|
||||
'bright': [ 230, 230, 230 ],
|
||||
'test': [ 255, 255, 0 ] // brown
|
||||
'nordic': [
|
||||
20,
|
||||
20,
|
||||
25
|
||||
],
|
||||
'deep-dark': [
|
||||
30,
|
||||
30,
|
||||
30
|
||||
],
|
||||
'material': [
|
||||
40,
|
||||
40,
|
||||
40
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
210,
|
||||
210,
|
||||
210
|
||||
],
|
||||
'bright': [
|
||||
230,
|
||||
230,
|
||||
230
|
||||
],
|
||||
'test': [
|
||||
255,
|
||||
255,
|
||||
0
|
||||
] // brown
|
||||
},
|
||||
'background-tertiary': {
|
||||
'nordic': [ 0, 0, 0 ],
|
||||
'deep-dark': [ 45, 45, 45 ],
|
||||
'material': [ 0, 0, 0 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 180, 180, 180 ],
|
||||
'bright': [ 200, 200, 200 ],
|
||||
'test': [ 255, 0, 255 ] // purple
|
||||
'nordic': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
'deep-dark': [
|
||||
45,
|
||||
45,
|
||||
45
|
||||
],
|
||||
'material': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
180,
|
||||
180,
|
||||
180
|
||||
],
|
||||
'bright': [
|
||||
200,
|
||||
200,
|
||||
200
|
||||
],
|
||||
'test': [
|
||||
255,
|
||||
0,
|
||||
255
|
||||
] // purple
|
||||
},
|
||||
shadow: {
|
||||
'nordic': [ 0, 0, 2 ],
|
||||
'deep-dark': [ 40, 40, 40 ],
|
||||
'material': [ 30, 30, 30 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 190, 190, 190 ],
|
||||
'bright': [ 150, 150, 150 ],
|
||||
'test': [ 120, 0, 0 ] // dark red
|
||||
'shadow': {
|
||||
'nordic': [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
'deep-dark': [
|
||||
40,
|
||||
40,
|
||||
40
|
||||
],
|
||||
'material': [
|
||||
30,
|
||||
30,
|
||||
30
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
190,
|
||||
190,
|
||||
190
|
||||
],
|
||||
'bright': [
|
||||
150,
|
||||
150,
|
||||
150
|
||||
],
|
||||
'test': [
|
||||
120,
|
||||
0,
|
||||
0
|
||||
] // dark red
|
||||
},
|
||||
inactive: {
|
||||
'nordic': [ 200, 200, 200 ],
|
||||
'deep-dark': [ 200, 200, 200 ],
|
||||
'material': [ 200, 200, 200 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 65, 65, 65 ],
|
||||
'bright': [ 60, 60, 60 ],
|
||||
'test': [ 150, 150, 150 ]
|
||||
'inactive': {
|
||||
'nordic': [
|
||||
200,
|
||||
200,
|
||||
200
|
||||
],
|
||||
'deep-dark': [
|
||||
200,
|
||||
200,
|
||||
200
|
||||
],
|
||||
'material': [
|
||||
200,
|
||||
200,
|
||||
200
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
65,
|
||||
65,
|
||||
65
|
||||
],
|
||||
'bright': [
|
||||
60,
|
||||
60,
|
||||
60
|
||||
],
|
||||
'test': [
|
||||
150,
|
||||
150,
|
||||
150
|
||||
]
|
||||
},
|
||||
'inactive-background': {
|
||||
'nordic': [ 0, 0, 0 ],
|
||||
'deep-dark': [ 0, 0, 0 ],
|
||||
'material': [ 255, 255, 255 ], // TODO: Will be calculated by material theme generator
|
||||
'light': [ 80, 80, 80 ],
|
||||
'bright': [ 60, 60, 60 ],
|
||||
'test': [ 60, 60, 60 ]
|
||||
'nordic': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
'deep-dark': [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
'material': [
|
||||
255,
|
||||
255,
|
||||
255
|
||||
], // TODO: Will be calculated by material theme generator
|
||||
'light': [
|
||||
80,
|
||||
80,
|
||||
80
|
||||
],
|
||||
'bright': [
|
||||
60,
|
||||
60,
|
||||
60
|
||||
],
|
||||
'test': [
|
||||
60,
|
||||
60,
|
||||
60
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
const fonts = {
|
||||
'primary': {
|
||||
'nordic': 'Comfortaa',
|
||||
@@ -261,20 +470,18 @@ const fonts = {
|
||||
'light': 'Jetbrains Mono',
|
||||
'bright': 'Jetbrains Mono',
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
const iconTheme = {
|
||||
'nordic': 'Candy',
|
||||
'deep-dark': 'Candy',
|
||||
'material': 'Candy',
|
||||
'light': 'Candy',
|
||||
'bright': 'Candy'
|
||||
}
|
||||
|
||||
};
|
||||
const yaziThemes = {
|
||||
'nordic': 'tokyo-night',
|
||||
'deep-dark': 'vscode-dark-modern',
|
||||
'material': 'dracula',
|
||||
'light': 'vscode-light-modern',
|
||||
'bright': 'vscode-light-modern',
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
||||
name: 'confirm-proceed-build',
|
||||
message: 'Okay to proceed with these colours?'
|
||||
} ] ).then( answer => {
|
||||
if ( answer ) proceedWithBuild( wallpaper, lockpaper, theme, palette );
|
||||
if ( answer['confirm-proceed-build'] ) proceedWithBuild( wallpaper, lockpaper, theme, palette );
|
||||
else {
|
||||
// Have the user pick any other of the extracted colours instead
|
||||
let counter = -1;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
const fs = require( 'fs' );
|
||||
|
||||
const path = require( 'path' );
|
||||
|
||||
const data = '' + fs.readFileSync( '/usr/share/themes/Material-Black-Blueberry/gtk-4.0/gtk.css' );
|
||||
|
||||
let lineNumber = 1;
|
||||
|
||||
const indexer = {};
|
||||
|
||||
for ( let i = 0; i < data.length; i++ ) {
|
||||
const char = data[i];
|
||||
|
||||
@@ -13,17 +16,22 @@ for (let i = 0; i < data.length; i++) {
|
||||
} else if ( char === '#' ) {
|
||||
const extract = data.substring( i );
|
||||
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
||||
|
||||
if ( !indexer[ col ] ) {
|
||||
indexer[ col ] = [];
|
||||
}
|
||||
|
||||
indexer[ col ].push( lineNumber );
|
||||
} else if ( char === 'r' ) {
|
||||
const extract = data.substring( i );
|
||||
|
||||
if ( extract.slice( 0, 3 ) === 'rgb' ) {
|
||||
const col = extract.slice( 0, extract.indexOf( '\n' ) );
|
||||
|
||||
if ( !indexer[ col ] ) {
|
||||
indexer[ col ] = [];
|
||||
}
|
||||
|
||||
indexer[ col ].push( lineNumber );
|
||||
}
|
||||
}
|
||||
@@ -32,6 +40,7 @@ for (let i = 0; i < data.length; i++) {
|
||||
|
||||
// Output
|
||||
const keys = Object.keys( indexer );
|
||||
|
||||
for ( let i = 0; i < keys.length; i++ ) {
|
||||
const element = keys[i];
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"gen": {
|
||||
"overrides": {}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,29 @@
|
||||
import { App } from "astal/gtk4"
|
||||
import style from "./style.scss"
|
||||
import Bar from "./components/bar/Bar";
|
||||
import AstalHyprland from "gi://AstalHyprland?version=0.1";
|
||||
import { hyprToGdk } from "./util/hyprland";
|
||||
import Brightness from "./util/brightness";
|
||||
import {
|
||||
App
|
||||
} from 'astal/gtk4';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import Bar from './components/bar/Bar';
|
||||
import Brightness from './util/brightness';
|
||||
import {
|
||||
hyprToGdk
|
||||
} from './util/hyprland';
|
||||
import style from './style.scss';
|
||||
|
||||
App.start( {
|
||||
instanceName: "runner",
|
||||
css: style,
|
||||
'instanceName': 'runner',
|
||||
'css': style,
|
||||
main () {
|
||||
const hypr = AstalHyprland.get_default();
|
||||
const bars = new Map<number, string>();
|
||||
|
||||
const barCreator = ( monitor: AstalHyprland.Monitor ) => {
|
||||
const gdkMonitor = hyprToGdk( monitor );
|
||||
|
||||
if ( gdkMonitor ) {
|
||||
print( 'Bar added for screen ' + monitor.get_id() );
|
||||
bars.set( monitor.get_id(), Bar.BarLauncher( gdkMonitor ) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for ( const monitor of hypr.monitors ) {
|
||||
barCreator( monitor );
|
||||
@@ -30,14 +35,17 @@ App.start({
|
||||
|
||||
hypr.connect( 'monitor-removed', ( _, monitor ) => {
|
||||
const windowName = bars.get( monitor );
|
||||
|
||||
if ( windowName ) {
|
||||
const win = App.get_window( windowName );
|
||||
|
||||
if ( win ) {
|
||||
App.toggle_window( windowName );
|
||||
win.set_child( null );
|
||||
App.remove_window( win );
|
||||
print( 'Bar removed for screen', monitor );
|
||||
}
|
||||
|
||||
bars.delete( monitor );
|
||||
}
|
||||
} );
|
||||
@@ -60,6 +68,7 @@ App.start({
|
||||
} else if ( args[ 0 ] === 'brightness' ) {
|
||||
try {
|
||||
const brightness = Brightness.get_default();
|
||||
|
||||
if ( brightness.screenAvailable ) {
|
||||
if ( args[ 1 ] === 'increase' ) {
|
||||
brightness.screen += args.length > 1 ? parseInt( args[ 2 ] ) / 100 : 1;
|
||||
@@ -70,12 +79,15 @@ App.start({
|
||||
brightness.screen = parseInt( args[ 2 ] ) / 100;
|
||||
} else {
|
||||
res( 'Argument <brightness> unspecified' );
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
res( 'Unknown command ' + args[ 1 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
res( 'Ok' );
|
||||
} else {
|
||||
res( 'No controllable screen available' );
|
||||
@@ -99,5 +111,4 @@ App.start({
|
||||
// }
|
||||
// }
|
||||
},
|
||||
})
|
||||
|
||||
} );
|
||||
|
||||
@@ -1,44 +1,58 @@
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import Power from "./modules/Power";
|
||||
import Audio from "./modules/Audio/Audio";
|
||||
import Bluetooth from "./modules/Bluetooth/Bluetooth";
|
||||
import Brightness from "./modules/Brightness/Brightness";
|
||||
import Player from "./modules/Player/Player";
|
||||
import { BatteryBox } from "./modules/Battery";
|
||||
import { exec } from "astal";
|
||||
import Network from "./modules/Networking/Network";
|
||||
import Audio from './modules/Audio/Audio';
|
||||
import {
|
||||
BatteryBox
|
||||
} from './modules/Battery';
|
||||
import Bluetooth from './modules/Bluetooth/Bluetooth';
|
||||
import Brightness from './modules/Brightness/Brightness';
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
import Network from './modules/Networking/Network';
|
||||
import Player from './modules/Player/Player';
|
||||
import Power from './modules/Power';
|
||||
import SysTray from './modules/SysTray';
|
||||
import {
|
||||
exec
|
||||
} from 'astal';
|
||||
|
||||
const QuickActions = () => {
|
||||
const popover = new Gtk.Popover({ cssClasses: ["quick-actions-wrapper"] });
|
||||
const popover = new Gtk.Popover( {
|
||||
'cssClasses': [ 'quick-actions-wrapper' ]
|
||||
} );
|
||||
|
||||
popover.set_child( renderQuickActions() );
|
||||
|
||||
return popover;
|
||||
};
|
||||
|
||||
const renderQuickActions = () => {
|
||||
const user = exec("/bin/sh -c whoami");
|
||||
const profile = exec("/bin/fish -c get-profile-picture");
|
||||
const cwd = exec("pwd");
|
||||
const user = exec( '/bin/sh -c whoami' );
|
||||
const profile = exec( '/bin/fish -c get-profile-picture' );
|
||||
const cwd = exec( 'pwd' );
|
||||
const um = Power.UserMenu();
|
||||
|
||||
return (
|
||||
<box visible cssClasses={["quick-actions", "popover-box"]} vertical>
|
||||
<box visible cssClasses={[
|
||||
'quick-actions',
|
||||
'popover-box'
|
||||
]} vertical>
|
||||
<centerbox
|
||||
startWidget={
|
||||
<button
|
||||
onClicked={() => um.popup()}
|
||||
cssClasses={["stealthy-button"]}
|
||||
cssClasses={[ 'stealthy-button' ]}
|
||||
child={
|
||||
<box>
|
||||
{um}
|
||||
<Gtk.Frame
|
||||
cssClasses={["avatar-icon"]}
|
||||
cssClasses={[ 'avatar-icon' ]}
|
||||
child={
|
||||
<image
|
||||
file={
|
||||
profile !== ""
|
||||
profile !== ''
|
||||
? profile
|
||||
: cwd +
|
||||
"/no-avatar-icon.jpg"
|
||||
: cwd
|
||||
+ '/no-avatar-icon.jpg'
|
||||
}
|
||||
></image>
|
||||
}
|
||||
@@ -53,6 +67,7 @@ const renderQuickActions = () => {
|
||||
hexpand={false}
|
||||
>
|
||||
<BatteryBox></BatteryBox>
|
||||
<SysTray.SystemTray></SysTray.SystemTray>
|
||||
<Power.Power></Power.Power>
|
||||
</box>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { bind, Binding } from "astal";
|
||||
import { bind } from "astal";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import AstalWp from "gi://AstalWp";
|
||||
|
||||
@@ -13,8 +13,8 @@ const AudioModule = () => {
|
||||
wp.defaultMicrophone.set_volume(volume / 100);
|
||||
};
|
||||
|
||||
const speakerSelector = SinkSelectPopover(AstalWp.MediaClass.AUDIO_SPEAKER);
|
||||
const micSelector = SinkSelectPopover(AstalWp.MediaClass.AUDIO_MICROPHONE);
|
||||
const speakerSelector = SinkSelectPopover(AstalWp.MediaClass.AUDIO_SINK);
|
||||
const micSelector = SinkSelectPopover(AstalWp.MediaClass.AUDIO_SOURCE);
|
||||
|
||||
return (
|
||||
<box cssClasses={["audio-box"]} vertical>
|
||||
@@ -107,12 +107,18 @@ const AudioModule = () => {
|
||||
};
|
||||
|
||||
const SinkPicker = (type: AstalWp.MediaClass) => {
|
||||
const devices = bind(wp, "endpoints");
|
||||
const devices = bind(wp, "nodes");
|
||||
wp.connect("ready", () => {
|
||||
const dev = wp.get_nodes()!
|
||||
for (let i = 0; i < dev.length; i++) {
|
||||
const d = dev[i];
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<box vertical>
|
||||
<label
|
||||
label={`Available Audio ${type === AstalWp.MediaClass.AUDIO_SPEAKER ? "Output" : type === AstalWp.MediaClass.AUDIO_MICROPHONE ? "Input" : ""} Devices`}
|
||||
label={`Available Audio ${type === AstalWp.MediaClass.AUDIO_SINK ? "Output" : type === AstalWp.MediaClass.AUDIO_SOURCE ? "Input" : ""} Devices`}
|
||||
cssClasses={[ 'title-2' ]}
|
||||
></label>
|
||||
<Gtk.Separator marginBottom={5} marginTop={3}></Gtk.Separator>
|
||||
@@ -128,11 +134,11 @@ const SinkPicker = (type: AstalWp.MediaClass) => {
|
||||
if (
|
||||
id ===
|
||||
(type ===
|
||||
AstalWp.MediaClass.AUDIO_SPEAKER
|
||||
AstalWp.MediaClass.AUDIO_SINK
|
||||
? wp.defaultSpeaker.id
|
||||
: type ===
|
||||
AstalWp.MediaClass
|
||||
.AUDIO_MICROPHONE
|
||||
.AUDIO_SOURCE
|
||||
? wp.defaultMicrophone.id
|
||||
: "")
|
||||
) {
|
||||
|
||||
51
config/astal/components/QuickActions/modules/Audio/dump
Normal file
51
config/astal/components/QuickActions/modules/Audio/dump
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
{devices.as(d => {
|
||||
return d.map(device => {
|
||||
if (device.get_media_class() !== type) {
|
||||
return <box cssClasses={[ 'empty' ]}></box>;
|
||||
}
|
||||
return (
|
||||
<button
|
||||
cssClasses={bind(device, "id").as(id => {
|
||||
if (
|
||||
id ===
|
||||
(type ===
|
||||
AstalWp.MediaClass.AUDIO_SPEAKER
|
||||
? wp.defaultSpeaker.id
|
||||
: type ===
|
||||
AstalWp.MediaClass
|
||||
.AUDIO_MICROPHONE
|
||||
? wp.defaultMicrophone.id
|
||||
: "")
|
||||
) {
|
||||
return [
|
||||
"sink-option",
|
||||
"currently-selected-sink-option",
|
||||
];
|
||||
} else {
|
||||
return ["sink-option"];
|
||||
}
|
||||
})}
|
||||
child={
|
||||
<box halign={Gtk.Align.START}>
|
||||
<image
|
||||
iconName={bind(device, "icon").as(
|
||||
icon => icon,
|
||||
)}
|
||||
marginEnd={3}
|
||||
></image>
|
||||
<label
|
||||
label={bind(
|
||||
device,
|
||||
"description",
|
||||
).as(t => t ?? "")}
|
||||
></label>
|
||||
</box>
|
||||
}
|
||||
onClicked={() => {
|
||||
device.set_is_default(true);
|
||||
}}
|
||||
></button>
|
||||
);
|
||||
});
|
||||
})}
|
||||
@@ -29,21 +29,23 @@ export const BatteryBox = () => {
|
||||
cssClasses={["battery-time"]}
|
||||
visible={bind(battery, "charging").as(c => !c)}
|
||||
label={bind(battery, "timeToEmpty").as(t => `(${toTime(t)})`)}
|
||||
tooltipText={bind(battery, 'energyRate').as(er => `Time to empty. Power usage: ${batteryEnergy(er)}`)}
|
||||
/>
|
||||
<label
|
||||
cssClasses={["battery-time"]}
|
||||
visible={bind(battery, "charging")}
|
||||
label={bind(battery, "timeToFull").as(t => `(${toTime(t)})`)}
|
||||
tooltipText={bind(battery, 'energyRate').as(er => `Time to full. Charge rate: ${batteryEnergy(er)}`)}
|
||||
/>
|
||||
</box>
|
||||
);
|
||||
};
|
||||
|
||||
const toTime = (time: number) => {
|
||||
const MINUTE = 60;
|
||||
const HOUR = MINUTE * 60;
|
||||
|
||||
if (time > 24 * HOUR) return "";
|
||||
const toTime = (time: number) => {
|
||||
if (!time) return "Waiting on BIOS"
|
||||
if (time > 24 * HOUR) return "24h+";
|
||||
|
||||
const hours = Math.round(time / HOUR);
|
||||
const minutes = Math.round((time - hours * HOUR) / MINUTE);
|
||||
|
||||
@@ -4,7 +4,6 @@ import Brightness from "../../../../util/brightness";
|
||||
const brightness = Brightness.get_default();
|
||||
|
||||
const BrightnessModule = () => {
|
||||
print( brightness.screen * 100 );
|
||||
const setBrightness = (value: number) => {
|
||||
brightness.screen = value;
|
||||
}
|
||||
@@ -17,7 +16,7 @@ const BrightnessModule = () => {
|
||||
hexpand
|
||||
max={1}
|
||||
min={0.01}
|
||||
step={0.01}
|
||||
step={0.05}
|
||||
vexpand
|
||||
onChangeValue={self => setBrightness(self.value)}
|
||||
></slider>
|
||||
|
||||
@@ -135,8 +135,9 @@ const PlayerItem = ({ player }: { player: AstalMpris.Player }) => {
|
||||
};
|
||||
|
||||
const secondsToFriendlyTime = (time: number) => {
|
||||
const minutes = Math.floor(time / 60);
|
||||
const hours = Math.floor(minutes / 60);
|
||||
const m = Math.floor(time / 60);
|
||||
const minutes = Math.floor(m % 60);
|
||||
const hours = Math.floor(m / 60 % 24);
|
||||
const seconds = Math.floor(time % 60);
|
||||
if (hours > 0) {
|
||||
return `${hours}:${expandTime(minutes)}:${expandTime(seconds)}`;
|
||||
|
||||
@@ -1,48 +1,56 @@
|
||||
import { exec } from "astal";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import {
|
||||
exec
|
||||
} from 'astal';
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
|
||||
const PowerMenu = (): Gtk.Popover => {
|
||||
const popover = new Gtk.Popover({ cssClasses: ["PowerMenu"] });
|
||||
const popover = new Gtk.Popover( {
|
||||
'cssClasses': [ 'PowerMenu' ]
|
||||
} );
|
||||
|
||||
const powerMenuBox = () => {
|
||||
return (
|
||||
<box>
|
||||
<button
|
||||
cssClasses={["power-button"]}
|
||||
cssClasses={[ 'power-button' ]}
|
||||
child={
|
||||
<image iconName={"system-shutdown-symbolic"}></image>
|
||||
<image iconName={'system-shutdown-symbolic'}></image>
|
||||
}
|
||||
onClicked={() => exec("/bin/sh -c 'shutdown now'")}
|
||||
onClicked={() => exec( '/bin/sh -c \'shutdown now\'' )}
|
||||
></button>
|
||||
<button
|
||||
cssClasses={["power-button"]}
|
||||
child={<image iconName={"system-reboot-symbolic"}></image>}
|
||||
onClicked={() => exec("/bin/sh -c 'reboot'")}
|
||||
cssClasses={[ 'power-button' ]}
|
||||
child={<image iconName={'system-reboot-symbolic'}></image>}
|
||||
onClicked={() => exec( '/bin/sh -c \'reboot\'' )}
|
||||
></button>
|
||||
<button
|
||||
cssClasses={["power-button"]}
|
||||
child={<image iconName={"system-suspend-symbolic"}></image>}
|
||||
onClicked={() => exec("/bin/sh -c 'systemctl suspend'")}
|
||||
cssClasses={[ 'power-button' ]}
|
||||
child={<image iconName={'system-suspend-symbolic'}></image>}
|
||||
onClicked={() => exec( '/bin/sh -c \'systemctl suspend\'' )}
|
||||
></button>
|
||||
</box>
|
||||
);
|
||||
};
|
||||
|
||||
popover.set_child( powerMenuBox() );
|
||||
|
||||
return popover;
|
||||
};
|
||||
|
||||
const Power = () => {
|
||||
const pm = PowerMenu();
|
||||
|
||||
return (
|
||||
<button
|
||||
widthRequest={0}
|
||||
hexpand={false}
|
||||
vexpand={false}
|
||||
cssClasses={["power-menu-button"]}
|
||||
cssClasses={[ 'power-menu-button' ]}
|
||||
child={
|
||||
<box>
|
||||
<image iconName={"system-shutdown-symbolic"}></image>
|
||||
<image iconName={'system-shutdown-symbolic'}></image>
|
||||
{pm}
|
||||
</box>
|
||||
}
|
||||
@@ -58,17 +66,16 @@ const UserMenu = (): Gtk.Popover => {
|
||||
return (
|
||||
<box>
|
||||
<button
|
||||
cssClasses={["power-button"]}
|
||||
cssClasses={[ 'power-button' ]}
|
||||
child={
|
||||
<image iconName={"system-lock-screen-symbolic"}></image>
|
||||
<image iconName={'system-lock-screen-symbolic'}></image>
|
||||
}
|
||||
onClicked={() => exec("/bin/sh -c 'hyprlock'")}
|
||||
onClicked={() => exec( '/bin/sh -c \'hyprlock\'' )}
|
||||
></button>
|
||||
<button
|
||||
cssClasses={["power-button"]}
|
||||
child={<image iconName={"system-log-out-symbolic"}></image>}
|
||||
onClicked={() =>
|
||||
exec("/bin/sh -c 'hyprctl dispatch exit 0'")
|
||||
cssClasses={[ 'power-button' ]}
|
||||
child={<image iconName={'system-log-out-symbolic'}></image>}
|
||||
onClicked={() => exec( '/bin/sh -c \'hyprctl dispatch exit 0\'' )
|
||||
}
|
||||
></button>
|
||||
</box>
|
||||
@@ -76,6 +83,7 @@ const UserMenu = (): Gtk.Popover => {
|
||||
};
|
||||
|
||||
popover.set_child( powerMenuBox() );
|
||||
|
||||
return popover;
|
||||
};
|
||||
|
||||
|
||||
88
config/astal/components/QuickActions/modules/SysTray.tsx
Normal file
88
config/astal/components/QuickActions/modules/SysTray.tsx
Normal file
@@ -0,0 +1,88 @@
|
||||
import AstalTray from 'gi://AstalTray';
|
||||
import {
|
||||
GObject
|
||||
} from 'astal';
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
|
||||
const SYNC = GObject.BindingFlags.SYNC_CREATE;
|
||||
|
||||
const SysTray = () => {
|
||||
const trayBox = new Gtk.Box( {
|
||||
'cssClasses': [ '' ]
|
||||
} );
|
||||
const tray = AstalTray.get_default();
|
||||
const trayItems = new Map<string, Gtk.MenuButton>();
|
||||
const trayAddedHandler = tray.connect( 'item-added', ( _, id ) => {
|
||||
const item = tray.get_item( id );
|
||||
const popover = Gtk.PopoverMenu.new_from_model( item.menu_model );
|
||||
const icon = new Gtk.Image();
|
||||
const button = new Gtk.MenuButton( {
|
||||
popover,
|
||||
'child': icon,
|
||||
'cssClasses': [ 'tray-item' ],
|
||||
} );
|
||||
|
||||
item.bind_property(
|
||||
'gicon', icon, 'gicon', SYNC
|
||||
);
|
||||
popover.insert_action_group( 'dbusmenu', item.action_group );
|
||||
item.connect( 'notify::action-group', () => {
|
||||
popover.insert_action_group( 'dbusmenu', item.action_group );
|
||||
} );
|
||||
|
||||
trayItems.set( id, button );
|
||||
trayBox.append( button );
|
||||
} );
|
||||
const trayRemovedHandler = tray.connect( 'item-removed', ( _, id ) => {
|
||||
const button = trayItems.get( id );
|
||||
|
||||
if ( button ) {
|
||||
trayBox.remove( button );
|
||||
button.run_dispose();
|
||||
trayItems.delete( id );
|
||||
}
|
||||
} );
|
||||
|
||||
trayBox.connect( 'destroy', () => {
|
||||
tray.disconnect( trayAddedHandler );
|
||||
tray.disconnect( trayRemovedHandler );
|
||||
} );
|
||||
|
||||
return trayBox;
|
||||
};
|
||||
|
||||
const TrayPopover = () => {
|
||||
const popover = new Gtk.Popover( {
|
||||
'cssClasses': [ 'TrayPopover' ]
|
||||
} );
|
||||
|
||||
popover.set_child( SysTray() );
|
||||
|
||||
return popover;
|
||||
};
|
||||
|
||||
const SystemTray = () => {
|
||||
const systray = TrayPopover();
|
||||
|
||||
return (
|
||||
<button
|
||||
widthRequest={0}
|
||||
hexpand={false}
|
||||
vexpand={false}
|
||||
cssClasses={[ 'power-menu-button' ]}
|
||||
child={
|
||||
<box>
|
||||
<image iconName={'systemtray'}></image>
|
||||
{systray}
|
||||
</box>
|
||||
}
|
||||
onClicked={() => systray.popup()}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default {
|
||||
SystemTray
|
||||
};
|
||||
@@ -1,19 +1,30 @@
|
||||
import { App, Astal, Gdk, Gtk } from "astal/gtk4";
|
||||
import Hyprland from "./modules/Hyprland";
|
||||
import Calendar from "./modules/Calendar";
|
||||
import QuickView from "./modules/QuickView";
|
||||
import SystemInfo from "./modules/SystemInfo";
|
||||
import { CenterBox } from "astal/gtk4/widget";
|
||||
import {
|
||||
App, Astal, Gdk, Gtk
|
||||
} from 'astal/gtk4';
|
||||
import Calendar from './modules/Calendar';
|
||||
import {
|
||||
CenterBox
|
||||
} from 'astal/gtk4/widget';
|
||||
import Hyprland from './modules/Hyprland';
|
||||
import QuickView from './modules/QuickView';
|
||||
import SystemInfo from './modules/SystemInfo';
|
||||
|
||||
const Bar = ( { gdkmonitor, name }: { gdkmonitor: Gdk.Monitor, name: string } ) => {
|
||||
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;
|
||||
const Bar = ( {
|
||||
gdkmonitor, name
|
||||
}: {
|
||||
'gdkmonitor': Gdk.Monitor,
|
||||
'name': string
|
||||
} ) => {
|
||||
const {
|
||||
TOP, LEFT, RIGHT
|
||||
} = Astal.WindowAnchor;
|
||||
|
||||
return (
|
||||
<window
|
||||
gdkmonitor={gdkmonitor}
|
||||
cssClasses={["Bar"]}
|
||||
cssClasses={[ 'Bar' ]}
|
||||
name={name}
|
||||
namespace={"bar"}
|
||||
namespace={'bar'}
|
||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||
anchor={TOP | LEFT | RIGHT}
|
||||
visible
|
||||
@@ -21,13 +32,13 @@ const Bar = ( { gdkmonitor, name }: { gdkmonitor: Gdk.Monitor, name: string } )
|
||||
child={
|
||||
<CenterBox
|
||||
orientation={Gtk.Orientation.HORIZONTAL}
|
||||
start_widget={
|
||||
startWidget={
|
||||
<box
|
||||
hexpand
|
||||
halign={Gtk.Align.START}
|
||||
>
|
||||
<Hyprland.ModeStatus />
|
||||
<Calendar.Time />
|
||||
<SystemInfo.SystemInfo />
|
||||
<Hyprland.Workspace />
|
||||
</box>
|
||||
}
|
||||
@@ -36,9 +47,9 @@ const Bar = ( { gdkmonitor, name }: { gdkmonitor: Gdk.Monitor, name: string } )
|
||||
<box
|
||||
hexpand
|
||||
halign={Gtk.Align.END}
|
||||
cssClasses={["BarRight"]}
|
||||
cssClasses={[ 'BarRight' ]}
|
||||
>
|
||||
<Hyprland.SysTray />
|
||||
<SystemInfo.SystemInfo />
|
||||
<QuickView.QuickView />
|
||||
</box>
|
||||
}
|
||||
@@ -49,20 +60,23 @@ const Bar = ( { gdkmonitor, name }: { gdkmonitor: Gdk.Monitor, name: string } )
|
||||
};
|
||||
|
||||
const cliHandler = ( args: string[] ): string => {
|
||||
return "Not implemented";
|
||||
console.debug( args );
|
||||
|
||||
return 'Not implemented';
|
||||
};
|
||||
|
||||
const BarLauncher = ( monitor: Gdk.Monitor ) => {
|
||||
const windowName = `bar-${monitor.get_connector()}`
|
||||
const windowName = `bar-${ monitor.get_connector() }`;
|
||||
|
||||
const createBar = () => {
|
||||
return <Bar gdkmonitor={monitor} name={windowName}></Bar>
|
||||
}
|
||||
return <Bar gdkmonitor={monitor} name={windowName}></Bar>;
|
||||
};
|
||||
|
||||
// Actually start the bar
|
||||
createBar();
|
||||
|
||||
return windowName;
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
BarLauncher,
|
||||
|
||||
@@ -11,6 +11,50 @@ window.Bar {
|
||||
/* border-radius: 10px; */
|
||||
/* margin: 8px; */
|
||||
/* } */
|
||||
.mode-status {
|
||||
color: white;
|
||||
background-color: #00002dff;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-left: 5px;
|
||||
border-radius: 20px;
|
||||
font-family: $monospace-font;
|
||||
|
||||
&.command-mode {
|
||||
background-color: darkslategray;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.windowing-mode {
|
||||
background-color: darkslategray;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.workspace-mode {
|
||||
background-color: darkblue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.launch-mode {
|
||||
background-color: darkgreen;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.device-mode {
|
||||
background-color: darkred;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.screenshotting-mode {
|
||||
background-color: purple;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.notifications-mode {
|
||||
background-color: darkorange;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.bar-button {
|
||||
border-radius: 20px;
|
||||
@@ -54,6 +98,7 @@ window.Bar {
|
||||
.time {
|
||||
min-width: 11rem;
|
||||
padding: 3px;
|
||||
|
||||
& button {
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
|
||||
@@ -1,75 +1,34 @@
|
||||
import AstalTray from "gi://AstalTray";
|
||||
import { bind, GObject } from "astal";
|
||||
import AstalHyprland from "gi://AstalHyprland";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import {
|
||||
bind,
|
||||
exec,
|
||||
readFile
|
||||
} from 'astal';
|
||||
import AstalHyprland from 'gi://AstalHyprland';
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
import Pango from 'gi://Pango?version=1.0';
|
||||
|
||||
const hypr = AstalHyprland.get_default();
|
||||
const SYNC = GObject.BindingFlags.SYNC_CREATE;
|
||||
|
||||
const SysTray = () => {
|
||||
const trayBox = new Gtk.Box({ cssClasses: ["bar-button"] });
|
||||
const tray = AstalTray.get_default();
|
||||
|
||||
const trayItems = new Map<string, Gtk.MenuButton>();
|
||||
const trayAddedHandler = tray.connect("item-added", (_, id) => {
|
||||
const item = tray.get_item(id);
|
||||
const popover = Gtk.PopoverMenu.new_from_model(item.menu_model);
|
||||
const icon = new Gtk.Image();
|
||||
const button = new Gtk.MenuButton({
|
||||
popover,
|
||||
child: icon,
|
||||
cssClasses: ["tray-item"],
|
||||
});
|
||||
|
||||
item.bind_property("gicon", icon, "gicon", SYNC);
|
||||
popover.insert_action_group("dbusmenu", item.action_group);
|
||||
item.connect("notify::action-group", () => {
|
||||
popover.insert_action_group("dbusmenu", item.action_group);
|
||||
});
|
||||
|
||||
trayItems.set(id, button);
|
||||
trayBox.append(button);
|
||||
});
|
||||
|
||||
const trayRemovedHandler = tray.connect("item-removed", (_, id) => {
|
||||
const button = trayItems.get(id);
|
||||
if (button) {
|
||||
trayBox.remove(button);
|
||||
button.run_dispose();
|
||||
trayItems.delete(id);
|
||||
}
|
||||
});
|
||||
|
||||
trayBox.connect("destroy", () => {
|
||||
tray.disconnect(trayAddedHandler);
|
||||
tray.disconnect(trayRemovedHandler);
|
||||
});
|
||||
|
||||
return trayBox;
|
||||
};
|
||||
|
||||
const Workspace = () => {
|
||||
return (
|
||||
<box>
|
||||
{bind(hypr, "workspaces").as(wss =>
|
||||
wss
|
||||
{bind( hypr, 'workspaces' ).as( wss => wss
|
||||
.filter( ws => !( ws.id >= -99 && ws.id <= -2 ) ) // filter out special workspaces
|
||||
.sort( ( a, b ) => a.id - b.id )
|
||||
.map( ws => (
|
||||
<button
|
||||
cssClasses={bind(hypr, "focusedWorkspace").as(fw =>
|
||||
ws === fw
|
||||
cssClasses={bind( hypr, 'focusedWorkspace' ).as( fw => ws === fw
|
||||
? [
|
||||
"focused-workspace-button",
|
||||
"workspace-button",
|
||||
'focused-workspace-button',
|
||||
'workspace-button',
|
||||
]
|
||||
: ["workspace-button"],
|
||||
)}
|
||||
: [ 'workspace-button' ], )}
|
||||
onButtonPressed={() => ws.focus()}
|
||||
child={<label label={String( ws.id )}></label>}
|
||||
></button>
|
||||
)),
|
||||
)}
|
||||
) ), )}
|
||||
</box>
|
||||
);
|
||||
};
|
||||
@@ -79,15 +38,15 @@ const Workspace = () => {
|
||||
* displaying all available clients
|
||||
*/
|
||||
const ActiveWindow = () => {
|
||||
const focused = bind(hypr, "focusedClient");
|
||||
const focused = bind( hypr, 'focusedClient' );
|
||||
|
||||
const WindowPopover = (): Gtk.Popover => {
|
||||
// Set up boxes + Popover
|
||||
const popover = new Gtk.Popover();
|
||||
|
||||
const popoverBox = WindowPopoverBox();
|
||||
|
||||
popover.set_child( popoverBox );
|
||||
|
||||
return popover;
|
||||
};
|
||||
|
||||
@@ -100,23 +59,67 @@ const ActiveWindow = () => {
|
||||
<box visible={focused.as( Boolean )}>
|
||||
<button
|
||||
onClicked={() => windowPopover.popup()}
|
||||
cssClasses={["bar-button"]}
|
||||
cssClasses={[ 'bar-button' ]}
|
||||
child={
|
||||
focused.as(
|
||||
client =>
|
||||
client && (
|
||||
<label label={bind(client, "title").as(String)} />
|
||||
),
|
||||
)
|
||||
focused.as( client => client && (
|
||||
<label
|
||||
maxWidthChars={70}
|
||||
ellipsize={Pango.EllipsizeMode.END}
|
||||
label={bind( client, 'title' ).as( String )} />
|
||||
), )
|
||||
}></button>
|
||||
{windowPopover}
|
||||
</box >
|
||||
);
|
||||
};
|
||||
|
||||
type submaps = 'device' | 'launch' | 'workspace' | 'windowing' | 'screenshotting' | 'notifications' | '';
|
||||
|
||||
const ModeStatus = () => {
|
||||
let isUsingHyprvim = false;
|
||||
|
||||
try {
|
||||
const path = exec( 'bash -c "cd ~ && pwd"' ) + '/.config/hyprvim';
|
||||
|
||||
isUsingHyprvim = readFile( path ).trim() === 'y';
|
||||
} catch ( e ) {
|
||||
printerr( 'Failed to read hyprvim config', e );
|
||||
}
|
||||
|
||||
const label = new Gtk.Label();
|
||||
|
||||
if ( !isUsingHyprvim ) return label;
|
||||
|
||||
print( '==> Using hyprvim config' );
|
||||
|
||||
const map = {
|
||||
'device': 'DEV',
|
||||
'launch': 'LNC',
|
||||
'workspace': 'WSP',
|
||||
'windowing': 'WIN',
|
||||
'screenshotting': 'SCS',
|
||||
'notifications': 'NOT',
|
||||
'': 'NRM'
|
||||
};
|
||||
|
||||
label.label = map[''];
|
||||
label.cssClasses = [ 'mode-status' ];
|
||||
|
||||
// TODO: Possibly add popover to it that lists binds
|
||||
hypr.connect( 'submap', ( _, name: submaps ) => {
|
||||
label.label = map[name];
|
||||
label.cssClasses = [
|
||||
'mode-status',
|
||||
name + '-mode'
|
||||
];
|
||||
} );
|
||||
|
||||
return label;
|
||||
};
|
||||
|
||||
const WindowPopoverBox = () => {
|
||||
return <box vertical>
|
||||
<label label={"Available Windows"} cssClasses={['title-2']}></label>
|
||||
<label label={'Available Windows'} cssClasses={[ 'title-2' ]}></label>
|
||||
<Gtk.Separator marginTop={5} marginBottom={5}></Gtk.Separator>
|
||||
<box vertical>
|
||||
{bind( hypr, 'clients' ).as( clients => {
|
||||
@@ -129,15 +132,15 @@ const WindowPopoverBox = () => {
|
||||
</box>
|
||||
}
|
||||
onClicked={() => client.focus()}
|
||||
></button>
|
||||
})
|
||||
></button>;
|
||||
} );
|
||||
} )}
|
||||
</box>
|
||||
</box>
|
||||
}
|
||||
</box>;
|
||||
};
|
||||
|
||||
export default {
|
||||
Workspace,
|
||||
ActiveWindow,
|
||||
SysTray,
|
||||
ModeStatus
|
||||
};
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
import { bind } from "astal";
|
||||
import AstalBattery from "gi://AstalBattery";
|
||||
import AstalBluetooth from "gi://AstalBluetooth";
|
||||
import AstalNetwork from "gi://AstalNetwork";
|
||||
import AstalWp from "gi://AstalWp";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import Brightness from "../../../util/brightness";
|
||||
import QuickActions from "../../QuickActions/QuickActions";
|
||||
import AstalBattery from 'gi://AstalBattery';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth';
|
||||
import AstalNetwork from 'gi://AstalNetwork';
|
||||
import AstalWp from 'gi://AstalWp';
|
||||
import Brightness from '../../../util/brightness';
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
import QuickActions from '../../QuickActions/QuickActions';
|
||||
import {
|
||||
bind
|
||||
} from 'astal';
|
||||
import {
|
||||
execAsync
|
||||
} from 'astal';
|
||||
|
||||
const STATE = AstalNetwork.DeviceState;
|
||||
|
||||
const QuickView = () => {
|
||||
const qa = QuickActions.QuickActions();
|
||||
|
||||
const showQuickActions = () => {
|
||||
qa.popup();
|
||||
};
|
||||
@@ -18,14 +26,14 @@ const QuickView = () => {
|
||||
return (
|
||||
<button
|
||||
onClicked={() => showQuickActions()}
|
||||
cssClasses={["quick-action-button"]}
|
||||
cssClasses={[ 'quick-action-button' ]}
|
||||
child={
|
||||
<box>
|
||||
<BatteryWidget></BatteryWidget>
|
||||
<Audio></Audio>
|
||||
<BluetoothWidget></BluetoothWidget>
|
||||
<NetworkWidget></NetworkWidget>
|
||||
<image iconName={"system-shutdown-symbolic"}></image>
|
||||
<image iconName={'system-shutdown-symbolic'}></image>
|
||||
{qa}
|
||||
</box>
|
||||
}
|
||||
@@ -39,37 +47,39 @@ const NetworkWidget = () => {
|
||||
return (
|
||||
<box>
|
||||
<image
|
||||
iconName={bind(network, "state").as(state => {
|
||||
iconName={bind( network, 'state' ).as( state => {
|
||||
if ( state === AstalNetwork.State.CONNECTING ) {
|
||||
return "chronometer-reset-symbolic";
|
||||
return 'chronometer-reset-symbolic';
|
||||
} else if (
|
||||
state === AstalNetwork.State.CONNECTED_LOCAL ||
|
||||
state === AstalNetwork.State.CONNECTED_SITE ||
|
||||
state === AstalNetwork.State.CONNECTED_GLOBAL
|
||||
state === AstalNetwork.State.CONNECTED_LOCAL
|
||||
|| state === AstalNetwork.State.CONNECTED_SITE
|
||||
|| state === AstalNetwork.State.CONNECTED_GLOBAL
|
||||
) {
|
||||
return "network-wired-activated-symbolic";
|
||||
return 'network-wired-activated-symbolic';
|
||||
} else {
|
||||
return "paint-unknown-symbolic";
|
||||
return 'paint-unknown-symbolic';
|
||||
}
|
||||
} )}
|
||||
cssClasses={["network-widget", "quick-view-symbol"]}
|
||||
visible={bind(network.wifi, "state").as(
|
||||
state => state !== STATE.ACTIVATED,
|
||||
)}
|
||||
cssClasses={[
|
||||
'network-widget',
|
||||
'quick-view-symbol'
|
||||
]}
|
||||
visible={bind( network.wifi, 'state' ).as( state => state !== STATE.ACTIVATED, )}
|
||||
></image>
|
||||
<image
|
||||
iconName={bind(network.wifi, "state").as(state => {
|
||||
iconName={bind( network.wifi, 'state' ).as( state => {
|
||||
if ( state === STATE.ACTIVATED ) {
|
||||
return network.wifi.iconName;
|
||||
} else {
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
} )}
|
||||
tooltipText={bind( network.wifi, 'ssid' )}
|
||||
cssClasses={["network-widget", "quick-view-symbol"]}
|
||||
visible={bind(network.wifi, "state").as(
|
||||
state => state === STATE.ACTIVATED,
|
||||
)}
|
||||
cssClasses={[
|
||||
'network-widget',
|
||||
'quick-view-symbol'
|
||||
]}
|
||||
visible={bind( network.wifi, 'state' ).as( state => state === STATE.ACTIVATED, )}
|
||||
></image>
|
||||
</box>
|
||||
);
|
||||
@@ -77,40 +87,36 @@ const NetworkWidget = () => {
|
||||
|
||||
const BluetoothWidget = () => {
|
||||
const bluetooth = AstalBluetooth.get_default();
|
||||
const enabled = bind(bluetooth, "isPowered");
|
||||
const connected = bind(bluetooth, "isConnected");
|
||||
const enabled = bind( bluetooth, 'isPowered' );
|
||||
const connected = bind( bluetooth, 'isConnected' );
|
||||
|
||||
// For each connected BT device, render status
|
||||
return (
|
||||
<box>
|
||||
<box visible={enabled.as( e => e )}>
|
||||
<image
|
||||
iconName={"bluetooth-active-symbolic"}
|
||||
iconName={'bluetooth-active-symbolic'}
|
||||
visible={connected.as( c => c )}
|
||||
></image>
|
||||
<image
|
||||
iconName={"bluetooth-disconnected-symbolic"}
|
||||
iconName={'bluetooth-disconnected-symbolic'}
|
||||
visible={connected.as( c => !c )}
|
||||
></image>
|
||||
</box>
|
||||
<image
|
||||
iconName={"bluetooth-disabled-symbolic"}
|
||||
iconName={'bluetooth-disabled-symbolic'}
|
||||
visible={enabled.as( e => !e )}
|
||||
></image>
|
||||
<box>
|
||||
{bind(bluetooth, "devices").as(devices => {
|
||||
{bind( bluetooth, 'devices' ).as( devices => {
|
||||
return devices.map( device => {
|
||||
return (
|
||||
<image
|
||||
iconName={bind(device, "icon").as(
|
||||
icon => icon,
|
||||
)}
|
||||
visible={bind(device, "connected")}
|
||||
tooltipText={bind(device, "batteryPercentage").as(
|
||||
n => {
|
||||
return device.get_name() + ': ' + n + "%";
|
||||
},
|
||||
)}
|
||||
iconName={bind( device, 'icon' ).as( icon => icon, )}
|
||||
visible={bind( device, 'connected' )}
|
||||
tooltipText={bind( device, 'batteryPercentage' ).as( n => {
|
||||
return device.get_name() + ': ' + n + '%';
|
||||
}, )}
|
||||
></image>
|
||||
);
|
||||
} );
|
||||
@@ -120,14 +126,27 @@ const BluetoothWidget = () => {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
let hasSentNotification = false;
|
||||
|
||||
const BatteryWidget = () => {
|
||||
const battery = AstalBattery.get_default();
|
||||
|
||||
if ( battery.get_is_present() ) {
|
||||
return (
|
||||
<image
|
||||
iconName={bind(battery, "iconName").as(icon => icon)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
tooltipText={bind(battery, 'percentage').as(p => `${Math.round(p * 100)}%`)}
|
||||
iconName={bind( battery, 'batteryIconName' ).as( icon => icon )}
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
tooltipText={bind( battery, 'percentage' ).as( p => {
|
||||
const level = Math.round( p * 100 );
|
||||
|
||||
if ( level < 20 && !hasSentNotification ) {
|
||||
hasSentNotification = true;
|
||||
execAsync( 'bash -c "notify-send \'Battery level below 20%\'"' );
|
||||
}
|
||||
|
||||
return `Battery Level: ${ level }%`;
|
||||
} )}
|
||||
></image>
|
||||
);
|
||||
} else {
|
||||
@@ -138,14 +157,14 @@ const BatteryWidget = () => {
|
||||
|
||||
const BrightnessWidget = () => {
|
||||
const brightness = Brightness.get_default();
|
||||
const screen_brightness = bind(brightness, "screen");
|
||||
const screen_brightness = bind( brightness, 'screen' );
|
||||
|
||||
return (
|
||||
<box cssClasses={["quick-view-symbol"]}>
|
||||
<image iconName={"brightness-high-symbolic"}></image>
|
||||
<box cssClasses={[ 'quick-view-symbol' ]}>
|
||||
<image iconName={'brightness-high-symbolic'}></image>
|
||||
<label
|
||||
label={screen_brightness.as( b => '' + Math.round( 100 * b ) )}
|
||||
visible={bind(brightness, "screenAvailable")}
|
||||
visible={bind( brightness, 'screenAvailable' )}
|
||||
></label>
|
||||
</box>
|
||||
);
|
||||
@@ -153,31 +172,27 @@ const BrightnessWidget = () => {
|
||||
|
||||
const Audio = () => {
|
||||
const wireplumber = AstalWp.get_default();
|
||||
|
||||
if ( wireplumber ) {
|
||||
return (
|
||||
<box orientation={Gtk.Orientation.HORIZONTAL}>
|
||||
<image
|
||||
iconName={bind(wireplumber.defaultSpeaker, "volumeIcon").as(
|
||||
icon => icon,
|
||||
)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
iconName={bind( wireplumber.defaultSpeaker, 'volumeIcon' ).as( icon => icon, )}
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
tooltipText={bind( wireplumber.defaultSpeaker, 'volume' ).as( v => Math.round( 100 * v ) + '%' )}
|
||||
></image>
|
||||
<image
|
||||
iconName={bind(
|
||||
wireplumber.defaultMicrophone,
|
||||
"volumeIcon",
|
||||
).as(icon => icon)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
iconName={bind( wireplumber.defaultMicrophone,
|
||||
'volumeIcon', ).as( icon => icon )}
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
tooltipText={bind( wireplumber.defaultMicrophone, 'volume' ).as( v => Math.round( 100 * v ) + '%' )}
|
||||
></image>
|
||||
</box>
|
||||
);
|
||||
} else {
|
||||
print(
|
||||
"[ WirePlumber ] Could not connect, Audio support in bar will be missing",
|
||||
);
|
||||
return <image iconName={"action-unavailable-symbolic"}></image>;
|
||||
print( '[ WirePlumber ] Could not connect, Audio support in bar will be missing', );
|
||||
|
||||
return <image iconName={'action-unavailable-symbolic'}></image>;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -185,4 +200,5 @@ const Audio = () => {
|
||||
|
||||
export default {
|
||||
QuickView,
|
||||
BrightnessWidget
|
||||
};
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
import { execAsync } from "astal";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import sysinfo from "../sysinfo";
|
||||
import {
|
||||
Gtk
|
||||
} from 'astal/gtk4';
|
||||
import {
|
||||
execAsync
|
||||
} from 'astal';
|
||||
import sysinfo from '../sysinfo';
|
||||
|
||||
const info = () => {
|
||||
return (
|
||||
<box vertical>
|
||||
<label
|
||||
label={"System Information"}
|
||||
cssClasses={["title-2"]}
|
||||
label={'System Information'}
|
||||
cssClasses={[ 'title-2' ]}
|
||||
></label>
|
||||
<Gtk.Separator marginTop={5} marginBottom={10}></Gtk.Separator>
|
||||
<label
|
||||
@@ -15,7 +19,7 @@ const info = () => {
|
||||
halign={Gtk.Align.START}
|
||||
hexpand
|
||||
label={sysinfo.ramUsed( used => {
|
||||
return "RAM: " + used + ` (${sysinfo.ramUtil.get()}%)`;
|
||||
return 'RAM: ' + used + ` (${ sysinfo.ramUtil.get() }%)`;
|
||||
} )}
|
||||
></label>
|
||||
<label
|
||||
@@ -27,9 +31,9 @@ Kernel: ${stats.kernel}`;
|
||||
></label>
|
||||
<Gtk.Separator marginTop={10}></Gtk.Separator>
|
||||
<button
|
||||
onClicked={() => execAsync(`/bin/sh -c "kitty --hold fish -c 'fastfetch'"`)}
|
||||
onClicked={() => execAsync( '/bin/sh -c "kitty --hold fish -c \'fastfetch\'"' )}
|
||||
child={
|
||||
<label label={"View FastFetch"}></label>
|
||||
<label label={'View FastFetch'}></label>
|
||||
}></button>
|
||||
</box>
|
||||
);
|
||||
@@ -64,7 +68,7 @@ const SystemInfo = () => {
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
>
|
||||
<image
|
||||
iconName={"power-profile-performance-symbolic"}
|
||||
iconName={'power-profile-performance-symbolic'}
|
||||
marginEnd={1}
|
||||
></image>
|
||||
<label
|
||||
@@ -75,23 +79,23 @@ const SystemInfo = () => {
|
||||
<box
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
>
|
||||
<image iconName={"histogram-symbolic"}></image>
|
||||
<image iconName={'memory'}></image>
|
||||
<label label={sysinfo.ramUtil( util => util )}></label>
|
||||
</box>
|
||||
<box
|
||||
cssClasses={[ 'quick-view-symbol' ]}
|
||||
>
|
||||
<image iconName={"show-gpu-effects-symbolic"}></image>
|
||||
<image iconName={'show-gpu-effects-symbolic'}></image>
|
||||
<label label={sysinfo.gpuUtil( util => util )}></label>
|
||||
</box>
|
||||
{panel}
|
||||
</box>
|
||||
}
|
||||
cssClasses={["bar-button"]}
|
||||
cssClasses={[ 'bar-button' ]}
|
||||
></button>
|
||||
);
|
||||
} else {
|
||||
return <image iconName={"action-unavailable-symbolic"}></image>;
|
||||
return <image iconName={'action-unavailable-symbolic'}></image>;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
$fg-color: #E6E6E6;
|
||||
$bg-color: #141414;
|
||||
$fg-color: #C8DCFF;
|
||||
$bg-color: #0A0A0F;
|
||||
$accent-color: #591641;
|
||||
$accent-color-2: #97103A;
|
||||
$shadow-color: rgba(40, 40, 40, 0.3);
|
||||
$shadow-color: rgba(0, 0, 2, 0.3);
|
||||
$monospace-font: Source Code Pro
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
alias ls='ls -l --color'
|
||||
alias ll='ls -la --color'
|
||||
alias v='nvim'
|
||||
alias i='vimiv'
|
||||
alias c='clear'
|
||||
alias zs='zathura-sandbox'
|
||||
alias z='zathura'
|
||||
alias bt='bluetui'
|
||||
alias vicfg='cd ~/.config/nvim/ && nvim'
|
||||
alias vicfg='nvim ~/projects/nvim/'
|
||||
alias fm='thunar .'
|
||||
alias gl='git ls-files --others --exclude-standard'
|
||||
alias gm='gti ls-files -m'
|
||||
@@ -12,19 +14,21 @@ alias gpu='git push'
|
||||
alias gp='git pull'
|
||||
alias gc='git commit -a -m'
|
||||
alias ga='git add ./*'
|
||||
alias cfh='nvim ~/projects/active/dotfiles/config/hypr/'
|
||||
alias cfn='nvim ~/projects/active/nvim/'
|
||||
alias cff='nvim ~/projects/active/dotfiles/config/fish/'
|
||||
alias cfw='nvim ~/projects/archive/dotfiles-old/pc/configs/waybar/'
|
||||
alias cfa='nvim ~/projects/active/dotfiles/config/ags/'
|
||||
alias cf='nvim ~/projects/active/dotfiles/'
|
||||
alias cfh='nvim ~/projects/dotfiles/config/hypr/'
|
||||
alias cfn='nvim ~/projects/nvim/'
|
||||
alias cff='nvim ~/projects/dotfiles/config/fish/'
|
||||
alias cfa='nvim ~/projects/dotfiles/config/astal/'
|
||||
alias cf='nvim ~/projects/dotfiles/'
|
||||
alias g='lazygit'
|
||||
alias open-webui='sudo systemctl start docker && sudo docker start -i open-webui'
|
||||
alias ai='ollama serve'
|
||||
alias ff='fastfetch'
|
||||
alias p='nvimpager -p'
|
||||
alias latexdocs='zathura ~/projects/latex/docs/docs.pdf &>> /dev/null & disown'
|
||||
alias gccerr='gcc -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -std=c99'
|
||||
|
||||
# Add scripts in ~/projects/active/dotfiles/general/scripts/ to path
|
||||
fish_add_path -P ~/projects/active/dotfiles/scripts/
|
||||
# Add scripts in ~/projects/dotfiles/scripts/ to path
|
||||
fish_add_path -P ~/projects/dotfiles/scripts/
|
||||
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
@@ -36,7 +40,6 @@ function y
|
||||
end
|
||||
|
||||
zoxide init --cmd j fish | source
|
||||
# [ -f /usr/share/autojump/autojump.fish ]; and source /usr/share/autojump/autojump.fish
|
||||
|
||||
if status is-interactive
|
||||
function fish_prompt
|
||||
@@ -124,3 +127,5 @@ end
|
||||
|
||||
|
||||
end
|
||||
|
||||
set -g fish_greeting ""
|
||||
|
||||
33
config/fish/fish_variables
Executable file
33
config/fish/fish_variables
Executable file
@@ -0,0 +1,33 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3800
|
||||
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:blue
|
||||
SETUVAR fish_color_comment:red
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:green
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:brcyan
|
||||
SETUVAR fish_color_param:cyan
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_greeting:\x1d
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||
SETUVAR fish_user_paths:/usr/lib/python3\x2e11/site\x2dpackages\x1e/usr/lib/python3\x2e11\x1e/usr/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/
|
||||
@@ -9,30 +9,19 @@
|
||||
#██████████████ █████ ████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
general {
|
||||
lock_cmd = hyprlock --immediate
|
||||
lock_cmd = hyprlock
|
||||
unlock_cmd = loginctl unlock-session
|
||||
before_sleep_cmd = hyprlock --immediate
|
||||
after_sleep_cmd = hyprlock --immediate
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 100
|
||||
on-timeout = notify-send "Entering idle state... (200s to screen off)"
|
||||
on-resume = notify-send "Welcome back!"
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 200
|
||||
on-timeout = notify-send "100s to screen off"
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 210
|
||||
on-timeout = hyprlock
|
||||
before_sleep_cmd = hyprlock
|
||||
after_sleep_cmd = hyprlock
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 300
|
||||
on-timeout = hyprlock --grace 15
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 360
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ $mainMod = SUPER
|
||||
# These key-binds are non-specific, laptop config has a separate file that includes
|
||||
# extra config for it specifically
|
||||
bind = $mainMod, Q, killactive
|
||||
# bind = $mainMod SHIFT, Q, exit
|
||||
bind = $mainMod, Return, exec, kitty
|
||||
# bind = $mainMod, E, exec, thunar
|
||||
bind = $mainMod SHIFT, E, exec, thunar
|
||||
bind = $mainMod, E, exec, kitty --hold fish -c "y"
|
||||
bind = $mainMod, V, togglefloating,
|
||||
@@ -46,13 +44,11 @@ bind = $mainMod SHIFT, L, exec, librewolf
|
||||
bind = $mainMod SHIFT, D, exec, vesktop
|
||||
bind = $mainMod SHIFT, V, exec, vscodium
|
||||
bind = $mainMod SHIFT, T, exec, thunderbird
|
||||
bind = $mainMod SHIFT, H, exec, heroic
|
||||
bind = $mainMod CTRL, H, exec, heroic
|
||||
bind = $mainMod SHIFT, Z, exec, zathura
|
||||
bind = $mainMod SHIFT, I, exec, notify-send 'AirPlay video server starting...' --app-name="AirPlay Video" && terminator -e "systemctl start avahi-daemon && sleep 5 && uxplay -n LinuxVideoPlay -nh"
|
||||
bind = $mainMod SHIFT, A, exec, notify-send 'AirPlay server starting...' --app-name="AirPlay Audio" && terminator -T "hidden-terminator" -e "systemctl start avahi-daemon && shairport-sync -a LinuxPlay"
|
||||
bind = $mainMod SHIFT, G, exec, notify-send 'Preparing system for gaming...' --app-name="Util" && corectrl
|
||||
bind = $mainMod SHIFT, P, exec, notify-send 'Steam is launching...' --app-name="Steam" && steam
|
||||
bind = $mainMod SHIFT, R, exec, notify-send 'Launching in Remoteplay optimised session' --app-name="Steam" && steam -pipewire
|
||||
bind = $mainMod CTRL, K, exec, notify-send 'Insta-Kill activated' --app-name="Hyprctl" && hyprctl kill
|
||||
bind = $mainMod SHIFT, O, exec, terminator -e "~/projects/dotfiles/ai.sh"
|
||||
|
||||
@@ -70,12 +66,12 @@ bind = SHIFT, PRINT, exec, grimblast --notify save screen
|
||||
# │ Rofi commands │
|
||||
# └ ┘
|
||||
bind = $mainMod, Space, exec, killall rofi || rofi -show combi -modes combi -combi-modes "window,drun,run"
|
||||
bind = $mainMod SHIFT, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
||||
|
||||
# ┌ ┐
|
||||
# │ Logout commands │
|
||||
# └ ┘
|
||||
bind = $mainMod, escape, exec, wlogout
|
||||
bind = $mainMod ALT CTRL, L, exec, hyprlock --immediate
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
@@ -85,14 +81,6 @@ bind = $mainMod ALT CTRL, L, exec, hyprlock --immediate
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Move focus with mainMod + arrow keys │
|
||||
# └ ┘
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# ┌ ┐
|
||||
# │ Same with vim-motions │
|
||||
# └ ┘
|
||||
@@ -140,6 +128,12 @@ bind = $mainMod SHIFT, j, movetoworkspace, e-1
|
||||
bind = $mainMod SHIFT, k, movetoworkspace, e+1
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Special workspace │
|
||||
# └ ┘
|
||||
bind = $mainMod SHIFT, M, movetoworkspace, special
|
||||
bind = $mainMod, M, togglespecialworkspace
|
||||
|
||||
# ┌ ┐
|
||||
# │ Scroll through existing workspaces with │
|
||||
# │ mainMod + scroll │
|
||||
@@ -148,30 +142,18 @@ bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Tile window to a part of the screen │
|
||||
# └ ┘
|
||||
# bind = $mainMod CTRL, left, movewindow, left
|
||||
# bind = $mainMod CTRL, right, movewindow, right
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ move to next window / previous window with │
|
||||
# │ ALT + Tab / SHIFT + ALT + Tab │
|
||||
# └ ┘
|
||||
bind = ALT SHIFT, tab, cyclenext, prev
|
||||
# bind = ALT, tab, cyclenext, next
|
||||
# bind = ALT CTRL, tab, focusurgentorlast
|
||||
bind = ALT, tab, focusurgentorlast
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Master layout commands │
|
||||
# │ Dwindle layout commands │
|
||||
# └ ┘
|
||||
bind = $mainMod CTRL, M, layoutmsg, swapwithmaster
|
||||
bind = $mainMod SHIFT, A, layoutmsg, addmaster
|
||||
bind = $mainMod SHIFT CTRL, right, layoutmsg, orientationnext
|
||||
bind = $mainMod SHIFT CTRL, left, layoutmsg, orientationprev
|
||||
bind = $mainMod CTRL, M, layoutmsg, swapsplit
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
@@ -182,6 +164,39 @@ bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Resize window with keybinds (change split) │
|
||||
# └ ┘
|
||||
bind = $mainMod ALT, T, submap, split
|
||||
|
||||
# Submap for split
|
||||
submap = split
|
||||
binde = , H, splitratio, -0.01
|
||||
binde = , L, splitratio, +0.01
|
||||
|
||||
# Reset bind
|
||||
bind = , escape, submap, reset
|
||||
|
||||
submap = reset
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Truly resize window with keybind (submap) │
|
||||
# └ ┘
|
||||
bind = $mainMod ALT, R, submap, resize
|
||||
|
||||
# Submap for resize
|
||||
submap = resize
|
||||
binde = , L, resizeactive, 10 0
|
||||
binde = , H, resizeactive, -10 0
|
||||
binde = , K, resizeactive, 0 -10
|
||||
binde = , J, resizeactive, 0 10
|
||||
|
||||
# Reset bind
|
||||
bind = , escape, submap, reset
|
||||
|
||||
submap = reset
|
||||
|
||||
# ┌ ┐
|
||||
# │ Freeze │
|
||||
# └ ┘
|
||||
@@ -199,8 +214,8 @@ bind = ,code:121, exec, pamixer -t
|
||||
# ┌ ┐
|
||||
# │ Brightness-Control │
|
||||
# └ ┘
|
||||
bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%' --app-name="Brightness"
|
||||
bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%' --app-name="Brightness"
|
||||
bind = ,code:232, exec, light -U 5
|
||||
bind = ,code:233, exec, light -A 5
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
@@ -208,3 +223,17 @@ bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased
|
||||
# └ ┘
|
||||
bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 1920x0, 1, mirror, DP-1 && notify-send 'Set FPV goggles to mirror main screen' --app-name="Hyprctl"
|
||||
bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 3840x0, 1 && notify-send 'Set to expand FPV goggles' --app-name="Hyprctl"
|
||||
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Funny windows user trolling binds │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
bind = CTRL ALT, Delete, exec, notify-send 'I am not Windows' 'Did ya really think that was gonna do anything? Only an eternally broken OS could need such a stupid keybind'
|
||||
bind = ALT, F4, exec, notify-send 'I am not Windows' 'That just feels like a way too unergonomic keybind to be used for such a common action'
|
||||
bind = $mainMod, left, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, right, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, up, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, down, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
|
||||
@@ -13,6 +13,6 @@ general {
|
||||
|
||||
decoration {
|
||||
shadow {
|
||||
color = rgb(282828)
|
||||
color = rgb(000002)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,14 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = hypridle
|
||||
exec-once = nm-applet
|
||||
exec-once = nextcloud --background
|
||||
# exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4 >> ~/log 2>&1"
|
||||
exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4"
|
||||
# exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/ >> ~/logn 2>&1"
|
||||
exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/"
|
||||
exec-once = sleep 2 && bash -c "ags run -d ~/projects/dotfiles/config/astal/ --gtk4 >> /tmp/runner-log 2>&1"
|
||||
# exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4"
|
||||
exec-once = bash -c "ags run -d ~/projects/dotfiles/config/ags/notifications/ >> /tmp/notifier-log 2>&1"
|
||||
# exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/"
|
||||
|
||||
# ── wlhist ──────────────────────────────────────────────────────────
|
||||
exec-once = wl-paste --type text --watch cliphist store # Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store # Stores only image data
|
||||
|
||||
|
||||
exec = hyprctl setcursor oreo_spark_blue_cursors 24
|
||||
@@ -36,6 +39,7 @@ input {
|
||||
natural_scroll = true
|
||||
|
||||
numlock_by_default = true
|
||||
repeat_delay = 400
|
||||
|
||||
follow_mouse = 2
|
||||
mouse_refocus = true
|
||||
@@ -47,43 +51,63 @@ input {
|
||||
|
||||
focus_on_close = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
sensitivity = 0
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = true
|
||||
workspace_swipe_distance = 300
|
||||
|
||||
# ── Cursors ─────────────────────────────────────────────────────────
|
||||
cursor {
|
||||
no_warps = false
|
||||
inactive_timeout = 5
|
||||
}
|
||||
|
||||
|
||||
# ── Bind config ─────────────────────────────────────────────────────
|
||||
binds {
|
||||
workspace_back_and_forth = true
|
||||
}
|
||||
|
||||
|
||||
# ── Gestures ────────────────────────────────────────────────────────
|
||||
gestures {
|
||||
workspace_swipe_distance = 200
|
||||
workspace_swipe_cancel_ratio = 0.3
|
||||
workspace_swipe_forever = true
|
||||
workspace_swipe_direction_lock = false
|
||||
}
|
||||
|
||||
gesture = 3, horizontal, workspace,
|
||||
gesture = 3, down, close
|
||||
gesture = 3, up, fullscreen
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ GENERAL CONFIG │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 3
|
||||
gaps_out = 4
|
||||
border_size = 1
|
||||
# col.active_border = rgba(cc5c00ff) rgba(cc5c00ff) rgba(ff0000ff) 45deg
|
||||
# col.inactive_border = rgba(595959aa)
|
||||
border_size = 2
|
||||
|
||||
layout = master
|
||||
layout = dwindle
|
||||
no_border_on_floating = false
|
||||
}
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Style │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
inactive_opacity = 1
|
||||
rounding = 10
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
# color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
blur {
|
||||
@@ -100,38 +124,26 @@ decoration {
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
animation = windows, 1, 4, myBezier
|
||||
animation = windowsOut, 1, 6, default, popin 80%
|
||||
animation = border, 1, 8, default
|
||||
animation = fade, 1, 3, default
|
||||
animation = workspaces, 1, 2, default
|
||||
animation = specialWorkspaceIn, 1, 2, default, fade
|
||||
animation = specialWorkspaceOut, 1, 2, default, fade
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = false
|
||||
vrr = 2
|
||||
vrr = 3
|
||||
allow_session_lock_restore = true
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
pseudotile = true
|
||||
force_split = 2
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
# no_gaps_when_only = true
|
||||
}
|
||||
|
||||
|
||||
cursor {
|
||||
no_warps = false
|
||||
inactive_timeout = 60
|
||||
}
|
||||
|
||||
|
||||
14
config/hypr/hyprland/modal-binds/README.md
Normal file
14
config/hypr/hyprland/modal-binds/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# hyprvim
|
||||
Using Vim Motions and in general vim-style commands is really neat - so why not apply to the Window Manager as well?
|
||||
|
||||
## Mapping
|
||||
- `Super + W`: Manage windows (close windows, resize them, change split)
|
||||
- `Super + Y`: Workspace management (change workspace, move windows to workspaces)
|
||||
- `Super + C`: Notification management (dismiss notifications)
|
||||
- `Super + X`: Launch commands (for software)
|
||||
- `Super + D`: Device management (brightness, volume, media, etc)
|
||||
- `Super + S`: Screenshot
|
||||
|
||||
There are several quick binds available, such as `Super + [0-9]` to switch workspaces, `Super + Shift + [0-9]` to move windows as well as `Super + [hjkl]` to move focus.
|
||||
|
||||
Additionally, there are shortcuts to commonly used apps, such as `Super + Enter` for `kitty`, `Super + Shift + L` for `librewolf` and `Super + Space` for `rofi`
|
||||
45
config/hypr/hyprland/modal-binds/device.conf
Normal file
45
config/hypr/hyprland/modal-binds/device.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ device config │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
|
||||
# ── Brightness-Control ──────────────────────────────────────────────
|
||||
bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
||||
bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
||||
|
||||
|
||||
# ── Volume control ──────────────────────────────────────────────────
|
||||
bind = ,code:123, exec, pamixer -i 5
|
||||
bind = ,code:122, exec, pamixer -d 5
|
||||
bind = ,code:121, exec, pamixer -t
|
||||
|
||||
|
||||
# ── Submap ──────────────────────────────────────────────────────────
|
||||
bind = $mainMod, D, submap, device
|
||||
submap = device
|
||||
|
||||
|
||||
# ── FPV goggles binds ───────────────────────────────────────────────
|
||||
bind = CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 1920x0, 1, mirror, DP-1 && notify-send 'Set FPV goggles to mirror main screen' --app-name="Hyprctl"
|
||||
bind = CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 3840x0, 1 && notify-send 'Set to expand FPV goggles' --app-name="Hyprctl"
|
||||
|
||||
|
||||
# ── Monitor config binds ────────────────────────────────────────────
|
||||
bind = SHIFT, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display'
|
||||
bind = SHIFT, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display'
|
||||
|
||||
|
||||
# ── Internal display controls ───────────────────────────────────────
|
||||
bind = , E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && cpupower-gui -b && notify-send 'Set to battery optimized settings'
|
||||
bind = , B, exec, hyprctl keyword monitor eDP-1, 2880x1800@120, 0x0, 1.5 && cpupower-gui -b && notify-send 'Set to balanced performance settings'
|
||||
bind = , P, exec, hyprctl keyword monitor eDP-1, 2880x1800@120, 0x0, 1.5 && cpupower-gui -p && notify-send 'Set to performance optimized settings'
|
||||
|
||||
|
||||
# ── Using docked ────────────────────────────────────────────────────
|
||||
bind = , D, exec, hyprctl keyword monitor eDP-1, disable
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
74
config/hypr/hyprland/modal-binds/launch.conf
Normal file
74
config/hypr/hyprland/modal-binds/launch.conf
Normal file
@@ -0,0 +1,74 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ App launching │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
bind = $mainMod, Return, exec, kitty
|
||||
|
||||
|
||||
# ── Rofi ────────────────────────────────────────────────────────────
|
||||
bind = $mainMod, Space, exec, killall rofi || rofi -show combi -modes combi -combi-modes "window,drun,run"
|
||||
bind = $mainMod SHIFT, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
||||
|
||||
|
||||
# ── Power / logout ──────────────────────────────────────────────────
|
||||
bind = $mainMod, escape, exec, wlogout
|
||||
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Launch submap │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
bind = $mainMod, X, submap, launch
|
||||
submap = launch
|
||||
|
||||
|
||||
# ── Kitty ───────────────────────────────────────────────────────────
|
||||
bind = , K, exec, kitty
|
||||
bind = , K, submap, reset
|
||||
bind = , Return, exec, kitty
|
||||
bind = , Return, submap, reset
|
||||
|
||||
|
||||
# ── Others ──────────────────────────────────────────────────────────
|
||||
bind = , L, exec, librewolf
|
||||
bind = , L, submap, reset
|
||||
|
||||
bind = , E, exec, thunar
|
||||
bind = , E, submap, reset
|
||||
|
||||
bind = , D, exec, vesktop
|
||||
bind = , D, submap, reset
|
||||
|
||||
bind = , V, exec, vscodium
|
||||
bind = , V, submap, reset
|
||||
|
||||
bind = , T, exec, thunderbird
|
||||
bind = , T, submap, reset
|
||||
|
||||
bind = , H, exec, heroic
|
||||
bind = , H, submap, reset
|
||||
|
||||
bind = , Z, exec, zathura
|
||||
bind = , Z, submap, reset
|
||||
|
||||
bind = , B, exec, /opt/bs-manager/bs-manager
|
||||
bind = , B, submap, reset
|
||||
|
||||
bind = , P, exec, alvr_dashboard
|
||||
bind = , P, submap, reset
|
||||
|
||||
bind = , A, exec, notify-send 'AirPlay server starting...' --app-name="AirPlay Audio" && terminator -T "hidden-terminator" -e "systemctl start avahi-daemon && shairport-sync -a LinuxPlay"
|
||||
bind = , A, submap, reset
|
||||
|
||||
bind = SHIFT, A, exec, notify-send 'AirPlay video server starting...' --app-name="AirPlay Video" && terminator -T "hidden-terminator" -e "systemctl start avahi-daemon && sleep 5 && uxplay -n LinuxVideoPlay -nh"
|
||||
bind = SHIFT, A, submap, reset
|
||||
|
||||
bind = , S, exec, notify-send 'Steam is launching...' --app-name="Steam" && steam
|
||||
bind = , S, submap, reset
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
30
config/hypr/hyprland/modal-binds/notifications.conf
Normal file
30
config/hypr/hyprland/modal-binds/notifications.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Notifications │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
|
||||
# ── Submap ──────────────────────────────────────────────────────────
|
||||
bind = $mainMod, C, submap, notifications
|
||||
submap = notifications
|
||||
|
||||
|
||||
bind = , T, exec, astal -i notifier toggle
|
||||
bind = , T, submap, reset
|
||||
|
||||
bind = , D, exec, astal -i notifier clear-newest
|
||||
bind = , D, submap, reset
|
||||
|
||||
bind = , C, exec, astal -i notifier clear
|
||||
bind = , C, submap, reset
|
||||
|
||||
bind = , S, exec, astal -i notifier show
|
||||
bind = , S, submap, reset
|
||||
|
||||
bind = , H, exec, astal -i notifier hide
|
||||
bind = , H, submap, reset
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
25
config/hypr/hyprland/modal-binds/screenshot.conf
Normal file
25
config/hypr/hyprland/modal-binds/screenshot.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Screenshotting binds │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
bind = $mainMod, S, submap, screenshotting
|
||||
submap = screenshotting
|
||||
|
||||
bind = , Y, exec, grimblast --notify copy area
|
||||
bind = , Y, submap, reset
|
||||
bind = , C, exec, grimblast --notify copysave area
|
||||
bind = , C, submap, reset
|
||||
bind = , S, exec, grimblast --notify save area
|
||||
bind = , S, submap, reset
|
||||
bind = SHIFT, Y, exec, grimblast --notify copy screen
|
||||
bind = SHIFT, Y, submap, reset
|
||||
bind = SHIFT, C, exec, grimblast --notify copysave screen
|
||||
bind = SHIFT, C, submap, reset
|
||||
bind = SHIFT, S, exec, grimblast --notify save screen
|
||||
bind = SHIFT, S, submap, reset
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
40
config/hypr/hyprland/modal-binds/window-management.conf
Normal file
40
config/hypr/hyprland/modal-binds/window-management.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Window management submap │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
bind = $mainMod, Q, killactive
|
||||
|
||||
# ── Resize, move using mouse plus mainMod ───────────────────────────
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
|
||||
# ── Submap ──────────────────────────────────────────────────────────
|
||||
bind = $mainMod, W, submap, windowing
|
||||
submap = windowing
|
||||
|
||||
# ── Resize windows ──────────────────────────────────────────────────
|
||||
binde = , L, resizeactive, 10 0
|
||||
binde = , H, resizeactive, -10 0
|
||||
binde = , K, resizeactive, 0 -10
|
||||
binde = , J, resizeactive, 0 10
|
||||
|
||||
|
||||
# ── Change splitratio ───────────────────────────────────────────────
|
||||
binde = SHIFT, H, splitratio, -0.01
|
||||
binde = SHIFT, L, splitratio, +0.01
|
||||
|
||||
|
||||
# ── Kill, freeze, etc ───────────────────────────────────────────────
|
||||
bind = SHIFT, f, exec, hyprfreeze -a
|
||||
bind = , x, killactive
|
||||
bind = , q, killactive
|
||||
bind = , f, fullscreen
|
||||
bind = , v, togglefloating
|
||||
bind = SHIFT, k, exec, notify-send 'Insta-Kill activated' --app-name="Hyprctl" && hyprctl kill
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
118
config/hypr/hyprland/modal-binds/workspace.conf
Normal file
118
config/hypr/hyprland/modal-binds/workspace.conf
Normal file
@@ -0,0 +1,118 @@
|
||||
# ┌ ┐
|
||||
# │ Switch workspaces with mainMod + [0-9] │
|
||||
# └ ┘
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# ┌ ┐
|
||||
# │ Move active window to a workspace with │
|
||||
# │ mainMod + SHIFT + [0-9] │
|
||||
# └ ┘
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# ┌ ┐
|
||||
# │ Move focus with vim motions │
|
||||
# └ ┘
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, j, movefocus, d
|
||||
bind = $mainMod, k, movefocus, u
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Special workspace │
|
||||
# └ ┘
|
||||
bind = $mainMod SHIFT, M, movetoworkspace, special
|
||||
bind = $mainMod, M, togglespecialworkspace
|
||||
|
||||
# ┌ ┐
|
||||
# │ Scroll through existing workspaces with │
|
||||
# │ mainMod + scroll │
|
||||
# └ ┘
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# ┌ ┐
|
||||
# │ move to next window / previous window with │
|
||||
# │ ALT + Tab / SHIFT + ALT + Tab │
|
||||
# └ ┘
|
||||
bind = ALT SHIFT, tab, cyclenext, prev
|
||||
bind = ALT, tab, focusurgentorlast
|
||||
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ Submap for workspace management │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
bind = $mainMod, Y, submap, workspace
|
||||
submap = workspace
|
||||
|
||||
# ── Move to workspace ───────────────────────────────────────────────
|
||||
bind = , 1, workspace, 1
|
||||
bind = , 2, workspace, 2
|
||||
bind = , 3, workspace, 3
|
||||
bind = , 4, workspace, 4
|
||||
bind = , 5, workspace, 5
|
||||
bind = , 6, workspace, 6
|
||||
bind = , 7, workspace, 7
|
||||
bind = , 8, workspace, 8
|
||||
bind = , 9, workspace, 9
|
||||
bind = , 0, workspace, 10
|
||||
|
||||
|
||||
# ── Move active window to workspace ─────────────────────────────────
|
||||
bind = SHIFT, 1, movetoworkspace, 1
|
||||
bind = SHIFT, 2, movetoworkspace, 2
|
||||
bind = SHIFT, 3, movetoworkspace, 3
|
||||
bind = SHIFT, 4, movetoworkspace, 4
|
||||
bind = SHIFT, 5, movetoworkspace, 5
|
||||
bind = SHIFT, 6, movetoworkspace, 6
|
||||
bind = SHIFT, 7, movetoworkspace, 7
|
||||
bind = SHIFT, 8, movetoworkspace, 8
|
||||
bind = SHIFT, 9, movetoworkspace, 9
|
||||
bind = SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
|
||||
# ── Move workspace with vim motions or mouse scroll ─────────────────
|
||||
bind = , h, workspace, e-1
|
||||
bind = , l, workspace, e+1
|
||||
bind = , mouse_down, workspace, e+1
|
||||
bind = , mouse_up, workspace, e-1
|
||||
|
||||
|
||||
# ── Move window to workspace with vim motions ───────────────────────
|
||||
bind = SHIFT, h, movetoworkspace, e-1
|
||||
bind = SHIFT, l, movetoworkspace, e+1
|
||||
|
||||
|
||||
# ── Special workspace ───────────────────────────────────────────────
|
||||
bind = , s, togglespecialworkspace
|
||||
bind = SHIFT, s, movetoworkspace, special
|
||||
|
||||
|
||||
# ── dwindle ─────────────────────────────────────────────────────────
|
||||
bind = , M, layoutmsg, swapsplit
|
||||
|
||||
|
||||
# ── Exit submap ─────────────────────────────────────────────────────
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
15
config/hypr/hyprland/mode-binds.conf
Normal file
15
config/hypr/hyprland/mode-binds.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
$mainMod = SUPER
|
||||
source=./modal-binds/workspace.conf
|
||||
source=./modal-binds/launch.conf
|
||||
source=./modal-binds/notifications.conf
|
||||
source=./modal-binds/window-management.conf
|
||||
source=./modal-binds/screenshot.conf
|
||||
source=./modal-binds/device.conf
|
||||
|
||||
|
||||
bind = CTRL ALT, Delete, exec, notify-send 'I am not Windows' 'Did ya really think that was gonna do anything? Only an eternally broken OS could need such a stupid keybind'
|
||||
bind = ALT, F4, exec, notify-send 'I am not Windows' 'That just feels like a way too unergonomic keybind to be used for such a common action'
|
||||
bind = $mainMod, left, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, right, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, up, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
bind = $mainMod, down, exec, notify-send 'I am not Windows' 'This is no inefficient stacking manager. Tiling happens automatically'
|
||||
@@ -1,17 +1,3 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ WORKSPACE RULES │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Display full sized (without gaps), if only window on screen
|
||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
||||
# workspace = f[1], gapsout:0, gapsin:0
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
$mainMod = SUPER
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
@@ -19,20 +5,20 @@ $mainMod = SUPER
|
||||
# │ WINDOW RULES │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
windowrule = float, title:.*(rofi).*
|
||||
windowrule = animation popin, title:.*(rofi).*
|
||||
windowrule = center, title:(rofi)(.*)
|
||||
|
||||
windowrule = move 1450 50, title:^(.*)(Power menu)$
|
||||
windowrule = move 1450 50, title:(.*)Power menu$
|
||||
windowrule = workspace 2, class:evince
|
||||
windowrule = workspace 2, title:.*(Okular).*
|
||||
windowrule = workspace 2, title:.*Okular.*
|
||||
windowrule = workspace 2, class:org.pwmt.zathura
|
||||
windowrule = fullscreen, title:wlogout
|
||||
windowrule = workspace 2, class:librewolf
|
||||
windowrule = workspace 2, title:LibreWolf
|
||||
windowrule = workspace 2, title:(.*)(Discord)(.*)
|
||||
windowrule = workspace 2, title:BSManager
|
||||
windowrule = workspace 1, title:ALVR(.*)
|
||||
windowrule = workspace 2, title:(.*)Beat Saber(.*)
|
||||
windowrule = fullscreen, title:(.*)Beat Saber(.*)
|
||||
windowrule = workspace 2, title:(.*)Discord(.*)
|
||||
windowrule = workspace 3, title:^(Steam)(.*)$
|
||||
windowrule = workspace 1, title:^(.*)(VSCodium)$
|
||||
windowrule = workspace 1, title:(.*)(VSCodium)$
|
||||
windowrule = center, title:^(.*)(VSCodium)$
|
||||
windowrule = workspace 3, class:minecraft-launcher
|
||||
windowrule = tile, class:minecraft-launcher
|
||||
@@ -50,6 +36,7 @@ windowrule = float, title:^(.*)hidden-terminator*(.*)$
|
||||
windowrule = float, title:^(.*)termfilechooser*(.*)$
|
||||
windowrule = size 1400 800, title:^(.*)termfilechooser*(.*)$
|
||||
windowrule = center, title:^(.*)termfilechooser*(.*)$
|
||||
windowrule = dimaround, title:^(.*)termfilechooser*(.*)$
|
||||
|
||||
# ┌ ┐
|
||||
# │ Set floating windows & position them centered │
|
||||
@@ -111,6 +98,7 @@ windowrule = center, class:pavucontrol
|
||||
windowrule = float, class:file-roller
|
||||
windowrule = center, class:file-roller
|
||||
|
||||
# idleinhibit
|
||||
windowrule = idleinhibit focus, title:^(Rocket League)(.*)$
|
||||
windowrule = fullscreen, title:^(Steam Big Picture)$
|
||||
windowrule = idleinhibit always, class:steam
|
||||
@@ -119,3 +107,15 @@ windowrule = idleinhibit focus, class:vlc
|
||||
windowrule = idleinhibit focus, class:supertuxkart
|
||||
windowrule = idleinhibit fullscreen, title:^(.*)(Discord)(.*)$
|
||||
windowrule = idleinhibit fullscreen, title:^(.*)(~)(.*)$
|
||||
|
||||
# Do not screenshare bitwarden windows
|
||||
windowrule = noscreenshare, title:(.*)(Bitwarden)(.*)
|
||||
windowrule = noscreenshare, class:nm-connection-editor
|
||||
windowrule = noscreenshare, title:(.*)(secret)(.*)
|
||||
windowrule = noscreenshare, class:(.*)[aA]uthentication(.*)
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
# │ Layer rules │
|
||||
# └ ┘
|
||||
layerrule = dimaround, ^(rofi)
|
||||
|
||||
@@ -17,14 +17,8 @@
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
# monitor=DP-1, preferred, 0x0, 1, vrr, 2
|
||||
monitor=DP-1, 1920x1080@144, 0x0, 1, vrr, 2
|
||||
monitor=DP-2, 1920x1080@75, 1920x0, 1
|
||||
# monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
# exec = swaybg -m fill -i /mnt/storage/SORTED/Pictures/Wallpapers/wallpaper/arch-bg-matterhorn.jpg
|
||||
# exec = swaybg -m fill -i /mnt/storage/SORTED/Pictures/Wallpapers/McLaren/main_livery_upscaled.jpg
|
||||
|
||||
|
||||
source=./hyprland/binds.conf
|
||||
|
||||
48
config/hypr/hyprland_docked.conf
Normal file
48
config/hypr/hyprland_docked.conf
Normal file
@@ -0,0 +1,48 @@
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
#░ ░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░
|
||||
#▒ ▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒
|
||||
#▒ ▒▒▒▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒
|
||||
#▓ ▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓
|
||||
#▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓ ▓▓▓▓ ▓ ▓▓▓ ▓▓▓ ▓▓ ▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓ ▓
|
||||
#█ ████ ████ ████ ██████ ████ ███ █ █ ██ ██ █ ███████████ ██████ █████ ██ ███ ████ █████ █
|
||||
#██████████████ █████ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# ╭────────────────────────────────────────────────╮
|
||||
# │ MONITORS │
|
||||
# ╰────────────────────────────────────────────────╯
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
monitor=eDP-1, disable
|
||||
monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
source=./hyprland/binds.conf
|
||||
source=./hyprland/general.conf
|
||||
source=./hyprland/windowrules.conf
|
||||
|
||||
# ┌ ┐
|
||||
# │ LAPTOP │
|
||||
# └ ┘
|
||||
exec = hyprctl setcursor oreo_spark_blue_cursors 36
|
||||
env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = X_CURSOR_THEME, Oreo_spark_blue_cursor
|
||||
env = XCURSOR_SIZE,24
|
||||
env = XDG_SESSION_TYPE, wayland
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
exec-once = hyprpm reload -nn
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
|
||||
# ── Vivado inversion ────────────────────────────────────────────────
|
||||
windowrule = plugin:invertwindow, class:Vivado
|
||||
windowrule = tile, title:(.*)Vivado(.*)
|
||||
@@ -19,10 +19,7 @@
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
monitor=eDP-1, 2880x1800@60, 0x0, 1.5
|
||||
# monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
# exec = swaybg -m fill -i /home/janis/Pictures/arch-bg.png
|
||||
monitor=,highres highrr, auto, 1
|
||||
|
||||
|
||||
source=./hyprland/binds.conf
|
||||
@@ -39,7 +36,6 @@ env = XCURSOR_SIZE,24
|
||||
env = ELECTRON_ENABLE_HIGHDPI_SUPPORT, 1
|
||||
env = XDG_SESSION_TYPE, wayland
|
||||
env = QT_QPA_PLATFORM, wayland
|
||||
# env = QT_QPA_PLATFORM_THEME,qt6ct
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT, wayland
|
||||
env = GDK_SCALE,2
|
||||
exec-once = hyprpm reload -nn
|
||||
@@ -48,25 +44,6 @@ xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
# ── Volume control ──────────────────────────────────────────────────
|
||||
bind = ,code:123, exec, pamixer -i 5
|
||||
bind = ,code:122, exec, pamixer -d 5
|
||||
bind = ,code:121, exec, pamixer -t
|
||||
|
||||
|
||||
# ── Brightness-Control ──────────────────────────────────────────────
|
||||
bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
||||
bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
||||
|
||||
|
||||
# ── Monitor config binds ────────────────────────────────────────────
|
||||
bind = $mainMod CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1, mirror, eDP-1 && notify-send 'Set to mirror internal display'
|
||||
bind = $mainMod CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1920x1080@60, 1920x0, 1 && notify-send 'Set to expand external display'
|
||||
|
||||
|
||||
# ── Internal display controls ───────────────────────────────────────
|
||||
bind = $mainMod ALT, E, exec, hyprctl keyword monitor eDP-1, 2880x1800@60, 0x0, 1.5 && cpupower-gui -b && notify-send 'Set to battery optimized settings'
|
||||
bind = $mainMod ALT, P, exec, hyprctl keyword monitor eDP-1, 2880x1800@120, 0x0, 1.5 && cpupower-gui -p && notify-send 'Set to performance optimized settings'
|
||||
|
||||
|
||||
# ── Vivado inversion ────────────────────────────────────────────────
|
||||
|
||||
@@ -9,16 +9,12 @@
|
||||
#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
general {
|
||||
grace = 15
|
||||
}
|
||||
|
||||
# ┌ ┐
|
||||
# │ BACKGROUND │
|
||||
# └ ┘
|
||||
background {
|
||||
monitor =
|
||||
path = /home/janis/NextCloud/Wallpapers/dark/colour-splash.jpg # Or screenshot
|
||||
path = /home/janis/NextCloud/Wallpapers/dark/mountains.jpg # Or screenshot
|
||||
|
||||
blur_passes = 1
|
||||
}
|
||||
@@ -49,7 +45,7 @@ label {
|
||||
monitor =
|
||||
text = <b>$TIME</b>
|
||||
color =
|
||||
font_size = 100
|
||||
font_size = 150
|
||||
font_family = Comfortaa
|
||||
|
||||
position = 0, 80
|
||||
|
||||
@@ -17,6 +17,7 @@ font_size 12.0
|
||||
# │ Cursor config │
|
||||
# └ ┘
|
||||
cursor_trail 1
|
||||
cursor_trail_start_threshold 0
|
||||
|
||||
|
||||
# ┌ ┐
|
||||
@@ -28,3 +29,8 @@ url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto ne
|
||||
detect_urls yes
|
||||
show_hyperlink_targets yes
|
||||
include current-theme.conf
|
||||
|
||||
# ┌ ┐
|
||||
# │ Mappings │
|
||||
# └ ┘
|
||||
map kitty_mod+e
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
276
config/lint/clang-format
Normal file
276
config/lint/clang-format
Normal file
@@ -0,0 +1,276 @@
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
# ╭─────────────────────────────────────────────────╮
|
||||
# │ clang-format config │
|
||||
# ╰─────────────────────────────────────────────────╯
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCaseArrows: false
|
||||
AlignCaseColons: false
|
||||
AlignConsecutiveTableGenBreakingDAGArgColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenCondOperatorColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenDefinitionColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseExpressionOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AttributeMacros:
|
||||
- __capability
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Always
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakAfterReturnType: None
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: All
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakFunctionDefinitionParameters: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
BreakTemplateDeclarations: MultiLine
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: "^ IWYU pragma:"
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: true
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: ^"(llvm|llvm-c|clang|clang-c)/
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: ^(<|"(gtest|gmock|isl|json)/)
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: .*
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: (Test)?$
|
||||
IncludeIsMainSourceRegex: ""
|
||||
IndentAccessModifiers: true
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: BeforeHash
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLines:
|
||||
AtEndOfFile: false
|
||||
AtStartOfBlock: true
|
||||
AtStartOfFile: true
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ""
|
||||
MacroBlockEnd: ""
|
||||
MainIncludeChar: Quote
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PPIndentWidth: -1
|
||||
PackConstructorInitializers: BinPack
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakScopeResolution: 500
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
QualifierAlignment: Left
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: true
|
||||
RemoveBracesLLVM: true
|
||||
RemoveParentheses: MultipleParentheses
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Always
|
||||
ShortNamespaceLines: 1
|
||||
SkipMacroDefinitionBody: false
|
||||
SortIncludes: CaseSensitive
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterForeachMacros: true
|
||||
AfterFunctionDeclarationName: true
|
||||
AfterFunctionDefinitionName: true
|
||||
AfterIfMacros: true
|
||||
AfterOverloadedOperator: false
|
||||
AfterPlacementOperator: true
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Custom
|
||||
SpacesInParensOptions:
|
||||
ExceptDoubleParentheses: false
|
||||
InConditionalStatements: true
|
||||
InCStyleCasts: false
|
||||
InEmptyParentheses: false
|
||||
Other: true
|
||||
SpacesInSquareBrackets: true
|
||||
Standard: Latest
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TabWidth: 4
|
||||
TableGenBreakInsideDAGArg: DontBreak
|
||||
UseTab: Never
|
||||
VerilogBreakBetweenInstancePorts: true
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
@@ -1,65 +1,724 @@
|
||||
// @ts-check
|
||||
|
||||
import eslint from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import globals from 'globals';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import typescript from '@typescript-eslint/eslint-plugin';
|
||||
import vue from 'eslint-plugin-vue';
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
const style = {
|
||||
'plugins': {
|
||||
'@stylistic': stylistic,
|
||||
'@stylistic/js': stylistic,
|
||||
'@stylistic/ts': stylistic,
|
||||
},
|
||||
'files': [
|
||||
'**/*.ts',
|
||||
'**/*.js',
|
||||
'**/*.mjs',
|
||||
'**/*.cjs',
|
||||
'**/*.tsx',
|
||||
'**/*.jsx'
|
||||
],
|
||||
'rules': {
|
||||
'sort-imports': [
|
||||
'warn',
|
||||
{
|
||||
'ignoreCase': false,
|
||||
'ignoreDeclarationSort': false,
|
||||
'ignoreMemberSort': false,
|
||||
'memberSyntaxSortOrder': [
|
||||
'none',
|
||||
'all',
|
||||
'multiple',
|
||||
'single'
|
||||
],
|
||||
'allowSeparatedGroups': false
|
||||
}
|
||||
],
|
||||
// Formatting
|
||||
'@stylistic/js/array-bracket-newline': [ 'error', { 'multiline': true, 'minItems': 4 } ],
|
||||
'@stylistic/js/array-bracket-spacing': [ 'error', 'always' ],
|
||||
'@stylistic/js/array-element-newline': [ 'error', { 'multiline': true, 'minItems': 4 } ],
|
||||
'@stylistic/js/arrow-parens': [ 'error', 'always' ],
|
||||
'@stylistic/js/arrow-spacing': [ 'error', { 'before': true, 'after': true } ],
|
||||
'@stylistic/js/block-spacing': [ 'error', 'always' ],
|
||||
'@stylistic/js/brace-style': [ 'error', '1tbs' ],
|
||||
'@stylistic/js/comma-spacing': [ 'error', { 'before': false, 'after': true } ],
|
||||
'@stylistic/js/comma-style': [ 'error', 'last' ],
|
||||
'@stylistic/js/dot-location': [ 'error', 'property' ],
|
||||
'@stylistic/js/eol-last': [ 'error', 'always' ],
|
||||
'@stylistic/js/function-call-spacing': [ 'error', 'never' ],
|
||||
'@stylistic/js/implicit-arrow-linebreak': [ 'error', 'beside' ],
|
||||
'@stylistic/js/indent': [ 'error', 4 ],
|
||||
'@stylistic/js/key-spacing': [ 'error', { 'beforeColon': false, 'afterColon': true } ],
|
||||
'@stylistic/js/keyword-spacing': [ 'error', { 'before': true, 'after': true } ],
|
||||
'@stylistic/js/lines-between-class-members': [ 'error', 'always' ],
|
||||
'@stylistic/js/new-parens': [ 'error', 'always' ],
|
||||
'@stylistic/js/no-extra-parens': [ 'error', 'all' ],
|
||||
'@stylistic/js/no-extra-semi': 'error',
|
||||
'@stylistic/js/no-floating-decimal': 'error',
|
||||
'@stylistic/js/no-mixed-operators': 'error',
|
||||
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
|
||||
'@stylistic/js/no-multi-spaces': 'error',
|
||||
'@stylistic/js/no-trailing-spaces': 'error',
|
||||
'@stylistic/js/no-whitespace-before-property': 'error',
|
||||
'@stylistic/js/object-curly-newline': [ 'error', { 'multiline': true, 'minProperties': 3 } ],
|
||||
'@stylistic/js/object-curly-spacing': [ 'error', 'always' ],
|
||||
'@stylistic/js/one-var-declaration-per-line': 'error',
|
||||
'@stylistic/js/quote-props': [ 'error', 'always' ],
|
||||
'@stylistic/js/quotes': [ 'error', 'single' ],
|
||||
'@stylistic/js/rest-spread-spacing': [ 'error', 'never' ],
|
||||
'@stylistic/js/semi': [ 'error', 'always' ],
|
||||
'@stylistic/js/semi-spacing': [ 'error', { 'before': false, 'after': true } ],
|
||||
'@stylistic/js/semi-style': [ 'error', 'last' ],
|
||||
'@stylistic/js/space-before-blocks': [ 'error', 'always' ],
|
||||
'@stylistic/js/space-before-function-paren': [ 'error', 'always' ],
|
||||
'@stylistic/js/space-in-parens': [ 'error', 'always' ],
|
||||
'@stylistic/js/space-infix-ops': [ 'error', { 'int32Hint': false } ],
|
||||
'@stylistic/js/space-unary-ops': 'error',
|
||||
'@stylistic/js/spaced-comment': [ 'error', 'always' ],
|
||||
'@stylistic/js/switch-colon-spacing': 'error',
|
||||
'@stylistic/js/template-curly-spacing': [ 'error', 'always' ],
|
||||
'@stylistic/js/wrap-iife': [ 'error', 'inside' ],
|
||||
'@stylistic/js/wrap-regex': 'error',
|
||||
'@stylistic/array-bracket-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minItems': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/array-bracket-spacing': [
|
||||
'error',
|
||||
'always',
|
||||
{
|
||||
'singleValue': true,
|
||||
'arraysInArrays': true,
|
||||
'objectsInArrays': true
|
||||
}
|
||||
],
|
||||
'@stylistic/array-element-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minItems': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/arrow-parens': [
|
||||
'error',
|
||||
'as-needed'
|
||||
],
|
||||
'@stylistic/arrow-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': true,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/block-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/brace-style': [
|
||||
'error',
|
||||
'1tbs'
|
||||
],
|
||||
'@stylistic/comma-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': false,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/comma-style': [
|
||||
'error',
|
||||
'last'
|
||||
],
|
||||
'@stylistic/dot-location': [
|
||||
'error',
|
||||
'property'
|
||||
],
|
||||
'@stylistic/eol-last': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/function-call-spacing': [
|
||||
'error',
|
||||
'never'
|
||||
],
|
||||
'@stylistic/function-paren-newline': [
|
||||
'error',
|
||||
{
|
||||
'minItems': 3
|
||||
}
|
||||
],
|
||||
'@stylistic/function-call-argument-newline': [
|
||||
'error',
|
||||
'consistent'
|
||||
],
|
||||
'@stylistic/implicit-arrow-linebreak': [
|
||||
'error',
|
||||
'beside'
|
||||
],
|
||||
'@stylistic/indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'@stylistic/key-spacing': [
|
||||
'error',
|
||||
{
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}
|
||||
],
|
||||
'@stylistic/keyword-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': true,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/lines-between-class-members': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/max-len': [
|
||||
'warn',
|
||||
{
|
||||
'code': 120,
|
||||
'comments': 140,
|
||||
'ignoreComments': false,
|
||||
'ignoreUrls': true,
|
||||
'ignoreStrings': false
|
||||
}
|
||||
],
|
||||
'@stylistic/new-parens': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/newline-per-chained-call': [ 'error' ],
|
||||
'@stylistic/no-extra-parens': [
|
||||
'error',
|
||||
'all',
|
||||
{
|
||||
'nestedBinaryExpressions': false,
|
||||
'ternaryOperandBinaryExpressions': false,
|
||||
'ignoreJSX': 'multi-line',
|
||||
'nestedConditionalExpressions': false
|
||||
}
|
||||
],
|
||||
'@stylistic/no-extra-semi': 'error',
|
||||
'@stylistic/no-floating-decimal': 'error',
|
||||
'@stylistic/no-mixed-operators': 'error',
|
||||
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||
'@stylistic/no-multi-spaces': 'error',
|
||||
'@stylistic/no-multiple-empty-lines': [
|
||||
'error',
|
||||
{
|
||||
'max': 3,
|
||||
'maxEOF': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/no-tabs': 'error',
|
||||
'@stylistic/no-trailing-spaces': 'error',
|
||||
'@stylistic/no-whitespace-before-property': 'error',
|
||||
'@stylistic/object-curly-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minProperties': 1
|
||||
}
|
||||
],
|
||||
'@stylistic/object-curly-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/object-property-newline': 'error',
|
||||
'@stylistic/operator-linebreak': [
|
||||
'error',
|
||||
'before'
|
||||
],
|
||||
'@stylistic/one-var-declaration-per-line': 'error',
|
||||
'@stylistic/padded-blocks': [
|
||||
'error',
|
||||
{
|
||||
'blocks': 'never',
|
||||
'classes': 'always',
|
||||
'switches': 'never',
|
||||
}
|
||||
],
|
||||
|
||||
// Padding lines. The most in-depth part of this config
|
||||
'@stylistic/padding-line-between-statements': [
|
||||
'error',
|
||||
// Variables, Constants
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'var',
|
||||
'next': 'var'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'let',
|
||||
'next': 'let'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'const',
|
||||
'next': 'const'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'var',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'let',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'const',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
// Import
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'import',
|
||||
'next': 'import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'cjs-import',
|
||||
'next': 'cjs-import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
],
|
||||
'next': 'cjs-import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'cjs-import',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
],
|
||||
'next': 'import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'import',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
// If
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'if'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'if',
|
||||
'next': '*'
|
||||
},
|
||||
// For
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'for'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'for',
|
||||
'next': '*'
|
||||
},
|
||||
// While
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'while'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'while',
|
||||
'next': '*'
|
||||
},
|
||||
// Functions
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'function'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'function',
|
||||
'next': '*'
|
||||
},
|
||||
// Block Statements
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'block-like'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'block-like',
|
||||
'next': '*'
|
||||
},
|
||||
// Switch
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'switch'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'switch',
|
||||
'next': '*'
|
||||
},
|
||||
// Try-Catch
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'try'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'try',
|
||||
'next': '*'
|
||||
},
|
||||
// Throw
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'throw'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'throw',
|
||||
'next': '*'
|
||||
},
|
||||
// Return
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'return',
|
||||
'next': '*'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'return'
|
||||
},
|
||||
// Export
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'export'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'export',
|
||||
'next': '*'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'cjs-export'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'cjs-export',
|
||||
'next': '*'
|
||||
},
|
||||
// Classes
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'class'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'class',
|
||||
'next': '*'
|
||||
},
|
||||
],
|
||||
'@stylistic/quote-props': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/quotes': [
|
||||
'error',
|
||||
'single'
|
||||
],
|
||||
'@stylistic/rest-spread-spacing': [
|
||||
'error',
|
||||
'never'
|
||||
],
|
||||
'@stylistic/semi': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/semi-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': false,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/semi-style': [
|
||||
'error',
|
||||
'last'
|
||||
],
|
||||
'@stylistic/space-before-blocks': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-before-function-paren': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-in-parens': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-infix-ops': [
|
||||
'error',
|
||||
{
|
||||
'int32Hint': false
|
||||
}
|
||||
],
|
||||
'@stylistic/space-unary-ops': 'error',
|
||||
'@stylistic/spaced-comment': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/template-curly-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/switch-colon-spacing': 'error',
|
||||
'@stylistic/wrap-iife': [
|
||||
'error',
|
||||
'inside'
|
||||
],
|
||||
'@stylistic/wrap-regex': 'error',
|
||||
'@stylistic/ts/type-annotation-spacing': 'error',
|
||||
}
|
||||
};
|
||||
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
export default tseslint.config(
|
||||
// Base JavaScript rules
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
style,
|
||||
|
||||
// Vue support (including TS and JSX inside SFCs)
|
||||
{
|
||||
'files': [ '**/*.vue' ],
|
||||
'languageOptions': {
|
||||
'sourceType': 'module',
|
||||
'ecmaVersion': 'latest',
|
||||
'globals': globals.browser,
|
||||
'parserOptions': {
|
||||
'parser': tseslint.parser,
|
||||
},
|
||||
},
|
||||
'plugins': {
|
||||
'vue': vue,
|
||||
'@stylistic': stylistic,
|
||||
'@stylistic/js': stylistic,
|
||||
'@stylistic/ts': stylistic,
|
||||
'@typescript-eslint': typescript,
|
||||
},
|
||||
'extends': [
|
||||
eslint.configs.recommended,
|
||||
...vue.configs['flat/recommended']
|
||||
],
|
||||
'rules': {
|
||||
...typescript.configs.recommended.rules,
|
||||
...style.rules,
|
||||
|
||||
// Vue specific rules
|
||||
'@stylistic/indent': 'off',
|
||||
'vue/html-indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'vue/html-comment-indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'vue/script-indent': [
|
||||
'error',
|
||||
4,
|
||||
{
|
||||
'baseIndent': 1,
|
||||
'switchCase': 1
|
||||
}
|
||||
],
|
||||
'vue/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
'html': {
|
||||
'void': 'never',
|
||||
'normal': 'never',
|
||||
'component': 'always'
|
||||
},
|
||||
'svg': 'always',
|
||||
'math': 'never'
|
||||
}
|
||||
],
|
||||
'vue/max-attributes-per-line': [
|
||||
'error',
|
||||
{
|
||||
'singleline': 3,
|
||||
'multiline': 1,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
2
config/lint/indentconfig.yaml
Normal file
2
config/lint/indentconfig.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
paths:
|
||||
- /home/janis/projects/dotfiles/config/lint/latexfmt.yaml
|
||||
76
config/lint/latexfmt.yaml
Normal file
76
config/lint/latexfmt.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
# Use spaces for indent (because f*k tabs)
|
||||
defaultIndent: " "
|
||||
|
||||
# Limit Number of backups
|
||||
maxNumberOfBackups: 3
|
||||
|
||||
indentRules:
|
||||
recall: " "
|
||||
remarks: " "
|
||||
remark: " "
|
||||
guides: " "
|
||||
properties: " "
|
||||
restrictions: " "
|
||||
limitations: " "
|
||||
terms: " "
|
||||
notation: " "
|
||||
usage: " "
|
||||
task: " "
|
||||
proof: " "
|
||||
general: " "
|
||||
simplebox: " "
|
||||
definition: " "
|
||||
theorem: " "
|
||||
lemma: " "
|
||||
corollary: " "
|
||||
axiom: " "
|
||||
fact: " "
|
||||
proposition: " "
|
||||
example: " "
|
||||
formula: " "
|
||||
conjugation: " "
|
||||
forms: " "
|
||||
|
||||
lookForAlignDelims:
|
||||
tables:
|
||||
delims: 1
|
||||
alignDoubleBackSlash: 1
|
||||
spacesBeforeDoubleBackSlash: 1
|
||||
multiColumnGrouping: 0
|
||||
alignRowsWithoutMaxDelims: 1
|
||||
spacesBeforeAmpersand: 1
|
||||
spacesAfterAmpersand: 1
|
||||
justification: left
|
||||
alignFinalDoubleBackSlash: 0
|
||||
dontMeasure: 0
|
||||
delimiterRegEx: (?<!\\)(&)
|
||||
delimiterJustification: left
|
||||
lookForChildCodeBlocks: 1
|
||||
alignContentAfterDoubleBackSlash: 0
|
||||
spacesAfterDoubleBackSlash: 1
|
||||
|
||||
specialBeginEnd:
|
||||
If:
|
||||
begin: '\\If'
|
||||
middle:
|
||||
- '\\ElsIf'
|
||||
- '\\Else'
|
||||
end: '\\EndIf'
|
||||
lookForThis: 1
|
||||
For:
|
||||
begin: '\\For'
|
||||
end: '\\EndFor'
|
||||
lookForThis: 1
|
||||
Procedure:
|
||||
begin: '\\Procedure'
|
||||
end: '\\EndProcedure'
|
||||
lookForThis: 1
|
||||
Function:
|
||||
begin: '\\Function'
|
||||
end: '\\EndFunction'
|
||||
lookForThis: 1
|
||||
While:
|
||||
begin: '\\While'
|
||||
end: '\\EndWhile'
|
||||
lookForThis: 1
|
||||
specialBeforeCommand: 1
|
||||
8
config/lint/package.json
Normal file
8
config/lint/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.28.0",
|
||||
"@stylistic/eslint-plugin": "^4.4.1",
|
||||
"eslint-plugin-vue": "^10.2.0",
|
||||
"typescript-eslint": "^8.33.1"
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/** Basic config file **/
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
icon-theme: "Candy";
|
||||
display-drun: "";
|
||||
display-run: "🏃🏽♂️ ";
|
||||
display-window: "🗔 ";
|
||||
display-combi: "🔎 ";
|
||||
dpi: 160;
|
||||
}
|
||||
|
||||
@theme "style.rasi"
|
||||
@@ -1,7 +1,7 @@
|
||||
* {
|
||||
background: #141414;
|
||||
background-selected: #1E1E1E;
|
||||
foreground: #E6E6E6;
|
||||
background: #0A0A0F;
|
||||
background-selected: #141419;
|
||||
foreground: #C8DCFF;
|
||||
accent: #591641;
|
||||
accent-two: #97103A;
|
||||
// border-color: #2D2057;
|
||||
@@ -18,8 +18,8 @@
|
||||
border: 1px;
|
||||
border-radius: 10px;
|
||||
padding: 0;
|
||||
location: west;
|
||||
anchor: west;
|
||||
location: center;
|
||||
anchor: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ window {
|
||||
font-family: monospace;
|
||||
font-size: 14pt;
|
||||
color: #ffffff; /* text */
|
||||
background-color: rgba(20, 20, 20, 0.5);
|
||||
background-color: rgba(10, 10, 15, 0.5);
|
||||
}
|
||||
|
||||
button {
|
||||
@@ -27,7 +27,7 @@ button:hover {
|
||||
|
||||
button:focus {
|
||||
background-color: rgb(151, 16, 58);
|
||||
color: rgb(230, 230, 230);
|
||||
color: rgb(200, 220, 255);
|
||||
}
|
||||
|
||||
#lock {
|
||||
|
||||
11
config/xdg-desktop-portal-termfilechooser/config
Normal file
11
config/xdg-desktop-portal-termfilechooser/config
Normal file
@@ -0,0 +1,11 @@
|
||||
[filechooser]
|
||||
cmd=yazi-wrapper.sh
|
||||
default_dir=$HOME
|
||||
; Uncomment to skip creating destination save files with instructions in them
|
||||
; create_help_file=0
|
||||
; Uncomment and edit the line below to change the terminal emulator command
|
||||
; env=TERMCMD=foot
|
||||
|
||||
; Mode must be one of 'suggested', 'default', or 'last'.
|
||||
open_mode=suggested
|
||||
save_mode=suggested
|
||||
2
config/xdg-desktop-portal/portals.conf
Normal file
2
config/xdg-desktop-portal/portals.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[preferred]
|
||||
org.freedesktop.impl.portal.FileChooser=termfilechooser
|
||||
@@ -7,31 +7,36 @@ prepend_keymap = [
|
||||
{ on = "C", run = "plugin ouch tar.gz", desc = "Compress with ouch" },
|
||||
# Goto
|
||||
{ on = [ "g", "h" ], run = "cd ~", desc = "Go to ~" },
|
||||
{ on = [ "g", "c", "c" ], run = "cd ~/.config", desc = "Go to ~/.config" },
|
||||
{ on = [ "g", "c", "h" ], run = "cd ~/.config/hypr", desc = "Go to Hyprland config" },
|
||||
{ on = [ "g", "c", "f" ], run = "cd ~/.config/fish", desc = "Go to Fish config" },
|
||||
{ on = [ "g", "c", "y" ], run = "cd ~/.config/yazi", desc = "Go to Yazi config" },
|
||||
{ on = [ "g", "c", "w" ], run = "cd ~/.config/waybar", desc = "Go to waybar config" },
|
||||
{ on = [ "g", "c", "n" ], run = "cd ~/.config/nvim", desc = "Go to NeoVim config" },
|
||||
{ on = [ "g", "a" ], run = "cd ~/.cache", desc = "Go to ~/.cache" },
|
||||
{ on = [ "g", "n" ], run = "cd ~/NextCloud/Documents/", desc = "Go to NextCloud Documents" },
|
||||
{ on = [ "g", "e", "c" ], run = "cd ~/projects/active/eth-gitlab/eth-code-expert/Semester2/", desc = "Go to ETH-Code-Expert" },
|
||||
{ on = [ "g", "e", "n" ], run = "cd ~/NextCloud/Documents/ETH/Semester2", desc = "Go to ETH Nextcloud" },
|
||||
{ on = [ "g", "e", "p" ], run = "cd ~/projects/active/eth/semester2/", desc = "Go to ETH notes folder" },
|
||||
{ on = [ "g", "e", "g" ], run = "cd ~/projects/active/eth-gitlab/pprog25-jahutz/", desc = "Go to ETH Gitlab folder" },
|
||||
{ on = [ "g", "l", "b" ], run = "cd ~/.local/bin", desc = "Go to ~/.local/bin" },
|
||||
{ on = [ "g", "l", "s" ], run = "cd ~/.local/share", desc = "Go to ~/.local/share" },
|
||||
{ on = [ "g", "c", "c" ], run = "cd ~/.config", desc = "Go to ~/.config" },
|
||||
{ on = [ "g", "c", "h" ], run = "cd ~/projects/dotfiles/config/hypr", desc = "Go to Hyprland config" },
|
||||
{ on = [ "g", "c", "f" ], run = "cd ~/projects/dotfiles/config/fish", desc = "Go to Fish config" },
|
||||
{ on = [ "g", "c", "y" ], run = "cd ~/projects/dotfiles/config/yazi", desc = "Go to Yazi config" },
|
||||
{ on = [ "g", "c", "a" ], run = "cd ~/projects/dotfiles/config/astal", desc = "Go to astal config" },
|
||||
{ on = [ "g", "c", "l" ], run = "cd ~/projects/dotfiles/config/lint", desc = "Go to linter configs" },
|
||||
{ on = [ "g", "c", "k" ], run = "cd ~/projects/dotfiles/config/kitty", desc = "Go to kitty config" },
|
||||
{ on = [ "g", "c", "r" ], run = "cd ~/projects/dotfiles/config/rofi", desc = "Go to rofi config" },
|
||||
{ on = [ "g", "c", "s" ], run = "cd ~/projects/dotfiles/scripts", desc = "Go to script" },
|
||||
{ on = [ "g", "c", "d" ], run = "cd ~/projects/dotfiles", desc = "Go to Dotfiles folder" },
|
||||
{ on = [ "g", "c", "n" ], run = "cd ~/projects/nvim", desc = "Go to NeoVim config" },
|
||||
{ on = [ "g", "n" ], run = "cd ~/NextCloud/Documents/", desc = "Go to NextCloud Documents" },
|
||||
{ on = [ "g", "w" ], run = "cd ~/NextCloud/Wallpapers", desc = "Go to Wallpapers" },
|
||||
{ on = [ "g", "e", "n" ], run = "cd ~/NextCloud/Documents/ETH/Semester3/", desc = "Go to ETH Nextcloud" },
|
||||
{ on = [ "g", "e", "p" ], run = "cd ~/projects/eth/semester3/", desc = "Go to ETH git folder" },
|
||||
{ on = [ "g", "e", "g" ], run = "cd ~/projects/eth/gitlab/spca2025-jahutz-hand-in/", desc = "Go to ETH Gitlab folder" },
|
||||
{ on = [ "g", "e", "s" ], run = "cd ~/projects/eth/eth-summaries/semester3/", desc = "Go to ETH Summaries folder" },
|
||||
{ on = [ "g", "s", "h" ], run = "cd ~/.steam/steam/steamapps/common", desc = "Go to ~/.steam/steam/steamapps/common" },
|
||||
{ on = [ "g", "s", "g" ], run = "cd /mnt/games/SteamLibrary", desc = "Go to SteamLibrary on NTFS partition" },
|
||||
{ on = [ "g", "s", "s" ], run = "cd /mnt/secondary/SteamLibrary", desc = "Go to SteamLibrary on main games drive" },
|
||||
{ on = [ "g", "o" ], run = "cd /mnt/janis/Documents", desc = "Go to Documents" },
|
||||
{ on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go to ~/Downloads" },
|
||||
{ on = [ "g", "p", "a" ], run = "cd ~/projects/active", desc = "Go to Active projects" },
|
||||
{ on = [ "g", "p", "r" ], run = "cd ~/projects/archive", desc = "Go to Archive projects" },
|
||||
{ on = [ "g", "p", "p" ], run = "cd ~/projects", desc = "Go to projects" },
|
||||
{ on = [ "g", "p" ], run = "cd ~/projects", desc = "Go to projects" },
|
||||
{ on = [ "g", "t", "m" ], run = "cd /tmp", desc = "Go to /tmp" },
|
||||
{ on = [ "g", "t", "t" ], run = "cd ~/.local/share/Trash/", desc = "Go to TRASH" },
|
||||
{ on = [ "g", "/" ], run = "cd /", desc = "Go to /" },
|
||||
{ on = [ "g", "m" ], run = "cd /run/media/$USER", desc = "Go to /run/media" },
|
||||
{ on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Go to interactively" },
|
||||
{ on = [ "g", "-" ], run = "plugin vcs-files", desc = "Show Git file changes" },
|
||||
]
|
||||
|
||||
@@ -8,5 +8,10 @@ use = "boydaihungst/restore"
|
||||
rev = "5d22884"
|
||||
hash = "8e6fc2d660f661c91e30b10dd1a251b8"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:vcs-files"
|
||||
rev = "e95c7b3"
|
||||
hash = "cc8da55f1deda45ee3787cc97b58ffc9"
|
||||
|
||||
[flavor]
|
||||
deps = []
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
[flavor]
|
||||
use = "vscode-dark-modern"
|
||||
dark = "tokyo-night"
|
||||
light = "tokyo-night"
|
||||
|
||||
@@ -8,3 +8,10 @@ prepend_previewers = [
|
||||
{ mime = "application/x-rar", run = "ouch" },
|
||||
{ mime = "application/x-xz", run = "ouch" },
|
||||
]
|
||||
|
||||
[opener]
|
||||
open = [
|
||||
{ run = 'xdg-open "$@"', desc = "Open" },
|
||||
{ run = 'okular "$@"', desc = "Open in Okular" },
|
||||
{ run = 'evince "$@"', desc = "Open in Evince" },
|
||||
]
|
||||
|
||||
724
eslint.config.mjs
Normal file
724
eslint.config.mjs
Normal file
@@ -0,0 +1,724 @@
|
||||
import eslint from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import typescript from '@typescript-eslint/eslint-plugin';
|
||||
import vue from 'eslint-plugin-vue';
|
||||
|
||||
const style = {
|
||||
'plugins': {
|
||||
'@stylistic': stylistic,
|
||||
'@stylistic/js': stylistic,
|
||||
'@stylistic/ts': stylistic,
|
||||
},
|
||||
'files': [
|
||||
'**/*.ts',
|
||||
'**/*.js',
|
||||
'**/*.mjs',
|
||||
'**/*.cjs',
|
||||
'**/*.tsx',
|
||||
'**/*.jsx'
|
||||
],
|
||||
'rules': {
|
||||
'sort-imports': [
|
||||
'warn',
|
||||
{
|
||||
'ignoreCase': false,
|
||||
'ignoreDeclarationSort': false,
|
||||
'ignoreMemberSort': false,
|
||||
'memberSyntaxSortOrder': [
|
||||
'none',
|
||||
'all',
|
||||
'multiple',
|
||||
'single'
|
||||
],
|
||||
'allowSeparatedGroups': false
|
||||
}
|
||||
],
|
||||
// Formatting
|
||||
'@stylistic/array-bracket-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minItems': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/array-bracket-spacing': [
|
||||
'error',
|
||||
'always',
|
||||
{
|
||||
'singleValue': true,
|
||||
'arraysInArrays': true,
|
||||
'objectsInArrays': true
|
||||
}
|
||||
],
|
||||
'@stylistic/array-element-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minItems': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/arrow-parens': [
|
||||
'error',
|
||||
'as-needed'
|
||||
],
|
||||
'@stylistic/arrow-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': true,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/block-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/brace-style': [
|
||||
'error',
|
||||
'1tbs'
|
||||
],
|
||||
'@stylistic/comma-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': false,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/comma-style': [
|
||||
'error',
|
||||
'last'
|
||||
],
|
||||
'@stylistic/dot-location': [
|
||||
'error',
|
||||
'property'
|
||||
],
|
||||
'@stylistic/eol-last': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/function-call-spacing': [
|
||||
'error',
|
||||
'never'
|
||||
],
|
||||
'@stylistic/function-paren-newline': [
|
||||
'error',
|
||||
{
|
||||
'minItems': 3
|
||||
}
|
||||
],
|
||||
'@stylistic/function-call-argument-newline': [
|
||||
'error',
|
||||
'consistent'
|
||||
],
|
||||
'@stylistic/implicit-arrow-linebreak': [
|
||||
'error',
|
||||
'beside'
|
||||
],
|
||||
'@stylistic/indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'@stylistic/key-spacing': [
|
||||
'error',
|
||||
{
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}
|
||||
],
|
||||
'@stylistic/keyword-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': true,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/lines-between-class-members': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/max-len': [
|
||||
'warn',
|
||||
{
|
||||
'code': 120,
|
||||
'comments': 140,
|
||||
'ignoreComments': false,
|
||||
'ignoreUrls': true,
|
||||
'ignoreStrings': false
|
||||
}
|
||||
],
|
||||
'@stylistic/new-parens': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/newline-per-chained-call': [ 'error' ],
|
||||
'@stylistic/no-extra-parens': [
|
||||
'error',
|
||||
'all',
|
||||
{
|
||||
'nestedBinaryExpressions': false,
|
||||
'ternaryOperandBinaryExpressions': false,
|
||||
'ignoreJSX': 'multi-line',
|
||||
'nestedConditionalExpressions': false
|
||||
}
|
||||
],
|
||||
'@stylistic/no-extra-semi': 'error',
|
||||
'@stylistic/no-floating-decimal': 'error',
|
||||
'@stylistic/no-mixed-operators': 'error',
|
||||
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||
'@stylistic/no-multi-spaces': 'error',
|
||||
'@stylistic/no-multiple-empty-lines': [
|
||||
'error',
|
||||
{
|
||||
'max': 3,
|
||||
'maxEOF': 2
|
||||
}
|
||||
],
|
||||
'@stylistic/no-tabs': 'error',
|
||||
'@stylistic/no-trailing-spaces': 'error',
|
||||
'@stylistic/no-whitespace-before-property': 'error',
|
||||
'@stylistic/object-curly-newline': [
|
||||
'error',
|
||||
{
|
||||
'multiline': true,
|
||||
'minProperties': 1
|
||||
}
|
||||
],
|
||||
'@stylistic/object-curly-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/object-property-newline': 'error',
|
||||
'@stylistic/operator-linebreak': [
|
||||
'error',
|
||||
'before'
|
||||
],
|
||||
'@stylistic/one-var-declaration-per-line': 'error',
|
||||
'@stylistic/padded-blocks': [
|
||||
'error',
|
||||
{
|
||||
'blocks': 'never',
|
||||
'classes': 'always',
|
||||
'switches': 'never',
|
||||
}
|
||||
],
|
||||
|
||||
// Padding lines. The most in-depth part of this config
|
||||
'@stylistic/padding-line-between-statements': [
|
||||
'error',
|
||||
// Variables, Constants
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'var',
|
||||
'next': 'var'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'let',
|
||||
'next': 'let'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'const',
|
||||
'next': 'const'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'var',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'let',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'const',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'cjs-import',
|
||||
'class',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'import',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
// Import
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'import',
|
||||
'next': 'import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'cjs-import',
|
||||
'next': 'cjs-import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
],
|
||||
'next': 'cjs-import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'cjs-import',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
],
|
||||
'next': 'import'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'import',
|
||||
'next': [
|
||||
'block',
|
||||
'block-like',
|
||||
'break',
|
||||
'cjs-export',
|
||||
'class',
|
||||
'const',
|
||||
'continue',
|
||||
'debugger',
|
||||
'directive',
|
||||
'do',
|
||||
'empty',
|
||||
'export',
|
||||
'expression',
|
||||
'for',
|
||||
'function',
|
||||
'if',
|
||||
'iife',
|
||||
'let',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'var',
|
||||
'while',
|
||||
'with'
|
||||
]
|
||||
},
|
||||
// If
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'if'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'if',
|
||||
'next': '*'
|
||||
},
|
||||
// For
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'for'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'for',
|
||||
'next': '*'
|
||||
},
|
||||
// While
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'while'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'while',
|
||||
'next': '*'
|
||||
},
|
||||
// Functions
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'function'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'function',
|
||||
'next': '*'
|
||||
},
|
||||
// Block Statements
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'block-like'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'block-like',
|
||||
'next': '*'
|
||||
},
|
||||
// Switch
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'switch'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'switch',
|
||||
'next': '*'
|
||||
},
|
||||
// Try-Catch
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'try'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'try',
|
||||
'next': '*'
|
||||
},
|
||||
// Throw
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'throw'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'throw',
|
||||
'next': '*'
|
||||
},
|
||||
// Return
|
||||
{
|
||||
'blankLine': 'never',
|
||||
'prev': 'return',
|
||||
'next': '*'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'return'
|
||||
},
|
||||
// Export
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'export'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'export',
|
||||
'next': '*'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'cjs-export'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'cjs-export',
|
||||
'next': '*'
|
||||
},
|
||||
// Classes
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': '*',
|
||||
'next': 'class'
|
||||
},
|
||||
{
|
||||
'blankLine': 'always',
|
||||
'prev': 'class',
|
||||
'next': '*'
|
||||
},
|
||||
],
|
||||
'@stylistic/quote-props': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/quotes': [
|
||||
'error',
|
||||
'single'
|
||||
],
|
||||
'@stylistic/rest-spread-spacing': [
|
||||
'error',
|
||||
'never'
|
||||
],
|
||||
'@stylistic/semi': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/semi-spacing': [
|
||||
'error',
|
||||
{
|
||||
'before': false,
|
||||
'after': true
|
||||
}
|
||||
],
|
||||
'@stylistic/semi-style': [
|
||||
'error',
|
||||
'last'
|
||||
],
|
||||
'@stylistic/space-before-blocks': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-before-function-paren': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-in-parens': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/space-infix-ops': [
|
||||
'error',
|
||||
{
|
||||
'int32Hint': false
|
||||
}
|
||||
],
|
||||
'@stylistic/space-unary-ops': 'error',
|
||||
'@stylistic/spaced-comment': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/template-curly-spacing': [
|
||||
'error',
|
||||
'always'
|
||||
],
|
||||
'@stylistic/switch-colon-spacing': 'error',
|
||||
'@stylistic/wrap-iife': [
|
||||
'error',
|
||||
'inside'
|
||||
],
|
||||
'@stylistic/wrap-regex': 'error',
|
||||
'@stylistic/ts/type-annotation-spacing': 'error',
|
||||
}
|
||||
};
|
||||
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
export default tseslint.config(
|
||||
// Base JavaScript rules
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
style,
|
||||
|
||||
// Vue support (including TS and JSX inside SFCs)
|
||||
{
|
||||
'files': [ '**/*.vue' ],
|
||||
'languageOptions': {
|
||||
'sourceType': 'module',
|
||||
'ecmaVersion': 'latest',
|
||||
'globals': globals.browser,
|
||||
'parserOptions': {
|
||||
'parser': tseslint.parser,
|
||||
},
|
||||
},
|
||||
'plugins': {
|
||||
'vue': vue,
|
||||
'@stylistic': stylistic,
|
||||
'@stylistic/js': stylistic,
|
||||
'@stylistic/ts': stylistic,
|
||||
'@typescript-eslint': typescript,
|
||||
},
|
||||
'extends': [
|
||||
eslint.configs.recommended,
|
||||
...vue.configs['flat/recommended']
|
||||
],
|
||||
'rules': {
|
||||
...typescript.configs.recommended.rules,
|
||||
...style.rules,
|
||||
|
||||
// Vue specific rules
|
||||
'@stylistic/indent': 'off',
|
||||
'vue/html-indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'vue/html-comment-indent': [
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'vue/script-indent': [
|
||||
'error',
|
||||
4,
|
||||
{
|
||||
'baseIndent': 1,
|
||||
'switchCase': 1
|
||||
}
|
||||
],
|
||||
'vue/html-self-closing': [
|
||||
'error',
|
||||
{
|
||||
'html': {
|
||||
'void': 'never',
|
||||
'normal': 'never',
|
||||
'component': 'always'
|
||||
},
|
||||
'svg': 'always',
|
||||
'math': 'never'
|
||||
}
|
||||
],
|
||||
'vue/max-attributes-per-line': [
|
||||
'error',
|
||||
{
|
||||
'singleline': 3,
|
||||
'multiline': 1,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
82
gtk-theme/dist/colours.css
vendored
82
gtk-theme/dist/colours.css
vendored
@@ -19,13 +19,13 @@
|
||||
/*
|
||||
* ── Foreground color, main interface text colour ─────────────────────
|
||||
*/
|
||||
@define-color fg #E6E6E6;
|
||||
@define-color fg_rgba_07 rgba(230, 230, 230, 0.7);
|
||||
@define-color fg_rgba_06 rgba(230, 230, 230, 0.6);
|
||||
@define-color fg_rgba_05 rgba(230, 230, 230, 0.5);
|
||||
@define-color fg_rgba_03 rgba(230, 230, 230, 0.3);
|
||||
@define-color fg_rgba_02 rgba(230, 230, 230, 0.2);
|
||||
@define-color fg_rgba_01 rgba(230, 230, 230, 0.1);
|
||||
@define-color fg #C8DCFF;
|
||||
@define-color fg_rgba_07 rgba(200, 220, 255, 0.7);
|
||||
@define-color fg_rgba_06 rgba(200, 220, 255, 0.6);
|
||||
@define-color fg_rgba_05 rgba(200, 220, 255, 0.5);
|
||||
@define-color fg_rgba_03 rgba(200, 220, 255, 0.3);
|
||||
@define-color fg_rgba_02 rgba(200, 220, 255, 0.2);
|
||||
@define-color fg_rgba_01 rgba(200, 220, 255, 0.1);
|
||||
|
||||
/*
|
||||
* ── Foreground accent, usually brighter or darker than default ───────
|
||||
@@ -51,14 +51,14 @@
|
||||
/*
|
||||
* ── Accent Gradient ──────────────────────────────────────────────────
|
||||
*/
|
||||
@define-color accent_gradient_1 #390E2A;
|
||||
@define-color accent_gradient_2 #2E0B21;
|
||||
@define-color accent_gradient_3 #24091B;
|
||||
@define-color accent_gradient_4 #1D0715;
|
||||
@define-color accent_gradient_5 #170611;
|
||||
@define-color accent_gradient_inverse_1 #8B2266;
|
||||
@define-color accent_gradient_inverse_2 #8B2266;
|
||||
@define-color accent_gradient_inverse_3 #8B2266;
|
||||
@define-color accent_gradient_1 #481235;
|
||||
@define-color accent_gradient_2 #41102F;
|
||||
@define-color accent_gradient_3 #3A0E2B;
|
||||
@define-color accent_gradient_4 #350D26;
|
||||
@define-color accent_gradient_5 #2F0C23;
|
||||
@define-color accent_gradient_inverse_1 #6E1B50;
|
||||
@define-color accent_gradient_inverse_2 #6E1B50;
|
||||
@define-color accent_gradient_inverse_3 #6E1B50;
|
||||
|
||||
/*
|
||||
* ── Secondary accent colour ──────────────────────────────────────────
|
||||
@@ -97,33 +97,33 @@
|
||||
/*
|
||||
* ── Background color, main interface background ──────────────────────
|
||||
*/
|
||||
@define-color bg #141414;
|
||||
@define-color bg_rgba_07 rgba(20, 20, 20, 0.7);
|
||||
@define-color bg_rgba_05 rgba(20, 20, 20, 0.5);
|
||||
@define-color bg_rgba_03 rgba(20, 20, 20, 0.3);
|
||||
@define-color bg_rgba_02 rgba(20, 20, 20, 0.2);
|
||||
@define-color bg_rgba_015 rgba(20, 20, 20, 0.15);
|
||||
@define-color bg_rgba_011 rgba(20, 20, 20, 0.11);
|
||||
@define-color bg #0A0A0F;
|
||||
@define-color bg_rgba_07 rgba(10, 10, 15, 0.7);
|
||||
@define-color bg_rgba_05 rgba(10, 10, 15, 0.5);
|
||||
@define-color bg_rgba_03 rgba(10, 10, 15, 0.3);
|
||||
@define-color bg_rgba_02 rgba(10, 10, 15, 0.2);
|
||||
@define-color bg_rgba_015 rgba(10, 10, 15, 0.15);
|
||||
@define-color bg_rgba_011 rgba(10, 10, 15, 0.11);
|
||||
|
||||
/*
|
||||
* ── Accent background color ──────────────────────────────────────────
|
||||
*/
|
||||
@define-color bg_accent #1E1E1E;
|
||||
@define-color bg_accent_rgba_07 rgba(30, 30, 30, 0.7);
|
||||
@define-color bg_accent_rgba_06 rgba(30, 30, 30, 0.6);
|
||||
@define-color bg_accent_rgba_05 rgba(30, 30, 30, 0.5);
|
||||
@define-color bg_accent_rgba_04 rgba(30, 30, 30, 0.4);
|
||||
@define-color bg_accent_rgba_03 rgba(30, 30, 30, 0.3);
|
||||
@define-color bg_accent_rgba_02 rgba(30, 30, 30, 0.2);
|
||||
@define-color bg_accent_rgba_015 rgba(30, 30, 30, 0.15);
|
||||
@define-color bg_accent_rgba_01 rgba(30, 30, 30, 0.1);
|
||||
@define-color bg_accent #141419;
|
||||
@define-color bg_accent_rgba_07 rgba(20, 20, 25, 0.7);
|
||||
@define-color bg_accent_rgba_06 rgba(20, 20, 25, 0.6);
|
||||
@define-color bg_accent_rgba_05 rgba(20, 20, 25, 0.5);
|
||||
@define-color bg_accent_rgba_04 rgba(20, 20, 25, 0.4);
|
||||
@define-color bg_accent_rgba_03 rgba(20, 20, 25, 0.3);
|
||||
@define-color bg_accent_rgba_02 rgba(20, 20, 25, 0.2);
|
||||
@define-color bg_accent_rgba_015 rgba(20, 20, 25, 0.15);
|
||||
@define-color bg_accent_rgba_01 rgba(20, 20, 25, 0.1);
|
||||
|
||||
/*
|
||||
* ── Tertiary background colour ───────────────────────────────────────
|
||||
*/
|
||||
@define-color bg_tertiary #2D2D2D;
|
||||
@define-color bg_tertiary_rgba_05 rgba(45, 45, 45, 0.5);
|
||||
@define-color bg_tertiary_rgba_02 rgba(45, 45, 45, 0.2);
|
||||
@define-color bg_tertiary #000000;
|
||||
@define-color bg_tertiary_rgba_05 rgba(0, 0, 0, 0.5);
|
||||
@define-color bg_tertiary_rgba_02 rgba(0, 0, 0, 0.2);
|
||||
|
||||
/*
|
||||
* ── Inactive background colour ───────────────────────────────────────
|
||||
@@ -140,10 +140,10 @@
|
||||
/*
|
||||
* ── Shadow colours ───────────────────────────────────────────────────
|
||||
*/
|
||||
@define-color shadow #282828;
|
||||
@define-color shadow_rgba_07 rgba(40, 40, 40, 0.7);
|
||||
@define-color shadow_rgba_05 rgba(40, 40, 40, 0.5);
|
||||
@define-color shadow_rgba_03 rgba(40, 40, 40, 0.3);
|
||||
@define-color shadow_rgba_02 rgba(40, 40, 40, 0.2);
|
||||
@define-color shadow_rgba_015 rgba(40, 40, 40, 0.15);
|
||||
@define-color shadow_rgba_011 rgba(40, 40, 40, 0.11);
|
||||
@define-color shadow #000002;
|
||||
@define-color shadow_rgba_07 rgba(0, 0, 2, 0.7);
|
||||
@define-color shadow_rgba_05 rgba(0, 0, 2, 0.5);
|
||||
@define-color shadow_rgba_03 rgba(0, 0, 2, 0.3);
|
||||
@define-color shadow_rgba_02 rgba(0, 0, 2, 0.2);
|
||||
@define-color shadow_rgba_015 rgba(0, 0, 2, 0.15);
|
||||
@define-color shadow_rgba_011 rgba(0, 0, 2, 0.11);
|
||||
|
||||
141
install
141
install
@@ -1,37 +1,142 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Read platform to install on (only if no platform file present in ~/.config/)
|
||||
read -p "Choose the configs to install, Laptop or Desktop (l/D): " platform
|
||||
echo "
|
||||
==> Setting up arch4edu & yay
|
||||
"
|
||||
|
||||
git clone https://aur.archlinux.org/yay
|
||||
cd yay
|
||||
makepkg -si
|
||||
cd ..
|
||||
rm -rf yay
|
||||
|
||||
reflector -c 'Switzerland, Germany' --sort 'rate' --protocol https --latest 10 --save /etc/pacman.d/mirrorlist
|
||||
echo "Server = https://at.arch4edu.mirror.kescher.at/\$arch" >/etc/pacman.d/mirrorlist
|
||||
|
||||
sudo cp ./system/pacman.conf /etc/pacman.conf
|
||||
|
||||
sudo pacman-key --recv-keys 7931B6D628C8D3BA
|
||||
sudo pacman-key --finger 7931B6D628C8D3BA
|
||||
sudo pacman-key --lsign-key 7931B6D628C8D3BA
|
||||
|
||||
# Packages to be added to install: aylurs-gtk-shell-git, brightnessctl, zoxide, trash-cli, fzf, ouch
|
||||
# Install yazi plugins using ya pack -a ndtoan96/ouch and ya pack -a boydaihungst/restore
|
||||
#
|
||||
# TODO: get configs from current setup
|
||||
# Hyprland
|
||||
yay -S hyprland hypridle hyprfreeze hyprlock plymouth aylurs-gtk-shell-git brightnessctl pulsemixer xdg-desktop-portal-hyprland
|
||||
echo "
|
||||
==> Installing Hyprland
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake hyprland hypridle hyprfreeze hyprlock aylurs-gtk-shell brightnessctl pulsemixer xdg-desktop-portal-hyprland cliphist grimblast wl-clipboard polkit-gnome swaybg polkit-kde-agent grim rofi cpio sysstat
|
||||
|
||||
# Audio, drivers, tools
|
||||
yay -S pipewire pipewire-alsa pipewire-pulse pipewire-jack mesa fish thunar yazi wireplumber grimblast wl-clipboard wget vimiv zoxide trash-cli fzf ouch zathura sensors radeontop lm-sensors
|
||||
# Audio, drivers
|
||||
echo "
|
||||
==> Installing drivers...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake pipewire pipewire-alsa pipewire-pulse pipewire-jack mesa wireplumber trash-cli sensors radeontop lm-sensors smartmontools
|
||||
|
||||
# Tools
|
||||
echo "
|
||||
==> Installing tools...
|
||||
"
|
||||
sleep 2
|
||||
|
||||
yay -S --noconfirm --noremovemake fish fzf ouch zathura zathura-pdf-poppler wget vimiv zoxide thunar yazi gnome-tweaks lxappearance gnome-keyring ffmpeg network-manager-applet cpupower-gui python-tkinter acpi python-pillow seahorse man man-pages ntp
|
||||
|
||||
# Set up yazi
|
||||
ya pack -a ndtoan96/ouch
|
||||
ya pack -a boydaihungst/restore
|
||||
echo "
|
||||
==> Setting up yazi...
|
||||
"
|
||||
sleep 2
|
||||
ya pkg add ndtoan96/ouch
|
||||
ya pkg add boydaihungst/restore
|
||||
ya pkg add yazi-rs/plugins:vcs-files
|
||||
|
||||
# Fonts
|
||||
yay -S adobe-source-code-pro-fonts gnome-font-viewer gnome-characters gnome-tweaks lxappearance kvantum gnome-keyring smartmontools ffmpeg polkit-gnome swaybg network-manager-applet polkit-kde-agent cpupower-gui ttf-fantasque-nerd ttf-jetbrains-mono-nerd ttf-fluentui-system-icons ttf-comfortaa
|
||||
echo "
|
||||
==> Installing fonts...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake adobe-source-code-pro-fonts gnome-font-viewer gnome-characters ttf-fantasque-nerd ttf-jetbrains-mono-nerd ttf-fluentui-system-icons ttf-comfortaa candy-icons
|
||||
|
||||
# Programming
|
||||
yay -S meld docker vscodium kitty fish docker terminator ghex nodejs npm python-pip git-credential-manager-core-bin wine kate rustup cargo filezilla typescript-language-server php jdk vscode-css-languageserver vscode-html-languageserver bash-language-server lazygit
|
||||
sudo npm i -g @vue/typescript-plugin
|
||||
echo "
|
||||
==> Installing coding tools...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake docker vscodium kitty fish docker terminator bvi nodejs npm python-pip git-credential-manager-bin wine kate rustup cargo filezilla php jdk ripgrep
|
||||
|
||||
# nvim
|
||||
yay -S neovim lua lua-language-server tree-sitter texlab stylua luarocks jdtls perl julia autojump pyright
|
||||
echo "
|
||||
==> Installing nvim...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake neovim lua lua-language-server tree-sitter tree-sitter-cli texlab stylua luarocks jdtls perl julia pyright vscode-css-languageserver vscode-html-languageserver bash-language-server python-black proselint asmfmt typescript-language-server shfmt sass ruby eslint_d nvimpager
|
||||
sudo npm i -g @vue/typescript-plugin
|
||||
|
||||
# Internet
|
||||
yay -S librewolf-bin webcord-bin thunderbird rustdesk brave-bin
|
||||
echo "
|
||||
==> Installing internet programs...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake librewolf-bin vesktop-bin thunderbird rustdesk brave-bin
|
||||
|
||||
# Utilities
|
||||
yay -S okular vlc nextcloud-client p7zip zip unzip gnome-keyring noto-fonts thunderbird pamixer pavucontrol light neofetch bashtop hugo sddm uxplay upower
|
||||
echo "
|
||||
==> Installing other utilities...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake okular vlc nextcloud-client p7zip zip unzip noto-fonts pavucontrol light fastfetch bashtop hugo uxplay upower gdu dig nwg-look serpl fcitx5 qalculate-gtk openconnect light blueman xdg-desktop-portal-termfilechooser-hunkyburrito-git lazygit tldr
|
||||
|
||||
# LaTeX
|
||||
yay -S texlive biber
|
||||
echo "
|
||||
==> Installing LaTeX...
|
||||
"
|
||||
sleep 2
|
||||
yay -S --noconfirm --noremovemake texlive biber texlive-latexextra perl-yaml-tiny perl-file-homedir libxcrypt-compat
|
||||
|
||||
# WebDev utilities
|
||||
echo "
|
||||
==> Installing webdev utilities...
|
||||
"
|
||||
sleep 2
|
||||
sudo npm i -g create-vue sitemap-generator-cli http-server
|
||||
|
||||
echo "
|
||||
==> Doing system config...
|
||||
"
|
||||
sleep 2
|
||||
sudo cp ./system/greetd/config.toml /etc/greetd/config.toml
|
||||
chsh -s /bin/fish
|
||||
sudo systemctl enable greetd
|
||||
|
||||
cd ./build/
|
||||
npm i
|
||||
cd ..
|
||||
|
||||
cd ./config/astal/
|
||||
mkdir node_modules && cd node_modules && ln -sf /usr/share/astal/gjs/ ./astal
|
||||
cd ../../config/ags/notifications/
|
||||
mkdir node_modules && cd node_modules && ln -sf /usr/share/astal/gjs/ ./astal
|
||||
cd ~/projects/dotfiles/
|
||||
|
||||
./setup
|
||||
|
||||
cd ~/projects/
|
||||
git clone https://git.janishutz.com/janishutz/nvim
|
||||
cd nvim
|
||||
./nvim-install.sh
|
||||
|
||||
xdg-settings set default-web-browser librewolf.desktop
|
||||
xdg-mime default org.pwmt.zathura.desktop application/pdf
|
||||
sudo systemctl disable rustdesk
|
||||
hyprpm update
|
||||
|
||||
git-credential-manager configure
|
||||
|
||||
echo "
|
||||
|
||||
==> DONE!
|
||||
|
||||
Run the postinstall script after a reboot and logging into NextCloud
|
||||
to install the grub theme and cursor icons.
|
||||
Use GNOME Tweaks and nwg-look to change the necessary appearance settings.
|
||||
"
|
||||
|
||||
21
notes.md
21
notes.md
@@ -17,12 +17,14 @@
|
||||
- [ ] AppLauncher (possibly, if anyrun is no good, probably not)
|
||||
- [ ] OSD (see [here](https://github.com/Aylur/astal/tree/main/examples/gtk3/js))
|
||||
- [x] Open Window List for bar when hovering over window title and per-workspace when hovering over workspace
|
||||
- [ ] Keybind to open QuickActions
|
||||
- [ ] Improve handling of tray items (crashes on update of submenus)
|
||||
- [ ] Text recognition
|
||||
- [ ] Theming
|
||||
- [x] Vivado dark mode
|
||||
- [x] GTK
|
||||
- [x] QT (via environment variable)
|
||||
- [x] ~Librewolf~
|
||||
- [x] Librewolf
|
||||
- [x] Astal
|
||||
- [x] Hyprland
|
||||
- [x] Rofi
|
||||
@@ -41,23 +43,26 @@
|
||||
- [ ] Read docs
|
||||
- [ ] battery management
|
||||
- [ ] Programs
|
||||
- [ ] New image viewer (eog, vimiv)
|
||||
- [ ] Switch to vimiv (make default and configure)
|
||||
- [x] Other pdf reader (maybe -> zathura)
|
||||
- [x] Maybe TUI archive manager (~felix-rs~, ouch in yazi)
|
||||
- [ ] vimiv
|
||||
- [ ] Configure
|
||||
- [ ] Theme
|
||||
- [ ] Lazygit: Configure
|
||||
- [ ] Nvim (other repo)
|
||||
- [x] Replace notification handler (noice)
|
||||
- [ ] Configure formatters (of Java, Cpp, TS/JS/Vue, Python)
|
||||
- [ ] Maybe: Add extra configs to commentbox
|
||||
- [ ] Remove trouble (useless for my purposes)
|
||||
- [ ] Yazi
|
||||
- [x] Yazi
|
||||
- [x] More keybinds
|
||||
- [ ] Configure
|
||||
- [ ] Drag and drop support?
|
||||
- [ ] Check out plugins
|
||||
- [x] Configure
|
||||
- [ ] ~Drag and drop support?~
|
||||
- [x] Check out plugins
|
||||
- [x] Use as file picker
|
||||
- [ ] SDDM
|
||||
- [ ] Replace with LightDM or ensure theming works, but prefer replacing, consider greetd + tuigreet
|
||||
- [x] SDDM
|
||||
- [x] Replace with LightDM or ensure theming works, but prefer replacing, consider greetd + tuigreet
|
||||
- [ ] Scripts
|
||||
- [ ] Installer (after the basic OS setup is done (= from chroot onwards))
|
||||
- [x] Theming script
|
||||
|
||||
8
package.json
Normal file
8
package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.37.0",
|
||||
"@stylistic/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-vue": "^10.5.1",
|
||||
"typescript-eslint": "^8.46.1"
|
||||
}
|
||||
}
|
||||
9
postinstall
Executable file
9
postinstall
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd ~/NextCloud/Documents/Private/PC/
|
||||
unzip ./oreo_spark_blue_cursors.zip
|
||||
sudo mv ./oreo_spark_blue_cursors /usr/share/icons
|
||||
|
||||
cd ~/NextCloud/Documents/Private/PC/monterey-grub-theme/
|
||||
sudo chmod +x ./install.sh
|
||||
sudo ./install.sh
|
||||
60
prompts.md
60
prompts.md
@@ -1,60 +0,0 @@
|
||||
# Bar
|
||||
## Attempt 1
|
||||
Use Astal (https://aylur.github.io/astal) to write me a new status bar for hyprland. You may use JSX (be aware, it's not react, but gjs based and has therefore some limitations), but I prefer using the other syntax that is similar to what it was for AGS (the old version of astal), which more closely resembles GTK syntax. The bar should include the following, from left to right:
|
||||
Left aligned
|
||||
- Date & Time (with seconds, preferably)
|
||||
- System stats (i.e. CPU, Memory util, Screen Brightness & Battery status, if available)
|
||||
- Workspace number
|
||||
Centered
|
||||
- The window name
|
||||
Right aligned (still left to right)
|
||||
- System tray
|
||||
- QuickAction menu in GNOME QuickAction menu style, but only the closed version showing icons for volume, mic, WiFi / Ethernet and a Power icon. For the icons (all throughout the bar) use the fluentui-icons (so the Windows 11 icons). If you can't provide them here, tell me what icon should go there and I will put it there manually
|
||||
|
||||
The actual QuickAction Menu (which you could also write in a separate file) will provide options where I can pick WiFi, Bluetooth (also turn it on and off), change volume of mic and output, pick the mic and output, have media controls and have a power menu).
|
||||
|
||||
For the QuickAction menu, provide a function that is exposed from the file to open and close it, as for all the features (like enabling BT, WiFi, etc).
|
||||
|
||||
|
||||
### Followups
|
||||
To the WiFi and Bluetooth menus, add the option to pick a WiFi Network / Bluetooth device. Please also fully extract the QuickActions menu to a separate file.
|
||||
|
||||
|
||||
Now, can you also provide scss for the bar, such that:
|
||||
- I have an easy way to customize colours (which I will be doing using one of my scripts, so having a separate colour config file will be a great option)
|
||||
- it is very rounded (the corners)
|
||||
- it has a very sleek, but modern design, with only a single accent colour
|
||||
- Hovering over something clickable uses a hover colour
|
||||
|
||||
|
||||
## Attempt 2
|
||||
Using AstalNetwork, can you write a UI (that can be integrated into a popover) and a corresponding backend that allows me to:
|
||||
- Turn on/off networking and WiFi
|
||||
- Select a WiFi Network
|
||||
- Some way of adding a new connection (can be a special UI or simply opens up another tool like nm-applet's network config)
|
||||
- WiFi-Auto-Connect
|
||||
- Exposes a function (or multiple) through which I can get (as a bindable porperty):
|
||||
- Current up/down speed
|
||||
- Connection type
|
||||
- WiFi SSID (if applicable)
|
||||
- WiFi Signal Strength (if applicable)
|
||||
- Local IP
|
||||
|
||||
I would prefer if you could split up the logic from the UI, i.e. have the logic in a separate TS file and have the UI as its own TSX file and simply import the logic
|
||||
|
||||
|
||||
|
||||
# GTK THEME
|
||||
Provide GTK CSS for Gtk 4, as short as possible, but including everything that is necessary to make it look good, where you have the following options for colours to pick. They will be replaced by a script (no need to provide that) according to some variables
|
||||
- #000 (normal background)
|
||||
- #111 (accent background, to differentiate, will be slightly brighter / darker
|
||||
- #222 (secondary accent background, slightly brighter / darker than #111)
|
||||
- #333 (inactive background, but could also be used to be slightly brighter / dark than #222)
|
||||
- #555 (shadow colour)
|
||||
- #555A (shadow colour, but as RGBA value)
|
||||
- #F00 (accent colour, primary accent colour)
|
||||
- #0F0 (secondary accent colour, use if it makes sense to differentiate from the primary accent)
|
||||
- #00F (tertiary accent colour, use sparingly)
|
||||
- #AAA (inactive colour, darker / brighter than primary foreground colour)
|
||||
- #FFF (primary foreground colour)
|
||||
Propose additional colours in a similar format (three-digit hex) and explain what they are for if necessary. Make the theme rounded and include as many of the widgets as needed or possible
|
||||
@@ -3,3 +3,4 @@ $bg-color: {{ colour-background-hex }};
|
||||
$accent-color: {{ colour-accent-hex }};
|
||||
$accent-color-2: {{ colour-accent-2-hex }};
|
||||
$shadow-color: {{ colour-shadow-rgba-03 }};
|
||||
$monospace-font: {{ font-mono }}
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
#██████████████ █████ ███████████████████████████████████████████████████████████████████████████████████████████████████ ██
|
||||
|
||||
|
||||
general {
|
||||
grace = 15
|
||||
}
|
||||
|
||||
# ┌ ┐
|
||||
# │ BACKGROUND │
|
||||
# └ ┘
|
||||
@@ -49,7 +45,7 @@ label {
|
||||
monitor =
|
||||
text = <b>$TIME</b>
|
||||
color = {{ colour-primary-rgb }}
|
||||
font_size = 100
|
||||
font_size = 150
|
||||
font_family = {{ font-primary }}
|
||||
|
||||
position = 0, 80
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/** Basic config file **/
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
icon-theme: "{{ icon-theme }}";
|
||||
display-drun: "";
|
||||
display-run: "🏃🏽♂️ ";
|
||||
display-window: "🗔 ";
|
||||
display-combi: "🔎 ";
|
||||
dpi: 160;
|
||||
}
|
||||
|
||||
@theme "style.rasi"
|
||||
@@ -18,8 +18,8 @@
|
||||
border: 1px;
|
||||
border-radius: 10px;
|
||||
padding: 0;
|
||||
location: west;
|
||||
anchor: west;
|
||||
location: center;
|
||||
anchor: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
[flavor]
|
||||
use = "{{ yazi-theme }}"
|
||||
dark = "{{ yazi-theme }}"
|
||||
light = "{{ yazi-theme }}"
|
||||
|
||||
5
scripts/auto-renamer
Executable file
5
scripts/auto-renamer
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
|
||||
node "$SCRIPT_DIR/util/auto-renamer/index.js" $@
|
||||
14
scripts/convert-to-mp4
Executable file
14
scripts/convert-to-mp4
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
extension="out"
|
||||
read -p "Pick extension to convert from: " extension
|
||||
outfolder="out"
|
||||
outext="mp4"
|
||||
read -p "Output folder: " outfolder
|
||||
read -p "Output extension: " outext
|
||||
|
||||
mkdir $outfolder
|
||||
for file in *.$extension; do
|
||||
ffmpeg -i "$file" "$outfolder/${file%.$extension}.$outext"
|
||||
echo "\n\n==> Conversion complete\n\n"
|
||||
done
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
connect() {
|
||||
read -sp $'Please type in your Encryption Password:\n' encpass
|
||||
read -sp $'Please enter your Encryption Password: ' encpass
|
||||
echo " ==> Connecting"
|
||||
TOKEN=$(cat ~/.local/share/ethz-vpn-connect/ethzvpntoken.secret | openssl enc -aes-256-cbc -pbkdf2 -d -a -k $encpass)
|
||||
PASSWORD=$(cat ~/.local/share/ethz-vpn-connect/ethzvpnpass.secret | openssl enc -aes-256-cbc -pbkdf2 -d -a -k $encpass)
|
||||
USERNAME=$(cat ~/.local/share/ethz-vpn-connect/ethzvpnusername.txt)
|
||||
@@ -12,18 +13,16 @@ connect() {
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
sudo killall -v -SIGINT openconnect #add -i option to ask for confirmation, usefull if running multible openconnect.
|
||||
sudo killall -v -SIGINT openconnect
|
||||
echo " ==> Disconnected"
|
||||
}
|
||||
|
||||
setup() {
|
||||
echo 'You are about to overwrite your secrets. Press ctrl + C to cancel.'
|
||||
read -p $'Please type in your Username: ' USERNAME
|
||||
echo 'Ok!'
|
||||
read -sp $'Please type in your Encryption Password: ' encpass
|
||||
echo 'Ok!'
|
||||
read -sp $'Please type in your ETHZ WLAN Password: ' PASSWORD
|
||||
echo 'Ok!'
|
||||
read -sp $'Please type in your ETHZ OTP Secret: ' TOKEN
|
||||
read -p $'Please enter your ETHZ-Username: ' USERNAME
|
||||
read -sp $'Please choose and enter your Encryption Password (will be required when launching): ' encpass
|
||||
read -sp $'Please enter your ETHZ WLAN (= Radius) Password: ' PASSWORD
|
||||
read -sp $'Please enter your ETHZ OTP Secret: ' TOKEN
|
||||
mkdir ~/.local/share/ethz-vpn-connect
|
||||
echo $PASSWORD | openssl enc -aes-256-cbc -pbkdf2 -a -k $encpass >~/.local/share/ethz-vpn-connect/ethzvpnpass.secret
|
||||
echo $TOKEN | openssl enc -aes-256-cbc -pbkdf2 -a -k $encpass >~/.local/share/ethz-vpn-connect/ethzvpntoken.secret
|
||||
@@ -31,7 +30,7 @@ setup() {
|
||||
encpass=""
|
||||
PASSWORD=""
|
||||
TOKEN=""
|
||||
echo $'Secrets set\n'
|
||||
echo $' ==> Secrets set <==\n'
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -54,6 +53,6 @@ setup)
|
||||
setup
|
||||
;;
|
||||
*)
|
||||
echo -e 'Usage: ethz-vpn [Option] \n [Option]: \n connect, c: Connect VPN \n disconnect, d, dc: Disconnect VPN \n setup: set secrets and eth-Kürzel.\n'
|
||||
echo -e 'Usage: ethz-vpn [Option] \n [Option]: \n connect, c: Connect VPN \n disconnect, d, dc: Disconnect VPN \n setup: set secrets and eth-Username.\n'
|
||||
;;
|
||||
esac
|
||||
|
||||
7
scripts/laptop-docked
Executable file
7
scripts/laptop-docked
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
cp -f ~/.config/hypr/hyprland_docked.conf ~/.config/hypr/hyprland.conf
|
||||
|
||||
./restart-bar
|
||||
|
||||
echo " ==> Done! To revert to normal config, run apply-config"
|
||||
13
scripts/restart-bar
Executable file
13
scripts/restart-bar
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
echo "
|
||||
=> Restarting ags
|
||||
"
|
||||
|
||||
killall gjs
|
||||
killall ags
|
||||
sleep 4
|
||||
ags run -d ~/projects/dotfiles/config/astal --gtk4 & disown
|
||||
sleep 2
|
||||
ags run -d ~/projects/dotfiles/config/ags/notifications & disown
|
||||
6
scripts/setup-clang-format
Executable file
6
scripts/setup-clang-format
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
|
||||
cp "$SCRIPT_DIR/../config/lint/clang-format" ./.clang-format
|
||||
@@ -4,6 +4,5 @@ SCRIPT_DIR=$(dirname "$0")
|
||||
|
||||
cp "$SCRIPT_DIR/../config/lint/eslint.config.mjs" .
|
||||
|
||||
# TODO: Improve eslint config to include JSX and Vue configs too, read on website
|
||||
npm i --save-dev @eslint/js typescript-eslint @stylistic/eslint-plugin
|
||||
npm i --save-dev @eslint/js typescript-eslint @stylistic/eslint-plugin eslint-plugin-vue
|
||||
|
||||
|
||||
5
scripts/update-nvim
Executable file
5
scripts/update-nvim
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd ~/projects/nvim/
|
||||
git pull
|
||||
./nvim-install.sh
|
||||
5
scripts/update-open-webui
Executable file
5
scripts/update-open-webui
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker container rm open-webui
|
||||
docker image pull ghcr.io/open-webui/open-webui
|
||||
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v /home/janis/projects/otherProjects/open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:latest
|
||||
238
scripts/util/auto-renamer/index.js
Normal file
238
scripts/util/auto-renamer/index.js
Normal file
@@ -0,0 +1,238 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { argv } = require('process');
|
||||
|
||||
const config = {
|
||||
// replace character of key with value, any character, apart from ['.', '_', '-', ' ']
|
||||
'replace': {
|
||||
'ä': 'ae',
|
||||
'ö': 'oe',
|
||||
'ü': 'ue',
|
||||
',': '-',
|
||||
'&': 'And',
|
||||
},
|
||||
'rules': {
|
||||
'underscore-before-and-after-number': true, // Will not do trailing or leading for filename
|
||||
'enforce-leading-zero': true, // adds a leading zero to any number below 10
|
||||
'camel-case-rules': {
|
||||
'enforce-snake-case-for-filetypes': ['py'], // using underscores
|
||||
'enforce-kebab-case-for-filetypes': ['css', 'html', 'scss', 'tex'], // using hyphens
|
||||
},
|
||||
'file-start-letter': 'lower', // lower, upper, unchanged
|
||||
'directory-start-letter': 'upper', // lower, upper, unchanged
|
||||
'replace-dots-with': '', // will not replace as leading character to not break dotfiles
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively find all files with extension in a directory
|
||||
* @param {string} dir The directory to search. Either absolute or relative path
|
||||
* @param {string} extension The file extension to look for
|
||||
* @param {boolean} cleanup If helper files (like .DS_STORE and Windows helpers should be auto-deleted)
|
||||
* @param {string[]} ignoreList A list of filenames or directories to ignore
|
||||
* @returns {{ files: string, directories: string }} returns a list of html files with their full path
|
||||
*/
|
||||
const treeWalker = (dir, extension, cleanup, ignoreList) => {
|
||||
const ls = fs.readdirSync(dir);
|
||||
const fileList = [];
|
||||
const dirList = [];
|
||||
for (let file in ls) {
|
||||
if (fs.statSync(path.join(dir, ls[file])).isDirectory()) {
|
||||
// Filter ignored directories
|
||||
if (ignoreList === undefined || !ignoreList.includes(ls[file])) {
|
||||
const newData = treeWalker(path.join(dir, ls[file]), extension, ignoreList);
|
||||
const newFiles = newData.files;
|
||||
dirList.push( path.join( dir, ls[ file ] ) );
|
||||
for (let dir = 0; dir < newData.directories.length; dir++) {
|
||||
dirList.push( newData.directories[dir] );
|
||||
}
|
||||
for (let file = 0; file < newFiles.length; file++) {
|
||||
fileList.push(newFiles[file]);
|
||||
}
|
||||
}
|
||||
} else if (extension == '*' || ls[file].includes(extension)) {
|
||||
if (ignoreList === undefined || !ignoreList.includes(ls[file])) {
|
||||
fileList.push(path.join(dir, ls[file]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { 'files': fileList, 'directories': dirList };
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} filename The filename to fix according to the rules
|
||||
* @returns {string} the fixed filename
|
||||
*/
|
||||
const fixName = ( fn, ft ) => {
|
||||
let out = '';
|
||||
const enforceSnake = config.rules['camel-case-rules']['enforce-snake-case-for-filetypes'].includes( ft );
|
||||
const enforceKebab = config.rules['camel-case-rules']['enforce-kebab-case-for-filetypes'].includes( ft );
|
||||
const isDir = ft === 'directory';
|
||||
const startLetter = isDir ? config.rules['directory-start-letter'] : config.rules['file-start-letter'];
|
||||
let nextUpperCase = false;
|
||||
|
||||
for ( let i = 0; i < fn.length; i++ ) {
|
||||
const c = fn[i];
|
||||
|
||||
if ( c == '.' ) {
|
||||
// Rule: Removed after number, allowed elsewhere
|
||||
if ( i > 0 && /[0-9]/.test( fn[ i - 1 ] ) ) {
|
||||
out += config.rules[ 'replace-dots-with' ];
|
||||
} else {
|
||||
out += '.';
|
||||
}
|
||||
} else if ( /[A-Z]/.test( c ) ) {
|
||||
// If we reach a capital letter and enforce either kebab-case or snake_case, we can assume that this is the start of a CamelCase word
|
||||
if ( enforceKebab ) {
|
||||
out += '-' + c.toLowerCase();
|
||||
} else if ( enforceSnake ) {
|
||||
out += '_' + c.toLowerCase();
|
||||
} else {
|
||||
nextUpperCase = false;
|
||||
if ( i == 0 && startLetter === 'lower' ) {
|
||||
out += c.toLowerCase();
|
||||
} else {
|
||||
out += c;
|
||||
}
|
||||
}
|
||||
} else if ( c == ' ' ) {
|
||||
// We always replace spaces, the question is just to what
|
||||
if ( enforceKebab ) {
|
||||
out += '-';
|
||||
} else if ( enforceSnake ) {
|
||||
out += '_';
|
||||
} else {
|
||||
nextUpperCase = true;
|
||||
}
|
||||
} else if ( c == '_' ) {
|
||||
// If we are not enforcing snake_case, then replace it
|
||||
if ( !enforceSnake ) {
|
||||
if ( needsUnderscore( i, fn ) ) {
|
||||
out += '_';
|
||||
} else if ( enforceKebab ) {
|
||||
out += '-';
|
||||
} else {
|
||||
nextUpperCase = true;
|
||||
}
|
||||
} else {
|
||||
out += '_'
|
||||
}
|
||||
} else if ( c == '-' ) {
|
||||
// If we are not enforcing kebab-case
|
||||
if ( !enforceKebab ) {
|
||||
if ( enforceSnake ) {
|
||||
out += '_';
|
||||
} else {
|
||||
nextUpperCase = true;
|
||||
}
|
||||
} else {
|
||||
out += '-'
|
||||
}
|
||||
} else {
|
||||
let curr = config.replace[ c ] === undefined ? c : config.replace[ c ];
|
||||
if ( config.rules[ 'underscore-before-and-after-number' ] || config.rules['enforce-leading-zero'] ) {
|
||||
if ( /[0-9]/.test( c ) ) {
|
||||
if ( i < fn.length - 1 ) {
|
||||
if ( config.rules['enforce-leading-zero'] ) {
|
||||
const prevIsNumber = i > 0 && /[0-9]/.test( fn[i - 1] );
|
||||
const nextIsNumber = /[0-9]/.test( fn[i + 1] );
|
||||
if ( !nextIsNumber && ( i == 0|| !prevIsNumber ) ) {
|
||||
curr = '0' + curr;
|
||||
}
|
||||
}
|
||||
|
||||
if ( config.rules['underscore-before-and-after-number'] ) {
|
||||
if ( !( /[0-9]/.test( fn[ i + 1 ] ) ) && fn[ i + 1 ] != '_' ) {
|
||||
curr += '_';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( config.rules['enforce-leading-zero'] && ( i > 0 && !( /[0-9]/.test( fn[i - 1] ) ) ) ) {
|
||||
curr = '0' + curr;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( config.rules['underscore-before-and-after-number'] && /[0-9]/.test( fn[ i + 1 ] ) ) {
|
||||
curr += '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( nextUpperCase || ( i == 0 && startLetter === 'upper' ) ) {
|
||||
nextUpperCase = false;
|
||||
out += curr.toUpperCase();
|
||||
} else {
|
||||
if ( i == 0 && startLetter === 'upper' ) {
|
||||
out += curr.toUpperCase();
|
||||
} else {
|
||||
out += curr.toLowerCase();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
const needsUnderscore = ( i, fn ) => {
|
||||
return ( i > 0 && /[0-9]/.test( fn[ i - 1 ] ) ) || ( i < fn - 1 && /[0-9]/.test( fn[ i + 1 ] ) )
|
||||
}
|
||||
|
||||
const separateDirAndFileAndFiletype = ( filename ) => {
|
||||
const loc = filename.lastIndexOf( '/' ) + 1;
|
||||
let ftl = filename.lastIndexOf( '.' ) + 1;
|
||||
let fn = filename.substring( loc, ftl - 1 );
|
||||
let ft = filename.substring( ftl );
|
||||
if ( fs.statSync( filename ).isDirectory() ) {
|
||||
ftl = filename.length;
|
||||
fn = filename.substring( loc );
|
||||
ft = 'directory';
|
||||
|
||||
}
|
||||
const dir = filename.slice( 0, loc - 1 );
|
||||
return { 'filename': fn, 'dir': dir, 'filetype': ft };
|
||||
}
|
||||
|
||||
const fixDirName = ( directory, top ) => {
|
||||
if ( directory === top ) {
|
||||
return top;
|
||||
}
|
||||
|
||||
const f = separateDirAndFileAndFiletype( directory );
|
||||
return fixDirName( f.dir, top ) + '/' + fixName( f.filename, f.filetype );
|
||||
}
|
||||
|
||||
if (argv[2] == '-h') {
|
||||
console.log('auto-renamer [directory]\n\n=> Recursively rename files in directory');
|
||||
} else if (argv[2] == '-v') {
|
||||
console.log('auto-renamer version 1.0.0, developed by Janis Hutz (development@janishutz.com)');
|
||||
} else {
|
||||
// Recursively add all files in the directory
|
||||
const fp = path.resolve( argv[2] );
|
||||
const list = treeWalker(fp, '*', ['.git', '@girs']);
|
||||
const files = list.files;
|
||||
const directories = list.directories;
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
const f = separateDirAndFileAndFiletype( file );
|
||||
let fixedFile = fixName( f.filename, f.filetype );
|
||||
|
||||
// Rename
|
||||
const fixedPath = f.dir + '/' + fixedFile + '.' + f.filetype;
|
||||
console.log( file + ' -> ' + fixedPath );
|
||||
fs.renameSync( file, fixedPath );
|
||||
}
|
||||
|
||||
// Fix directory names after file names. Sort array by decending length
|
||||
directories.sort( ( a, b ) => {
|
||||
return b.length - a.length;
|
||||
} );
|
||||
|
||||
// separate directories up until we reach the path of dir started in
|
||||
for (let i = 0; i < directories.length; i++) {
|
||||
const dir = directories[i];
|
||||
const fixed = fixDirName( dir, fp );
|
||||
console.log( dir + ' -> ' + fixed );
|
||||
fs.renameSync( dir, fixDirName( dir, fp ) );
|
||||
}
|
||||
}
|
||||
81
setup
81
setup
@@ -23,12 +23,11 @@ echo "
|
||||
|
||||
"
|
||||
|
||||
trap 'echo -e "\nCaught Ctrl+C, exiting..."; exit 1' SIGINT
|
||||
trap 'echo -e "\nCaught Ctrl+C, exiting..."; exit 130' SIGINT
|
||||
|
||||
# Read platform to install on (only if no platform file present in ~/.config/)
|
||||
platform=""
|
||||
if [[ -f ~/.config/platform ]]; then
|
||||
echo "Config type already selected, skipping"
|
||||
platform=$(cat ~/.config/platform)
|
||||
else
|
||||
read -p "Choose the configs to install, Laptop or Desktop (l/D): " platform
|
||||
@@ -36,10 +35,13 @@ else
|
||||
fi
|
||||
platform=$(echo "$platform" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# Get user preference for regenerating the styling
|
||||
regen=""
|
||||
read -p "Would you like to regenerate styling? (y/N) " regen
|
||||
if [ $regen == "y" ]; then
|
||||
restart=""
|
||||
if [[ "$regen" == "y" ]]; then
|
||||
restart="y"
|
||||
cd build
|
||||
node build.js
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -47,30 +49,54 @@ if [ $regen == "y" ]; then
|
||||
exit 130
|
||||
fi
|
||||
cd ..
|
||||
else
|
||||
read -p "Apply full config? (y/N) " restart
|
||||
fi
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
# hyprvim config
|
||||
hyprvim=""
|
||||
if [[ -f ~/.config/hyprvim ]]; then
|
||||
hyprvim=$(cat ~/.config/hyprvim)
|
||||
else
|
||||
read -p "Would you like to use hyprvim? (Y/n) " hyprvim
|
||||
fi
|
||||
hyprvim=$(echo "$hyprvim" | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$hyprvim" == "" ]]; then
|
||||
hyprvim="y"
|
||||
fi
|
||||
echo "$hyprvim" >~/.config/hyprvim
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
echo "=> Moving configs to correct destinations"
|
||||
killall swaybg
|
||||
cp -r ./config/fish ~/.config/
|
||||
cp -r ./config/hypr ~/.config/
|
||||
rm -rf ~/.config/rofi/
|
||||
cp -r ./config/rofi ~/.config/
|
||||
cp -r ./config/xdg-desktop-portal-termfilechooser/ ~/.config/
|
||||
cp -r ./config/xdg-desktop-portal/ ~/.config/
|
||||
|
||||
# Depending on platform, remove one or the other config and rename remaining one
|
||||
if [[ "$platform" == "d" ]]; then
|
||||
echo "Running on desktop"
|
||||
mv ~/.config/hypr/hyprland_desktop.conf ~/.config/hypr/hyprland.conf
|
||||
rm ~/.config/hypr/hyprland_*
|
||||
mv ~/.config/rofi/config_desktop.rasi ~/.config/rofi/config.rasi
|
||||
rm ~/.config/rofi/config_*
|
||||
echo "==> Running on desktop"
|
||||
cp -f ~/.config/hypr/hyprland_desktop.conf ~/.config/hypr/hyprland.conf
|
||||
else
|
||||
echo "Running on laptop"
|
||||
mv ~/.config/hypr/hyprland_laptop.conf ~/.config/hypr/hyprland.conf
|
||||
rm ~/.config/hypr/hyprland_*
|
||||
mv ~/.config/rofi/config_laptop.rasi ~/.config/rofi/config.rasi
|
||||
rm ~/.config/rofi/config_*
|
||||
echo "==> Running on laptop"
|
||||
cp -f ~/.config/hypr/hyprland_laptop.conf ~/.config/hypr/hyprland.conf
|
||||
fi
|
||||
|
||||
# Enable or disable "hyprvim" (using hyprland with vim-inspired modes)
|
||||
if [[ "$hyprvim" == "y" ]]; then
|
||||
echo "==> Enabling hyprvim"
|
||||
mv -f ~/.config/hypr/hyprland/mode-binds.conf ~/.config/hypr/hyprland/binds.conf
|
||||
else
|
||||
echo "==> Disabling hyprvim"
|
||||
rm -rf ~/.config/hypr/hyprland/modal-binds
|
||||
rm ~/.config/hypr/hyprland/mode-binds.conf
|
||||
fi
|
||||
|
||||
# Done this way intentionally to control what is copied
|
||||
cp -r ./config/kitty ~/.config/
|
||||
cp -r ./config/fastfetch ~/.config/
|
||||
cp -r ./config/lazygit ~/.config/
|
||||
@@ -79,34 +105,43 @@ cp -r ./config/Thunar ~/.config/
|
||||
cp -r ./config/wlogout/ ~/.config/
|
||||
cp -r ./config/yazi ~/.config/
|
||||
cp -r ./config/zathura ~/.config/
|
||||
cp ./config/lint/indentconfig.yaml ~/.indentconfig.yaml
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
echo "
|
||||
=> Installing yazi plugins
|
||||
"
|
||||
ya pack -i
|
||||
rm -rf ~/.config/yazi/plugins/*
|
||||
ya pkg upgrade
|
||||
|
||||
if [[ "$restart" == "y" ]]; then
|
||||
echo "
|
||||
=> Installing GTK Theme
|
||||
"
|
||||
sudo rm -rf /usr/share/themes/Adaptive-Theme/
|
||||
sudo mkdir /usr/share/themes/Adaptive-Theme/
|
||||
sudo cp -r ./gtk-theme/dist/* /usr/share/themes/Adaptive-Theme/
|
||||
|
||||
echo "
|
||||
=> Installing System Configs
|
||||
"
|
||||
sudo cp ./system/environment /etc/environment
|
||||
sudo cp -r ./system/greetd/* /etc/greetd/
|
||||
sudo cp ./system/greetd/pam /etc/pam.d/greetd
|
||||
sudo cp -r ./system/greetd/config.toml /etc/greetd/
|
||||
|
||||
# if [[ "$platform" == "d" ]]; then
|
||||
# else
|
||||
# echo "Setting up autologin config for greetd"
|
||||
# sudo cp -r ./system/greetd/config-autologin.toml /etc/greetd/config.toml
|
||||
# fi
|
||||
hyprctl reload
|
||||
|
||||
# echo "
|
||||
# => Restarting bars, etc
|
||||
# "
|
||||
# killall gjs
|
||||
# sleep 1
|
||||
# ags run -d ./config/astal --gtk4 & disown 2>&1 > /dev/null
|
||||
# ags run -d ./config/ags/notifications/ & disown 2>&1 > /dev/null
|
||||
./scripts/restart-bar
|
||||
fi
|
||||
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
|
||||
hyprctl reload
|
||||
|
||||
echo "
|
||||
|
||||
|
||||
@@ -14,3 +14,5 @@ VKD3D_CONFIG=dxr11,dxr
|
||||
RADV_PERFTEST_RT=1
|
||||
ANDROID_HOME=/home/janis/Android/Sdk
|
||||
EDITOR=nvim
|
||||
PAGER=nvimpager
|
||||
MANPAGER=nvimpager
|
||||
|
||||
18
system/greetd/config-autologin.toml
Normal file
18
system/greetd/config-autologin.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[terminal]
|
||||
# The VT to run the greeter on. Can be "next", "current" or a number
|
||||
# designating the VT.
|
||||
vt = 1
|
||||
|
||||
# The default session, also known as the greeter.
|
||||
[default_session]
|
||||
command = "tuigreet --cmd Hyprland --time --remember --remember-user-session --asterisks --user-menu --sessions /usr/share/wayland-sessions"
|
||||
|
||||
# The user to run the command as. The privileges this user must have depends
|
||||
# on the greeter. A graphical greeter may for example require the user to be
|
||||
# in the `video` group.
|
||||
user = "greeter"
|
||||
|
||||
|
||||
[initial_session]
|
||||
command = "Hyprland"
|
||||
user = "janis"
|
||||
9
system/greetd/pam
Normal file
9
system/greetd/pam
Normal file
@@ -0,0 +1,9 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth required pam_securetty.so
|
||||
auth requisite pam_nologin.so
|
||||
auth include system-local-login
|
||||
auth optional pam_gnome_keyring.so
|
||||
account include system-local-login
|
||||
session include system-local-login
|
||||
session optional pam_gnome_keyring.so auto_start
|
||||
@@ -1,73 +0,0 @@
|
||||
# vim:set ft=sh
|
||||
# MODULES
|
||||
# The following modules are loaded before any boot hooks are
|
||||
# run. Advanced users may wish to specify all system modules
|
||||
# in this array. For instance:
|
||||
# MODULES=(usbhid xhci_hcd)
|
||||
MODULES=()
|
||||
|
||||
# BINARIES
|
||||
# This setting includes any additional binaries a given user may
|
||||
# wish into the CPIO image. This is run last, so it may be used to
|
||||
# override the actual binaries included by a given hook
|
||||
# BINARIES are dependency parsed, so you may safely ignore libraries
|
||||
BINARIES=()
|
||||
|
||||
# FILES
|
||||
# This setting is similar to BINARIES above, however, files are added
|
||||
# as-is and are not parsed in any way. This is useful for config files.
|
||||
FILES=()
|
||||
|
||||
# HOOKS
|
||||
# This is the most important setting in this file. The HOOKS control the
|
||||
# modules and scripts added to the image, and what happens at boot time.
|
||||
# Order is important, and it is recommended that you do not change the
|
||||
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
|
||||
# help on a given hook.
|
||||
# 'base' is _required_ unless you know precisely what you are doing.
|
||||
# 'udev' is _required_ in order to automatically load modules
|
||||
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
|
||||
# Examples:
|
||||
## This setup specifies all modules in the MODULES setting above.
|
||||
## No RAID, lvm2, or encrypted root is needed.
|
||||
# HOOKS=(base)
|
||||
#
|
||||
## This setup will autodetect all modules for your system and should
|
||||
## work as a sane default
|
||||
# HOOKS=(base udev autodetect modconf block filesystems fsck)
|
||||
#
|
||||
## This setup will generate a 'full' image which supports most systems.
|
||||
## No autodetection is done.
|
||||
# HOOKS=(base udev modconf block filesystems fsck)
|
||||
#
|
||||
## This setup assembles a mdadm array with an encrypted root file system.
|
||||
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
|
||||
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
|
||||
#
|
||||
## This setup loads an lvm2 volume group.
|
||||
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
|
||||
#
|
||||
## NOTE: If you have /usr on a separate partition, you MUST include the
|
||||
# usr and fsck hooks.
|
||||
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck plymouth)
|
||||
|
||||
# COMPRESSION
|
||||
# Use this to compress the initramfs image. By default, zstd compression
|
||||
# is used. Use 'cat' to create an uncompressed image.
|
||||
#COMPRESSION="zstd"
|
||||
#COMPRESSION="gzip"
|
||||
#COMPRESSION="bzip2"
|
||||
#COMPRESSION="lzma"
|
||||
#COMPRESSION="xz"
|
||||
#COMPRESSION="lzop"
|
||||
#COMPRESSION="lz4"
|
||||
|
||||
# COMPRESSION_OPTIONS
|
||||
# Additional options for the compressor
|
||||
#COMPRESSION_OPTIONS=()
|
||||
|
||||
# MODULES_DECOMPRESS
|
||||
# Decompress kernel modules during initramfs creation.
|
||||
# Enable to speedup boot process, disable to save RAM
|
||||
# during early userspace. Switch (yes/no).
|
||||
#MODULES_DECOMPRESS="yes"
|
||||
Reference in New Issue
Block a user