Compare commits
50 Commits
26ec943fef
...
master
Author | SHA1 | Date | |
---|---|---|---|
b58a7327f2 | |||
885ee3d66f | |||
219873c890
|
|||
01e1b307f1
|
|||
392d75f182
|
|||
4427954ba0
|
|||
de13fa6bcb | |||
9e2d872968
|
|||
0db5c9fb0c
|
|||
38d690c5aa
|
|||
c38530d5a7 | |||
e78351850e | |||
5d8912036a | |||
638f1efc3a | |||
73881d7d05 | |||
187ebbadb6 | |||
003aa55726 | |||
7a34cbe48d | |||
079bef1e52
|
|||
17da29c03e
|
|||
0920081084
|
|||
0f0e56174d | |||
c89670f53d | |||
90804f75bb | |||
6d836901aa | |||
84cfee9afa
|
|||
45c0c935a8 | |||
6308f00345 | |||
23e3adc741
|
|||
459e31371f
|
|||
eccf6c17b4
|
|||
37735ae085
|
|||
7f9549f651
|
|||
b7a7798611
|
|||
4b2e2c8815
|
|||
40634f0de5
|
|||
e5b253411f
|
|||
bb27fcfaa0
|
|||
76e7547151
|
|||
9ca3a7147d
|
|||
c414473b4c
|
|||
b65616d1cc
|
|||
b1c1c8faa6
|
|||
03e9fbe124
|
|||
b70603504e
|
|||
765c4232a8
|
|||
77106d60f4
|
|||
8c59220b6a
|
|||
d549a22794
|
|||
d8b78f78f3
|
26
README.md
@ -1,16 +1,22 @@
|
|||||||
# Awesome Window Manager config scripts
|
# Mark's Awesomewm Config
|
||||||
|
|
||||||
|
## Setup
|
||||||
Copy config.lua.template into config.lua before using.
|
Copy config.lua.template into config.lua before using.
|
||||||
|
|
||||||
|
## Modules
|
||||||
|
See the [modules](./modules/README.md) README.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
Some features require extra tools. Tools each module requires are listed below. If a module is disabled, its tool is not needed. Applications required by `core` MUST be installed.
|
||||||
|
|
||||||
|
- Core: `fish`, `sox` (and plugins)
|
||||||
|
- Backlight: `xbacklight`
|
||||||
|
- Battery: `acpi`
|
||||||
|
- Ibus: `ibus`
|
||||||
|
- Launcher: `rofi`
|
||||||
|
- Lock: `i3lock, imagemagick, scrot` or `lightdm` (For `dm-tool`), depending on configuration.
|
||||||
|
- MPC: `mpc`
|
||||||
|
- Picom: `picom`
|
||||||
|
- Screenshot: `flameshot`, `tesseract (and data)`, `xclip`, `lpr`
|
||||||
|
- Volume: `pamixer`
|
||||||
|
|
||||||
- rofi
|
|
||||||
- fish
|
|
||||||
- upower, xbacklight
|
|
||||||
- flameshot, xclip, tesseract
|
|
||||||
- pamixer
|
|
||||||
- sox
|
|
||||||
- ibus
|
|
||||||
- redshift
|
|
||||||
- mpc
|
|
||||||
|
@ -7,5 +7,7 @@ return {
|
|||||||
signal = conf_dir .. "assets/apps/signal.svg",
|
signal = conf_dir .. "assets/apps/signal.svg",
|
||||||
terminal = conf_dir .. "assets/apps/terminal.svg",
|
terminal = conf_dir .. "assets/apps/terminal.svg",
|
||||||
thunderbird = conf_dir .. "assets/apps/thunderbird.svg",
|
thunderbird = conf_dir .. "assets/apps/thunderbird.svg",
|
||||||
writer = conf_dir .. "assets/apps/writer.svg"
|
writer = conf_dir .. "assets/apps/writer.svg",
|
||||||
|
phone = conf_dir .. "assets/apps/phone.svg",
|
||||||
|
code = conf_dir .. "assets/apps/code.svg",
|
||||||
}
|
}
|
||||||
|
13
assets/apps/code.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
|
||||||
|
<rect style="opacity:0.2" width="56" height="48" x="4" y="9" rx="2.8" ry="2.4"/>
|
||||||
|
<rect style="fill:#167abf" width="56" height="48" x="4" y="8" rx="2.8" ry="2.4"/>
|
||||||
|
<path style="fill:#ffffff;opacity:0.1" d="M 6.8007812 8 C 5.2495813 8 4 9.0707908 4 10.400391 L 4 11.400391 C 4 10.070791 5.2495813 9 6.8007812 9 L 57.199219 9 C 58.750419 9 60 10.070791 60 11.400391 L 60 10.400391 C 60 9.0707908 58.750419 8 57.199219 8 L 6.8007812 8 z"/>
|
||||||
|
<path style="opacity:0.2" d="m 6.8,7.9999992 c -1.5512,0 -2.8,1.0692973 -2.8,2.3988968 v 43.202207 c 0,1.3296 1.2488,2.398898 2.8,2.398898 H 22.2 V 7.9999992 Z"/>
|
||||||
|
<path style="opacity:0.2" d="M 21.955078,4.9143037 A 3.0003,3.0003 0 0 0 19,7.9572725 V 57.957273 a 3.0003,3.0003 0 1 0 6,0 V 7.9572725 A 3.0003,3.0003 0 0 0 21.955078,4.9143037 Z m 8.087891,7.0429693 a 3.0003,3.0003 0 1 0 0,6 H 41 a 3.0003,3.0003 0 1 0 0,-6 z m 4,9 a 3.0003,3.0003 0 1 0 0,6 H 48 a 3.0003,3.0003 0 1 0 0,-6 z m 0,9 a 3.0003,3.0003 0 1 0 0,6 H 48 a 3.0003,3.0003 0 1 0 0,-6 z m 0,9 a 3.0003,3.0003 0 1 0 0,6 H 48 a 3.0003,3.0003 0 1 0 0,-6 z m -4,9 a 3.0003,3.0003 0 1 0 0,6 H 41 a 3.0003,3.0003 0 1 0 0,-6 z"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 22,7 V 57"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 30.042727,13.9994 H 41"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 34.042727,22.9997 H 48"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 34.042727,31.9997 H 48"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 34.042727,40.9997 H 48"/>
|
||||||
|
<path style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round" d="M 30.042727,49.9997 H 41"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
8
assets/apps/phone.svg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
|
||||||
|
<rect style="opacity:0.2" width="40" height="60" x="12" y="3" rx="3" ry="3"/>
|
||||||
|
<path style="fill:#595959" d="M 15 2 C 13.338 2 12 3.338 12 5 L 12 8 L 52 8 L 52 5 C 52 3.338 50.662 2 49 2 L 15 2 z M 12 54 L 12 59 C 12 60.662 13.338 62 15 62 L 49 62 C 50.662 62 52 60.662 52 59 L 52 54 L 12 54 z"/>
|
||||||
|
<rect style="fill:#333333" width="40" height="46" x="12" y="8"/>
|
||||||
|
<path style="fill:#333333" d="M 28.25 4 C 27.5575 4 27 4.446 27 5 C 27 5.554 27.5575 6 28.25 6 L 35.75 6 C 36.4425 6 37 5.554 37 5 C 37 4.446 36.4425 4 35.75 4 L 28.25 4 z M 40 4 A 1 1 0 0 0 39 5 A 1 1 0 0 0 40 6 A 1 1 0 0 0 41 5 A 1 1 0 0 0 40 4 z M 30.5 55 C 29.669 55 29 55.669 29 56.5 L 29 59.5 C 29 60.331 29.669 61 30.5 61 L 33.5 61 C 34.331 61 35 60.331 35 59.5 L 35 56.5 C 35 55.669 34.331 55 33.5 55 L 30.5 55 z M 19.5 56 C 18.669 56 18 56.669 18 57.5 C 18 58.331 18.669 59 19.5 59 L 22.5 59 C 23.331 59 24 58.331 24 57.5 C 24 56.669 23.331 56 22.5 56 L 19.5 56 z M 41.5 56 C 40.669 56 40 56.669 40 57.5 C 40 58.331 40.669 59 41.5 59 L 44.5 59 C 45.331 59 46 58.331 46 57.5 C 46 56.669 45.331 56 44.5 56 L 41.5 56 z"/>
|
||||||
|
<path style="fill:#ffffff;opacity:0.1" d="M 15 2 C 13.338 2 12 3.338 12 5 L 12 6 C 12 4.338 13.338 3 15 3 L 49 3 C 50.662 3 52 4.338 52 6 L 52 5 C 52 3.338 50.662 2 49 2 L 15 2 z"/>
|
||||||
|
<rect style="opacity:0.2" width="40" height="1" x="12" y="8"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -1,11 +1,15 @@
|
|||||||
-- Some subdir variables,
|
-- Some subdir variables,
|
||||||
-- to make switching icon sets easy.
|
-- to make switching icon sets easy.
|
||||||
local brightnessdir = conf_dir .. "assets/icons/brightness/clockwise/"
|
local brightnessdir = conf_dir .. "assets/icons/brightness/counterclockwise/"
|
||||||
local titlebardir = conf_dir .. "assets/icons/titlebar/"
|
local titlebardir = conf_dir .. "assets/icons/titlebar/"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
submenu = conf_dir .. "assets/icons/submenu.svg",
|
submenu = conf_dir .. "assets/icons/submenu.svg",
|
||||||
launcher = conf_dir .. "assets/icons/arch.svg",
|
arch = conf_dir .. "assets/icons/arch.svg",
|
||||||
|
nix = conf_dir .. "assets/icons/nix.svg",
|
||||||
|
sys76 = conf_dir .. "assets/icons/sys76.svg",
|
||||||
|
nix_grey = conf_dir .. "assets/icons/nix-grey.svg",
|
||||||
|
arch_grey = conf_dir .. "assets/icons/arch-grey.svg",
|
||||||
|
|
||||||
music = {
|
music = {
|
||||||
grey = {
|
grey = {
|
||||||
|
38
assets/icons/arch-grey.svg
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="arch-grey.svg"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs12" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview10"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.94931588"
|
||||||
|
inkscape:cx="1025.4753"
|
||||||
|
inkscape:cy="524.5883"
|
||||||
|
inkscape:window-width="3200"
|
||||||
|
inkscape:window-height="1696"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg8" />
|
||||||
|
<path
|
||||||
|
style="opacity:1;fill:#a3a3a3;fill-opacity:1;fill-rule:evenodd;stroke-width:9.14289"
|
||||||
|
d="M 255.9559,0.01280001 C 233.16217,55.8841 219.41473,92.430208 194.03744,146.63496 209.59643,163.12501 224.98314,179.4548 256,201.14286 222.65435,187.42399 203.62144,176.52388 186.62345,162.23158 154.14583,229.98881 103.26064,326.50472 0,512 c 81.159513,-46.84357 137.67092,-75.72385 196.30682,-86.74451 -2.51776,-10.82611 -3.94935,-22.53668 -3.85205,-34.75541 l 0.0896,-2.59965 c 1.28769,-51.98526 35.30506,-95.25882 66.77374,-95.329 31.46869,-0.0705 62.07084,53.16378 60.7829,105.14906 -0.24196,9.7829 -1.34595,19.19207 -3.27402,27.92027 57.99577,11.34321 115.11197,40.14926 195.173,86.35924 -15.78689,-29.05692 -29.87741,-55.25051 -43.33294,-80.1974 -21.19597,-16.42476 -39.57118,-33.80335 -84.66706,-56.94545 30.99636,8.05238 49.45735,13.34536 66.75623,23.72987 C 313.94768,143.9214 302.87344,110.07863 255.95193,0 Z"
|
||||||
|
id="path2" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
@ -1,5 +1,46 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1.1">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<path style="opacity:0.2;fill-rule:evenodd" d="M 31.995177,5.0013995 C 29.502112,11.112323 27.998486,15.109554 25.222845,21.038199 26.924609,22.841797 28.607531,24.627869 32,27 28.35282,25.499498 26.271095,24.307299 24.41194,22.744078 20.8597,30.155025 15.294132,40.711453 4.0000002,61 12.876822,55.876484 19.057757,52.717703 25.471058,51.512319 25.195678,50.328213 25.039098,49.04737 25.049741,47.710946 l 0.0098,-0.284337 C 25.200382,41.740721 28.921032,37.007676 32.362919,37 c 3.441888,-0.0077 6.788998,5.814788 6.648129,11.500678 -0.02646,1.070005 -0.147212,2.099133 -0.358095,3.05378 C 44.99624,52.795122 51.243325,55.945783 60,61 58.273309,57.821899 56.732158,54.956976 55.26046,52.228409 52.94215,50.431951 50.932361,48.531168 46,46 c 3.390226,0.880729 5.409397,1.459649 7.301462,2.595455 C 38.338028,20.741402 37.126783,17.03985 31.994742,4.9999995 Z"/>
|
<svg
|
||||||
<path style="fill:#1793d1;fill-rule:evenodd" d="M 31.995177,4.0013995 C 29.502112,10.112323 27.998486,14.109554 25.222845,20.038199 26.924609,21.841797 28.607531,23.627869 32,26 28.35282,24.499498 26.271095,23.307299 24.41194,21.744078 20.8597,29.155025 15.294132,39.711453 4.0000002,60 12.876822,54.876484 19.057757,51.717703 25.471058,50.512319 25.195678,49.328213 25.039098,48.04737 25.049741,46.710946 l 0.0098,-0.284337 C 25.200382,40.740721 28.921032,36.007676 32.362919,36 c 3.441888,-0.0077 6.788998,5.814788 6.648129,11.500678 -0.02646,1.070005 -0.147212,2.099133 -0.358095,3.05378 C 44.99624,51.795122 51.243325,54.945783 60,60 58.273309,56.821899 56.732158,53.956976 55.26046,51.228409 52.94215,49.431951 50.932361,47.531168 46,45 c 3.390226,0.880729 5.409397,1.459649 7.301462,2.595455 C 38.338028,19.741402 37.126783,16.03985 31.994742,3.9999995 Z"/>
|
width="512"
|
||||||
<path style="fill:#ffffff;fill-rule:evenodd;opacity:0.2" d="M 31.996094 4.0039062 C 29.503492 10.113758 27.998009 14.111032 25.222656 20.039062 C 25.323 20.145411 25.42873 20.253025 25.529297 20.359375 C 28.094806 14.819153 29.605533 10.863636 31.996094 5.0039062 C 37.029258 16.812002 38.370111 20.737759 52.542969 47.173828 C 52.799752 47.306209 53.051272 47.445923 53.300781 47.595703 C 38.339229 19.745153 37.126504 16.040146 31.996094 4.0039062 z M 24.412109 21.744141 C 20.859869 29.155088 15.294132 39.711453 4 60 C 4.2790559 59.838935 4.5328222 59.696245 4.8066406 59.539062 C 15.496107 40.307372 20.956001 29.95453 24.412109 22.744141 C 26.271264 24.307362 28.35282 25.499498 32 27 C 30.744922 26.122406 29.773063 25.343432 28.898438 24.595703 C 27.047844 23.676699 25.658286 22.791955 24.412109 21.744141 z M 46 46 C 50.932361 48.531168 52.941456 50.432058 55.259766 52.228516 C 56.488953 54.507462 57.825027 56.982477 59.21875 59.554688 C 59.483717 59.706715 59.730349 59.844362 60 60 C 58.273309 56.821899 56.731464 53.957083 55.259766 51.228516 C 53.590647 49.935116 52.064892 48.584211 49.509766 46.986328 C 48.498719 46.669238 47.382852 46.359244 46 46 z M 25.064453 47.345703 C 25.063622 47.372706 25.059264 47.398735 25.058594 47.425781 L 25.048828 47.710938 C 25.040995 48.694489 25.125285 49.647751 25.279297 50.554688 C 25.343143 50.542292 25.406814 50.523727 25.470703 50.511719 C 25.239369 49.517004 25.099409 48.452553 25.064453 47.345703 z M 39 47.652344 C 38.966126 48.666573 38.852993 49.646368 38.652344 50.554688 C 38.705667 50.565117 38.759189 50.581098 38.8125 50.591797 C 38.915197 49.916489 38.99384 49.223001 39.011719 48.5 C 39.018717 48.217524 39.009803 47.934762 39 47.652344 z"/>
|
height="512"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="arch.svg"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs12" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview10"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.7307882"
|
||||||
|
inkscape:cx="261.44158"
|
||||||
|
inkscape:cy="162.35378"
|
||||||
|
inkscape:window-width="3200"
|
||||||
|
inkscape:window-height="1696"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg8" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.2;fill-rule:evenodd;stroke-width:8.98246"
|
||||||
|
d="M 255.95668,8.9950315 C 233.56281,63.886133 220.05655,99.79108 195.12444,153.04488 210.41048,169.24562 225.52727,185.28893 256,206.59649 223.23934,193.1183 204.54031,182.40942 187.84052,168.36786 155.93265,234.93637 105.94013,329.75902 4.4910018,512 84.226737,465.97824 139.74676,437.60463 197.35402,426.77732 c -2.4736,-10.63618 -3.88008,-22.14129 -3.78448,-34.14566 l 0.088,-2.55405 c 1.2651,-51.07324 34.6857,-93.58761 65.60233,-93.65656 30.91664,-0.0692 60.98194,52.23108 59.71659,103.30434 -0.23768,9.61127 -1.32232,18.85537 -3.21658,27.43044 56.97835,11.14421 113.09257,39.44489 191.74909,84.84417 -15.50994,-28.54715 -29.35328,-54.2812 -42.57275,-78.79043 -20.82414,-16.13661 -38.87699,-33.21031 -83.18176,-55.94641 30.45259,7.91111 48.58973,13.11123 65.58513,23.31356 C 312.93111,150.37891 302.05114,117.12988 255.95277,8.9824565 Z"
|
||||||
|
id="path2" />
|
||||||
|
<path
|
||||||
|
style="fill:#1793d1;fill-rule:evenodd;stroke-width:8.98246"
|
||||||
|
d="M 255.95668,0.0125754 C 233.56281,54.903677 220.05655,90.808629 195.12444,144.06242 210.41048,160.26316 225.52727,176.30647 256,197.61404 223.23934,184.13584 204.54031,173.42697 187.84052,159.3854 155.93265,225.95391 105.94013,320.77656 4.4910018,503.01754 84.226737,456.99579 139.74676,428.62217 197.35402,417.79487 c -2.4736,-10.63618 -3.88008,-22.1413 -3.78448,-34.14567 l 0.088,-2.55404 c 1.2651,-51.07324 34.6857,-93.58761 65.60233,-93.65656 30.91664,-0.0692 60.98194,52.23108 59.71659,103.30433 -0.23768,9.61128 -1.32232,18.85537 -3.21658,27.43045 56.97835,11.14421 113.09257,39.44488 191.74909,84.84416 -15.50994,-28.54715 -29.35328,-54.28119 -42.57275,-78.79043 -20.82414,-16.1366 -38.87699,-33.2103 -83.18176,-55.94641 30.45259,7.91111 48.58973,13.11124 65.58513,23.31356 C 312.93111,141.39646 302.05114,108.14743 255.95277,0 Z"
|
||||||
|
id="path4" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.2;fill:#ffffff;fill-rule:evenodd;stroke-width:8.98246"
|
||||||
|
d="M 255.96491,0.0350918 C 233.57521,54.916567 220.05226,90.821905 195.12275,144.07017 c 0.90134,0.95528 1.85106,1.92192 2.75439,2.8772 23.0446,-49.7648 36.61465,-85.295057 58.08777,-137.9298225 45.21022,106.0657025 57.25438,141.3286425 184.56158,378.7894725 2.30654,1.1891 4.56581,2.44408 6.80701,3.78947 C 312.9419,141.43015 302.04864,108.15009 255.96491,0.0350918 Z M 187.84204,159.38597 C 155.93417,225.95448 105.94013,320.77656 4.491,503.01754 6.99761,501.57078 9.277056,500.28908 11.736621,498.87719 107.75437,326.12938 156.79767,233.13543 187.84204,168.36843 204.54183,182.40999 223.23934,193.1183 256,206.59649 244.72631,198.71354 235.99662,191.71644 228.14033,185 211.51744,176.74509 199.03578,168.79791 187.84204,159.38597 Z m 193.91245,217.87719 c 44.30477,22.7361 62.35139,39.81076 83.17553,55.94737 11.04112,20.47053 23.04236,42.70225 35.56143,65.80702 2.38006,1.36557 4.59542,2.60198 7.01755,3.99999 -15.50994,-28.54715 -29.35951,-54.28023 -42.57898,-78.78947 -14.9928,-11.6179 -28.69785,-23.75235 -51.64918,-38.10526 -9.08168,-2.84825 -19.10492,-5.63276 -31.52635,-8.85965 z m -188.0528,12.08772 c -0.007,0.24252 -0.0467,0.47634 -0.053,0.71931 l -0.088,2.56141 c -0.0701,8.83471 0.6868,17.39734 2.07018,25.54386 0.57354,-0.11138 1.14542,-0.2781 1.7193,-0.38597 -2.07795,-8.93499 -3.33514,-18.49637 -3.64913,-28.4386 z m 125.17556,2.75439 c -0.30423,9.11026 -1.32048,17.91123 -3.12281,26.07017 0.47895,0.0937 0.95974,0.23723 1.4386,0.33334 0.92247,-6.06592 1.62888,-12.29515 1.78948,-18.78947 0.0629,-2.53733 -0.0171,-5.07723 -0.10528,-7.61404 z"
|
||||||
|
id="path6" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 4.5 KiB |
113
assets/icons/nix-grey.svg
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 480.00001 480"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
sodipodi:docname="nix-grey.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.7494491"
|
||||||
|
inkscape:cx="126.03968"
|
||||||
|
inkscape:cy="287.51908"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="1696"
|
||||||
|
inkscape:window-x="1600"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showguides="true" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="print-logo"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-132.5822,958.04022)">
|
||||||
|
<g
|
||||||
|
id="g251"
|
||||||
|
transform="matrix(0.95674018,0,0,0.95674018,-16.993334,-33.377468)"
|
||||||
|
style="fill:#a4a4a4;fill-opacity:1">
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
id="path4861"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
|
||||||
|
id="use4863"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
|
||||||
|
id="use4865"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
|
||||||
|
id="use4867"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4873"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4875"
|
||||||
|
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4877"
|
||||||
|
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.8 KiB |
112
assets/icons/nix.svg
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 480.00001 480"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
sodipodi:docname="nix.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.7494491"
|
||||||
|
inkscape:cx="278.65915"
|
||||||
|
inkscape:cy="287.51908"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="1696"
|
||||||
|
inkscape:window-x="1600"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showguides="true" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="print-logo"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-132.5822,958.04022)">
|
||||||
|
<g
|
||||||
|
id="g251"
|
||||||
|
transform="matrix(0.95674018,0,0,0.95674018,-16.993334,-33.377468)">
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
id="path4861"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
|
||||||
|
id="use4863"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
|
||||||
|
id="use4865"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
|
||||||
|
id="use4867"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4873"
|
||||||
|
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4875"
|
||||||
|
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4877"
|
||||||
|
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.8 KiB |
67
assets/icons/sys76 alt.svg
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 480.00001 480"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
sodipodi:docname="sys76.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"><defs
|
||||||
|
id="defs4" /><sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.0844886"
|
||||||
|
inkscape:cx="301.5246"
|
||||||
|
inkscape:cy="154.91172"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-height="1362"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showguides="true" /><metadata
|
||||||
|
id="metadata7"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><g
|
||||||
|
inkscape:label="print-logo"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-132.5822,958.04022)"><circle
|
||||||
|
style="display:inline;fill:#faa41a;fill-opacity:1;stroke-width:1.00645"
|
||||||
|
id="path2-6"
|
||||||
|
cx="372.58221"
|
||||||
|
cy="-718.04022"
|
||||||
|
r="239.99998" /><circle
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke-width:0.884138"
|
||||||
|
id="path2"
|
||||||
|
cx="372.58221"
|
||||||
|
cy="-718.04022"
|
||||||
|
r="210.83322" /><path
|
||||||
|
d="m 365.13622,-928.75782 a 210.72083,210.72083 0 0 0 -141.52888,359.73483 l 2.17872,2.12607 114.76933,-212.77665 h -122.7814 l 21.55875,36.30037 a 11.104441,11.104441 0 0 1 1.33626,8.60935 11.895105,11.895105 0 0 1 -11.4206,8.89068 11.174722,11.174722 0 0 1 -9.55826,-5.23605 l -32.03063,-53.90572 a 11.122011,11.122011 0 0 1 -1.66988,-6.00897 v -0.47419 a 11.385566,11.385566 0 0 1 11.28023,-11.03414 h 162.63086 c 2.9342,0 6.46588,1.05328 8.25795,2.45989 l 0.16869,0.13116 a 12.879043,12.879043 0 0 1 3.86547,16.55133 l -124.20465,230.29411 a 12.879043,12.879043 0 0 1 -2.45982,3.19789 210.73839,210.73839 0 0 0 249.93781,3.25037 h -98.95603 a 13.072317,13.072317 0 0 1 -13.07231,-13.07231 v -0.26427 a 13.072317,13.072317 0 0 1 13.07231,-13.07231 h 129.17699 a 210.73839,210.73839 0 0 0 -4.07632,-294.00417 211.89803,211.89803 0 0 0 -28.42886,-23.86044 l -0.0563,0.11245 -0.57911,1.73929 c -4.09375,7.60782 -51.67416,93.64964 -67.4348,122.1312 l -5.78069,10.45431 c -13.23049,22.87663 -19.30972,48.61701 -16.25259,68.87563 a 66.327949,66.327949 0 0 0 11.54374,28.5342 68.770224,68.770224 0 0 0 44.80443,27.98956 71.30035,71.30035 0 0 0 11.98287,1.01954 69.947434,69.947434 0 0 0 42.25665,-14.02101 66.626645,66.626645 0 0 0 26.00407,-42.3796 66.486082,66.486082 0 0 0 -12.29922,-50.81337 70.544824,70.544824 0 0 0 -45.38408,-27.77871 76.905277,76.905277 0 0 0 -3.11,-0.45731 12.281653,12.281653 0 0 1 -10.78827,-12.61559 12.123519,12.123519 0 0 1 4.09393,-8.83782 12.387074,12.387074 0 0 1 9.64616,-3.02209 95.055416,95.055416 0 0 1 65.62509,38.33834 91.014244,91.014244 0 0 1 16.55133,69.27991 91.014244,91.014244 0 0 1 -38.3033,60.05526 94.756727,94.756727 0 0 1 -54.25714,16.92015 h -0.0175 a 96.267769,96.267769 0 0 1 -16.0768,-1.37001 93.175398,93.175398 0 0 1 -61.00415,-38.19795 98.095086,98.095086 0 0 1 -7.46743,-12.40457 c -12.59797,-24.87957 -13.23049,-53.94094 -1.79171,-84.074 a 323.99665,323.99665 0 0 1 13.3184,-29.48291 l 71.65167,-130.89902 1.68675,-2.05571 0.0748,-0.14996 a 211.54663,211.54663 0 0 0 -17.21892,-8.20527 210.72083,210.72083 0 0 0 -89.48549,-16.51606 z"
|
||||||
|
id="path1"
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke-width:17.5703" /></g></svg>
|
After Width: | Height: | Size: 4.3 KiB |
57
assets/icons/sys76.svg
Normal file
After Width: | Height: | Size: 8.3 KiB |
@ -1,4 +1,4 @@
|
|||||||
return {
|
return {
|
||||||
volume_up = conf_dir .. "assets/sounds/volumeup-click.mp3",
|
volume_up = conf_dir .. "assets/sounds/volumeup.ogg",
|
||||||
volume_down = conf_dir .. "assets/sounds/volumedown-click.mp3"
|
volume_down = conf_dir .. "assets/sounds/volumedown.ogg"
|
||||||
}
|
}
|
||||||
|
BIN
assets/sounds/volumedown.ogg
Executable file
BIN
assets/sounds/volumeup.ogg
Executable file
@ -36,6 +36,32 @@ return gears.table.join(
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
awful.key( {"Mod4"}, "Right",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.byidx(1)
|
||||||
|
end,
|
||||||
|
{
|
||||||
|
description = "Focus next",
|
||||||
|
group = "Client"
|
||||||
|
}
|
||||||
|
),
|
||||||
|
|
||||||
|
awful.key( {"Mod4"}, "Left",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.byidx(-1)
|
||||||
|
end,
|
||||||
|
{
|
||||||
|
description = "Focus previous",
|
||||||
|
group = "Client"
|
||||||
|
}
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
awful.key( {"Mod4", "Shift"}, "c",
|
awful.key( {"Mod4", "Shift"}, "c",
|
||||||
function (c)
|
function (c)
|
||||||
c:kill()
|
c:kill()
|
||||||
|
@ -28,7 +28,8 @@ return {
|
|||||||
"feh",
|
"feh",
|
||||||
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
|
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
|
||||||
"zoom",
|
"zoom",
|
||||||
"flameshot"
|
"flameshot",
|
||||||
|
"scrcpy"
|
||||||
},
|
},
|
||||||
|
|
||||||
role = {
|
role = {
|
||||||
|
@ -105,7 +105,7 @@ return gears.table.join(
|
|||||||
awful.key( {"Mod4"}, "p",
|
awful.key( {"Mod4"}, "p",
|
||||||
function ()
|
function ()
|
||||||
awful.prompt.run {
|
awful.prompt.run {
|
||||||
prompt = "<b>Really shutdown? (y/n/r) </b>",
|
prompt = "Really shutdown? (y/n/r) ",
|
||||||
textbox = awful.screen.focused().mypromptbox.widget,
|
textbox = awful.screen.focused().mypromptbox.widget,
|
||||||
exe_callback = shutdown
|
exe_callback = shutdown
|
||||||
}
|
}
|
||||||
@ -156,32 +156,8 @@ return gears.table.join(
|
|||||||
description = "Down",
|
description = "Down",
|
||||||
group = "Tags"
|
group = "Tags"
|
||||||
}
|
}
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Clients
|
|
||||||
awful.key( {"Mod4"}, "Left",
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx( 1)
|
|
||||||
end,
|
|
||||||
{
|
|
||||||
description = "Focus next",
|
|
||||||
group = "Client"
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
awful.key( {"Mod4"}, "Right",
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
end,
|
|
||||||
{
|
|
||||||
description = "Focus previous",
|
|
||||||
group = "Client"
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
awful.key( {"Mod4", "Shift"}, "j",
|
awful.key( {"Mod4", "Shift"}, "j",
|
||||||
function ()
|
function ()
|
||||||
|
@ -9,7 +9,7 @@ sound.play = function(sound_key)
|
|||||||
text = "There is no sound with key " .. sound_key
|
text = "There is no sound with key " .. sound_key
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
if (sound.counter > 5) then
|
if (sound.counter > 0) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
sound.counter = sound.counter + 1
|
sound.counter = sound.counter + 1
|
||||||
|
@ -54,20 +54,23 @@ local function start()
|
|||||||
|
|
||||||
-- If timed wallpaper is enabled, load timed manager
|
-- If timed wallpaper is enabled, load timed manager
|
||||||
if (type(beautiful.wallpaper) == "table") then
|
if (type(beautiful.wallpaper) == "table") then
|
||||||
desktop.wallpaper = require("desktop.wallpaper")
|
local wallpaper = require("core.wallpaper")
|
||||||
screen.connect_signal("property::geometry", desktop.wallpaper.update)
|
screen.connect_signal(
|
||||||
desktop.wallpaper.update()
|
"property::geometry",
|
||||||
desktop.wallpaper.start()
|
wallpaper.update
|
||||||
|
)
|
||||||
|
wallpaper.update()
|
||||||
|
wallpaper.start()
|
||||||
else
|
else
|
||||||
|
-- Otherwise, set a static wallpaper
|
||||||
-- Otherwise, set static wallpaper on each screen
|
-- on each screen. We need to iterate
|
||||||
-- We loop over screens to prevent the wallpaper from being stretched over
|
-- because a single call to wallpaper.maximized
|
||||||
-- all displays. If, for some reason, you want that to happen, use a single
|
-- will stretch one image over all screens
|
||||||
-- call of "gears.wallpaper.maximized(beautiful.wallpaper)" instead of
|
|
||||||
-- this loop.
|
|
||||||
|
|
||||||
for s in screen do
|
for s in screen do
|
||||||
gears.wallpaper.maximized(beautiful.wallpaper, s)
|
gears.wallpaper.maximized(
|
||||||
|
beautiful.wallpaper,
|
||||||
|
s
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -92,13 +95,10 @@ local function start()
|
|||||||
-- Prepare screens
|
-- Prepare screens
|
||||||
awful.screen.connect_for_each_screen(
|
awful.screen.connect_for_each_screen(
|
||||||
function(s)
|
function(s)
|
||||||
-- s: the screen this function is being called for
|
|
||||||
-- Create tag table
|
-- Create tag table
|
||||||
|
|
||||||
s.tagger = tagger:new(s)
|
s.tagger = tagger:new(s)
|
||||||
|
|
||||||
|
-- Create a promptbox for each screen
|
||||||
-- Create a promptbox for each s
|
|
||||||
s.mypromptbox = awful.widget.prompt()
|
s.mypromptbox = awful.widget.prompt()
|
||||||
|
|
||||||
-- Create the bar
|
-- Create the bar
|
||||||
@ -215,6 +215,14 @@ local function start()
|
|||||||
rightside
|
rightside
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-- Run module screen initialization methods
|
||||||
|
for _, mod in pairs(modules) do
|
||||||
|
if (mod["for_each_screen"] ~= nil) then
|
||||||
|
mod["for_each_screen"](s)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ local function make(tagger)
|
|||||||
-- Create tag tagindicators
|
-- Create tag tagindicators
|
||||||
-- We're using flex.vertical and flex.horizontal layouts because the grid
|
-- We're using flex.vertical and flex.horizontal layouts because the grid
|
||||||
-- layout doesn't expand things properly.
|
-- layout doesn't expand things properly.
|
||||||
widget.tagindicators = {}
|
widget.tagindicators = {} -- NOTE THE `s`, THIS IS A DIFFERENT VARIABLE
|
||||||
widget.tagindicator = wibox.widget {
|
widget.tagindicator = wibox.widget {
|
||||||
homogeneous = true,
|
homogeneous = true,
|
||||||
spacing = beautiful.dpi(2),
|
spacing = beautiful.dpi(2),
|
||||||
|
@ -64,7 +64,10 @@ tasklist.make = function(screen)
|
|||||||
fill_vertical = true,
|
fill_vertical = true,
|
||||||
{
|
{
|
||||||
id = "clienticon",
|
id = "clienticon",
|
||||||
widget = awful.widget.clienticon,
|
-- Don't use awesomewm's stock clienticon.
|
||||||
|
-- using a raw imagebox lets us handle nil icons...
|
||||||
|
-- also, see th call to awesome.preferred_icon_size in rc.lua.
|
||||||
|
widget = wibox.widget.imagebox,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
margins = beautiful.dpi(3),
|
margins = beautiful.dpi(3),
|
||||||
@ -79,8 +82,24 @@ tasklist.make = function(screen)
|
|||||||
-- The create callback is only called once, when the task indicator
|
-- The create callback is only called once, when the task indicator
|
||||||
-- is created.
|
-- is created.
|
||||||
create_callback = function(self, c, index, objects)
|
create_callback = function(self, c, index, objects)
|
||||||
|
|
||||||
-- Set indicator icon
|
-- Set indicator icon
|
||||||
self:get_children_by_id("clienticon")[1].client = c
|
if c.icon == nil then
|
||||||
|
self:get_children_by_id("clienticon")[1].image = beautiful.icons[config.core.default_clienticon]
|
||||||
|
else
|
||||||
|
self:get_children_by_id("clienticon")[1].image = c.icon
|
||||||
|
end
|
||||||
|
self:get_children_by_id("clienticon")[1]:emit_signal("widget::redraw_needed")
|
||||||
|
|
||||||
|
|
||||||
|
-- Update top color
|
||||||
|
if c == client.focus then
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = "#2DA0DA"
|
||||||
|
elseif c.minimized then
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = beautiful.color.bar.hover_bg --beautiful.color.transparent
|
||||||
|
else
|
||||||
|
self:get_children_by_id("top_tab")[1].bg = "#2DA0DA77"
|
||||||
|
end
|
||||||
|
|
||||||
-- Change background when mouse is over widget
|
-- Change background when mouse is over widget
|
||||||
self:connect_signal("mouse::enter", function(result)
|
self:connect_signal("mouse::enter", function(result)
|
||||||
@ -106,7 +125,13 @@ tasklist.make = function(screen)
|
|||||||
update_callback = function(self, c, index, objects)
|
update_callback = function(self, c, index, objects)
|
||||||
|
|
||||||
-- Update indicator icon
|
-- Update indicator icon
|
||||||
self:get_children_by_id("clienticon")[1].client = c
|
if c.icon == nil then
|
||||||
|
self:get_children_by_id("clienticon")[1].image = beautiful.icons[config.core.default_clienticon]
|
||||||
|
else
|
||||||
|
self:get_children_by_id("clienticon")[1].image = c.icon
|
||||||
|
end
|
||||||
|
self:get_children_by_id("clienticon")[1]:emit_signal("widget::redraw_needed")
|
||||||
|
|
||||||
|
|
||||||
-- Update top color
|
-- Update top color
|
||||||
if c == client.focus then
|
if c == client.focus then
|
||||||
|
@ -1,26 +1,78 @@
|
|||||||
|
-- Default configuration values.
|
||||||
|
-- Override these by creating `config.lua`
|
||||||
|
-- Example contents:
|
||||||
|
--
|
||||||
|
--[[ config.lua
|
||||||
|
|
||||||
|
|
||||||
|
-- Override values in defaults.lua.
|
||||||
|
-- If you only want to overwrite one, you'll need to do explicitly:
|
||||||
|
-- config.core = { wallpaper = "" } will delete all other value in config.core.
|
||||||
|
|
||||||
|
config.battery = { enabled = true }
|
||||||
|
config.backlight = { enabled = true }
|
||||||
|
config.launcher = { enabled = true, icon = "nix"}
|
||||||
|
|
||||||
|
config.core.wallpaper = "/home/assets/wallpapers/Themed/Stellaris/upscale/City.png"
|
||||||
|
config.core.default_clienticon = "arch_grey"
|
||||||
|
config.core.browser = "firefox-developer-edition --new-tab"
|
||||||
|
|
||||||
|
config.core.startup_commands = {
|
||||||
|
"ibus-daemon --daemonize --replace --xim",
|
||||||
|
"keepassxc"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local config = {}
|
local config = {}
|
||||||
|
|
||||||
config.battery = { enabled = false }
|
config.launcher = { enabled = true, icon = "arch"}
|
||||||
config.backlight = { enabled = false }
|
|
||||||
config.simple_widgets = { enabled = true }
|
|
||||||
config.launcher = { enabled = true }
|
|
||||||
config.screenshot = { enabled = true }
|
|
||||||
config.keymap_popup = { enabled = true }
|
|
||||||
config.lock = { enabled = true, type = "i3lock"}
|
config.lock = { enabled = true, type = "i3lock"}
|
||||||
|
config.screenshot = { enabled = true }
|
||||||
|
config.simple_widgets = { enabled = true }
|
||||||
|
config.keymap_popup = { enabled = true }
|
||||||
|
config.battery = { enabled = false }
|
||||||
|
config.picom = { enabled = true }
|
||||||
|
config.backlight = {
|
||||||
|
enabled = false,
|
||||||
|
button_step = 5,
|
||||||
|
scroll_step = 5,
|
||||||
|
backend = "xbacklight"
|
||||||
|
}
|
||||||
|
|
||||||
config.core = {
|
config.core = {
|
||||||
wallpaper = "/home/assets/wallpapers/Themed/Stellaris/Gigapixel/City.png",
|
-- Icon to use when a window doesn't provide one
|
||||||
--
|
default_clienticon = "arch_grey",
|
||||||
|
continuous_tag_updates = true,
|
||||||
|
|
||||||
|
-- Run these commands in this order when awesome starts.
|
||||||
|
startup_commands = {},
|
||||||
|
|
||||||
|
wallpaper = "",
|
||||||
|
|
||||||
-- Dynamic: a table of files and times
|
-- Dynamic: a table of files and times
|
||||||
-- {file = "path", start_time = {hour, minute}}
|
-- {file = "path", start_time = {hour, minute}}
|
||||||
--[[
|
--[[
|
||||||
config.wallpaper = {
|
wallpaper = {
|
||||||
{ file = "morning-file.png", start_time = {04, 00} },
|
{ file = "morning-file.png", start_time = {04, 00} },
|
||||||
{ file = "noon-file.png", start_time = {11, 00} },
|
{ file = "noon-file.png", start_time = {11, 00} },
|
||||||
{ file = "night-file.png", start_time = {19, 00} },
|
{ file = "night-file.png", start_time = {19, 00} },
|
||||||
}
|
}
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
font = {
|
||||||
|
normal_large = "Hack NF 16",
|
||||||
|
normal_medium = "Hack NF 14",
|
||||||
|
normal = "Hack NF 12",
|
||||||
|
normal_small = "Hack NF 10",
|
||||||
|
prompt = "Hack NF 14"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
-- The position of the bar on each screen
|
-- The position of the bar on each screen
|
||||||
bar_position = "bottom",
|
bar_position = "bottom",
|
||||||
-- Bar size in dpi
|
-- Bar size in dpi
|
||||||
@ -29,9 +81,9 @@ config.core = {
|
|||||||
bar_margin = 3,
|
bar_margin = 3,
|
||||||
|
|
||||||
-- Preferred terminal.
|
-- Preferred terminal.
|
||||||
terminal = "kitty",
|
terminal = "alacritty",
|
||||||
-- Preferred browser.
|
-- Preferred browser.
|
||||||
browser = "firefox-developer-edition --new-tab",
|
browser = "firefox --new-tab",
|
||||||
|
|
||||||
-- Table of layouts.
|
-- Table of layouts.
|
||||||
-- This is not handled by the regular awesomewm facility.
|
-- This is not handled by the regular awesomewm facility.
|
||||||
@ -71,13 +123,7 @@ config.core = {
|
|||||||
--awful.layout.suit.corner.se,
|
--awful.layout.suit.corner.se,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Run these commands, in this order, when awesome starts.
|
|
||||||
startup_commands = {
|
|
||||||
"ibus-daemon --daemonize --replace --xim",
|
|
||||||
"keepassxc"
|
|
||||||
},
|
|
||||||
|
|
||||||
continuous_tag_updates = true,
|
|
||||||
|
|
||||||
bar_shortcuts = {
|
bar_shortcuts = {
|
||||||
{
|
{
|
||||||
@ -89,12 +135,12 @@ config.core = {
|
|||||||
"firefox_dev"
|
"firefox_dev"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"thunderbird",
|
"code",
|
||||||
"thunderbird"
|
"code"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"onlyoffice-desktopeditors",
|
"thunderbird",
|
||||||
"writer"
|
"thunderbird"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"signal-desktop",
|
"signal-desktop",
|
||||||
@ -105,32 +151,35 @@ config.core = {
|
|||||||
"keepassx"
|
"keepassx"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config.mpc = {
|
config.mpc = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
||||||
-- If your MPC server has a password, do "passwd@host"
|
-- If your MPC server has a password, do "passwd@host"
|
||||||
|
-- Default port is 6600, you probably won't need to change it.
|
||||||
host = "localhost",
|
host = "localhost",
|
||||||
|
port = 6600,
|
||||||
|
|
||||||
-- Fixed width of the mpc widget
|
-- Fixed width of the mpc widget
|
||||||
width = 250,
|
width = 250,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.volume = {
|
config.volume = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
||||||
|
-- How much % to change volume by
|
||||||
|
scroll_step = 2,
|
||||||
|
button_step = 5,
|
||||||
|
|
||||||
-- The pulse sink volume widgets and keybinds should use.
|
-- The pulse sink volume widgets and keybinds should use.
|
||||||
-- To use the default, keep this value an empty string.
|
-- To use the default, keep this value an empty string.
|
||||||
-- Applies the --sink option to pamixer in wrapper.volume
|
-- Applies the --sink option to pamixer
|
||||||
pamixer_sink = ""
|
pamixer_sink = "",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.ibus = {
|
config.ibus = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
||||||
@ -162,7 +211,4 @@ config.ibus = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return config
|
return config
|
@ -1,15 +1,22 @@
|
|||||||
# Modules
|
## Modules
|
||||||
|
|
||||||
Modules are parts of this configuration that can be disabled. Nearly all features in this config are defined by a module.
|
Modules are parts of this configuration that can be disabled. Nearly all features in this config are defined by a module.
|
||||||
|
|
||||||
## Organization
|
### Enable / Disable Modules
|
||||||
|
|
||||||
|
See `config-template.lua`
|
||||||
|
|
||||||
|
### Organization
|
||||||
|
|
||||||
Every directory in `modules/` is a module. Modules cannot be in subdirectories. \
|
Every directory in `modules/` is a module. Modules cannot be in subdirectories. \
|
||||||
Each module directory MUST have an ``init.lua``, which returns a table. That table can contain anything, but a few keys are special:
|
Each module directory MUST have an ``init.lua``, which returns a table. That table can contain anything, but a few keys are special:
|
||||||
|
|
||||||
``keybinds`` \
|
``keybinds`` \
|
||||||
Defines keybinds the module provides. It is audomatically loaded *if* the module is enabled. \
|
Defines keybinds the module provides. It is automatically loaded *if* the module is enabled. \
|
||||||
This MUST be a table formed by ``awful.key()``. See `ibus` or `screenshot` for examples.
|
This MUST be a table formed by ``awful.key()``. See `ibus` or `screenshot` for examples.
|
||||||
|
|
||||||
``init`` \
|
``init`` \
|
||||||
Defines an init method. This is called once when awesome starts.
|
Called once when awesome starts if defined. Takes no arguments.
|
||||||
|
|
||||||
|
``for_each_screen(s)`` \
|
||||||
|
Called for each screen at start if defined. Takes one argument, `s`, the screen.
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/fish
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# backlight get
|
|
||||||
# backlight set [value]
|
|
||||||
# backlight max
|
|
||||||
#
|
|
||||||
# Returns:
|
|
||||||
# Set - nothing
|
|
||||||
# Get, max - Number between 0 and 100 (eg: 0, 25.445283, 100)
|
|
||||||
#
|
|
||||||
|
|
||||||
function backlight
|
|
||||||
switch $argv[1]
|
|
||||||
case "get"
|
|
||||||
xbacklight -get
|
|
||||||
case "max"
|
|
||||||
echo 100
|
|
||||||
case "set"
|
|
||||||
xbacklight -set $argv[2]
|
|
||||||
case "up"
|
|
||||||
xbacklight -inc 10
|
|
||||||
case "down"
|
|
||||||
xbacklight -dec 10
|
|
||||||
case "*"
|
|
||||||
echo "Unknown function \"$argv[1]\""
|
|
||||||
echo ""
|
|
||||||
echo "Usage:"
|
|
||||||
echo " backlight get"
|
|
||||||
echo " backlight set [value]"
|
|
||||||
echo " backlight max"
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
backlight $argv
|
|
@ -1,4 +1,14 @@
|
|||||||
|
local popup = require("modules.backlight.popup")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
widget = require("modules.backlight.widget").widget,
|
widget = require("modules.backlight.widget").widget,
|
||||||
keybinds = require("modules.backlight.keybinds"),
|
keybinds = require("modules.backlight.keybinds"),
|
||||||
|
|
||||||
|
init = function()
|
||||||
|
awesome.emit_signal("module::backlight:update_read")
|
||||||
|
end,
|
||||||
|
|
||||||
|
for_each_screen = function(s)
|
||||||
|
popup(s)
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ local backlight = req_rel(..., "util")
|
|||||||
return gears.table.join(
|
return gears.table.join(
|
||||||
awful.key( {}, "XF86MonBrightnessUp",
|
awful.key( {}, "XF86MonBrightnessUp",
|
||||||
function ()
|
function ()
|
||||||
backlight.backlight_up()
|
backlight.backlight_up(config.backlight.button_step)
|
||||||
|
--awesome.emit_signal("module::backlight:popup_show")
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "Raise brightness",
|
description = "Raise brightness",
|
||||||
@ -13,7 +14,8 @@ return gears.table.join(
|
|||||||
|
|
||||||
awful.key( {}, "XF86MonBrightnessDown",
|
awful.key( {}, "XF86MonBrightnessDown",
|
||||||
function ()
|
function ()
|
||||||
backlight.backlight_down()
|
backlight.backlight_down(config.backlight.button_step)
|
||||||
|
--awesome.emit_signal("module::backlight:popup_show")
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "Lower brightness",
|
description = "Lower brightness",
|
||||||
|
246
modules/backlight/popup.lua
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
local backlight = req_rel(..., "util")
|
||||||
|
|
||||||
|
return function(s)
|
||||||
|
local widget = wibox.widget {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{ -- Icon and margins
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
id = "icon",
|
||||||
|
forced_height = beautiful.dpi(100),
|
||||||
|
image = beautiful.icons.brightness.i,
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
expand = "none",
|
||||||
|
id = "icon_margin2",
|
||||||
|
layout = wibox.layout.align.vertical
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
id = "icon_margin1",
|
||||||
|
expand = "none",
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
},
|
||||||
|
{ -- Text and percentage
|
||||||
|
{
|
||||||
|
id = "label",
|
||||||
|
text = "Backlight",
|
||||||
|
align = "left",
|
||||||
|
valign = "center",
|
||||||
|
widget = wibox.widget.textbox
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
id = "value",
|
||||||
|
text = "0%",
|
||||||
|
align = "center",
|
||||||
|
valign = "center",
|
||||||
|
widget = wibox.widget.textbox
|
||||||
|
},
|
||||||
|
id = "label_value_layout",
|
||||||
|
forced_height = beautiful.dpi(48),
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
},
|
||||||
|
{ -- Progress bar
|
||||||
|
{
|
||||||
|
id = "backlight_bar",
|
||||||
|
shape = gears.shape.rounded_bar,
|
||||||
|
forced_height = beautiful.dpi(10),
|
||||||
|
background_color = "#AAAAAA88",
|
||||||
|
bar_color = "#ffffff",
|
||||||
|
color = "#ffffff",
|
||||||
|
bar_shape = gears.shape.rounded_bar,
|
||||||
|
max_value = 100,
|
||||||
|
widget = wibox.widget.progressbar
|
||||||
|
},
|
||||||
|
id = "bar_layout",
|
||||||
|
forced_height = beautiful.dpi(24),
|
||||||
|
widget = wibox.container.place
|
||||||
|
},
|
||||||
|
id = "icon_bar_layout",
|
||||||
|
spacing = beautiful.dpi(0),
|
||||||
|
layout = wibox.layout.align.vertical
|
||||||
|
},
|
||||||
|
id = "popup_layout",
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
},
|
||||||
|
id = "container",
|
||||||
|
left = beautiful.dpi(20),
|
||||||
|
right = beautiful.dpi(20),
|
||||||
|
top = beautiful.dpi(10),
|
||||||
|
bottom = beautiful.dpi(10),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
},
|
||||||
|
bg ="#000000FF",
|
||||||
|
widget = wibox.container.background,
|
||||||
|
ontop = true,
|
||||||
|
visible = true,
|
||||||
|
type = "notification",
|
||||||
|
forced_height = beautiful.dpi(180),
|
||||||
|
forced_width = beautiful.dpi(300),
|
||||||
|
offset = beautiful.dpi(5),
|
||||||
|
}
|
||||||
|
|
||||||
|
local popup_container = awful.popup {
|
||||||
|
widget = wibox.container.background,
|
||||||
|
ontop = true,
|
||||||
|
bg = "#00000000",
|
||||||
|
stretch = false,
|
||||||
|
visible = false,
|
||||||
|
screen = s,
|
||||||
|
|
||||||
|
placement = function(c)
|
||||||
|
awful.placement.bottom_right(
|
||||||
|
c,
|
||||||
|
{
|
||||||
|
honor_workarea = true,
|
||||||
|
margins = {
|
||||||
|
top = beautiful.dpi(200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- Only set corner radius here.
|
||||||
|
shape = function(cr, width, height)
|
||||||
|
gears.shape.partially_rounded_rect(
|
||||||
|
cr,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
beautiful.dpi(20)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
popup_container:setup {
|
||||||
|
widget,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
awesome.connect_signal("module::backlight:update",
|
||||||
|
function(value)
|
||||||
|
|
||||||
|
if value == nil then
|
||||||
|
value = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Update slider
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
bar_layout.
|
||||||
|
backlight_bar:set_value(value)
|
||||||
|
|
||||||
|
-- Update text
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
label_value_layout.
|
||||||
|
value:set_text(value .. "%")
|
||||||
|
|
||||||
|
-- Update icon
|
||||||
|
local icon
|
||||||
|
if value >= 90 then icon = beautiful.icons.brightness.i
|
||||||
|
elseif value >= 80 then icon = beautiful.icons.brightness.h
|
||||||
|
elseif value >= 70 then icon = beautiful.icons.brightness.g
|
||||||
|
elseif value >= 60 then icon = beautiful.icons.brightness.f
|
||||||
|
elseif value >= 50 then icon = beautiful.icons.brightness.e
|
||||||
|
elseif value >= 40 then icon = beautiful.icons.brightness.d
|
||||||
|
elseif value >= 30 then icon = beautiful.icons.brightness.c
|
||||||
|
elseif value >= 20 then icon = beautiful.icons.brightness.b
|
||||||
|
elseif value <= 10 then icon = beautiful.icons.brightness.a end
|
||||||
|
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
icon_margin1.
|
||||||
|
icon_margin2.
|
||||||
|
icon:set_image(icon)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local hide_popup_timer = gears.timer {
|
||||||
|
timeout = 1,
|
||||||
|
autostart = true,
|
||||||
|
callback = function()
|
||||||
|
popup_container.visible = false
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
awesome.connect_signal("module::all:popup_hide",
|
||||||
|
function(except)
|
||||||
|
if (except == "backlight") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
popup_container.visible = false
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:stop()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
awesome.connect_signal("module::backlight:popup_show",
|
||||||
|
function()
|
||||||
|
awesome.emit_signal("module::all:popup_hide", "backlight")
|
||||||
|
if s == mouse.screen then
|
||||||
|
popup_container.visible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:again()
|
||||||
|
else
|
||||||
|
hide_popup_timer:start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
awesome.connect_signal("module::backlight:popup_show_stay",
|
||||||
|
function()
|
||||||
|
awesome.emit_signal("module::all:popup_hide", "backlight")
|
||||||
|
if s == mouse.screen then
|
||||||
|
popup_container.visible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:stop()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
popup_container:connect_signal("button::press",
|
||||||
|
function(_, _, _, button, mods)
|
||||||
|
-- Scroll up
|
||||||
|
if (button == 4) then
|
||||||
|
backlight.backlight_up(config.backlight.scroll_step)
|
||||||
|
|
||||||
|
-- Scroll down
|
||||||
|
elseif (button == 5) then
|
||||||
|
backlight.backlight_down(config.backlight.scroll_step)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
popup_container:connect_signal("mouse::enter", function(result)
|
||||||
|
awesome.emit_signal("module::backlight:popup_show_stay")
|
||||||
|
end)
|
||||||
|
|
||||||
|
popup_container:connect_signal("mouse::leave", function(result)
|
||||||
|
awesome.emit_signal("module::backlight:popup_show")
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
@ -1,38 +1,84 @@
|
|||||||
local backlight = {}
|
local brightnessctl = {}
|
||||||
|
brightnessctl.parse = function(s)
|
||||||
-- The space at the end is important!
|
local batpec = string.match(s, ",%d?%d?%d%%,")
|
||||||
local script = conf_dir .. "modules/backlight/backlight.fish"
|
batpec = batpec:sub(2, batpec:len() - 2)
|
||||||
script = script .. " "
|
return tonumber(batpec)
|
||||||
|
|
||||||
backlight.hooks = {}
|
|
||||||
backlight.add_hook = function(callback)
|
|
||||||
backlight.hooks[#backlight.hooks + 1] = callback
|
|
||||||
end
|
end
|
||||||
|
|
||||||
backlight.exec_hooks = function()
|
brightnessctl.get = function(callback)
|
||||||
backlight.read(function(status)
|
|
||||||
for i=1, #backlight.hooks do
|
|
||||||
backlight.hooks[i](status)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
backlight.read = function(callback)
|
|
||||||
awful.spawn.easy_async(
|
awful.spawn.easy_async(
|
||||||
script .. "get",
|
"brightnessctl info -m",
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
callback(brightnessctl.parse(stdout))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
brightnessctl.set = function(value)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"brightnessctl set " .. value .. "% -m",
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal(
|
||||||
|
"module::backlight:update",
|
||||||
|
brightnessctl.parse(stdout)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
brightnessctl.watch = function(timeout, callback, widget)
|
||||||
|
awful.widget.watch(
|
||||||
|
"brightnessctl get -m",
|
||||||
|
timeout,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
callback(brightnessctl.parse(stdout))
|
||||||
|
end,
|
||||||
|
widget
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
brightnessctl.backlight_up = function(value)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"brightnessctl set " .. value .. "%+ -m",
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal(
|
||||||
|
"module::backlight:update",
|
||||||
|
brightnessctl.parse(stdout)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
brightnessctl.backlight_down = function(value)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"brightnessctl set " .. value .. "%- -m",
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal(
|
||||||
|
"module::backlight:update",
|
||||||
|
brightnessctl.parse(stdout)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local xbacklight = {}
|
||||||
|
xbacklight.get = function(callback)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"xbacklight -get",
|
||||||
function(stdout, stderr, exitreason, exitcode)
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
callback(tonumber(stdout))
|
callback(tonumber(stdout))
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
backlight.set = function(value)
|
xbacklight.set = function(value)
|
||||||
awful.spawn(script .. "set " .. value, false)
|
awful.spawn("xbacklight -set " .. value, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
backlight.watch = function(timeout, callback, widget)
|
xbacklight.watch = function(timeout, callback, widget)
|
||||||
awful.widget.watch(
|
awful.widget.watch(
|
||||||
script .. "get",
|
"xbacklight -get",
|
||||||
timeout,
|
timeout,
|
||||||
callback,
|
callback,
|
||||||
widget
|
widget
|
||||||
@ -40,25 +86,48 @@ backlight.watch = function(timeout, callback, widget)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
backlight.backlight_up = function()
|
xbacklight.backlight_up = function(value)
|
||||||
awful.spawn(script .. "up", false)
|
awful.spawn.easy_async(
|
||||||
backlight.exec_hooks()
|
"xbacklight -inc " .. value,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal("module::backlight:update_read")
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
backlight.backlight_down = function()
|
xbacklight.backlight_down = function(value)
|
||||||
awful.spawn(script .. "down", false)
|
awful.spawn.easy_async(
|
||||||
backlight.exec_hooks()
|
"xbacklight -dec " .. value,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal("module::backlight:update_read")
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
|
||||||
backlight.redshift = function(temp)
|
local backlight = {}
|
||||||
awful.spawn("redshift -O " .. tostring(temp), false)
|
if config.backlight.backend == "xbacklight" then
|
||||||
|
backlight = xbacklight
|
||||||
|
elseif config.backlight.backend == "brightnessctl" then
|
||||||
|
backlight = brightnessctl
|
||||||
|
else
|
||||||
|
backlight = xbacklight
|
||||||
end
|
end
|
||||||
|
|
||||||
backlight.reset_redshift = function()
|
|
||||||
awful.spawn("redshift -x", false)
|
|
||||||
end
|
awesome.connect_signal("module::backlight:update_read",
|
||||||
--]]
|
function()
|
||||||
|
backlight.get(
|
||||||
|
function(value)
|
||||||
|
awesome.emit_signal(
|
||||||
|
"module::backlight:update",
|
||||||
|
value
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
return backlight
|
return backlight
|
||||||
|
@ -1,99 +1,59 @@
|
|||||||
local backlight = req_rel(..., "util")
|
local backlight = req_rel(..., "util")
|
||||||
local widget = {}
|
local widget = {}
|
||||||
|
local dotgrid = require("widgets.dotgrid")
|
||||||
|
|
||||||
|
widget.dots = dotgrid:new();
|
||||||
widget.icon = wibox.widget {
|
widget.dots.on_color = {0.18, 0.88, 1}
|
||||||
id = "icon",
|
widget.dots.off_color = {0.1, 0.44, 0.5}
|
||||||
image = beautiful.icons.brightness.i,
|
widget.dots.spacing = beautiful.dpi(2)
|
||||||
resize = true,
|
|
||||||
widget = wibox.widget.imagebox,
|
|
||||||
}
|
|
||||||
|
|
||||||
widget.arc = wibox.widget {
|
|
||||||
{
|
|
||||||
widget.icon,
|
|
||||||
top = beautiful.dpi(1),
|
|
||||||
bottom = beautiful.dpi(1),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
max_value = 100,
|
|
||||||
thickness = beautiful.dpi(4),
|
|
||||||
start_angle = 4.71238898, -- 2pi*3/4
|
|
||||||
--forced_height = beautiful.dpi(16),
|
|
||||||
--forced_width = beautiful.dpi(16),
|
|
||||||
colors = {"#27D4CC", "#00446B"},
|
|
||||||
bg = "#FFFFFF30",
|
|
||||||
paddings = beautiful.dpi(2),
|
|
||||||
widget = wibox.container.arcchart
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
widget.widget = wibox.widget {
|
widget.widget = wibox.widget {
|
||||||
{
|
{
|
||||||
{ -- Right space
|
widget.dots,
|
||||||
widget = wibox.widget.separator,
|
top = beautiful.dpi(2),
|
||||||
color = beautiful.color.transparent,
|
bottom = beautiful.dpi(2),
|
||||||
forced_width = beautiful.dpi(3)
|
left = beautiful.dpi(2),
|
||||||
},
|
right = beautiful.dpi(2),
|
||||||
{ -- Main indicator. Can be replaced with widget.arc
|
layout = wibox.container.margin,
|
||||||
widget.arc,
|
|
||||||
top = beautiful.dpi(2),
|
|
||||||
bottom = beautiful.dpi(2),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
{ -- Left space
|
|
||||||
widget = wibox.widget.separator,
|
|
||||||
color = beautiful.color.transparent,
|
|
||||||
forced_width = beautiful.dpi(3)
|
|
||||||
},
|
|
||||||
layout = wibox.layout.align.horizontal,
|
|
||||||
},
|
},
|
||||||
layout = wibox.container.background,
|
layout = wibox.container.background,
|
||||||
}
|
}
|
||||||
|
|
||||||
widget.widget:connect_signal("mouse::enter", function(result)
|
widget.widget:connect_signal("mouse::enter", function(result)
|
||||||
widget.widget.bg = beautiful.color.bar.hover_bg
|
widget.widget.bg = beautiful.color.bar.hover_bg
|
||||||
|
--awesome.emit_signal("module::backlight:popup_show_stay")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
widget.widget:connect_signal("mouse::leave", function(result)
|
widget.widget:connect_signal("mouse::leave", function(result)
|
||||||
widget.widget.bg = beautiful.color.transparent
|
widget.widget.bg = beautiful.color.transparent
|
||||||
|
--awesome.emit_signal("module::backlight:popup_show")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
widget.widget:connect_signal("button::press",
|
widget.widget:connect_signal("button::press",
|
||||||
function(_, _, _, button, mods)
|
function(_, _, _, button, mods)
|
||||||
-- Scroll up
|
-- Scroll up
|
||||||
if (button == 4) then
|
if (button == 4) then
|
||||||
backlight.backlight_up()
|
backlight.backlight_up(config.backlight.scroll_step)
|
||||||
-- Scroll down
|
-- Scroll down
|
||||||
elseif (button == 5) then
|
elseif (button == 5) then
|
||||||
backlight.backlight_down()
|
backlight.backlight_down(config.backlight.scroll_step)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--awesome.emit_signal("module::backlight:popup_show_stay")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
widget.update = function(value)
|
awesome.connect_signal("module::backlight:update",
|
||||||
widget.arc.value = value
|
function(value)
|
||||||
|
widget.dots.value = value
|
||||||
|
widget.dots:emit_signal("widget::redraw_needed")
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
--[[if value > 90 then widget.icon.image = beautiful.icons.brightness.i
|
|
||||||
elseif value > 80 then widget.icon.image = beautiful.icons.brightness.h
|
|
||||||
elseif value > 70 then widget.icon.image = beautiful.icons.brightness.g
|
|
||||||
elseif value > 60 then widget.icon.image = beautiful.icons.brightness.f
|
|
||||||
elseif value > 50 then widget.icon.image = beautiful.icons.brightness.e
|
|
||||||
elseif value > 40 then widget.icon.image = beautiful.icons.brightness.d
|
|
||||||
elseif value > 30 then widget.icon.image = beautiful.icons.brightness.c
|
|
||||||
elseif value > 20 then widget.icon.image = beautiful.icons.brightness.b
|
|
||||||
elseif value <= 10 then widget.icon.image = beautiful.icons.brightness.a end
|
|
||||||
--]]
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
backlight.add_hook(widget.update)
|
|
||||||
backlight.watch(
|
backlight.watch(
|
||||||
5,
|
5,
|
||||||
function()
|
function()
|
||||||
backlight.read(widget.update)
|
awesome.emit_signal("module::backlight::update_read")
|
||||||
end,
|
end,
|
||||||
widget.widget
|
widget.widget
|
||||||
)
|
)
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/fish
|
|
||||||
# returns battery percentage and status
|
|
||||||
# 45%, discharging
|
|
||||||
# second parameter returns "fully" when fully charged. Since awesome only checks for "discharging," fixing that isn't necessary.
|
|
||||||
|
|
||||||
echo \
|
|
||||||
(upower --show-info /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage | grep -Po "(\d\d?\d?)%"), \
|
|
||||||
(upower --show-info /org/freedesktop/UPower/devices/battery_BAT1 | grep state | grep -Po "(?<=state:)\s*(\w*)" | xargs) \
|
|
@ -1,13 +1,11 @@
|
|||||||
local battery = {}
|
local battery = {}
|
||||||
|
|
||||||
local script = conf_dir .. "modules/battery/battery.fish"
|
|
||||||
|
|
||||||
battery.watch = function(timeout, callback, widget)
|
battery.watch = function(timeout, callback, widget)
|
||||||
awful.widget.watch(script, timeout, callback, widget)
|
awful.widget.watch("acpi --battery", timeout, callback, widget)
|
||||||
end
|
end
|
||||||
|
|
||||||
battery.status = function(callback)
|
battery.status = function(callback)
|
||||||
awful.spawn.easy_async(script, callback)
|
awful.spawn.easy_async("acpi --battery", callback)
|
||||||
end
|
end
|
||||||
|
|
||||||
return battery
|
return battery
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local battery = req_rel(..., "util")
|
local battery = req_rel(..., "util")
|
||||||
local widget = {}
|
local widget = {}
|
||||||
|
local dotgrid = require("widgets.dotgrid")
|
||||||
|
|
||||||
-- Percentages to warn at
|
-- Percentages to warn at
|
||||||
-- (must be in order least -> greatest)
|
-- (must be in order least -> greatest)
|
||||||
@ -13,76 +14,25 @@ for i=1, #widget.warnings do
|
|||||||
widget.warninglog[i] = false
|
widget.warninglog[i] = false
|
||||||
end
|
end
|
||||||
|
|
||||||
widget.image_path = beautiful.icons.battery.missing
|
|
||||||
widget.icon = wibox.widget {
|
|
||||||
image = beautiful.icons.battery.missing,
|
|
||||||
resize = true,
|
|
||||||
widget = wibox.widget.imagebox,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
widget.progressbar = wibox.widget {
|
|
||||||
max_value = 100,
|
|
||||||
widget = wibox.widget.progressbar,
|
|
||||||
paddings = beautiful.dpi(2),
|
|
||||||
color = beautiful.color.bar.active,
|
|
||||||
background_color = beautiful.color.transparent,
|
|
||||||
border_color = beautiful.color.bar.active,
|
|
||||||
border_width = beautiful.dpi(1),
|
|
||||||
margins = beautiful.dpi(3)
|
|
||||||
}
|
|
||||||
|
|
||||||
widget.arc = wibox.widget {
|
|
||||||
{
|
|
||||||
widget.icon,
|
|
||||||
top = beautiful.dpi(1),
|
|
||||||
bottom = beautiful.dpi(1),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
max_value = 100,
|
|
||||||
thickness = beautiful.dpi(4),
|
|
||||||
start_angle = 4.71238898, -- 2pi*3/4
|
|
||||||
--forced_height = beautiful.dpi(16),
|
|
||||||
--forced_width = beautiful.dpi(16),
|
|
||||||
colors = {"#27D4CC", "#00446B"},
|
|
||||||
bg = "#FFFFFF30",
|
|
||||||
paddings = beautiful.dpi(2),
|
|
||||||
widget = wibox.container.arcchart
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
widget.rotator = wibox.widget {
|
|
||||||
widget.progressbar,
|
|
||||||
forced_width = beautiful.dpi(15),
|
|
||||||
direction = "east",
|
|
||||||
layout = wibox.container.rotate,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
widget.dots = dotgrid:new();
|
||||||
|
widget.dots.on_color = {1, 0, 0}
|
||||||
|
widget.dots.off_color = {0.5, 0, 0}
|
||||||
|
widget.dots.spacing = beautiful.dpi(2)
|
||||||
|
|
||||||
widget.widget = wibox.widget {
|
widget.widget = wibox.widget {
|
||||||
{
|
{
|
||||||
{ -- Right space
|
widget.dots,
|
||||||
widget = wibox.widget.separator,
|
top = beautiful.dpi(2),
|
||||||
color = beautiful.color.transparent,
|
bottom = beautiful.dpi(2),
|
||||||
forced_width = beautiful.dpi(3)
|
left = beautiful.dpi(2),
|
||||||
},
|
right = beautiful.dpi(2),
|
||||||
{
|
layout = wibox.container.margin,
|
||||||
widget.arc,
|
|
||||||
top = beautiful.dpi(2),
|
|
||||||
bottom = beautiful.dpi(2),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
{ -- Left space
|
|
||||||
widget = wibox.widget.separator,
|
|
||||||
color = beautiful.color.transparent,
|
|
||||||
forced_width = beautiful.dpi(3)
|
|
||||||
},
|
|
||||||
|
|
||||||
layout = wibox.layout.align.horizontal,
|
|
||||||
},
|
},
|
||||||
layout = wibox.container.background,
|
layout = wibox.container.background,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
widget.widget:connect_signal("mouse::enter", function(result)
|
widget.widget:connect_signal("mouse::enter", function(result)
|
||||||
widget.widget.bg = beautiful.color.bar.hover_bg
|
widget.widget.bg = beautiful.color.bar.hover_bg
|
||||||
end)
|
end)
|
||||||
@ -95,7 +45,7 @@ widget.update = function(stdout)
|
|||||||
local batpec = string.match(stdout, "(%d?%d?%d)%%")
|
local batpec = string.match(stdout, "(%d?%d?%d)%%")
|
||||||
batpec = tonumber(string.format("% 3d", batpec))
|
batpec = tonumber(string.format("% 3d", batpec))
|
||||||
|
|
||||||
local discharging = string.match(stdout, "discharging") or false
|
local discharging = string.match(stdout, "Discharging") or false
|
||||||
|
|
||||||
-- Handle low power notifications
|
-- Handle low power notifications
|
||||||
if discharging then
|
if discharging then
|
||||||
@ -126,49 +76,17 @@ widget.update = function(stdout)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
widget.dots.value = batpec
|
||||||
widget.progressbar.value = batpec
|
|
||||||
widget.arc.value = batpec
|
|
||||||
|
|
||||||
if batpec > 60 then
|
|
||||||
widget.progressbar.color = beautiful.color.battery.good
|
|
||||||
elseif batpec > 40 then
|
|
||||||
widget.progressbar.color = beautiful.color.battery.low
|
|
||||||
elseif batpec <= 40 then
|
|
||||||
widget.progressbar.color = beautiful.color.battery.danger
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
widget.image_path = beautiful.icons.battery.missing
|
|
||||||
-- Set current battery icon
|
|
||||||
if (not discharging) then
|
|
||||||
if batpec > 80 then widget.image_path = beautiful.icons.battery.charging.full
|
|
||||||
elseif batpec > 60 then widget.image_path = beautiful.icons.battery.charging.good
|
|
||||||
elseif batpec > 40 then widget.image_path = beautiful.icons.battery.charging.low
|
|
||||||
elseif batpec > 20 then widget.image_path = beautiful.icons.battery.charging.caution
|
|
||||||
elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.charging.empty end
|
|
||||||
else
|
|
||||||
if batpec > 80 then widget.image_path = beautiful.icons.battery.full
|
|
||||||
elseif batpec > 60 then widget.image_path = beautiful.icons.battery.good
|
|
||||||
elseif batpec > 40 then widget.image_path = beautiful.icons.battery.low
|
|
||||||
elseif batpec > 20 then widget.image_path = beautiful.icons.battery.caution
|
|
||||||
elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.empty end
|
|
||||||
end
|
|
||||||
widget.icon.image = widget.image_path
|
|
||||||
|
|
||||||
if (not discharging) and (batpec > 90) then
|
|
||||||
widget.progressbar.border_color = beautiful.color.battery.good
|
|
||||||
elseif (discharging) and (batpec <= 25) then
|
|
||||||
widget.progressbar.border_color = beautiful.color.battery.danger
|
|
||||||
else
|
|
||||||
widget.progressbar.border_color = beautiful.color.bar.active
|
|
||||||
end
|
|
||||||
|
|
||||||
if discharging then
|
if discharging then
|
||||||
widget.rotator.direction = "east"
|
widget.dots.on_color = {1, 0, 0}
|
||||||
|
widget.dots.off_color = {0.5, 0, 0}
|
||||||
else
|
else
|
||||||
widget.rotator.direction = "west"
|
widget.dots.on_color = {1, 1, 0}
|
||||||
|
widget.dots.off_color = {0.5, 0.5, 0}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
widget.dots:emit_signal("widget::redraw_needed")
|
||||||
end
|
end
|
||||||
|
|
||||||
widget.readupdate = function()
|
widget.readupdate = function()
|
||||||
@ -185,8 +103,12 @@ widget.widget:connect_signal("button::press",
|
|||||||
if (button == 1) then
|
if (button == 1) then
|
||||||
battery.status(
|
battery.status(
|
||||||
function(stdout, stderr, exitreason, exitcode)
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
local batpec = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
|
local batpec = string.match(stdout, "(%d?%d?%d)%%")
|
||||||
local batstat = string.match(stdout, "discharging") or false
|
batpec = tonumber(string.format("% 3d", batpec))
|
||||||
|
|
||||||
|
local batstat = string.match(stdout, "Discharging") or false
|
||||||
|
|
||||||
|
debug_message(batpec)
|
||||||
|
|
||||||
if batstat then
|
if batstat then
|
||||||
batstat = "Discharging, "
|
batstat = "Discharging, "
|
||||||
@ -211,7 +133,7 @@ widget.widget:connect_signal("button::press",
|
|||||||
)
|
)
|
||||||
|
|
||||||
battery.watch(
|
battery.watch(
|
||||||
10,
|
2,
|
||||||
function(_, stdout)
|
function(_, stdout)
|
||||||
widget.update(stdout)
|
widget.update(stdout)
|
||||||
end,
|
end,
|
||||||
|
@ -31,10 +31,10 @@ for k, l in pairs(config.ibus.language_list) do
|
|||||||
|
|
||||||
l["widget_text"] = wibox.widget {
|
l["widget_text"] = wibox.widget {
|
||||||
{
|
{
|
||||||
markup = "<b>" .. l["title"] .. "</b>",
|
text = "" .. l["title"] .. "",
|
||||||
align = "left",
|
align = "left",
|
||||||
valign = "center",
|
valign = "center",
|
||||||
font = "Comfortaa 16",
|
font = config.core.font.normal_large,
|
||||||
widget = wibox.widget.textbox
|
widget = wibox.widget.textbox
|
||||||
},
|
},
|
||||||
layout = wibox.container.background,
|
layout = wibox.container.background,
|
||||||
|
@ -4,12 +4,12 @@ local widget = {}
|
|||||||
widget.ibus_indicator_text = wibox.widget.textbox("??")
|
widget.ibus_indicator_text = wibox.widget.textbox("??")
|
||||||
widget.ibus_indicator_text.valign = "center"
|
widget.ibus_indicator_text.valign = "center"
|
||||||
widget.ibus_indicator_text.align = "center"
|
widget.ibus_indicator_text.align = "center"
|
||||||
widget.ibus_indicator_text.font = "Hack NF 14"
|
widget.ibus_indicator_text.font = config.core.font.normal_medium
|
||||||
|
|
||||||
widget.xkb_indicator_text = wibox.widget.textbox("??")
|
widget.xkb_indicator_text = wibox.widget.textbox("??")
|
||||||
widget.xkb_indicator_text.valign = "center"
|
widget.xkb_indicator_text.valign = "center"
|
||||||
widget.xkb_indicator_text.align = "center"
|
widget.xkb_indicator_text.align = "center"
|
||||||
widget.xkb_indicator_text.font = "Hack NF 10"
|
widget.xkb_indicator_text.font = config.core.font.normal_small
|
||||||
|
|
||||||
|
|
||||||
widget.widget = wibox.widget {
|
widget.widget = wibox.widget {
|
||||||
@ -53,8 +53,8 @@ widget.widget:connect_signal("mouse::leave", function(result)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
widget.update = function()
|
widget.update = function()
|
||||||
widget.ibus_indicator_text.markup = config.ibus.language_list[util.current_engine_index]["indicator_code"]
|
widget.ibus_indicator_text.text = config.ibus.language_list[util.current_engine_index]["indicator_code"]
|
||||||
widget.xkb_indicator_text.markup = util.current_xkbmap
|
widget.xkb_indicator_text.text = util.current_xkbmap
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ popup.popup = awful.popup {
|
|||||||
widget = wibox.widget {
|
widget = wibox.widget {
|
||||||
wibox.widget {
|
wibox.widget {
|
||||||
image = ru_kb_img,
|
image = ru_kb_img,
|
||||||
resize = true,
|
|
||||||
widget = wibox.widget.imagebox,
|
widget = wibox.widget.imagebox,
|
||||||
resize = true,
|
resize = true,
|
||||||
forced_width = popup.width,
|
forced_width = popup.width,
|
||||||
|
@ -3,7 +3,7 @@ local widget = {}
|
|||||||
|
|
||||||
widget.icon = wibox.widget {
|
widget.icon = wibox.widget {
|
||||||
resize = true,
|
resize = true,
|
||||||
image = beautiful.icons.launcher,
|
image = beautiful.icons[config.launcher.icon],
|
||||||
widget = wibox.widget.imagebox
|
widget = wibox.widget.imagebox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,14 +2,18 @@ local util = {}
|
|||||||
|
|
||||||
util.mpc_command = function(command, callback)
|
util.mpc_command = function(command, callback)
|
||||||
awful.spawn.easy_async(
|
awful.spawn.easy_async(
|
||||||
"mpc --host " .. config.mpc.host .. " " .. command,
|
"mpc --host " .. config.mpc.host .. " "
|
||||||
|
.. "--port " .. config.mpc.port .. " "
|
||||||
|
.. command,
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
util.mpc_watch = function(command, timeout, callback, widget)
|
util.mpc_watch = function(command, timeout, callback, widget)
|
||||||
awful.widget.watch(
|
awful.widget.watch(
|
||||||
"mpc --host " .. config.mpc.host .. " " .. command,
|
"mpc --host " .. config.mpc.host .. " "
|
||||||
|
.. "--port " .. config.mpc.port .. " "
|
||||||
|
.. command,
|
||||||
timeout,
|
timeout,
|
||||||
callback,
|
callback,
|
||||||
widget
|
widget
|
||||||
|
@ -4,21 +4,21 @@ local mpc_widget = {}
|
|||||||
mpc_widget.title = wibox.widget.textbox("MPD is not")
|
mpc_widget.title = wibox.widget.textbox("MPD is not")
|
||||||
mpc_widget.title.valign = "center"
|
mpc_widget.title.valign = "center"
|
||||||
mpc_widget.title.align = "left"
|
mpc_widget.title.align = "left"
|
||||||
mpc_widget.title.font = "Hack NF 12"
|
mpc_widget.title.font = config.core.font.normal
|
||||||
mpc_widget.title.ellipsize = "end"
|
mpc_widget.title.ellipsize = "end"
|
||||||
mpc_widget.title.forced_width = beautiful.dpi(config.mpc.width)
|
mpc_widget.title.forced_width = beautiful.dpi(config.mpc.width)
|
||||||
|
|
||||||
mpc_widget.artist = wibox.widget.textbox("connected")
|
mpc_widget.artist = wibox.widget.textbox("connected")
|
||||||
mpc_widget.artist.valign = "center"
|
mpc_widget.artist.valign = "center"
|
||||||
mpc_widget.artist.align = "left"
|
mpc_widget.artist.align = "left"
|
||||||
mpc_widget.artist.font = "Hack NF 12"
|
mpc_widget.artist.font = config.core.font.normal
|
||||||
mpc_widget.artist.ellipsize = "end"
|
mpc_widget.artist.ellipsize = "end"
|
||||||
mpc_widget.artist.forced_width = beautiful.dpi(config.mpc.width)
|
mpc_widget.artist.forced_width = beautiful.dpi(config.mpc.width)
|
||||||
|
|
||||||
mpc_widget.volume = wibox.widget.textbox("??")
|
mpc_widget.volume = wibox.widget.textbox("??")
|
||||||
mpc_widget.volume.valign = "center"
|
mpc_widget.volume.valign = "center"
|
||||||
mpc_widget.volume.align = "left"
|
mpc_widget.volume.align = "left"
|
||||||
mpc_widget.volume.font = "Hack NF 10"
|
mpc_widget.volume.font = config.core.font.normal_small
|
||||||
mpc_widget.volume.ellipsize = "end"
|
mpc_widget.volume.ellipsize = "end"
|
||||||
mpc_widget.volume.forced_width = beautiful.dpi(10)
|
mpc_widget.volume.forced_width = beautiful.dpi(10)
|
||||||
|
|
||||||
@ -67,21 +67,23 @@ mpc_widget.right = wibox.widget {
|
|||||||
|
|
||||||
mpc_widget.widget = wibox.widget {
|
mpc_widget.widget = wibox.widget {
|
||||||
{
|
{
|
||||||
{ -- Right spacer
|
{
|
||||||
widget = wibox.widget.separator,
|
mpc_widget.left,
|
||||||
color = beautiful.color.transparent,
|
mpc_widget.right,
|
||||||
forced_width = beautiful.dpi(3)
|
|
||||||
|
forced_num_cols = 2,
|
||||||
|
forced_num_rows = 1,
|
||||||
|
homogeneous = false,
|
||||||
|
vertical_homogenous = true;
|
||||||
|
horizontal_homogenous = false;
|
||||||
|
expand = true,
|
||||||
|
layout = wibox.layout.grid
|
||||||
},
|
},
|
||||||
|
|
||||||
mpc_widget.left,
|
top = 0, bottom = 0,
|
||||||
mpc_widget.right,
|
left = beautiful.dpi(2),
|
||||||
|
right = beautiful.dpi(2),
|
||||||
{ -- Left spacer
|
layout = wibox.container.margin,
|
||||||
widget = wibox.widget.separator,
|
|
||||||
color = beautiful.color.transparent,
|
|
||||||
forced_width = beautiful.dpi(3)
|
|
||||||
},
|
|
||||||
layout = wibox.layout.align.horizontal,
|
|
||||||
},
|
},
|
||||||
layout = wibox.container.background,
|
layout = wibox.container.background,
|
||||||
}
|
}
|
||||||
@ -130,6 +132,20 @@ mpc_widget.left:connect_signal("button::press",
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
function pango.escape(text)
|
||||||
|
local replacements = {
|
||||||
|
["&"] = "&",
|
||||||
|
["<"] = "<",
|
||||||
|
[">"] = ">",
|
||||||
|
["\""] = """,
|
||||||
|
["'"] = "'",
|
||||||
|
}
|
||||||
|
return string.gsub(text, "[&<>'\"]", replacements)
|
||||||
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
mpc_widget.readupdate = function()
|
mpc_widget.readupdate = function()
|
||||||
-- Update title and artist
|
-- Update title and artist
|
||||||
mpc.mpc_command("current --format \"title=%title% artist=%artist%\"",
|
mpc.mpc_command("current --format \"title=%title% artist=%artist%\"",
|
||||||
@ -138,8 +154,8 @@ mpc_widget.readupdate = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
mpc_widget.title.markup = string.match(stdout, "title=(.*)artist=")
|
mpc_widget.title.text = string.match(stdout, "title=(.*)artist=")
|
||||||
mpc_widget.artist.markup = string.match(stdout, "artist=(.*)")
|
mpc_widget.artist.text = string.match(stdout, "artist=(.*)")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -158,11 +174,12 @@ mpc_widget.readupdate = function()
|
|||||||
mpc_widget.icon_play.image = beautiful.icons.music.blue.stopped
|
mpc_widget.icon_play.image = beautiful.icons.music.blue.stopped
|
||||||
end
|
end
|
||||||
|
|
||||||
local volume = string.match(stdout, "volume: (%d?%d?%d)%%")
|
local volume = string.match(stdout, "volume: ?(%d?%d?%d)%%")
|
||||||
|
|
||||||
if (volume) then
|
if (volume) then
|
||||||
mpc_widget.volume.markup = volume .. "%"
|
mpc_widget.volume.text = volume .. "%"
|
||||||
else
|
else
|
||||||
mpc_widget.volume.markup = ""
|
mpc_widget.volume.text = ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
init = function()
|
init = function()
|
||||||
local conf = conf_dir .. "/modules/picom/picom.conf"
|
local conf = conf_dir .. "/modules/picom/picom.conf"
|
||||||
|
awful.spawn("picom -b --experimental-backends --conf \"" .. conf .. "\"")
|
||||||
awful.spawn("killall picom")
|
|
||||||
awful.spawn("picom -b --conf \"" .. conf .. "\"")
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,29 @@
|
|||||||
shadow-radius = 0
|
shadow-radius = 0;
|
||||||
shadow-opacity = 0
|
shadow-opacity = 0;
|
||||||
|
|
||||||
// Enable fading initially.
|
// Enable fading initially.
|
||||||
// Finer config is in fade-exclude.
|
// Finer config is in fade-exclude.
|
||||||
fading = true
|
fading = true
|
||||||
fade-in-step = 0.04
|
fade-in-step = 0.1;
|
||||||
fade-out-step = 0.03
|
fade-out-step = 0.03;
|
||||||
fade-delta = 10
|
fade-delta = 5;
|
||||||
|
|
||||||
fade-exclude = [
|
fade-exclude = [
|
||||||
"class_g != 'awesome'"
|
"class_g != 'awesome'"
|
||||||
]
|
];
|
||||||
|
|
||||||
inactive-opacity = 1
|
backend = "glx";
|
||||||
active-opacity = 1
|
detect-rounded-corners = true;
|
||||||
inactive-dim = 0
|
blur-background-frame = false;
|
||||||
|
blur: {
|
||||||
|
method = "dual_kawase";
|
||||||
|
strength = 3;
|
||||||
|
};
|
||||||
|
blur-exclude = [
|
||||||
|
"class_g != 'awesome'"
|
||||||
|
];
|
||||||
|
|
||||||
|
inactive-opacity = 1;
|
||||||
|
active-opacity = 1;
|
||||||
|
inactive-dim = 0;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local function screenshot_action(mode)
|
local function screenshot_action(mode)
|
||||||
awful.spawn(
|
awful.spawn(
|
||||||
conf_dir .. "modules/screenshot/screenshot.fish " .. mode,
|
"fish " .. conf_dir .. "modules/screenshot/screenshot.fish " .. mode,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -8,8 +8,8 @@ textclock.widget = wibox.widget {
|
|||||||
forced_width = beautiful.dpi(3)
|
forced_width = beautiful.dpi(3)
|
||||||
},
|
},
|
||||||
wibox.widget {
|
wibox.widget {
|
||||||
wibox.widget.textclock("%m/%d"),
|
wibox.widget.textclock("<span font=\"" .. config.core.font.normal .. "\">%m/%d</span>"),
|
||||||
wibox.widget.textclock("%I:%M", 60),
|
wibox.widget.textclock("<span font=\"" .. config.core.font.normal .. "\">%I:%M</span>", 60),
|
||||||
|
|
||||||
-- Long format:
|
-- Long format:
|
||||||
-- wibox.widget.textclock("%m/%d/%y"),
|
-- wibox.widget.textclock("%m/%d/%y"),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local volume = require("modules.volume.util")
|
local volume = require("modules.volume.util")
|
||||||
local widget = require("modules.volume.widget")
|
local popup = require("modules.volume.popup")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
widget = require("modules.volume.widget").widget,
|
widget = require("modules.volume.widget").widget,
|
||||||
@ -7,8 +7,11 @@ return {
|
|||||||
|
|
||||||
init = function ()
|
init = function ()
|
||||||
-- Make sure volume is unmuted
|
-- Make sure volume is unmuted
|
||||||
volume.commands:unmute()
|
-- Implicitly updates widgets
|
||||||
-- Update volume widget at start
|
volume.commands.unmute()
|
||||||
volume.commands:get(widget.update)
|
end,
|
||||||
|
|
||||||
|
for_each_screen = function (s)
|
||||||
|
popup(s)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ local volume = req_rel(..., "util")
|
|||||||
return gears.table.join(
|
return gears.table.join(
|
||||||
awful.key( {}, "XF86AudioRaiseVolume",
|
awful.key( {}, "XF86AudioRaiseVolume",
|
||||||
function ()
|
function ()
|
||||||
volume.volume_up()
|
volume.volume_up(config.volume.button_step)
|
||||||
|
--awesome.emit_signal("module::volume:popup_show")
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "Volume up",
|
description = "Volume up",
|
||||||
@ -13,7 +14,8 @@ return gears.table.join(
|
|||||||
|
|
||||||
awful.key( {}, "XF86AudioLowerVolume",
|
awful.key( {}, "XF86AudioLowerVolume",
|
||||||
function ()
|
function ()
|
||||||
volume.volume_down()
|
volume.volume_down(config.volume.button_step)
|
||||||
|
--awesome.emit_signal("module::volume:popup_show")
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "Volume down",
|
description = "Volume down",
|
||||||
@ -24,6 +26,7 @@ return gears.table.join(
|
|||||||
awful.key( {}, "XF86AudioMute",
|
awful.key( {}, "XF86AudioMute",
|
||||||
function ()
|
function ()
|
||||||
volume.toggle_mute()
|
volume.toggle_mute()
|
||||||
|
--awesome.emit_signal("module::volume:popup_show")
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "Mute",
|
description = "Mute",
|
||||||
|
247
modules/volume/popup.lua
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
local volume = req_rel(..., "util")
|
||||||
|
|
||||||
|
return function(s)
|
||||||
|
local widget = wibox.widget {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{ -- Icon and margins
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
id = "icon",
|
||||||
|
forced_height = beautiful.dpi(100),
|
||||||
|
image = beautiful.icons.volume.high,
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
expand = "none",
|
||||||
|
id = "icon_margin2",
|
||||||
|
layout = wibox.layout.align.vertical
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
id = "icon_margin1",
|
||||||
|
expand = "none",
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
},
|
||||||
|
{ -- Text and percentage
|
||||||
|
{
|
||||||
|
id = "label",
|
||||||
|
text = "Volume",
|
||||||
|
align = "left",
|
||||||
|
valign = "center",
|
||||||
|
widget = wibox.widget.textbox
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
{
|
||||||
|
id = "value",
|
||||||
|
text = "0%",
|
||||||
|
align = "center",
|
||||||
|
valign = "center",
|
||||||
|
widget = wibox.widget.textbox
|
||||||
|
},
|
||||||
|
id = "label_value_layout",
|
||||||
|
forced_height = beautiful.dpi(48),
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
},
|
||||||
|
{ -- Progress bar
|
||||||
|
{
|
||||||
|
id = "volume_bar",
|
||||||
|
shape = gears.shape.rounded_bar,
|
||||||
|
forced_height = beautiful.dpi(10),
|
||||||
|
background_color = "#AAAAAA88",
|
||||||
|
bar_color = "#ffffff",
|
||||||
|
color = "#ffffff",
|
||||||
|
bar_shape = gears.shape.rounded_bar,
|
||||||
|
max_value = 100,
|
||||||
|
widget = wibox.widget.progressbar
|
||||||
|
},
|
||||||
|
id = "bar_layout",
|
||||||
|
forced_height = beautiful.dpi(24),
|
||||||
|
widget = wibox.container.place
|
||||||
|
},
|
||||||
|
id = "icon_bar_layout",
|
||||||
|
spacing = beautiful.dpi(0),
|
||||||
|
layout = wibox.layout.align.vertical
|
||||||
|
},
|
||||||
|
id = "popup_layout",
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
},
|
||||||
|
id = "container",
|
||||||
|
left = beautiful.dpi(20),
|
||||||
|
right = beautiful.dpi(20),
|
||||||
|
top = beautiful.dpi(10),
|
||||||
|
bottom = beautiful.dpi(10),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
},
|
||||||
|
bg ="#000000FF",
|
||||||
|
widget = wibox.container.background,
|
||||||
|
ontop = true,
|
||||||
|
visible = true,
|
||||||
|
type = "notification",
|
||||||
|
forced_height = beautiful.dpi(180),
|
||||||
|
forced_width = beautiful.dpi(300),
|
||||||
|
offset = beautiful.dpi(5),
|
||||||
|
}
|
||||||
|
|
||||||
|
local popup_container = awful.popup {
|
||||||
|
widget = wibox.container.background,
|
||||||
|
ontop = true,
|
||||||
|
bg = "#00000000",
|
||||||
|
stretch = false,
|
||||||
|
visible = false,
|
||||||
|
screen = s,
|
||||||
|
|
||||||
|
placement = function(c)
|
||||||
|
awful.placement.bottom_right(
|
||||||
|
c,
|
||||||
|
{
|
||||||
|
honor_workarea = true,
|
||||||
|
margins = {
|
||||||
|
top = beautiful.dpi(200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- Only set corner radius here.
|
||||||
|
shape = function(cr, width, height)
|
||||||
|
gears.shape.partially_rounded_rect(
|
||||||
|
cr,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
beautiful.dpi(20)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
popup_container:setup {
|
||||||
|
widget,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
}
|
||||||
|
|
||||||
|
local hide_popup_timer = gears.timer {
|
||||||
|
timeout = 1,
|
||||||
|
autostart = true,
|
||||||
|
callback = function()
|
||||||
|
popup_container.visible = false
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
awesome.connect_signal("module::all:popup_hide",
|
||||||
|
function(except)
|
||||||
|
if (except == "volume") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
popup_container.visible = false
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:stop()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
awesome.connect_signal("module::volume:update",
|
||||||
|
function(status)
|
||||||
|
|
||||||
|
-- Update slider
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
bar_layout.
|
||||||
|
volume_bar:set_value(status.value)
|
||||||
|
|
||||||
|
-- Update text
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
label_value_layout.
|
||||||
|
value:set_text(status.value .. "%")
|
||||||
|
|
||||||
|
-- Update icon
|
||||||
|
local icon
|
||||||
|
if status.mute then
|
||||||
|
icon = beautiful.icons.volume.mute
|
||||||
|
elseif status.value < 1 then
|
||||||
|
icon = beautiful.icons.volume.off
|
||||||
|
elseif status.value >= 1 and status.value < 34 then
|
||||||
|
icon = beautiful.icons.volume.low
|
||||||
|
elseif status.value >= 34 and status.value < 67 then
|
||||||
|
icon = beautiful.icons.volume.medium
|
||||||
|
elseif status.value >= 67 then
|
||||||
|
icon = beautiful.icons.volume.high
|
||||||
|
end
|
||||||
|
|
||||||
|
widget.
|
||||||
|
container.
|
||||||
|
popup_layout.
|
||||||
|
icon_bar_layout.
|
||||||
|
icon_margin1.
|
||||||
|
icon_margin2.
|
||||||
|
icon:set_image(icon)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
awesome.connect_signal("module::volume:popup_show",
|
||||||
|
function()
|
||||||
|
awesome.emit_signal("module::all:popup_hide", "volume")
|
||||||
|
if s == mouse.screen then
|
||||||
|
popup_container.visible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:again()
|
||||||
|
else
|
||||||
|
hide_popup_timer:start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
awesome.connect_signal("module::volume:popup_show_stay",
|
||||||
|
function()
|
||||||
|
awesome.emit_signal("module::all:popup_hide", "volume")
|
||||||
|
if s == mouse.screen then
|
||||||
|
popup_container.visible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if hide_popup_timer.started then
|
||||||
|
hide_popup_timer:stop()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
popup_container:connect_signal("button::press",
|
||||||
|
function(_, _, _, button, mods)
|
||||||
|
-- Left-click
|
||||||
|
if (button == 1) then
|
||||||
|
volume.toggle_mute()
|
||||||
|
|
||||||
|
-- Scroll up
|
||||||
|
elseif (button == 4) then
|
||||||
|
volume.volume_up(config.volume.scroll_step)
|
||||||
|
|
||||||
|
-- Scroll down
|
||||||
|
elseif (button == 5) then
|
||||||
|
volume.volume_down(config.volume.scroll_step)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
popup_container:connect_signal("mouse::enter", function(result)
|
||||||
|
awesome.emit_signal("module::volume:popup_show_stay")
|
||||||
|
end)
|
||||||
|
|
||||||
|
popup_container:connect_signal("mouse::leave", function(result)
|
||||||
|
awesome.emit_signal("module::volume:popup_show")
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
local volume = {}
|
local volume = {}
|
||||||
volume.commands = {}
|
|
||||||
|
|
||||||
|
|
||||||
-- Create pamixer option string
|
-- Create pamixer option string
|
||||||
@ -8,131 +8,150 @@ if (config.volume.pamixer_sink ~= "") then
|
|||||||
volume.pamixer_options = volume.pamixer_options .. " --sink " .. config.volume.pamixer_sink
|
volume.pamixer_options = volume.pamixer_options .. " --sink " .. config.volume.pamixer_sink
|
||||||
end
|
end
|
||||||
|
|
||||||
function volume.commands:up()
|
volume.commands = {
|
||||||
awful.spawn("pamixer --increase 5" .. volume.pamixer_options, false)
|
up = function(value, callback)
|
||||||
end
|
awful.spawn.easy_async(
|
||||||
|
"pamixer --increase " .. value .. " "
|
||||||
function volume.commands:down()
|
.. volume.pamixer_options,
|
||||||
awful.spawn("pamixer --decrease 5" .. volume.pamixer_options, false)
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
end
|
awesome.emit_signal("module::volume:update_read")
|
||||||
|
if (callback ~= nil) then
|
||||||
function volume.commands:set(value)
|
callback()
|
||||||
awful.spawn("pamixer --set_volume" .. tostring(value) .. " " .. volume.pamixer_options, false)
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function volume.commands:mute()
|
|
||||||
awful.spawn("pamixer --mute" .. volume.pamixer_options, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
function volume.commands:unmute()
|
|
||||||
awful.spawn("pamixer --unmute" .. volume.pamixer_options, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
function volume.commands:get(callback)
|
|
||||||
local muted
|
|
||||||
local value
|
|
||||||
|
|
||||||
awful.spawn.easy_async("pamixer --get-mute --get-volume" .. volume.pamixer_options,
|
|
||||||
function(stdout, stderr, exitreason, exitcode)
|
|
||||||
muted = string.match(stdout, "(%w%w%w%w%w?) ") -- "true" or "false"
|
|
||||||
muted = (muted == "true")
|
|
||||||
|
|
||||||
value = string.match(stdout, "(%d?%d?%d)") -- (\d?\d?\d)\%)
|
|
||||||
|
|
||||||
if (value == nil) then
|
|
||||||
value = false
|
|
||||||
else
|
|
||||||
value = tonumber(string.format("% 3d", value))
|
|
||||||
end
|
end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
callback({
|
down = function(value, callback)
|
||||||
mute = muted,
|
awful.spawn.easy_async(
|
||||||
value = value
|
"pamixer --decrease " .. value .. " "
|
||||||
})
|
.. volume.pamixer_options,
|
||||||
end
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
)
|
awesome.emit_signal("module::volume:update_read")
|
||||||
end
|
if (callback ~= nil) then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
function volume.commands:watch(timeout, callback, widget)
|
set = function(value, callback)
|
||||||
awful.widget.watch(
|
awful.spawn.easy_async(
|
||||||
"pamixer --get-mute --get-volume " .. volume.pamixer_options,
|
"pamixer --set_volume " .. tostring(value) .. " " .. volume.pamixer_options,
|
||||||
timeout, callback, widget
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
)
|
awesome.emit_signal("module::volume:update_read")
|
||||||
end
|
if (callback ~= nil) then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
mute = function(callback)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"pamixer --mute " .. volume.pamixer_options,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal("module::volume:update_read")
|
||||||
|
if (callback ~= nil) then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
|
unmute = function(callback)
|
||||||
|
awful.spawn.easy_async(
|
||||||
|
"pamixer --unmute " .. volume.pamixer_options,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
awesome.emit_signal("module::volume:update_read")
|
||||||
|
if (callback ~= nil) then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
volume.hooks = {}
|
watch = function(timeout, callback, widget)
|
||||||
volume.add_hook = function(callback)
|
awful.widget.watch(
|
||||||
volume.hooks[#volume.hooks + 1] = callback
|
"pamixer --get-mute --get-volume " .. volume.pamixer_options,
|
||||||
end
|
timeout, callback, widget
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
|
||||||
volume.exec_hooks = function()
|
get = function(callback)
|
||||||
volume.commands:get(function(status)
|
local muted
|
||||||
for i=1, #volume.hooks do
|
local value
|
||||||
volume.hooks[i](status)
|
|
||||||
end
|
awful.spawn.easy_async(
|
||||||
|
"pamixer --get-mute --get-volume " .. volume.pamixer_options,
|
||||||
|
function(stdout, stderr, exitreason, exitcode)
|
||||||
|
muted = string.match(stdout, "(%w%w%w%w%w?) ") -- "true" or "false"
|
||||||
|
muted = (muted == "true")
|
||||||
|
|
||||||
|
value = string.match(stdout, "(%d?%d?%d)") -- (\d?\d?\d)\%)
|
||||||
|
|
||||||
|
if (value == nil) then
|
||||||
|
value = false
|
||||||
|
else
|
||||||
|
value = tonumber(string.format("% 3d", value))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Value will be "false" if audio not connected,
|
||||||
|
-- needs to be handled gracefully
|
||||||
|
callback({
|
||||||
|
mute = muted,
|
||||||
|
value = value
|
||||||
|
})
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
awesome.connect_signal("module::volume:update_read",
|
||||||
|
function()
|
||||||
|
volume.commands.get(
|
||||||
|
function(status)
|
||||||
|
awesome.emit_signal(
|
||||||
|
"module::volume:update",
|
||||||
|
status
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
volume.volume_up = function(value)
|
||||||
|
if volume.muted then
|
||||||
|
volume.unmute()
|
||||||
|
end
|
||||||
|
|
||||||
|
volume.commands.up(value, function()
|
||||||
|
core.sound.play("volume_up")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
volume.volume_up = function()
|
volume.volume_down = function(value)
|
||||||
if volume.muted then
|
if volume.muted then
|
||||||
volume.unmute()
|
volume.unmute()
|
||||||
end
|
end
|
||||||
|
|
||||||
volume.commands:up()
|
volume.commands.down(value, function()
|
||||||
core.sound.play("volume_up")
|
core.sound.play("volume_down")
|
||||||
|
end)
|
||||||
volume.exec_hooks()
|
|
||||||
end
|
|
||||||
|
|
||||||
volume.volume_down = function()
|
|
||||||
if volume.muted then
|
|
||||||
volume.unmute()
|
|
||||||
end
|
|
||||||
|
|
||||||
volume.commands:down()
|
|
||||||
core.sound.play("volume_down")
|
|
||||||
|
|
||||||
volume.exec_hooks()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
volume.mute = function()
|
volume.mute = function()
|
||||||
volume.commands:mute()
|
|
||||||
volume.muted = true
|
volume.muted = true
|
||||||
|
volume.commands.mute()
|
||||||
-- Spawn notification
|
|
||||||
local n = naughty.notify({
|
|
||||||
title = "Volume muted",
|
|
||||||
text = "Silence!",
|
|
||||||
timeout = 1,
|
|
||||||
replaces_id = volume.notificationid
|
|
||||||
})
|
|
||||||
|
|
||||||
volume.notificationid = n.id
|
|
||||||
|
|
||||||
volume.exec_hooks()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
volume.unmute = function()
|
volume.unmute = function()
|
||||||
volume.commands:unmute()
|
|
||||||
volume.muted = false
|
volume.muted = false
|
||||||
|
volume.commands.unmute()
|
||||||
-- Spawn notification
|
|
||||||
local n = naughty.notify({
|
|
||||||
title = "Volume unmuted",
|
|
||||||
text = "Loud.",
|
|
||||||
timeout = 1,
|
|
||||||
replaces_id = volume.notificationid
|
|
||||||
})
|
|
||||||
|
|
||||||
volume.notificationid = n.id
|
|
||||||
|
|
||||||
volume.exec_hooks()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
volume.toggle_mute = function()
|
volume.toggle_mute = function()
|
||||||
volume.commands:get(function(status)
|
volume.commands.get(function(status)
|
||||||
if status.mute then
|
if status.mute then
|
||||||
volume.unmute()
|
volume.unmute()
|
||||||
else
|
else
|
||||||
|
@ -1,136 +1,72 @@
|
|||||||
local volume = req_rel(..., "util")
|
local volume = req_rel(..., "util")
|
||||||
local widget = {}
|
local widget = {}
|
||||||
|
local dotgrid = require("widgets.dotgrid")
|
||||||
|
|
||||||
|
widget.dots = dotgrid:new();
|
||||||
widget.icon = wibox.widget {
|
widget.dots.on_color = {1, 0, 0}
|
||||||
resize = true,
|
widget.dots.off_color = {0.5, 0, 0}
|
||||||
image = beautiful.icons.volume.mute,
|
widget.dots.spacing = beautiful.dpi(2)
|
||||||
widget = wibox.widget.imagebox
|
|
||||||
}
|
|
||||||
|
|
||||||
widget.arc = wibox.widget {
|
|
||||||
{
|
|
||||||
widget.icon,
|
|
||||||
top = beautiful.dpi(1),
|
|
||||||
bottom = beautiful.dpi(1),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
max_value = 1,
|
|
||||||
thickness = beautiful.dpi(4),
|
|
||||||
start_angle = 4.71238898, -- 2pi*3/4
|
|
||||||
--forced_height = beautiful.dpi(16),
|
|
||||||
--forced_width = beautiful.dpi(16),
|
|
||||||
colors = {"#27D4CC", "#00446B"},
|
|
||||||
bg = "#FFFFFF30",
|
|
||||||
paddings = beautiful.dpi(2),
|
|
||||||
widget = wibox.container.arcchart
|
|
||||||
}
|
|
||||||
|
|
||||||
widget.bar = wibox.widget {
|
|
||||||
max_value = 100,
|
|
||||||
value = 0,
|
|
||||||
--forced_height = 20,
|
|
||||||
forced_width = beautiful.dpi(50),
|
|
||||||
paddings = 0,
|
|
||||||
border_width = 0,
|
|
||||||
color = {
|
|
||||||
type = "linear",
|
|
||||||
from = {0, 0}, to = {beautiful.dpi(50), 0},
|
|
||||||
stops = { { 0, "#27D4CC" }, { 1, "#00446B" }}
|
|
||||||
},
|
|
||||||
background_color = "#FFFFFF30",
|
|
||||||
widget = wibox.widget.progressbar,
|
|
||||||
shape = gears.shape.rounded_bar,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
widget.widget = wibox.widget {
|
widget.widget = wibox.widget {
|
||||||
{
|
{
|
||||||
{ -- Right space
|
widget.dots,
|
||||||
widget = wibox.widget.separator,
|
top = beautiful.dpi(2),
|
||||||
color = beautiful.color.transparent,
|
bottom = beautiful.dpi(2),
|
||||||
forced_width = beautiful.dpi(3)
|
left = beautiful.dpi(2),
|
||||||
},
|
right = beautiful.dpi(2),
|
||||||
{
|
layout = wibox.container.margin,
|
||||||
widget.arc,
|
|
||||||
top = beautiful.dpi(2),
|
|
||||||
bottom = beautiful.dpi(2),
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
{ -- Left space
|
|
||||||
widget = wibox.widget.separator,
|
|
||||||
color = beautiful.color.transparent,
|
|
||||||
forced_width = beautiful.dpi(3)
|
|
||||||
},
|
|
||||||
layout = wibox.layout.align.horizontal,
|
|
||||||
},
|
},
|
||||||
layout = wibox.container.background,
|
layout = wibox.container.background,
|
||||||
}
|
}
|
||||||
|
|
||||||
widget.widget:connect_signal("mouse::enter", function(result)
|
widget.widget:connect_signal("mouse::enter", function(result)
|
||||||
widget.widget.bg = beautiful.color.bar.hover_bg
|
widget.widget.bg = beautiful.color.bar.hover_bg
|
||||||
|
--awesome.emit_signal("module::volume:popup_show_stay")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
widget.widget:connect_signal("mouse::leave", function(result)
|
widget.widget:connect_signal("mouse::leave", function(result)
|
||||||
widget.widget.bg = beautiful.color.transparent
|
widget.widget.bg = beautiful.color.transparent
|
||||||
|
--awesome.emit_signal("module::volume:popup_show")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
widget.widget:connect_signal("button::press",
|
widget.widget:connect_signal("button::press",
|
||||||
function(_, _, _, button, mods)
|
function(_, _, _, button, mods)
|
||||||
|
|
||||||
-- Right-click
|
-- Left-click
|
||||||
if (button == 3) then
|
if (button == 1) then
|
||||||
volume.toggle_mute()
|
volume.toggle_mute()
|
||||||
|
|
||||||
-- Scroll up
|
-- Scroll up
|
||||||
elseif (button == 4) then
|
elseif (button == 4) then
|
||||||
volume.volume_up()
|
volume.volume_up(config.volume.scroll_step)
|
||||||
|
|
||||||
-- Scroll down
|
-- Scroll down
|
||||||
elseif (button == 5) then
|
elseif (button == 5) then
|
||||||
volume.volume_down()
|
volume.volume_down(config.volume.scroll_step)
|
||||||
end
|
end
|
||||||
|
--awesome.emit_signal("module::volume:popup_show_stay")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
widget.update = function(status)
|
awesome.connect_signal("module::volume:update",
|
||||||
|
function(status)
|
||||||
if (status.value == false) then
|
if (status.value == false) then
|
||||||
widget.icon.image = beautiful.icons.volume.error
|
widget.dots.value = 100
|
||||||
widget.arc.value = 100;
|
return
|
||||||
widget.bar.value = 100;
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
widget.arc.value = status.value / 100;
|
|
||||||
widget.bar.value = status.value;
|
|
||||||
|
|
||||||
|
|
||||||
if (status.mute) then
|
|
||||||
-- Set muted icon
|
|
||||||
widget.icon.image = beautiful.icons.volume.mute
|
|
||||||
else
|
|
||||||
-- Set icon by value
|
|
||||||
if status.value > 70 then
|
|
||||||
widget.icon.image = beautiful.icons.volume.high
|
|
||||||
elseif status.value > 40 then
|
|
||||||
widget.icon.image = beautiful.icons.volume.medium
|
|
||||||
elseif status.value > 0 then
|
|
||||||
widget.icon.image = beautiful.icons.volume.low
|
|
||||||
elseif status.value == 0 then
|
|
||||||
widget.icon.image = beautiful.icons.volume.off
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
widget.dots.value = status.value
|
||||||
|
|
||||||
|
if (status.mute) then
|
||||||
|
widget.dots.on_color = {0.7, 0.7, 0.7}
|
||||||
|
widget.dots.off_color = {0.3, 0.3, 0.3}
|
||||||
|
else
|
||||||
|
widget.dots.on_color = {0, 1, 0}
|
||||||
|
widget.dots.off_color = {0, 0.5, 0}
|
||||||
|
end
|
||||||
|
|
||||||
|
widget.dots:emit_signal("widget::redraw_needed")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
volume.add_hook(widget.update)
|
|
||||||
volume.commands:watch(
|
|
||||||
5,
|
|
||||||
function()
|
|
||||||
volume.commands:get(widget.update)
|
|
||||||
end,
|
|
||||||
widget.widget
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return widget
|
return widget
|
||||||
|
21
rc.lua
@ -6,7 +6,19 @@ beautiful = require("beautiful")
|
|||||||
menubar = require("menubar")
|
menubar = require("menubar")
|
||||||
wibox = require("wibox")
|
wibox = require("wibox")
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
|
|
||||||
|
-- Load configuration
|
||||||
conf_dir = gears.filesystem.get_configuration_dir()
|
conf_dir = gears.filesystem.get_configuration_dir()
|
||||||
|
conf_env = os.getenv("AWESOMEWM_CONFIG")
|
||||||
|
config = require("defaults")
|
||||||
|
|
||||||
|
if (conf_env == nil) then
|
||||||
|
-- Default location: in this directory
|
||||||
|
dofile(conf_dir .. "/config.lua")
|
||||||
|
else
|
||||||
|
dofile(conf_env)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- A "relative require" hack. Does the same thing as `require`,
|
-- A "relative require" hack. Does the same thing as `require`,
|
||||||
@ -22,8 +34,6 @@ debug_message = function(msg)
|
|||||||
naughty.notify({title = "Debug message:", text = tostring(msg)})
|
naughty.notify({title = "Debug message:", text = tostring(msg)})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Order matters.
|
|
||||||
config = require("config")
|
|
||||||
beautiful.init(require("theme"))
|
beautiful.init(require("theme"))
|
||||||
|
|
||||||
|
|
||||||
@ -32,6 +42,13 @@ local keys = require("core.keybinds")
|
|||||||
local buttons = {}
|
local buttons = {}
|
||||||
|
|
||||||
|
|
||||||
|
-- Preferred client icon size, in pixels.
|
||||||
|
-- Set this to bar height, since that's the largest icon we'll ever draw.
|
||||||
|
-- This fixes the icon size given by client.icon. Client.icon give the smallest size by default.
|
||||||
|
awesome.set_preferred_icon_size(beautiful.dpi(config.core.bar_height))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Bind first 5 shortcuts to Mod + #.
|
-- Bind first 5 shortcuts to Mod + #.
|
||||||
local i = 0
|
local i = 0
|
||||||
for k, v in pairs(config.core.bar_shortcuts) do
|
for k, v in pairs(config.core.bar_shortcuts) do
|
||||||
|
@ -19,7 +19,7 @@ local overrides = function(theme)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
theme.prompt_font = "Comfortaa 14"
|
theme.prompt_font = config.core.font.prompt
|
||||||
theme.prompt_fg = theme.color.white
|
theme.prompt_fg = theme.color.white
|
||||||
theme.prompt_bg = "#00000000"
|
theme.prompt_bg = "#00000000"
|
||||||
theme.prompt_fg_cursor = theme.color.black
|
theme.prompt_fg_cursor = theme.color.black
|
||||||
|
@ -19,7 +19,7 @@ local theme = bar(theme)
|
|||||||
local theme = clients(theme)
|
local theme = clients(theme)
|
||||||
local theme = notifications(theme)
|
local theme = notifications(theme)
|
||||||
|
|
||||||
theme.font = "Hack NF 12"
|
theme.font = config.core.font.normal
|
||||||
|
|
||||||
theme.wallpaper = config.core.wallpaper
|
theme.wallpaper = config.core.wallpaper
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ local overrides = function(theme)
|
|||||||
--theme.hotkeys_group_magin = 5
|
--theme.hotkeys_group_magin = 5
|
||||||
|
|
||||||
-- Notification theming
|
-- Notification theming
|
||||||
theme.notification_font = "Comfortaa 8"
|
theme.notification_font = config.core.font.normal_small
|
||||||
theme.notification_bg = theme.color.black
|
theme.notification_bg = theme.color.black
|
||||||
theme.notification_fg = theme.color.white
|
theme.notification_fg = theme.color.white
|
||||||
|
|
||||||
|
117
widgets/dotgrid.lua
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
local dotgrid = {}
|
||||||
|
|
||||||
|
function dotgrid:shuffle(tbl)
|
||||||
|
for i = #tbl, 2, -1 do
|
||||||
|
local j = math.random(i)
|
||||||
|
tbl[i], tbl[j] = tbl[j], tbl[i]
|
||||||
|
end
|
||||||
|
return tbl
|
||||||
|
end
|
||||||
|
|
||||||
|
function dotgrid:new()
|
||||||
|
local dots = wibox.widget.base.make_widget();
|
||||||
|
|
||||||
|
dots.on_color = {1, 0, 0}
|
||||||
|
dots.off_color = {0.5, 0, 0}
|
||||||
|
dots.value = 0
|
||||||
|
dots.max = 100
|
||||||
|
dots.rows = 5
|
||||||
|
dots.cols = 5
|
||||||
|
dots.spacing = 2
|
||||||
|
dots.last_value = 0
|
||||||
|
|
||||||
|
dots.map = {}
|
||||||
|
local idx
|
||||||
|
for i=1, dots.rows*dots.cols do
|
||||||
|
dots.map[i] = false;
|
||||||
|
end
|
||||||
|
--dots.map = dotgrid:shuffle(dots.map)
|
||||||
|
|
||||||
|
|
||||||
|
function dots:fit(context, width, height)
|
||||||
|
local m = math.min(width, height)
|
||||||
|
return m, m
|
||||||
|
end
|
||||||
|
|
||||||
|
function dots:draw(context, cr, width, height)
|
||||||
|
local col_size = math.floor((height - self.spacing * (self.rows-1)) / self.rows)
|
||||||
|
local row_size = math.floor((width - self.spacing * (self.cols-1)) / self.cols)
|
||||||
|
|
||||||
|
-- Compute rounding offsets for better centering
|
||||||
|
local xoffset = math.floor((
|
||||||
|
width - (
|
||||||
|
(col_size * self.cols) +
|
||||||
|
(self.spacing * (self.cols - 1))
|
||||||
|
)
|
||||||
|
) / 2)
|
||||||
|
|
||||||
|
local yoffset = math.floor((
|
||||||
|
height - (
|
||||||
|
(row_size * self.rows) +
|
||||||
|
(self.spacing * (self.rows - 1))
|
||||||
|
)
|
||||||
|
) / 2)
|
||||||
|
|
||||||
|
-- How many dots should be on
|
||||||
|
local on = math.floor((self.value / self.max) * (self.rows * self.cols))
|
||||||
|
|
||||||
|
local flip
|
||||||
|
while self.last_value > on do
|
||||||
|
-- Flip the nth on dot
|
||||||
|
flip = math.random(1, self.last_value)
|
||||||
|
for i=1, dots.rows*dots.cols do
|
||||||
|
if dots.map[i] then
|
||||||
|
if flip == 1 then
|
||||||
|
dots.map[i] = false
|
||||||
|
self.last_value = self.last_value - 1
|
||||||
|
break
|
||||||
|
else
|
||||||
|
flip = flip - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
while self.last_value < on do
|
||||||
|
-- Flip the nth off dot
|
||||||
|
flip = math.random(1, dots.rows*dots.cols - self.last_value)
|
||||||
|
for i=1, dots.rows*dots.cols do
|
||||||
|
if not dots.map[i] then
|
||||||
|
if flip == 1 then
|
||||||
|
dots.map[i] = true
|
||||||
|
self.last_value = self.last_value + 1
|
||||||
|
break
|
||||||
|
else
|
||||||
|
flip = flip - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local idx
|
||||||
|
for r=1, self.rows do
|
||||||
|
for c=1, self.cols do
|
||||||
|
idx = c + ((r-1)*self.cols)
|
||||||
|
|
||||||
|
cr:new_path();
|
||||||
|
if self.map[idx] then
|
||||||
|
cr:set_source_rgb(self.on_color[1], self.on_color[2], self.on_color[3])
|
||||||
|
else
|
||||||
|
cr:set_source_rgb(self.off_color[1], self.off_color[2], self.off_color[3])
|
||||||
|
end
|
||||||
|
|
||||||
|
cr:rectangle(
|
||||||
|
(c-1) * (col_size + self.spacing) + xoffset,
|
||||||
|
(r-1) * (row_size + self.spacing) + yoffset,
|
||||||
|
col_size,
|
||||||
|
row_size
|
||||||
|
)
|
||||||
|
cr:fill()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return dots
|
||||||
|
end
|
||||||
|
|
||||||
|
return dotgrid
|