mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-28 18:39:31 +02:00
Compare commits
283 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab8fd424d8 | |||
| fd776a0c0a | |||
| 0a957dab79 | |||
| 7c35aca631 | |||
| a2bc3c4292 | |||
| 86d6f88484 | |||
| 4cbc4a2724 | |||
| 39fc4a118f | |||
| ab3c88b071 | |||
| 5efb1f69df | |||
| 4417c0dde4 | |||
| fdfbe202cd | |||
| dd8259ed85 | |||
| 7429aab2aa | |||
| 73ebd9ecb4 | |||
| e5cb040f29 | |||
| 90c55009e0 | |||
| 290e813677 | |||
| 6bbd73c245 | |||
| bdf4d46be8 | |||
| b8d03dedb6 | |||
| dffb641f04 | |||
| f8a8ae8d13 | |||
| c56676eec3 | |||
| 140d0c7c3d | |||
| 72b25cee70 | |||
| 199aca18d1 | |||
| 28d66fef04 | |||
| 984fac8469 | |||
| b940146aec | |||
| 7ff4338475 | |||
| 30947c3ded | |||
| e4c256145b | |||
| 7c18b85f30 | |||
| f2825513c0 | |||
| 1e33fd1e17 | |||
| 0d7b4ac928 | |||
| 34072df760 | |||
| 0fb0601a24 | |||
| 051c37ad29 | |||
| c6f81aa2b8 | |||
| aa35fce12a | |||
| 47e1ca61c3 | |||
| 76a18e6ed6 | |||
| ae229e568f | |||
| 0ed219db34 | |||
| 698bd14c47 | |||
| b9cb86c8e3 | |||
| acc4f4eda7 | |||
| fed81fad1c | |||
| 4236df4281 | |||
| ae289ab869 | |||
| 9197bc7f0d | |||
| f85982c8ea | |||
| b82395d603 | |||
| 37be74746f | |||
| 00a9c844d3 | |||
| 5a8ef54c3b | |||
| 19a917f1d9 | |||
| 9b9ad93a88 | |||
| e03a86b461 | |||
| 4e8e7ecef2 | |||
| 5f42a1442e | |||
| 3c4de12ebf | |||
| 94e04bfbcc | |||
| aa9c1a4829 | |||
| 7438aa04ea | |||
| b364181dd6 | |||
| 2abea4e387 | |||
| 5895d7c97d | |||
| 498d76d803 | |||
| 6aef21ec8f | |||
| d20d46606d | |||
| 46ed22565d | |||
| e1cbaf6a1a | |||
| 6bded49335 | |||
| cb79cd4d5a | |||
| 4f93202864 | |||
| 00b9c7e805 | |||
| 0f5568f4ff | |||
| f097312145 | |||
| 68fa7360ff | |||
| 2b47447f0b | |||
| 6942e54b28 | |||
| df9ca7aefa | |||
| 773688a9e5 | |||
| 5e66e8cf2a | |||
| fde21e5039 | |||
| bc0781e97a | |||
| 7ba567b0bd | |||
| a0372eb24c | |||
| cf34ea047c | |||
| a1789eebff | |||
| 07b74cd2e5 | |||
| 2ff2c56fae | |||
| cca62222ef | |||
| a422cfadc0 | |||
| 8ff5b91a0a | |||
| 8b6d3e6034 | |||
| 08895478a4 | |||
| 9f7a56bc37 | |||
| 49f002ca5b | |||
| 30a288bdb3 | |||
| 11af465bd1 | |||
| a02097f7d7 | |||
| 00b6f97ddd | |||
| 482e88613d | |||
| 831fb2dd82 | |||
| e61ed83bf1 | |||
| 3c6d78537b | |||
| 7e402ed9c8 | |||
| b3a7da8301 | |||
| e28c7565d7 | |||
| 0693713e94 | |||
| 1bf67acde9 | |||
| f1a5d419fb | |||
| e8be41f8e1 | |||
| d853036fb1 | |||
| df1f9b0070 | |||
| 4def213b08 | |||
| 35eb6ed5c9 | |||
| 07178984b1 | |||
| eb83e88267 | |||
| 6c8e8111c6 | |||
| 62e96cde7e | |||
| 4bb53d0190 | |||
| 41af2c1444 | |||
| 43db6bcf63 | |||
| e17bc1ec23 | |||
| c9954c009a | |||
| e68a43edce | |||
| 08a6885873 | |||
| 930d8322d1 | |||
| 2363ab59c4 | |||
| 1394e26a59 | |||
| 940367c790 | |||
| cae48ede1b | |||
| 9535c09a33 | |||
| 194c3d9895 | |||
| a8f613ead1 | |||
| 5d69019f60 | |||
| 648021b0ca | |||
| c30730bedd | |||
| e9b502fa5f | |||
| 3e2340aee7 | |||
| 94c8eef2cb | |||
| 2581c9d562 | |||
| 3aaa4c0372 | |||
| c446a693ea | |||
| 9b0c5d7d50 | |||
| 86ee8132b7 | |||
| 2f3d644234 | |||
| 87dfa7669f | |||
| 64dd1fc2f3 | |||
| fc81143c10 | |||
| 5178a3e638 | |||
| b3127a18c9 | |||
| 15e0b150e9 | |||
| 41dc24e350 | |||
| 8c795c7d0d | |||
| b671c05db9 | |||
| 80e0bcf031 | |||
| 64ab375d1f | |||
| 325f82b9cc | |||
| 59a46844a7 | |||
| 5e21effb15 | |||
| 1e7b9697e1 | |||
| 422ec75ec0 | |||
| c059d90b17 | |||
| 880e0ac65e | |||
| ed4a2f00fe | |||
| 7a1788520b | |||
| e86d7a1020 | |||
| 6670c5bd7d | |||
| 0620f199b2 | |||
| e2457e80aa | |||
| 8ffaf4e3ae | |||
| f9d07d92de | |||
| 2b91c6f99d | |||
| fed3bc981b | |||
| d02331c1e0 | |||
| 5ec72c848f | |||
| 5a6ccd8794 | |||
| 3dc7ec1fe8 | |||
| 414a222d19 | |||
| 783d61999c | |||
| 86ec08aecb | |||
| b7b913b444 | |||
| aa0e1d84e0 | |||
| 94e2e17c60 | |||
| 41f4dc6237 | |||
| d7c0e7caa6 | |||
| d8759cc845 | |||
| 6c6ada4243 | |||
| 95cdd40c77 | |||
| a04d6dfdf6 | |||
| adf1415868 | |||
| b1c6f1b90f | |||
| 5e9f98e56d | |||
| 885205d9e3 | |||
| 385bcd2d87 | |||
| b3b55c36d8 | |||
| 7d6fa4028d | |||
| 0ea8548f37 | |||
| c29148fc77 | |||
| 1eecf89793 | |||
| 5fcf0d0995 | |||
| 66949f6b8f | |||
| 36ba5a4efc | |||
| 68285a70d0 | |||
| f97ad2fd1e | |||
| 1d66cf655d | |||
| 04fa05151a | |||
| 62d986d1c8 | |||
| 730906ebf2 | |||
| bcf5b8b1cb | |||
| 1f14f5899c | |||
| 9732c87d1f | |||
| 032f478d2a | |||
| 71cb1cf295 | |||
| 09a9e086d8 | |||
| e903f95a46 | |||
| 1239f4549a | |||
| 4433e018d9 | |||
| e9ac7d8ddc | |||
| cf51e77d75 | |||
| 095b092e08 | |||
| 4e4eb9a003 | |||
| 1efe489846 | |||
| ea13da3031 | |||
| 47a735d235 | |||
| 84c4708b98 | |||
| 12494d66af | |||
| 97ff571431 | |||
| c0e3af3fad | |||
| bbe2e80650 | |||
| 5bc941d9e2 | |||
| 7f6c061041 | |||
| b8e45b28e1 | |||
| 21555a4148 | |||
| 0f4387800f | |||
| 1095d8fa53 | |||
| 98e2e7196d | |||
| 0a764cfdf3 | |||
| 54e4dfcec0 | |||
| f37588df64 | |||
| 9adf87aaf5 | |||
| 82dccbdeca | |||
| af88851772 | |||
| b3d7d0d2a3 | |||
| b0fcf9d9e7 | |||
| 7bd264fee9 | |||
| 2a841a5a32 | |||
| e97e61c8d2 | |||
| c65018f450 | |||
| 218ff4c1da | |||
| e26c20a29b | |||
| 13751a4b66 | |||
| f4d91b6827 | |||
| 4f780f3f61 | |||
| a626458b8e | |||
| 87c041f8b4 | |||
| ace653e9d6 | |||
| bb913b181d | |||
| bec52f9d60 | |||
| de891782cb | |||
| 5abbd63284 | |||
| 14dabdcee5 | |||
| 5583f1ffe9 | |||
| 6b016a2432 | |||
| cad8cf325d | |||
| 9a0e41429a | |||
| 44ce90bf68 | |||
| 9fe6ef9165 | |||
| 4b2035a0dc | |||
| 21d85d41ef | |||
| 7fd3baca0f | |||
| ce645e7935 | |||
| 9631334088 | |||
| a9bb04c37d | |||
| ddad742023 | |||
| 21c9e572af | |||
| 6b2168b925 |
+2
-1
@@ -1,2 +1,3 @@
|
||||
github: ryan4yin
|
||||
patreon: ryan4yin
|
||||
custom: ["https://buymeacoffee.com/ryan4yin", "https://afdian.net/a/ryan4yin"]
|
||||
custom: ["https://buymeacoffee.com/ryan4yin"]
|
||||
|
||||
@@ -3,3 +3,7 @@ result/
|
||||
.direnv/
|
||||
.DS_Store
|
||||
.pre-commit-config.yaml
|
||||
logs/
|
||||
core*
|
||||
!core/
|
||||
!core.nix
|
||||
|
||||
+22
-1
@@ -9,5 +9,26 @@ binary = false
|
||||
extend-ignore-re = [
|
||||
"iterm2",
|
||||
"iHgEIBYKACAWIQSizQe9ljFEyyclWmtVhZllwnQrSwUCZZ1T9wIdAAAKCRBVhZll", # crypto keys
|
||||
"noice", # noice.nvim
|
||||
"noice", # noice.nvim
|
||||
"crypted-nixos",
|
||||
"daed",
|
||||
|
||||
# catppuccin theme colors
|
||||
"11111b",
|
||||
"1e1e2e",
|
||||
"313244",
|
||||
"414356",
|
||||
"45475a",
|
||||
"585b70",
|
||||
"89b4fa",
|
||||
"94e2d5",
|
||||
"a6adc8",
|
||||
"a6e3a1",
|
||||
"bac2de",
|
||||
"cdd6f4",
|
||||
"f38ba8",
|
||||
"f5c2e7",
|
||||
"f5e0dc",
|
||||
"f9e2af",
|
||||
"fab387",
|
||||
]
|
||||
|
||||
@@ -1,57 +1,98 @@
|
||||
# just is a command runner, Justfile is very similar to Makefile, but simpler.
|
||||
|
||||
# use nushell for shell commands
|
||||
# Use nushell for shell commands
|
||||
# To usage this justfile, you need to enter a shell with just & nushell installed:
|
||||
#
|
||||
# nix shell nixpkgs#just nixpkgs#nushell
|
||||
set shell := ["nu", "-c"]
|
||||
|
||||
utils_nu := absolute_path("utils.nu")
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Common commands(suitable for all machines)
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Remote deployment via colmena
|
||||
col tag:
|
||||
colmena apply --on '@{{tag}}' --verbose --show-trace
|
||||
|
||||
local name mode="default":
|
||||
use utils.nu *; \
|
||||
nixos-switch {{name}} {{mode}}
|
||||
# List all the just commands
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# Run eval tests
|
||||
[group('nix')]
|
||||
test:
|
||||
nix eval .#evalTests --show-trace --print-build-logs --verbose
|
||||
|
||||
# update all the flake inputs
|
||||
# Update all the flake inputs
|
||||
[group('nix')]
|
||||
up:
|
||||
nix flake update
|
||||
|
||||
# Update specific input
|
||||
# Usage: just upp nixpkgs
|
||||
[group('nix')]
|
||||
upp input:
|
||||
nix flake lock --update-input {{input}}
|
||||
nix flake update {{input}}
|
||||
|
||||
# List all generations of the system profile
|
||||
[group('nix')]
|
||||
history:
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
|
||||
# Open a nix shell with the flake
|
||||
[group('nix')]
|
||||
repl:
|
||||
nix repl -f flake:nixpkgs
|
||||
|
||||
# remove all generations older than 7 days
|
||||
# on darwin, you may need to switch to root user to run this command
|
||||
[group('nix')]
|
||||
clean:
|
||||
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||
|
||||
# Garbage collect all unused nix store entries
|
||||
[group('nix')]
|
||||
gc:
|
||||
# garbage collect all unused nix store entries
|
||||
sudo nix store gc --debug
|
||||
sudo nix-collect-garbage --delete-old
|
||||
# garbage collect all unused nix store entries(system-wide)
|
||||
sudo nix-collect-garbage --delete-older-than 7d
|
||||
# garbage collect all unused nix store entries(for the user - home-manager)
|
||||
# https://github.com/NixOS/nix/issues/8508
|
||||
nix-collect-garbage --delete-older-than 7d
|
||||
|
||||
# Remove all reflog entries and prune unreachable objects
|
||||
gitgc:
|
||||
git reflog expire --expire-unreachable=now --all
|
||||
git gc --prune=now
|
||||
# Enter a shell session which has all the necessary tools for this flake
|
||||
[linux]
|
||||
[group('nix')]
|
||||
shell:
|
||||
nix shell nixpkgs#git nixpkgs#neovim nixpkgs#colmena
|
||||
|
||||
# Enter a shell session which has all the necessary tools for this flake
|
||||
[macos]
|
||||
[group('nix')]
|
||||
shell:
|
||||
nix shell nixpkgs#git nixpkgs#neovim
|
||||
|
||||
[group('nix')]
|
||||
fmt:
|
||||
# format the nix files in this repo
|
||||
nix fmt
|
||||
|
||||
# Show all the auto gc roots in the nix store
|
||||
[group('nix')]
|
||||
gcroot:
|
||||
ls -al /nix/var/nix/gcroots/auto/
|
||||
|
||||
# Verify all the store entries
|
||||
# Nix Store can contains corrupted entries if the nix store object has been modified unexpectedly.
|
||||
# This command will verify all the store entries,
|
||||
# and we need to fix the corrupted entries manually via `sudo nix store delete <store-path-1> <store-path-2> ...`
|
||||
[group('nix')]
|
||||
verify-store:
|
||||
nix store verify --all
|
||||
|
||||
# Repair Nix Store Objects
|
||||
[group('nix')]
|
||||
repair-store *paths:
|
||||
nix store repair {{paths}}
|
||||
|
||||
############################################################################
|
||||
#
|
||||
@@ -59,21 +100,18 @@ gitgc:
|
||||
#
|
||||
############################################################################
|
||||
|
||||
i3 mode="default":
|
||||
use utils.nu *; \
|
||||
nixos-switch ai-i3 {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
hypr mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch ai-hyprland {{mode}}
|
||||
|
||||
|
||||
s-i3 mode="default":
|
||||
use utils.nu *; \
|
||||
nixos-switch shoukei-i3 {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
s-hypr mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch shoukei-hyprland {{mode}}
|
||||
|
||||
############################################################################
|
||||
@@ -82,30 +120,43 @@ s-hypr mode="default":
|
||||
#
|
||||
############################################################################
|
||||
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
darwin-set-proxy:
|
||||
sudo python3 scripts/darwin_set_proxy.py
|
||||
sleep 1sec
|
||||
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
darwin-rollback:
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
darwin-rollback
|
||||
|
||||
# Deploy to harmonica(macOS host)
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
ha mode="default":
|
||||
use utils.nu *; \
|
||||
darwin-build "harmonica" {{mode}}; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
darwin-build "harmonica" {{mode}};
|
||||
darwin-switch "harmonica" {{mode}}
|
||||
|
||||
# Depoly to fern(macOS host)
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
fe mode="default": darwin-set-proxy
|
||||
use utils.nu *; \
|
||||
darwin-build "fern" {{mode}}; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
darwin-build "fern" {{mode}};
|
||||
darwin-switch "fern" {{mode}}
|
||||
|
||||
# Reload yabai and skhd(macOS)
|
||||
yabai-reload:
|
||||
launchctl kickstart -k "gui/502/org.nixos.yabai";
|
||||
launchctl kickstart -k "gui/502/org.nixos.skhd";
|
||||
# Reset launchpad to force it to reindex Applications
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
reset-launchpad:
|
||||
defaults write com.apple.dock ResetLaunchPad -bool true
|
||||
killall Dock
|
||||
|
||||
############################################################################
|
||||
#
|
||||
@@ -113,34 +164,67 @@ yabai-reload:
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Remote deployment via colmena
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
col tag:
|
||||
colmena apply --on '@{{tag}}' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
local name mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch {{name}} {{mode}}
|
||||
|
||||
# Build and upload a vm image
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
upload-vm name mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
upload-vm {{name}} {{mode}}
|
||||
|
||||
# Deploy all the KubeVirt nodes(Physical machines running KubeVirt)
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
lab:
|
||||
colmena apply --on '@virt-*' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shoryu:
|
||||
colmena apply --on '@kubevirt-shoryu' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shoryu-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-shoryu {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shushou:
|
||||
colmena apply --on '@kubevirt-shushou' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shushou-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-shushou {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
youko:
|
||||
colmena apply --on '@kubevirt-youko' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
youko-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-youko {{mode}}
|
||||
|
||||
############################################################################
|
||||
@@ -150,31 +234,49 @@ youko-local mode="default":
|
||||
############################################################################
|
||||
|
||||
# Build and upload a vm image
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
upload-idols mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
upload-vm aquamarine {{mode}}
|
||||
upload-vm ruby {{mode}}
|
||||
upload-vm kana {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
aqua:
|
||||
colmena apply --on '@aqua' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
aqua-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch aquamarine {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
ruby:
|
||||
colmena apply --on '@ruby' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
ruby-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch ruby {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
kana:
|
||||
colmena apply --on '@kana' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
kana-local mode="default":
|
||||
use utils.nu *; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kana {{mode}}
|
||||
|
||||
############################################################################
|
||||
@@ -184,88 +286,49 @@ kana-local mode="default":
|
||||
############################################################################
|
||||
|
||||
# Build and upload a vm image
|
||||
upload-k3s mode="default":
|
||||
use utils.nu *; \
|
||||
upload-vm k3s-prod-1-master-1 {{mode}}; \
|
||||
upload-vm k3s-prod-1-master-2 {{mode}}; \
|
||||
upload-vm k3s-prod-1-master-3 {{mode}}; \
|
||||
upload-vm k3s-prod-1-worker-1 {{mode}}; \
|
||||
upload-vm k3s-prod-1-worker-2 {{mode}}; \
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
upload-k3s-prod mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
upload-vm k3s-prod-1-master-1 {{mode}};
|
||||
upload-vm k3s-prod-1-master-2 {{mode}};
|
||||
upload-vm k3s-prod-1-master-3 {{mode}};
|
||||
upload-vm k3s-prod-1-worker-1 {{mode}};
|
||||
upload-vm k3s-prod-1-worker-2 {{mode}};
|
||||
upload-vm k3s-prod-1-worker-3 {{mode}};
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
upload-k3s-test mode="default":
|
||||
use utils.nu *; \
|
||||
upload-vm k3s-test-1-master-1 {{mode}}; \
|
||||
upload-vm k3s-test-1-master-2 {{mode}}; \
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
upload-vm k3s-test-1-master-1 {{mode}};
|
||||
upload-vm k3s-test-1-master-2 {{mode}};
|
||||
upload-vm k3s-test-1-master-3 {{mode}};
|
||||
|
||||
k3s:
|
||||
colmena apply --on '@k3s-*' --verbose --show-trace
|
||||
|
||||
master:
|
||||
colmena apply --on '@k3s-prod-1-master-*' --verbose --show-trace
|
||||
|
||||
worker:
|
||||
colmena apply --on '@k3s-prod-1-worker-*' --verbose --show-trace
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
k3s-prod:
|
||||
colmena apply --on '@k3s-prod-*' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
k3s-test:
|
||||
colmena apply --on '@k3s-test-*' --verbose --show-trace
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# RISC-V related commands
|
||||
# Neovim related commands
|
||||
#
|
||||
############################################################################
|
||||
|
||||
riscv:
|
||||
colmena apply --on '@riscv' --verbose --show-trace
|
||||
|
||||
nozomi:
|
||||
colmena apply --on '@nozomi' --verbose --show-trace
|
||||
|
||||
yukina:
|
||||
colmena apply --on '@yukina' --verbose --show-trace
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Aarch64 related commands
|
||||
#
|
||||
############################################################################
|
||||
|
||||
aarch:
|
||||
colmena apply --on '@aarch' --build-on-target --verbose --show-trace
|
||||
|
||||
suzu:
|
||||
colmena apply --on '@suzu' --build-on-target --verbose --show-trace
|
||||
|
||||
suzu-local mode="default":
|
||||
use utils.nu *; \
|
||||
nixos-switch suzu {{mode}}
|
||||
|
||||
rakushun:
|
||||
colmena apply --on '@rakushun' --build-on-target --verbose --show-trace
|
||||
|
||||
rakushun-local mode="default":
|
||||
use utils.nu *; \
|
||||
nixos-switch rakushun {{mode}}
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Misc, other useful commands
|
||||
#
|
||||
############################################################################
|
||||
|
||||
fmt:
|
||||
# format the nix files in this repo
|
||||
nix fmt
|
||||
|
||||
path:
|
||||
$env.PATH | split row ":"
|
||||
|
||||
[group('neovim')]
|
||||
nvim-test:
|
||||
rm -rf $"($env.HOME)/.config/nvim"
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/tui/editors/neovim/nvim/ $"($env.HOME)/.config/nvim/"
|
||||
|
||||
[group('neovim')]
|
||||
nvim-clean:
|
||||
rm -rf $"($env.HOME)/.config/nvim"
|
||||
|
||||
@@ -273,45 +336,82 @@ nvim-clean:
|
||||
# Emacs related commands
|
||||
# =================================================
|
||||
|
||||
emacs-plist-path := "~/Library/LaunchAgents/org.nix-community.home.emacs.plist"
|
||||
|
||||
reload-emacs-cmd := if os() == "macos" {
|
||||
"launchctl unload " + emacs-plist-path
|
||||
+ "\n"
|
||||
+ "launchctl load " + emacs-plist-path
|
||||
+ "\n"
|
||||
+ "tail -f ~/Library/Logs/emacs-daemon.stderr.log"
|
||||
} else {
|
||||
"systemctl --user restart emacs.service"
|
||||
+ "\n"
|
||||
+ "systemctl --user status emacs.service"
|
||||
}
|
||||
|
||||
[group('emacs')]
|
||||
emacs-test:
|
||||
rm -rf $"($env.HOME)/.config/doom"
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/tui/editors/emacs/doom/ $"($env.HOME)/.config/doom/"
|
||||
doom clean
|
||||
doom sync
|
||||
|
||||
[group('emacs')]
|
||||
emacs-clean:
|
||||
rm -rf $"($env.HOME)/.config/doom/"
|
||||
|
||||
[group('emacs')]
|
||||
emacs-purge:
|
||||
doom purge
|
||||
doom clean
|
||||
doom sync
|
||||
|
||||
[linux]
|
||||
[group('emacs')]
|
||||
emacs-reload:
|
||||
doom sync
|
||||
{{reload-emacs-cmd}}
|
||||
systemctl --user restart emacs.service
|
||||
systemctl --user status emacs.service
|
||||
|
||||
|
||||
emacs-plist-path := "~/Library/LaunchAgents/org.nix-community.home.emacs.plist"
|
||||
|
||||
[macos]
|
||||
[group('emacs')]
|
||||
emacs-reload:
|
||||
doom sync
|
||||
launchctl unload {{emacs-plist-path}}
|
||||
launchctl load {{emacs-plist-path}}
|
||||
tail -f ~/Library/Logs/emacs-daemon.stderr.log
|
||||
|
||||
# =================================================
|
||||
#
|
||||
# Kubernetes related commands
|
||||
# Other useful commands
|
||||
#
|
||||
# =================================================
|
||||
|
||||
[group('common')]
|
||||
path:
|
||||
$env.PATH | split row ":"
|
||||
|
||||
[group('common')]
|
||||
trace-access app *args:
|
||||
strace -f -t -e trace=file {{app}} {{args}} | complete | $in.stderr | lines | find -v -r "(/nix/store|/newroot|/proc)" | parse --regex '"(/.+)"' | sort | uniq
|
||||
|
||||
[linux]
|
||||
[group('common')]
|
||||
penvof pid:
|
||||
sudo cat $"/proc/($pid)/environ" | tr '\0' '\n'
|
||||
|
||||
# Remove all reflog entries and prune unreachable objects
|
||||
[group('git')]
|
||||
ggc:
|
||||
git reflog expire --expire-unreachable=now --all
|
||||
git gc --prune=now
|
||||
|
||||
# Amend the last commit without changing the commit message
|
||||
[group('git')]
|
||||
game:
|
||||
git commit --amend -a --no-edit
|
||||
|
||||
# Delete all failed pods
|
||||
[group('k8s')]
|
||||
del-failed:
|
||||
kubectl delete pod --all-namespaces --field-selector="status.phase==Failed"
|
||||
kubectl delete pod --all-namespaces --field-selector="status.phase==Failed"
|
||||
|
||||
[linux]
|
||||
[group('services')]
|
||||
list-inactive:
|
||||
systemctl list-units -all --state=inactive
|
||||
|
||||
[linux]
|
||||
[group('services')]
|
||||
list-failed:
|
||||
systemctl list-units -all --state=failed
|
||||
|
||||
@@ -8,20 +8,22 @@
|
||||
<a href="https://github.com/ryan4yin/nix-config/stargazers">
|
||||
<img alt="Stargazers" src="https://img.shields.io/github/stars/ryan4yin/nix-config?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||
<a href="https://nixos.org/">
|
||||
<img src="https://img.shields.io/badge/NixOS-23.11-informational.svg?style=for-the-badge&logo=nixos&color=F2CDCD&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||
<img src="https://img.shields.io/badge/NixOS-24.05-informational.svg?style=for-the-badge&logo=nixos&color=F2CDCD&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||
<a href="https://github.com/ryan4yin/nixos-and-flakes-book">
|
||||
<img src="https://img.shields.io/static/v1?label=Nix Flakes&message=learning&style=for-the-badge&logo=nixos&color=DDB6F2&logoColor=D9E0EE&labelColor=302D41"></a>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
> My configuration is becoming more and more complex, and it may be difficult for beginners to read
|
||||
> it. If you are new to NixOS and want to know how I use NixOS, I would recommend you to take a look
|
||||
> at the [ryan4yin/nix-config/releases](https://github.com/ryan4yin/nix-config/releases) first,
|
||||
> **checkout to some simpler older versions**, which will be much easier to understand.
|
||||
> My configuration is becoming more and more complex, and **it will be difficult for beginners to
|
||||
> read**. If you are new to NixOS and want to know how I use NixOS, I would recommend you to take a
|
||||
> look at the [ryan4yin/nix-config/releases](https://github.com/ryan4yin/nix-config/releases) first,
|
||||
> **checkout to some simpler older versions, such as
|
||||
> [i3-kickstarter](https://github.com/ryan4yin/nix-config/tree/i3-kickstarter), which will be much
|
||||
> easier to understand**.
|
||||
|
||||
This repository is home to the nix code that builds my systems:
|
||||
|
||||
1. NixOS Desktops: NixOS with home-manager, i3, hyprland, agenix, etc.
|
||||
1. NixOS Desktops: NixOS with home-manager, hyprland, agenix, etc.
|
||||
2. macOS Desktops: nix-darwin with home-manager, share the same home-manager configuration with
|
||||
NixOS Desktops.
|
||||
3. NixOS Servers: virtual machines running on Proxmox/KubeVirt, with various services, such as
|
||||
@@ -29,6 +31,9 @@ This repository is home to the nix code that builds my systems:
|
||||
|
||||
See [./hosts](./hosts) for details of each host.
|
||||
|
||||
See [./Virtual-Machine.md](./Virtual-Machine.md) for details of how to create & manage KubeVirt's
|
||||
Virtual Machine from this flake.
|
||||
|
||||
## Why NixOS & Flakes?
|
||||
|
||||
Nix allows for easy-to-manage, collaborative, reproducible deployments. This means that once
|
||||
@@ -49,29 +54,29 @@ You don't have to go through the pain I've experienced again! Check out my
|
||||
|
||||
## Components
|
||||
|
||||
| | NixOS(Wayland) | NixOS(Xorg) |
|
||||
| --------------------------- | :------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Window Manager** | [Hyprland][Hyprland] | [i3][i3] |
|
||||
| **Terminal Emulator** | [Zellij][Zellij] + [Kitty][Kitty] | [Zellij][Zellij] + [Kitty][Kitty] |
|
||||
| **Bar** | [Waybar][Waybar] | [polybar][polybar] |
|
||||
| **Application Launcher** | [anyrun][anyrun] | [rofi][rofi] |
|
||||
| **Notification Daemon** | [Mako][Mako] | [Dunst][Dunst] |
|
||||
| **Display Manager** | [GDM][GDM] | [GDM][GDM] |
|
||||
| **Color Scheme** | [Catppuccin][Catppuccin] | [Catppuccin][Catppuccin] |
|
||||
| **network management tool** | [NetworkManager][NetworkManager] | [NetworkManager][NetworkManager] |
|
||||
| **Input method framework** | [Fcitx5][Fcitx5] | [Fcitx5][Fcitx5] |
|
||||
| **System resource monitor** | [Btop][Btop] | [Btop][Btop] |
|
||||
| **File Manager** | [Yazi][Yazi] + [thunar][thunar] | [Yazi][Yazi] + [thunar][thunar] |
|
||||
| **Shell** | [Nushell][Nushell] + [Starship][Starship] | [Nushell][Nushell] + [Starship][Starship] |
|
||||
| **Music Player** | [mpd][mpd], [ncmpcpp][ncmpcpp], [mpc][mpc], [Netease-cloud-music-gtk][netease-cloud-music-gtk] | [Netease-cloud-music-gtk][netease-cloud-music-gtk] |
|
||||
| **Media Player** | [mpv][mpv] | [mpv][mpv] |
|
||||
| **Text Editor** | [Neovim][Neovim] + [DoomEmacs][DoomEmacs] | [Neovim][Neovim] + [DoomEmacs][DoomEmacs] |
|
||||
| **Fonts** | [Nerd fonts][Nerd fonts] | [Nerd fonts][Nerd fonts] |
|
||||
| **Image Viewer** | [imv][imv] | [imv][imv] |
|
||||
| **Screenshot Software** | [flameshot][flameshot] + [grim][grim] | [flameshot][flameshot] |
|
||||
| **Screen Recording** | [OBS][OBS] | [OBS][OBS] |
|
||||
| **Filesystem & Encryption** | tmpfs on `/`, [Btrfs][Btrfs] subvolumes on a [LUKS][LUKS] encrypted partition for persistent, unlock via passphrase | tmpfs on `/`, [Btrfs][Btrfs] subvolumes on a [LUKS][LUKS] encrypted partition for persistent, unlock via passphrase |
|
||||
| **Secure Boot** | [lanzaboote][lanzaboote] | [lanzaboote][lanzaboote] |
|
||||
| | NixOS(Wayland) |
|
||||
| --------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Window Manager** | [Hyprland][Hyprland] |
|
||||
| **Terminal Emulator** | [Zellij][Zellij] + [Kitty][Kitty] |
|
||||
| **Bar** | [Waybar][Waybar] |
|
||||
| **Application Launcher** | [anyrun][anyrun] |
|
||||
| **Notification Daemon** | [Mako][Mako] |
|
||||
| **Display Manager** | [GDM][GDM] |
|
||||
| **Color Scheme** | [Catppuccin][Catppuccin] |
|
||||
| **network management tool** | [NetworkManager][NetworkManager] |
|
||||
| **Input method framework** | [Fcitx5][Fcitx5] |
|
||||
| **System resource monitor** | [Btop][Btop] |
|
||||
| **File Manager** | [Yazi][Yazi] + [thunar][thunar] |
|
||||
| **Shell** | [Nushell][Nushell] + [Starship][Starship] |
|
||||
| **Music Player** | [mpd][mpd], [ncmpcpp][ncmpcpp], [mpc][mpc] |
|
||||
| **Media Player** | [mpv][mpv] |
|
||||
| **Text Editor** | [Neovim][Neovim] + [DoomEmacs][DoomEmacs] |
|
||||
| **Fonts** | [Nerd fonts][Nerd fonts] |
|
||||
| **Image Viewer** | [imv][imv] |
|
||||
| **Screenshot Software** | [flameshot][flameshot] + [grim][grim] |
|
||||
| **Screen Recording** | [OBS][OBS] |
|
||||
| **Filesystem & Encryption** | tmpfs on `/`, [Btrfs][Btrfs] subvolumes on a [LUKS][LUKS] encrypted partition for persistent, unlock via passphrase |
|
||||
| **Secure Boot** | [lanzaboote][lanzaboote] |
|
||||
|
||||
Wallpapers: https://github.com/ryan4yin/wallpapers
|
||||
|
||||
@@ -83,17 +88,13 @@ Wallpapers: https://github.com/ryan4yin/wallpapers
|
||||
|
||||

|
||||
|
||||
## I3 + AstroNvim
|
||||
|
||||
 
|
||||
|
||||
## Neovim
|
||||
|
||||
See [./home/base/desktop/editors/neovim/](./home/base/desktop/editors/neovim/) for details.
|
||||
See [./home/base/tui/editors/neovim/](./home/base/tui/editors/neovim/) for details.
|
||||
|
||||
## Emacs
|
||||
|
||||
See [./home/base/desktop/editors/emacs/](./home/base/desktop/editors/emacs/) for details.
|
||||
See [./home/base/tui/editors/emacs/](./home/base/tui/editors/emacs/) for details.
|
||||
|
||||
## Secrets Management
|
||||
|
||||
@@ -101,8 +102,9 @@ See [./secrets](./secrets) for details.
|
||||
|
||||
## How to Deploy this Flake?
|
||||
|
||||
> :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine
|
||||
> :exclamation: It will not succeed.** This flake contains my hardware configuration(such as
|
||||
<!-- prettier-ignore -->
|
||||
> :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine :exclamation:
|
||||
> It will not succeed.** This flake contains my hardware configuration(such as
|
||||
> [hardware-configuration.nix](hosts/idols-ai/hardware-configuration.nix),
|
||||
> [Nvidia Support](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols-ai/default.nix#L77-L91),
|
||||
> etc.) which is not suitable for your hardwares, and requires my private secrets repository
|
||||
@@ -118,15 +120,12 @@ For NixOS:
|
||||
|
||||
```bash
|
||||
# deploy one of the configuration based on the hostname
|
||||
# sudo nixos-rebuild switch --flake .#ai_i3
|
||||
sudo nixos-rebuild switch --flake .#ai-hyprland
|
||||
|
||||
# deploy via `just`(a command runner with similar syntax to make) & Justfile
|
||||
# just i3 # deploy my pc with i3 window manager
|
||||
just hypr # deploy my pc with hyprland compositor
|
||||
|
||||
# or we can deploy with details
|
||||
# just i3 debug
|
||||
just hypr debug
|
||||
```
|
||||
|
||||
@@ -180,17 +179,12 @@ Other dotfiles that inspired me:
|
||||
- [HeinzDev/Hyprland-dotfiles](https://github.com/HeinzDev/Hyprland-dotfiles): Refer to the waybar
|
||||
configuration here.
|
||||
- [linuxmobile/kaku](https://github.com/linuxmobile/kaku)
|
||||
- I3 Window Manager
|
||||
- [endeavouros-i3wm-setup](https://github.com/endeavouros-team/endeavouros-i3wm-setup): I started
|
||||
using i3 here, and my i3 configuration is also based on it, but made a lot of changes.
|
||||
- [denisse-dev/dotfiles](https://github.com/denisse-dev/dotfiles)
|
||||
- Neovim/AstroNvim
|
||||
- [maxbrunet/dotfiles](https://github.com/maxbrunet/dotfiles): astronvim with nix flakes.
|
||||
- Misc
|
||||
- [1amSimp1e/dots](https://github.com/1amSimp1e/dots)
|
||||
|
||||
[Hyprland]: https://github.com/hyprwm/Hyprland
|
||||
[i3]: https://github.com/i3/i3
|
||||
[Kitty]: https://github.com/kovidgoyal/kitty
|
||||
[Nushell]: https://github.com/nushell/nushell
|
||||
[Starship]: https://github.com/starship/starship
|
||||
|
||||
+6
-2
@@ -1,13 +1,17 @@
|
||||
## How to create & managage KubeVirt's Virtual Machine from this flake?
|
||||
|
||||
Use `aquamarine` as an example, we can create a virtual machine with the following command:
|
||||
Use `aquamarine` as an example, first build and upload the virtual machine's qcow2 image to the file
|
||||
server:
|
||||
|
||||
```shell
|
||||
just upload-vm aquamarine
|
||||
```
|
||||
|
||||
Then create the virtual machine by creating a yaml file at
|
||||
[ryan4yin/k8s-gitops](https://github.com/ryan4yin/k8s-gitops/tree/main/vms)
|
||||
[ryan4yin/k8s-gitops](https://github.com/ryan4yin/k8s-gitops/tree/main/vms), set the
|
||||
`spec.dataVolumeTemplates[0].source.http.url` to the uploaded file's URL, and fluxcd will
|
||||
automatically apply the changes, then a virtual machine named `aquamarine` will be created in the
|
||||
KubeVirt cluster.
|
||||
|
||||
Once the virtual machine `aquamarine` is created, we can deploy updates to it with the following
|
||||
commands:
|
||||
|
||||
Generated
+856
-972
File diff suppressed because it is too large
Load Diff
@@ -12,19 +12,17 @@
|
||||
|
||||
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||
# for more information, see:
|
||||
# https://nixos-and-flakes.thiscute.world/nixos-with-flakes/add-custom-cache-servers
|
||||
# https://nixos-and-flakes.thiscute.world/nix-store/add-binary-cache-servers
|
||||
nixConfig = {
|
||||
# substituers will be appended to the default substituters when fetching packages
|
||||
extra-substituters = [
|
||||
"https://anyrun.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
# "https://nix-gaming.cachix.org"
|
||||
# "https://nixpkgs-wayland.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
# "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
# "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
];
|
||||
};
|
||||
@@ -37,11 +35,11 @@
|
||||
|
||||
# Official NixOS package source, using nixos's unstable branch by default
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
# for macos
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
|
||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
|
||||
nix-darwin = {
|
||||
url = "github:lnl7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
@@ -50,8 +48,8 @@
|
||||
|
||||
# home-manager, used for managing user configuration
|
||||
home-manager = {
|
||||
# url = "github:nix-community/home-manager/release-23.11";
|
||||
url = "github:nix-community/home-manager/master";
|
||||
# url = "github:nix-community/home-manager/release-24.05";
|
||||
|
||||
# The `follows` keyword in inputs is used for inheritance.
|
||||
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
|
||||
@@ -60,17 +58,12 @@
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.3.0";
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
hyprland = {
|
||||
url = "github:hyprwm/Hyprland/v0.38.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# community wayland nixpkgs
|
||||
# nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
# anyrun - a wayland launcher
|
||||
@@ -96,7 +89,7 @@
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
url = "github:nix-community/disko/v1.6.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@@ -108,16 +101,13 @@
|
||||
|
||||
nuenv.url = "github:DeterminateSystems/nuenv";
|
||||
|
||||
daeuniverse.url = "github:daeuniverse/flake.nix";
|
||||
# daeuniverse.url = "github:daeuniverse/flake.nix/exp";
|
||||
|
||||
haumea = {
|
||||
url = "github:nix-community/haumea/v0.2.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
microvm = {
|
||||
url = "github:astro/microvm.nix";
|
||||
nixpak = {
|
||||
url = "github:nixpak/nixpak";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@@ -149,16 +139,7 @@
|
||||
flake = false;
|
||||
};
|
||||
|
||||
nur-ryan4yin = {
|
||||
url = "github:ryan4yin/nur-packages";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# riscv64 SBCs
|
||||
nixos-licheepi4a.url = "github:ryan4yin/nixos-licheepi4a";
|
||||
# nixos-jh7110.url = "github:ryan4yin/nixos-jh7110";
|
||||
|
||||
# aarch64 SBCs
|
||||
nixos-rk3588.url = "github:ryan4yin/nixos-rk3588";
|
||||
nur-ryan4yin.url = "github:ryan4yin/nur-packages";
|
||||
nur-ataraxiasjel.url = "github:AtaraxiaSjel/nur";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Linux Hardening
|
||||
|
||||
> Work in progress.
|
||||
|
||||
## Goal
|
||||
|
||||
- **System Level**: Protect critical files from being accessed by untrusted applications.
|
||||
1. Such as browser cookies, SSH keys, etc.
|
||||
- **Per-App Level**: Prevent untrusted applications(such as closed-source apps) from:
|
||||
1. Accessing files they shouldn't.
|
||||
- Such as a malicious application accessing your browser's cookies, SSH Keys, etc.
|
||||
1. Accessing the network when they don't need to.
|
||||
1. Accessing hardware devices they don't need.
|
||||
|
||||
## Current Status
|
||||
|
||||
1. **System Level**:
|
||||
- [ ] AppArmor
|
||||
- [ ] Kernel & System Hardening
|
||||
1. **Per-App Level**:
|
||||
- Nixpak (Bubblewrap)
|
||||
- [x] QQ
|
||||
- [x] Firefox
|
||||
- [ ] Firejail (risk? not enabled yet)
|
||||
|
||||
## Kernel Hardening
|
||||
|
||||
- NixOS Kernel Config:
|
||||
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/kernel/hardened/config.nix
|
||||
|
||||
## System Hardening
|
||||
|
||||
- NixOS Profile:
|
||||
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/profiles/hardened.nix
|
||||
- Apparmor: [roddhjav/apparmor.d)](https://github.com/roddhjav/apparmor.d)
|
||||
- https://gitlab.com/apparmor/apparmor/-/wikis/Documentation
|
||||
- AppArmor.d is a set of over 1500 AppArmor profiles whose aim is to confine most Linux based
|
||||
applications and processes.
|
||||
- Nix Package:
|
||||
[roddhjav-apparmor-rules](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ro/roddhjav-apparmor-rules/package.nix#L33)
|
||||
- https://github.com/NixOS/nixpkgs/issues/331645
|
||||
- https://github.com/LordGrimmauld/aa-alias-manager
|
||||
- SELinux: too complex, not recommended for personal use.
|
||||
|
||||
## Application Sandboxing
|
||||
|
||||
- [Firejail](https://github.com/netblue30/firejail/tree/master/etc): A SUID security sandbox with
|
||||
hundreds of security profiles for many common applications in the default installation.
|
||||
- https://wiki.nixos.org/wiki/Firejail
|
||||
- Firejail needs SUID to work, which is considered a security risk -
|
||||
[Does firejail improve the security of my system?](https://github.com/netblue30/firejail/discussions/4601)
|
||||
- [Bubblewrap](https://github.com/containers/bubblewrap):
|
||||
[nixpak](https://github.com/nixpak/nixpak), more secure than firejail, but no batteries included.
|
||||
- NixOS's FHSEnv is implemented using bubblewrap by default.
|
||||
- [Systemd/Hardening](https://wiki.nixos.org/wiki/Systemd/Hardening): Systemd also provides some
|
||||
sandboxing features.
|
||||
|
||||
## NOTE
|
||||
|
||||
**Running untrusted code is never safe, kernel hardening & sandboxing cannot change this**.
|
||||
|
||||
If you want to run untrusted code, please use a VM & an isolated network environment, which will
|
||||
provide a much higher level of security.
|
||||
|
||||
## References
|
||||
|
||||
- [Harden your NixOS workstation - dataswamp](https://dataswamp.org/~solene/2022-01-13-nixos-hardened.html)
|
||||
- [Linux Insecurities - Madaidans](https://madaidans-insecurities.github.io/linux.html)
|
||||
- [Sandboxing all programs by default - NixOS Discourse](https://discourse.nixos.org/t/sandboxing-all-programs-by-default/7792)
|
||||
- [在 Firejail 中运行 Steam](https://imbearchild.cyou/archives/2021/11/steam-in-firejail/)
|
||||
- [Firejail - Arch Linux Wiki](https://wiki.archlinux.org/title/Firejail)
|
||||
- [Paranoid NixOS Setup - xeiaso](https://xeiaso.net/blog/paranoid-nixos-2021-07-18/)
|
||||
- [nix-mineral](https://github.com/cynicsketch/nix-mineral): NixOS module for convenient system
|
||||
hardening.
|
||||
- nixpak configs:
|
||||
- https://github.com/pokon548/OysterOS/tree/b97604d89953373d6316286b96f6a964af2c398d/desktop/application
|
||||
- https://github.com/segment-tree/my-nixos/tree/ceb6041f73bd9edcb78a8818b27a28f7c629193b/hm/me/apps/nixpak
|
||||
- https://github.com/Keksgesicht/nixos-config/tree/91cc77d8d6b598da7c4dbed143e0009c2dea6940/packages/nixpak
|
||||
- https://github.com/bluskript/nix-config/blob/7ecb6a7254c1ac4969072f4c4febdc19f8b83b30/pkgs/nixpak/default.nix
|
||||
- firejail configs:
|
||||
- https://github.com/stelcodes/nixos-config/blob/f8967c82a5e5f3d128eb1aaf7498b5f918f719ec/packages/overlay.nix#L261
|
||||
- apparmor configs:
|
||||
- https://github.com/sukhmancs/nixos-configs/blob/7fcf737c506ad843113cd5b94796b49d4d4dfad2/modules/shared/security/apparmor/default.nix#L8
|
||||
- https://github.com/zramctl/dotfiles/blob/4fe177f6984154960942bb47d5a375098ec6ed6a/modules/nixos/security/apparmor.nix#L4
|
||||
- Others:
|
||||
- Directly via `buildFHSUserEnvBubblewrap`:
|
||||
https://github.com/xddxdd/nur-packages/blob/master/pkgs/uncategorized/wechat-uos/default.nix
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.dbus.apparmor = "enabled";
|
||||
security.apparmor = {
|
||||
enable = true;
|
||||
|
||||
# kill process that are not confined but have apparmor profiles enabled
|
||||
killUnconfinedConfinables = true;
|
||||
packages = with pkgs; [
|
||||
apparmor-utils
|
||||
apparmor-profiles
|
||||
];
|
||||
|
||||
# apparmor policies
|
||||
policies = {
|
||||
"default_deny" = {
|
||||
enforce = false;
|
||||
enable = false;
|
||||
profile = ''
|
||||
profile default_deny /** { }
|
||||
'';
|
||||
};
|
||||
|
||||
"sudo" = {
|
||||
enforce = false;
|
||||
enable = false;
|
||||
profile = ''
|
||||
${pkgs.sudo}/bin/sudo {
|
||||
file /** rwlkUx,
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
"nix" = {
|
||||
enforce = false;
|
||||
enable = false;
|
||||
profile = ''
|
||||
${config.nix.package}/bin/nix {
|
||||
unconfined,
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
apparmor-bin-utils
|
||||
apparmor-profiles
|
||||
apparmor-parser
|
||||
libapparmor
|
||||
apparmor-kernel-patches
|
||||
apparmor-pam
|
||||
apparmor-utils
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
{pkgs, ...}: let
|
||||
firejailWrapper = import ./firejailWrapper.nix pkgs;
|
||||
in {
|
||||
programs.firejail.enable = true;
|
||||
|
||||
# Add firejailed Apps into nixsuper, and reference them in home-manager or other nixos modules
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
firejailed = {
|
||||
steam = firejailWrapper {
|
||||
name = "steam-firejailed";
|
||||
executable = "${super.steam}/bin/steam";
|
||||
profile = "${super.firejail}/etc/firejail/steam.profile";
|
||||
};
|
||||
steam-run = firejailWrapper {
|
||||
name = "steam-run-firejailed";
|
||||
executable = "${super.steam}/bin/steam-run";
|
||||
profile = "${super.firejail}/etc/firejail/steam.profile";
|
||||
};
|
||||
|
||||
# firefox = firejailWrapper {
|
||||
# name = "firefox-firejailed";
|
||||
# executable = "${super.lib.getBin super.firefox-wayland}/bin/firefox";
|
||||
# profile = "${super.firejail}/etc/firejail/firefox.profile";
|
||||
# };
|
||||
# chromium = firejailWrapper {
|
||||
# name = "chromium-firejailed";
|
||||
# executable = "${super.lib.getBin super.ungoogled-chromium}/bin/chromium";
|
||||
# profile = "${super.firejail}/etc/firejail/chromium.profile";
|
||||
# };
|
||||
|
||||
mpv = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.mpv}/bin/mpv";
|
||||
profile = "${super.firejail}/etc/firejail/mpv.profile";
|
||||
};
|
||||
imv = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.imv}/bin/imv";
|
||||
profile = "${super.firejail}/etc/firejail/imv.profile";
|
||||
};
|
||||
zathura = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.zathura}/bin/zathura";
|
||||
profile = "${super.firejail}/etc/firejail/zathura.profile";
|
||||
};
|
||||
slack = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.slack}/bin/slack";
|
||||
profile = "${super.firejail}/etc/firejail/slack.profile";
|
||||
};
|
||||
telegram-desktop = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.tdesktop}/bin/telegram-desktop";
|
||||
profile = "${super.firejail}/etc/firejail/telegram-desktop.profile";
|
||||
};
|
||||
brave = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.brave}/bin/brave";
|
||||
profile = "${super.firejail}/etc/firejail/brave.profile";
|
||||
};
|
||||
qutebrowser = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.qutebrowser}/bin/qutebrowser";
|
||||
profile = "${super.firejail}/etc/firejail/qutebrowser.profile";
|
||||
};
|
||||
thunar = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.xfce.thunar}/bin/thunar";
|
||||
profile = "${super.firejail}/etc/firejail/thunar.profile";
|
||||
};
|
||||
vscodium = firejailWrapper {
|
||||
executable = "${super.lib.getBin super.vscodium}/bin/vscodium";
|
||||
profile = "${super.firejail}/etc/firejail/vscodium.profile";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# https://www.reddit.com/r/NixOS/comments/1b56jdx/simple_nix_function_for_wrapping_executables_with/
|
||||
pkgs: {
|
||||
name ? "firejail-wrapper",
|
||||
executable,
|
||||
desktop ? null,
|
||||
profile ? null,
|
||||
extraArgs ? [],
|
||||
}:
|
||||
pkgs.runCommand name
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
meta.priority = -1; # take precedence over non-firejailed versions
|
||||
}
|
||||
(
|
||||
let
|
||||
firejailArgs = pkgs.lib.concatStringsSep " " (
|
||||
extraArgs ++ (pkgs.lib.optional (profile != null) "--profile=${toString profile}")
|
||||
);
|
||||
in
|
||||
''
|
||||
command_path="$out/bin/$(basename ${executable})-jailed"
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/applications
|
||||
cat <<'_EOF' >"$command_path"
|
||||
#! ${pkgs.runtimeShell} -e
|
||||
exec /run/wrappers/bin/firejail ${firejailArgs} -- ${toString executable} "\$@"
|
||||
_EOF
|
||||
chmod 0755 "$command_path"
|
||||
''
|
||||
+ pkgs.lib.optionalString (desktop != null) ''
|
||||
substitute ${desktop} $out/share/applications/$(basename ${desktop}) \
|
||||
--replace ${executable} "$command_path"
|
||||
''
|
||||
)
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
pkgs,
|
||||
nixpak,
|
||||
...
|
||||
}: let
|
||||
callArgs = {
|
||||
mkNixPak = nixpak.lib.nixpak {
|
||||
inherit (pkgs) lib;
|
||||
inherit pkgs;
|
||||
};
|
||||
safeBind = sloth: realdir: mapdir: [
|
||||
(sloth.mkdir (sloth.concat' sloth.appDataDir realdir))
|
||||
(sloth.concat' sloth.homeDir mapdir)
|
||||
];
|
||||
};
|
||||
wrapper = _pkgs: path: (_pkgs.callPackage path callArgs).config.script;
|
||||
in {
|
||||
# Add nixpaked Apps into nixpkgs, and reference them in home-manager or other nixos modules
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
nixpaks = {
|
||||
qq = wrapper super ./qq.nix;
|
||||
qq-desktop-item = super.callPackage ./qq-desktop-item.nix {};
|
||||
|
||||
wechat-uos = wrapper super ./wechat-uos.nix;
|
||||
wechat-uos-desktop-item = super.callPackage ./wechat-uos-desktop-item.nix {};
|
||||
|
||||
firefox = wrapper super ./firefox.nix;
|
||||
firefox-desktop-item = super.callPackage ./firefox-desktop-item.nix {};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{makeDesktopItem}:
|
||||
makeDesktopItem {
|
||||
name = "firefox";
|
||||
desktopName = "firefox";
|
||||
exec = "firefox %U";
|
||||
terminal = false;
|
||||
icon = "firefox";
|
||||
type = "Application";
|
||||
categories = ["Network"];
|
||||
comment = "firefox boxed";
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
# Refer:
|
||||
# - Flatpak manifest's docs:
|
||||
# - https://docs.flatpak.org/en/latest/manifests.html
|
||||
# - https://docs.flatpak.org/en/latest/sandbox-permissions.html
|
||||
# - Firefox's flatpak manifest: https://hg.mozilla.org/mozilla-central/file/tip/taskcluster/docker/firefox-flatpak/runme.sh#l151
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
mkNixPak,
|
||||
...
|
||||
}:
|
||||
mkNixPak {
|
||||
config = {
|
||||
config,
|
||||
sloth,
|
||||
...
|
||||
}: {
|
||||
app = {
|
||||
package = pkgs.firefox-wayland;
|
||||
binPath = "bin/firefox";
|
||||
};
|
||||
flatpak.appId = "org.mozilla.firefox";
|
||||
|
||||
imports = [
|
||||
./modules/gui-base.nix
|
||||
./modules/network.nix
|
||||
];
|
||||
|
||||
# list all dbus services:
|
||||
# ls -al /run/current-system/sw/share/dbus-1/services/
|
||||
# ls -al /etc/profiles/per-user/ryan/share/dbus-1/services/
|
||||
dbus.policies = {
|
||||
"org.mozilla.firefox.*" = "own"; # firefox
|
||||
"org.mozilla.firefox_beta.*" = "own"; # firefox beta
|
||||
"org.mpris.MediaPlayer2.firefox.*" = "own";
|
||||
"org.freedesktop.NetworkManager" = "talk";
|
||||
};
|
||||
|
||||
bubblewrap = {
|
||||
# To trace all the home files QQ accesses, you can use the following nushell command:
|
||||
# just trace-access firefox
|
||||
# See the Justfile in the root of this repository for more information.
|
||||
bind.rw = [
|
||||
# given the read write permission to the following directories.
|
||||
# NOTE: sloth.mkdir is used to create the directory if it does not exist!
|
||||
(sloth.mkdir (sloth.concat' sloth.homeDir "/.mozilla"))
|
||||
|
||||
sloth.xdgDownloadDir
|
||||
# ================ for externsions ===============================
|
||||
# required by https://github.com/browserpass/browserpass-extension
|
||||
(sloth.concat' sloth.homeDir "/.local/share/password-store") # pass
|
||||
];
|
||||
bind.ro = [
|
||||
# To actually make Firefox run
|
||||
"/sys/bus/pci"
|
||||
["${config.app.package}/lib/firefox" "/app/etc/firefox"]
|
||||
|
||||
# Unsure
|
||||
(sloth.concat' sloth.xdgConfigHome "/dconf")
|
||||
];
|
||||
|
||||
sockets = {
|
||||
x11 = false;
|
||||
wayland = true;
|
||||
pipewire = true;
|
||||
};
|
||||
bind.dev = [
|
||||
"/dev/shm" # Shared Memory
|
||||
];
|
||||
tmpfs = [
|
||||
"/tmp"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
# https://github.com/nixpak/pkgs/blob/master/pkgs/modules/gui-base.nix
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
sloth,
|
||||
...
|
||||
}: let
|
||||
envSuffix = envKey: suffix: sloth.concat' (sloth.env envKey) suffix;
|
||||
# cursor & icon's theme should be the same as the host's one.
|
||||
cursorTheme = pkgs.bibata-cursors;
|
||||
iconTheme = pkgs.papirus-icon-theme;
|
||||
in {
|
||||
config = {
|
||||
dbus.policies = {
|
||||
"${config.flatpak.appId}" = "own";
|
||||
"org.freedesktop.DBus" = "talk";
|
||||
"org.gtk.vfs.*" = "talk";
|
||||
"org.gtk.vfs" = "talk";
|
||||
"ca.desrt.dconf" = "talk";
|
||||
"org.freedesktop.portal.*" = "talk";
|
||||
"org.a11y.Bus" = "talk";
|
||||
};
|
||||
# https://github.com/nixpak/nixpak/blob/master/modules/gpu.nix
|
||||
# 1. bind readonly - /run/opengl-driver
|
||||
# 2. bind device - /dev/dri
|
||||
gpu = {
|
||||
enable = lib.mkDefault true;
|
||||
provider = "nixos";
|
||||
bundlePackage = pkgs.mesa.drivers; # for amd & intel
|
||||
};
|
||||
# https://github.com/nixpak/nixpak/blob/master/modules/gui/fonts.nix
|
||||
# it works not well, bind system's /etc/fonts directly instead
|
||||
fonts.enable = false;
|
||||
# https://github.com/nixpak/nixpak/blob/master/modules/locale.nix
|
||||
locale.enable = true;
|
||||
bubblewrap = {
|
||||
network = lib.mkDefault false;
|
||||
bind.rw = [
|
||||
[
|
||||
(envSuffix "HOME" "/.var/app/${config.flatpak.appId}/cache")
|
||||
sloth.xdgCacheHome
|
||||
]
|
||||
(sloth.concat' sloth.xdgCacheHome "/fontconfig")
|
||||
(sloth.concat' sloth.xdgCacheHome "/mesa_shader_cache")
|
||||
|
||||
(sloth.concat [
|
||||
(sloth.env "XDG_RUNTIME_DIR")
|
||||
"/"
|
||||
(sloth.envOr "WAYLAND_DISPLAY" "no")
|
||||
])
|
||||
|
||||
(envSuffix "XDG_RUNTIME_DIR" "/at-spi/bus")
|
||||
(envSuffix "XDG_RUNTIME_DIR" "/gvfsd")
|
||||
(envSuffix "XDG_RUNTIME_DIR" "/pulse")
|
||||
|
||||
"/run/dbus"
|
||||
];
|
||||
bind.ro = [
|
||||
(envSuffix "XDG_RUNTIME_DIR" "/doc")
|
||||
(sloth.concat' sloth.xdgConfigHome "/gtk-2.0")
|
||||
(sloth.concat' sloth.xdgConfigHome "/gtk-3.0")
|
||||
(sloth.concat' sloth.xdgConfigHome "/gtk-4.0")
|
||||
(sloth.concat' sloth.xdgConfigHome "/fontconfig")
|
||||
|
||||
"/etc/fonts" # for fontconfig
|
||||
"/etc/machine-id"
|
||||
"/etc/localtime"
|
||||
|
||||
# Fix: libEGL warning: egl: failed to create dri2 screen
|
||||
"/etc/egl"
|
||||
"/etc/static/egl"
|
||||
];
|
||||
bind.dev = [
|
||||
# seems required when using nvidia as primary gpu
|
||||
"/dev/nvidia0"
|
||||
"/dev/nvidiactl"
|
||||
"/dev/nvidia-modeset"
|
||||
"/dev/nvidia-uvm"
|
||||
];
|
||||
|
||||
env = {
|
||||
XDG_DATA_DIRS = lib.mkForce (lib.makeSearchPath "share" [
|
||||
iconTheme
|
||||
cursorTheme
|
||||
pkgs.shared-mime-info
|
||||
]);
|
||||
XCURSOR_PATH = lib.mkForce (lib.concatStringsSep ":" [
|
||||
"${cursorTheme}/share/icons"
|
||||
"${cursorTheme}/share/pixmaps"
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# https://github.com/nixpak/pkgs/blob/master/pkgs/modules/network.nix
|
||||
{
|
||||
etc.sslCertificates.enable = true;
|
||||
bubblewrap = {
|
||||
bind.ro = ["/etc/resolv.conf"];
|
||||
network = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
makeDesktopItem,
|
||||
qq,
|
||||
}:
|
||||
makeDesktopItem {
|
||||
name = "qq";
|
||||
desktopName = "QQ";
|
||||
exec = "qq %U";
|
||||
terminal = false;
|
||||
# To find the icon name(nushell):
|
||||
# let p = NIXPKGS_ALLOW_UNFREE=1 nix eval --impure nixpkgs#qq.outPath | str trim --char '"'
|
||||
# tree $"($p)/share/icons"
|
||||
icon = "${qq}/share/icons/hicolor/512x512/apps/qq.png";
|
||||
type = "Application";
|
||||
categories = ["Network"];
|
||||
comment = "QQ boxed";
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
# Refer:
|
||||
# - Flatpak manifest's docs:
|
||||
# - https://docs.flatpak.org/en/latest/manifests.html
|
||||
# - https://docs.flatpak.org/en/latest/sandbox-permissions.html
|
||||
# - QQ's flatpak manifest: https://github.com/flathub/com.qq.QQ/blob/master/com.qq.QQ.yaml
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
mkNixPak,
|
||||
...
|
||||
}:
|
||||
mkNixPak {
|
||||
config = {sloth, ...}: {
|
||||
app = {
|
||||
package = pkgs.qq.override {
|
||||
# fix fcitx5 input method
|
||||
commandLineArgs = lib.concatStringsSep " " ["--enable-wayland-ime"];
|
||||
};
|
||||
binPath = "bin/qq";
|
||||
};
|
||||
flatpak.appId = "com.tencent.qq";
|
||||
|
||||
imports = [
|
||||
./modules/gui-base.nix
|
||||
./modules/network.nix
|
||||
];
|
||||
|
||||
# list all dbus services:
|
||||
# ls -al /run/current-system/sw/share/dbus-1/services/
|
||||
# ls -al /etc/profiles/per-user/ryan/share/dbus-1/services/
|
||||
dbus.policies = {
|
||||
"org.gnome.Shell.Screencast" = "talk";
|
||||
"org.freedesktop.Notifications" = "talk";
|
||||
"org.kde.StatusNotifierWatcher" = "talk";
|
||||
};
|
||||
bubblewrap = {
|
||||
# To trace all the home files QQ accesses, you can use the following nushell command:
|
||||
# just trace-access qq
|
||||
# See the Justfile in the root of this repository for more information.
|
||||
bind.rw = [
|
||||
# given the read write permission to the following directories.
|
||||
# NOTE: sloth.mkdir is used to create the directory if it does not exist!
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgConfigHome "/QQ"]))
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgDownloadDir "/QQ"]))
|
||||
];
|
||||
sockets = {
|
||||
x11 = false;
|
||||
wayland = true;
|
||||
pipewire = true;
|
||||
};
|
||||
bind.dev = [
|
||||
"/dev/shm" # Shared Memory
|
||||
];
|
||||
tmpfs = [
|
||||
"/tmp"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
makeDesktopItem,
|
||||
wechat-uos,
|
||||
}:
|
||||
makeDesktopItem {
|
||||
name = "wechat";
|
||||
desktopName = "WeChat";
|
||||
exec = "wechat-uos %U";
|
||||
terminal = false;
|
||||
# To find the icon name(nushell):
|
||||
# let p = NIXPKGS_ALLOW_UNFREE=1 nix eval --impure nixpkgs#wechat-uos.outPath | str trim --char '"'
|
||||
# tree $"($p)/share/icons"
|
||||
icon = "${wechat-uos}/share/icons/hicolor/256x256/apps/com.tencent.wechat.png";
|
||||
type = "Application";
|
||||
categories = ["Network"];
|
||||
comment = "Wechat boxed";
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
# TODO: wechat-uos is running in FHS sandbox by default, it's problematic
|
||||
# to wrap it again via flatpak. We need to find a way to fix it.
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/we/wechat-uos/package.nix
|
||||
# Refer:
|
||||
# - Flatpak manifest's docs:
|
||||
# - https://docs.flatpak.org/en/latest/manifests.html
|
||||
# - https://docs.flatpak.org/en/latest/sandbox-permissions.html
|
||||
# - wechat-uos's flatpak manifest: https://github.com/flathub/com.tencent.WeChat/blob/master/com.tencent.WeChat.yaml
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
mkNixPak,
|
||||
...
|
||||
}:
|
||||
mkNixPak {
|
||||
config = {sloth, ...}: {
|
||||
app = {
|
||||
package = pkgs.wechat-uos;
|
||||
binPath = "bin/wechat-uos";
|
||||
};
|
||||
flatpak.appId = "com.tencent.WeChat";
|
||||
|
||||
imports = [
|
||||
./modules/gui-base.nix
|
||||
./modules/network.nix
|
||||
];
|
||||
|
||||
# list all dbus services:
|
||||
# ls -al /run/current-system/sw/share/dbus-1/services/
|
||||
# ls -al /etc/profiles/per-user/ryan/share/dbus-1/services/
|
||||
dbus.policies = {
|
||||
"org.gnome.Shell.Screencast" = "talk";
|
||||
# System tray icon
|
||||
"org.freedesktop.Notifications" = "talk";
|
||||
"org.kde.StatusNotifierWatcher" = "talk";
|
||||
# File Manager
|
||||
"org.freedesktop.FileManager1" = "talk";
|
||||
# Uses legacy StatusNotifier implementation
|
||||
"org.kde.*" = "own";
|
||||
};
|
||||
bubblewrap = {
|
||||
# To trace all the home files QQ accesses, you can use the following nushell command:
|
||||
# just trace-access wechat-uos
|
||||
# See the Justfile in the root of this repository for more information.
|
||||
bind.rw = [
|
||||
# given the read write permission to the following directories.
|
||||
# NOTE: sloth.mkdir is used to create the directory if it does not exist!
|
||||
(sloth.mkdir (sloth.concat [sloth.homeDir "/.xwechat"]))
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgDocumentsDir "/xwechat_files"]))
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgDocumentsDir "/WeChat_Data/"]))
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgDownloadDir "/WeChat"]))
|
||||
];
|
||||
sockets = {
|
||||
x11 = false;
|
||||
wayland = true;
|
||||
pipewire = true;
|
||||
};
|
||||
bind.dev = [
|
||||
"/dev/shm" # Shared Memory
|
||||
];
|
||||
tmpfs = [
|
||||
"/tmp"
|
||||
];
|
||||
|
||||
env = {
|
||||
# Hidpi scale
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR" = "1";
|
||||
# Only supports xcb
|
||||
"QT_QPA_PLATFORM" = "kcb";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{modulesPath, ...}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/hardened.nix")
|
||||
];
|
||||
|
||||
# disable coredump that could be exploited later
|
||||
# and also slow down the system when something crash
|
||||
systemd.coredump.enable = false;
|
||||
}
|
||||
@@ -5,17 +5,23 @@
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
skopeo
|
||||
docker-compose
|
||||
dive # explore docker layers
|
||||
lazydocker # Docker terminal UI.
|
||||
skopeo # copy/sync images between registries and local storage
|
||||
go-containerregistry # provides `crane` & `gcrane`, it's similar to skopeo
|
||||
|
||||
kubectl
|
||||
kubectx
|
||||
kubebuilder
|
||||
istioctl
|
||||
clusterctl # for kubernetes cluster-api
|
||||
kubevirt # virtctl
|
||||
kubernetes-helm
|
||||
fluxcd
|
||||
argocd
|
||||
|
||||
ko # build go project to container image
|
||||
];
|
||||
|
||||
programs = {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
gnupg
|
||||
gnumake
|
||||
|
||||
# Morden cli tools, replacement of grep/sed/...
|
||||
# Modern cli tools, replacement of grep/sed/...
|
||||
|
||||
# Interactively filter its input using fuzzy searching, not limit to filenames.
|
||||
fzf
|
||||
@@ -62,7 +62,7 @@
|
||||
# do not enable aliases in nushell!
|
||||
enableNushellIntegration = false;
|
||||
git = true;
|
||||
icons = true;
|
||||
icons = "auto";
|
||||
};
|
||||
|
||||
# a cat(1) clone with syntax highlighting and Git integration.
|
||||
@@ -134,7 +134,7 @@
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = false;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
includes = [
|
||||
{
|
||||
# use diffrent email & name for work
|
||||
# use different email & name for work
|
||||
path = "~/work/.gitconfig";
|
||||
condition = "gitdir:~/work/";
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
trim.bases = "develop,master,main"; # for git-trim
|
||||
push.autoSetupRemote = true;
|
||||
pull.rebase = true;
|
||||
|
||||
|
||||
@@ -109,12 +109,38 @@ $env.config = {
|
||||
vi_insert: block # block, underscore, line , blink_block, blink_underscore, blink_line (block is the default)
|
||||
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
|
||||
}
|
||||
use_grid_icons: true
|
||||
footer_mode: "25" # always, never, number_of_rows, auto
|
||||
footer_mode: "auto" # always, never, number_of_rows, auto
|
||||
float_precision: 2 # the precision for displaying floats in tables
|
||||
# buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||
edit_mode: emacs # emacs, vi
|
||||
shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue
|
||||
shell_integration: {
|
||||
# osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
|
||||
osc2: true
|
||||
# osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
|
||||
osc7: true
|
||||
# osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
|
||||
osc8: true
|
||||
# osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
|
||||
osc9_9: false
|
||||
# osc133 is several escapes invented by Final Term which include the supported ones below.
|
||||
# 133;A - Mark prompt start
|
||||
# 133;B - Mark prompt end
|
||||
# 133;C - Mark pre-execution
|
||||
# 133;D;exit - Mark execution finished with exit code
|
||||
# This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
|
||||
osc133: true
|
||||
# osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
|
||||
# 633;A - Mark prompt start
|
||||
# 633;B - Mark prompt end
|
||||
# 633;C - Mark pre-execution
|
||||
# 633;D;exit - Mark execution finished with exit code
|
||||
# 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce
|
||||
# 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal
|
||||
# and also helps with the run recent menu in vscode
|
||||
osc633: true
|
||||
# reset_application_mode is escape \x1b[?1l and was added to help ssh work better
|
||||
reset_application_mode: true
|
||||
}
|
||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||
}
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: let
|
||||
shellAliases = {
|
||||
k = "kubectl";
|
||||
|
||||
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
|
||||
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
|
||||
};
|
||||
|
||||
localBin = "${config.home.homeDirectory}/.local/bin";
|
||||
goBin = "${config.home.homeDirectory}/go/bin";
|
||||
rustBin = "${config.home.homeDirectory}/.cargo/bin";
|
||||
in {
|
||||
# only works in bash/zsh, not nushell
|
||||
home.shellAliases = shellAliases;
|
||||
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.nushell;
|
||||
configFile.source = ./config.nu;
|
||||
inherit shellAliases;
|
||||
};
|
||||
@@ -19,7 +28,7 @@ in {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
bashrcExtra = ''
|
||||
export PATH="$HOME/.local/bin:$HOME/go/bin:$PATH"
|
||||
export PATH="$PATH:${localBin}:${goBin}:${rustBin}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
package = pkgs-unstable.yazi;
|
||||
# Changing working directory when exiting Yazi
|
||||
enableBashIntegration = true;
|
||||
# TODO: nushellIntegration is broken on release-23.11, wait for master's fix to be released
|
||||
enableNushellIntegration = false;
|
||||
enableNushellIntegration = true;
|
||||
settings = {
|
||||
manager = {
|
||||
show_hidden = true;
|
||||
sort_dir_first = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."yazi/theme.toml".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-yazi}/mocha.toml";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# db related
|
||||
dbeaver
|
||||
|
||||
mitmproxy # http/https proxy tool
|
||||
insomnia # REST client
|
||||
wireshark # network analyzer
|
||||
|
||||
# IDEs
|
||||
jetbrains.idea-community
|
||||
];
|
||||
}
|
||||
|
||||
@@ -13,13 +13,11 @@ My current terminal emulators are:
|
||||
1. kitty: My main terminal emulator.
|
||||
1. to select/copy a large mount of text, We should do some tricks via kitty's `scrollback_pager`
|
||||
with neovim, it's really painful: <https://github.com/kovidgoyal/kitty/issues/719>
|
||||
2. wezterm: My secondary terminal emulator.
|
||||
1. its search ability is very basic, and it's not easy to use.
|
||||
1. its scrollback buffer's copy mode is very like vim, which is nice, but zellij's even better,
|
||||
it can use neovim as its default scrollback buffer's editor without any pain!
|
||||
3. foot: a fast, lightweight and minimalistic Wayland terminal emulator.
|
||||
2. foot: A fast, lightweight and minimalistic Wayland terminal emulator.
|
||||
1. foot only do the things a terminal emulator should do, no more, no less.
|
||||
1. It's really suitable for tiling window manager or zellij users!
|
||||
3. alacritty: A cross-platform, GPU-accelerated terminal emulator.
|
||||
1. alacritty is really fast, I use it as a backup terminal emulator on all my desktops.
|
||||
|
||||
## 'xterm-kitty': unknown terminal type when `ssh` into a remote host or `sudo xxx`
|
||||
|
||||
@@ -54,7 +52,7 @@ Error opening terminal: xterm-kitty.
|
||||
|
||||
NixOS preserve the `TERMINFO` and `TERMINFO_DIRS` environment variables, for `root` and the `wheel`
|
||||
group:
|
||||
[nixpkgs/nixos/modules/config/terminfo.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/config/terminfo.nix#L18)
|
||||
[nixpkgs/nixos/modules/config/terminfo.nix](https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/config/terminfo.nix#L18)
|
||||
|
||||
For nix-darwin, take a look at <https://github.com/LnL7/nix-darwin/wiki/Terminfo-issues>
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
[colors.primary]
|
||||
background = "#1e1e2e"
|
||||
foreground = "#cdd6f4"
|
||||
dim_foreground = "#7f849c"
|
||||
bright_foreground = "#cdd6f4"
|
||||
|
||||
[colors.cursor]
|
||||
text = "#1e1e2e"
|
||||
cursor = "#f5e0dc"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = "#1e1e2e"
|
||||
cursor = "#b4befe"
|
||||
|
||||
[colors.search.matches]
|
||||
foreground = "#1e1e2e"
|
||||
background = "#a6adc8"
|
||||
|
||||
[colors.search.focused_match]
|
||||
foreground = "#1e1e2e"
|
||||
background = "#a6e3a1"
|
||||
|
||||
[colors.footer_bar]
|
||||
foreground = "#1e1e2e"
|
||||
background = "#a6adc8"
|
||||
|
||||
[colors.hints.start]
|
||||
foreground = "#1e1e2e"
|
||||
background = "#f9e2af"
|
||||
|
||||
[colors.hints.end]
|
||||
foreground = "#1e1e2e"
|
||||
background = "#a6adc8"
|
||||
|
||||
[colors.selection]
|
||||
text = "#1e1e2e"
|
||||
background = "#f5e0dc"
|
||||
|
||||
[colors.normal]
|
||||
black = "#45475a"
|
||||
red = "#f38ba8"
|
||||
green = "#a6e3a1"
|
||||
yellow = "#f9e2af"
|
||||
blue = "#89b4fa"
|
||||
magenta = "#f5c2e7"
|
||||
cyan = "#94e2d5"
|
||||
white = "#bac2de"
|
||||
|
||||
[colors.bright]
|
||||
black = "#585b70"
|
||||
red = "#f38ba8"
|
||||
green = "#a6e3a1"
|
||||
yellow = "#f9e2af"
|
||||
blue = "#89b4fa"
|
||||
magenta = "#f5c2e7"
|
||||
cyan = "#94e2d5"
|
||||
white = "#a6adc8"
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = "#fab387"
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = "#f5e0dc"
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}:
|
||||
###########################################################
|
||||
#
|
||||
# Alacritty Configuration
|
||||
#
|
||||
# Useful Hot Keys for macOS:
|
||||
# 1. Multi-Window: `command + N`
|
||||
# 2. Increase Font Size: `command + =` | `command + +`
|
||||
# 3. Decrease Font Size: `command + -` | `command + _`
|
||||
# 4. Search Text: `command + F`
|
||||
# 5. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||
#
|
||||
# Useful Hot Keys for Linux:
|
||||
# 1. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +`
|
||||
# 2. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _`
|
||||
# 3. Search Text: `ctrl + shift + N`
|
||||
# 4. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||
#
|
||||
# Note: Alacritty do not have support for Tabs, and any graphic protocol.
|
||||
#
|
||||
###########################################################
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.alacritty;
|
||||
# https://alacritty.org/config-alacritty.html
|
||||
settings = {
|
||||
general.import = [
|
||||
./catppuccin-mocha.toml
|
||||
];
|
||||
window = {
|
||||
opacity = 0.93;
|
||||
startup_mode = "Maximized"; # Maximized window
|
||||
dynamic_title = true;
|
||||
option_as_alt = "Both"; # Option key acts as Alt on macOS
|
||||
};
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
};
|
||||
font = {
|
||||
bold = {family = "JetBrainsMono Nerd Font";};
|
||||
italic = {family = "JetBrainsMono Nerd Font";};
|
||||
normal = {family = "JetBrainsMono Nerd Font";};
|
||||
bold_italic = {family = "JetBrainsMono Nerd Font";};
|
||||
size =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then 14
|
||||
else 13;
|
||||
};
|
||||
terminal = {
|
||||
# Spawn a nushell in login mode via `bash`
|
||||
shell = {
|
||||
program = "${pkgs.bash}/bin/bash";
|
||||
args = ["--login" "-c" "nu --login --interactive"];
|
||||
};
|
||||
# Controls the ability to write to the system clipboard with the OSC 52 escape sequence.
|
||||
# It's used by zellij to copy text to the system clipboard.
|
||||
osc52 = "CopyPaste";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{pkgs, ...}: {
|
||||
programs.foot = {
|
||||
# foot is designed only for Linux
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
# https://man.archlinux.org/man/foot.ini.5
|
||||
settings = {
|
||||
main = {
|
||||
term = "foot"; # or "xterm-256color" for maximum compatibility
|
||||
font = "JetBrainsMono Nerd Font:size=14";
|
||||
dpi-aware = "yes";
|
||||
|
||||
# Spawn a nushell in login mode via `bash`
|
||||
shell = "${pkgs.bash}/bin/bash --login -c 'nu --login --interactive'";
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
# https://github.com/catppuccin/foot/blob/main/themes/catppuccin-mocha.ini
|
||||
cursor = {
|
||||
color = "11111b f5e0dc";
|
||||
};
|
||||
colors = {
|
||||
alpha = "0.93"; # background opacity
|
||||
|
||||
foreground = "cdd6f4";
|
||||
background = "1e1e2e";
|
||||
|
||||
regular0 = "45475a";
|
||||
regular1 = "f38ba8";
|
||||
regular2 = "a6e3a1";
|
||||
regular3 = "f9e2af";
|
||||
regular4 = "89b4fa";
|
||||
regular5 = "f5c2e7";
|
||||
regular6 = "94e2d5";
|
||||
regular7 = "bac2de";
|
||||
|
||||
bright0 = "585b70";
|
||||
bright1 = "f38ba8";
|
||||
bright2 = "a6e3a1";
|
||||
bright3 = "f9e2af";
|
||||
bright4 = "89b4fa";
|
||||
bright5 = "f5c2e7";
|
||||
bright6 = "94e2d5";
|
||||
bright7 = "a6adc8";
|
||||
|
||||
"16" = "fab387";
|
||||
"17" = "f5e0dc";
|
||||
|
||||
"selection-foreground" = "cdd6f4";
|
||||
"selection-background" = "414356";
|
||||
|
||||
"search-box-no-match" = "11111b f38ba8";
|
||||
"search-box-match" = "cdd6f4 313244";
|
||||
|
||||
"jump-labels" = "11111b fab387";
|
||||
urls = "89b4fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
# kitty has catppuccin theme built-in,
|
||||
# all the built-in themes are packaged into an extra package named `kitty-themes`
|
||||
# and it's installed by home-manager if `theme` is specified.
|
||||
theme = "Catppuccin-Mocha";
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
# use different font size on macOS
|
||||
@@ -29,7 +29,7 @@
|
||||
else 13;
|
||||
};
|
||||
|
||||
# consistent with wezterm
|
||||
# consistent with other terminal emulators
|
||||
keybindings = {
|
||||
"ctrl+shift+m" = "toggle_maximized";
|
||||
"ctrl+shift+f" = "show_scrollback"; # search in the current window
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
###########################################################
|
||||
#
|
||||
# Wezterm Configuration
|
||||
#
|
||||
# Useful Hot Keys for Linux(replace `ctrl + shift` with `cmd` on macOS)):
|
||||
# 1. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +`
|
||||
# 2. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _`
|
||||
# 3. And Other common shortcuts such as Copy, Paste, Cursor Move, etc.
|
||||
#
|
||||
# Default Keybindings: https://wezfurlong.org/wezterm/config/default-keys.html
|
||||
#
|
||||
###########################################################
|
||||
{
|
||||
# wezterm has catppuccin theme built-in,
|
||||
# it's not necessary to install it separately.
|
||||
|
||||
# we can add wezterm as a flake input once this PR is merged:
|
||||
# https://github.com/wez/wezterm/pull/3547
|
||||
|
||||
programs.wezterm = {
|
||||
enable = true; # disable
|
||||
|
||||
# install wezterm via homebrew on macOS to avoid compilation, dummy package here.
|
||||
package =
|
||||
if pkgs.stdenv.isLinux
|
||||
then pkgs.wezterm
|
||||
else pkgs.hello;
|
||||
|
||||
enableBashIntegration = pkgs.stdenv.isLinux;
|
||||
enableZshIntegration = pkgs.stdenv.isLinux;
|
||||
|
||||
extraConfig = let
|
||||
fontsize =
|
||||
if pkgs.stdenv.isLinux
|
||||
then "13.0"
|
||||
else "14.0";
|
||||
in ''
|
||||
-- Pull in the wezterm API
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
-- This table will hold the configuration.
|
||||
local config = {}
|
||||
|
||||
-- In newer versions of wezterm, use the config_builder which will
|
||||
-- help provide clearer error messages
|
||||
if wezterm.config_builder then
|
||||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
wezterm.on('toggle-opacity', function(window, pane)
|
||||
local overrides = window:get_config_overrides() or {}
|
||||
if not overrides.window_background_opacity then
|
||||
overrides.window_background_opacity = 0.93
|
||||
else
|
||||
overrides.window_background_opacity = nil
|
||||
end
|
||||
window:set_config_overrides(overrides)
|
||||
end)
|
||||
|
||||
wezterm.on('toggle-maximize', function(window, pane)
|
||||
window:maximize()
|
||||
end)
|
||||
|
||||
-- This is where you actually apply your config choices
|
||||
config.color_scheme = "Catppuccin Mocha"
|
||||
config.font = wezterm.font_with_fallback {
|
||||
"JetBrainsMono Nerd Font",
|
||||
"FiraCode Nerd Font",
|
||||
|
||||
-- To avoid 'Chinese characters displayed as variant (Japanese) glyphs'
|
||||
"Source Han Sans SC",
|
||||
"Source Han Sans TC"
|
||||
}
|
||||
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.scrollback_lines = 10000
|
||||
config.enable_scroll_bar = true
|
||||
config.term = 'wezterm'
|
||||
|
||||
config.keys = {
|
||||
-- toggle opacity(CTRL + SHIFT + B)
|
||||
{
|
||||
key = 'B',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.EmitEvent 'toggle-opacity',
|
||||
},
|
||||
{
|
||||
key = 'M',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.EmitEvent 'toggle-maximize',
|
||||
},
|
||||
}
|
||||
config.font_size = ${fontsize}
|
||||
|
||||
-- To resolve issues:
|
||||
-- 1. https://github.com/ryan4yin/nix-config/issues/26
|
||||
-- 2. https://github.com/ryan4yin/nix-config/issues/8
|
||||
-- Spawn a nushell in login mode via `bash`
|
||||
config.default_prog = { '${pkgs.bash}/bin/bash', '--login', '-c', 'nu --login --interactive' }
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "23.11";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
|
||||
# aliyun
|
||||
aliyun-cli
|
||||
# digitalocean
|
||||
doctl
|
||||
# google cloud
|
||||
google-cloud-sdk
|
||||
|
||||
# cloud tools that nix do not have cache for.
|
||||
terraform
|
||||
terraformer # generate terraform configs from existing cloud resources
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
colmena # nixos's remote deployment tool
|
||||
|
||||
# db related
|
||||
mycli
|
||||
pgcli
|
||||
pkgs-unstable.mycli
|
||||
pkgs-unstable.pgcli
|
||||
mongosh
|
||||
sqlite
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
minicom
|
||||
|
||||
# ai related
|
||||
python311Packages.huggingface-hub # huggingface-cli
|
||||
pkgs-unstable.python312Packages.huggingface-hub # huggingface-cli
|
||||
|
||||
# misc
|
||||
pkgs-unstable.devbox
|
||||
@@ -41,6 +41,7 @@
|
||||
# Automatically trims your branches whose tracking remote refs are merged or gone
|
||||
# It's really useful when you work on a project for a long time.
|
||||
git-trim
|
||||
gitleaks
|
||||
|
||||
# need to run `conda-install` before using it
|
||||
# need to run `conda-shell` before using command `conda`
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- paredit/[lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy): too
|
||||
complex.
|
||||
- [evil-cleverparens](https://github.com/emacs-evil/evil-cleverparens): simple and useful.
|
||||
- [parinfer(par-in-fer)](https://shaunlebron.github.io/parinfer/): morden, simple, elegant and
|
||||
- [parinfer(par-in-fer)](https://shaunlebron.github.io/parinfer/): modern, simple, elegant and
|
||||
useful, but works not well with some other completion plugins...
|
||||
- to make parinfer works, you should disable sexp & smartparens in any lisp mode.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ==============================================
|
||||
# Based on doomemacs's auther's config:
|
||||
# Based on doomemacs's author's config:
|
||||
# https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
|
||||
#
|
||||
# Emacs Tutorials:
|
||||
@@ -15,12 +15,12 @@
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.editors.emacs;
|
||||
envExtra = ''
|
||||
envExtra = lib.mkAfter ''
|
||||
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
|
||||
'';
|
||||
shellAliases = {
|
||||
e = "emacsclient --create-frame"; # gui
|
||||
et = "emacsclient --create-frame --tty"; # termimal
|
||||
et = "emacsclient --create-frame --tty"; # terminal
|
||||
};
|
||||
librime-dir = "${config.xdg.dataHome}/emacs/librime";
|
||||
parinfer-rust-lib-dir = "${config.xdg.dataHome}/emacs/parinfer-rust";
|
||||
|
||||
@@ -20,7 +20,7 @@ Use `:tutor` in helix to start the tutorial.
|
||||
1. Helix: delete 2 word: `2w` then `x`. You can always see what you're selecting before you apply
|
||||
the action.
|
||||
2. Neovim: delete 2 word: `d`. then `2w`. No visual feedback before you apply the action.
|
||||
1. Helix - Morden builtin features: LSP, tree-sitter, fuzzy finder, multi cursors, surround and
|
||||
1. Helix - Modern builtin features: LSP, tree-sitter, fuzzy finder, multi cursors, surround and
|
||||
more.
|
||||
1. They're all available in Neovim too, but you need to find and use the right plugins manually,
|
||||
which takes time and effort.
|
||||
@@ -30,7 +30,7 @@ Use `:tutor` in helix to start the tutorial.
|
||||
1. Personally I'm glad to take a look at a Rust codebase, but not a VimScript/Lua codebase.
|
||||
1. Neovim have a very activate plugin ecosystem, and it's easy to find plugins for almost
|
||||
everything.
|
||||
1. Helix is still new, and it even do have a stable plugin system yet. A PR to add a plugin
|
||||
1. Helix is still new, and it even don't have a stable plugin system yet. A PR to add a plugin
|
||||
system is still envolving: <https://github.com/helix-editor/helix/pull/8675>
|
||||
1. Neovim has integrated terminal, and it's very powerful. It's quite similar to VSCode's integrated
|
||||
terminal. I use it a lot.
|
||||
|
||||
@@ -84,18 +84,23 @@ plugin.
|
||||
| Show line diagnostics | `gl` |
|
||||
| Show function/variable info | `K` |
|
||||
| References of a symbol | `gr` |
|
||||
| Next tab | `]b` |
|
||||
| Previous tab | `[b` |
|
||||
|
||||
### Window Navigation
|
||||
|
||||
- Switch between windows: `<Ctrl> + h/j/k/l`
|
||||
- Resize windows: `<Ctrl> + Up/Down/Left/Right`
|
||||
- Resize windows: `<Ctrl> + Up/Down/Left/Right` (`<Ctrl-w> + -/+/</>`)
|
||||
- Note: On macOS, conflicts with system shortcuts
|
||||
- Disable in System Preferences -> Keyboard -> Shortcuts -> Mission Control
|
||||
|
||||
### Splitting and Buffers
|
||||
|
||||
| | Action | Shortcut | | --------------------- | ------------- | | Horizontal Split | `\` | |
|
||||
Vertical Split | `\|` | | Close Buffer | `<Space> + c` |
|
||||
| Action | Shortcut |
|
||||
| ---------------- | ------------- |
|
||||
| Horizontal Split | `\` |
|
||||
| Vertical Split | `\|` |
|
||||
| Close Buffer | `<Space> + c` |
|
||||
|
||||
### Editing and Formatting
|
||||
|
||||
@@ -109,7 +114,18 @@ Vertical Split | `\|` | | Close Buffer | `<Space> + c` |
|
||||
| Comment Line(support multiple lines) | `<Space> + /` |
|
||||
| Open filepath/URL at cursor(neovim's builtin command) | `gx` |
|
||||
| Find files by name (fzf) | `<Space> + ff` |
|
||||
| Find files by name (include hidden files) | `<Space> + fF` |
|
||||
| Grep string in files (ripgrep) | `<Space> + fw` |
|
||||
| Grep string in files (include hidden files) | `<Space> + fW` |
|
||||
|
||||
### Git
|
||||
|
||||
| Action | Shortcut |
|
||||
| -------------------------- | --------------- |
|
||||
| Git Commits (repository) | `:<Space> + gc` |
|
||||
| Git Commits (current file) | `:<Space> + gC` |
|
||||
| Git Branches | `:<Space> + gb` |
|
||||
| Git Status | `:<Space> + gt` |
|
||||
|
||||
### Sessions
|
||||
|
||||
@@ -159,10 +175,11 @@ Provided by mini.surround plugin.
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
| Action | |
|
||||
| --------------------- | --------------- |
|
||||
| Show all Yank History | `:<Space> + yh` |
|
||||
| Show undo history | `:<Space> + uh` |
|
||||
| Action | |
|
||||
| --------------------------------- | --------------- |
|
||||
| Show all Yank History | `:<Space> + yh` |
|
||||
| Show undo history | `:<Space> + uh` |
|
||||
| Show the path of the current file | `:!echo $%` |
|
||||
|
||||
## Additional Resources
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}:
|
||||
###############################################################################
|
||||
@@ -25,13 +26,37 @@ in {
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.neovim-unwrapped;
|
||||
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# currently we use lazy.nvim as neovim's package manager, so comment this one.
|
||||
# Install packages that will compile locally or download FHS binaries via Nix!
|
||||
# These environment variables are needed to build and run binaries
|
||||
# with external package managers like mason.nvim.
|
||||
#
|
||||
# LD_LIBRARY_PATH is also needed to run the non-FHS binaries downloaded by mason.nvim.
|
||||
# it will be set by nix-ld, so we do not need to set it here again.
|
||||
extraWrapperArgs = with pkgs; [
|
||||
# LIBRARY_PATH is used by gcc before compilation to search directories
|
||||
# containing static and shared libraries that need to be linked to your program.
|
||||
"--suffix"
|
||||
"LIBRARY_PATH"
|
||||
":"
|
||||
"${lib.makeLibraryPath [stdenv.cc.cc zlib]}"
|
||||
|
||||
# PKG_CONFIG_PATH is used by pkg-config before compilation to search directories
|
||||
# containing .pc files that describe the libraries that need to be linked to your program.
|
||||
"--suffix"
|
||||
"PKG_CONFIG_PATH"
|
||||
":"
|
||||
"${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [stdenv.cc.cc zlib]}"
|
||||
];
|
||||
|
||||
# Currently we use lazy.nvim as neovim's package manager, so comment this one.
|
||||
#
|
||||
# NOTE: These plugins will not be used by astronvim by default!
|
||||
# We should install packages that will compile locally or download FHS binaries via Nix!
|
||||
# and use lazy.nvim's `dir` option to specify the package directory in nix store.
|
||||
# so that these plugins can work on NixOS.
|
||||
#
|
||||
@@ -40,6 +65,8 @@ in {
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# search all the plugins using https://search.nixos.org/packages
|
||||
telescope-fzf-native-nvim
|
||||
|
||||
nvim-treesitter.withAllGrammars
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrolsp",
|
||||
@@ -13,7 +12,7 @@ return {
|
||||
features = {
|
||||
autoformat = true, -- enable or disable auto formatting on start
|
||||
codelens = true, -- enable/disable codelens refresh on start
|
||||
inlay_hints = false, -- enable/disable inlay hints on start
|
||||
inlay_hints = true, -- enable/disable inlay hints on start
|
||||
semantic_tokens = true, -- enable/disable semantic token highlighting
|
||||
},
|
||||
-- customize lsp formatting options
|
||||
@@ -42,40 +41,51 @@ return {
|
||||
-- end
|
||||
},
|
||||
-- enable servers that you already have installed without mason
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
servers = {
|
||||
---- Frontend & NodeJS
|
||||
"tsserver", -- typescript/javascript language server
|
||||
---- Data & Configuration Languages
|
||||
"jsonls", -- json language server
|
||||
"jsonnet_ls", -- jsonnet language server
|
||||
"yamlls", -- yaml language server
|
||||
"taplo", -- toml language server
|
||||
"dagger", -- cuelsp - cue language server
|
||||
"terraformls", -- terraform hcl
|
||||
"marksman", -- markdown ls
|
||||
"nickel_ls", -- nickel language server
|
||||
"nil_ls", -- nix language server
|
||||
"bufls", -- protocol buffer language server
|
||||
"dockerls", -- dockerfile
|
||||
"cmake", -- cmake language server
|
||||
"sqls", -- sql language server
|
||||
|
||||
---- General Purpose Languages
|
||||
"clangd", -- c/c++
|
||||
"gopls", -- go
|
||||
"jdtls", -- java language server, provides only basic features
|
||||
"rust_analyzer", -- rust
|
||||
"pyright", -- python
|
||||
"ruff_lsp", -- extremely fast Python linter and code transformation
|
||||
-- "julials", -- julia language server
|
||||
-- "zls", -- zig language server
|
||||
"lua_ls", -- lua
|
||||
"bashls", -- bash
|
||||
"nushell", -- nushell language server
|
||||
|
||||
---- Web Development
|
||||
"ts_ls", -- typescript/javascript language server
|
||||
"tailwindcss", -- tailwindcss language server
|
||||
"html", -- html language server
|
||||
"cssls", -- css language server
|
||||
"prismals", -- prisma language server
|
||||
"volar", -- vue language server
|
||||
---- Configuration Language
|
||||
"marksman", -- markdown ls
|
||||
"jsonls", -- json language server
|
||||
"yamlls", -- yaml language server
|
||||
"taplo", -- toml language server
|
||||
---- Backend
|
||||
"lua_ls", -- lua
|
||||
"gopls", -- go
|
||||
"rust_analyzer", -- rust
|
||||
"pyright", -- python
|
||||
"ruff_lsp", -- extremely fast Python linter and code transformation
|
||||
"jdtls", -- java
|
||||
"nil_ls", -- nix language server
|
||||
"bufls", -- protocol buffer language server
|
||||
"zls", -- zig language server
|
||||
---- HDL
|
||||
"verible", -- verilog language server
|
||||
---- Operation & Cloud Nativautoindente
|
||||
"bashls", -- bash
|
||||
"cmake", -- cmake language server
|
||||
"clangd", -- c/c++
|
||||
"dockerls", -- dockerfile
|
||||
"jsonnet_ls", -- jsonnet language server
|
||||
"terraformls", -- terraform hcl
|
||||
"nushell", -- nushell language server
|
||||
|
||||
---- Lisp Like
|
||||
"scheme_langserver", -- scheme language server
|
||||
"elixirls", -- elixir language server
|
||||
-- "clojure_lsp", -- clojure language server"
|
||||
|
||||
---- Circuit Design
|
||||
"verible", -- verilog language server
|
||||
},
|
||||
-- customize language server configuration options passed to `lspconfig`
|
||||
---@diagnostic disable: missing-fields
|
||||
@@ -91,6 +101,18 @@ return {
|
||||
filetypes = { "scheme", "scm" },
|
||||
single_file_support = true,
|
||||
},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
-- Make the rust-analyzer use its own profile,
|
||||
-- so you can run cargo build without that being blocked while rust-analyzer runs.
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
extraEnv = { CARGO_PROFILE_RUST_ANALYZER_INHERITS = "dev" },
|
||||
extraArgs = { "--profile", "rust-analyzer" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- customize how language servers are attached
|
||||
handlers = {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
-- Custom copilot-lua to enable filetypes: markdown
|
||||
return {
|
||||
"zbirenbaum/copilot.lua",
|
||||
-- "zbirenbaum/copilot.lua",
|
||||
|
||||
-- Fix https://github.com/zbirenbaum/copilot.lua/pull/336
|
||||
"ryan4yin/copilot.lua",
|
||||
branch = "fix_issue_330",
|
||||
opts = function(_, opts)
|
||||
opts.filetypes = {
|
||||
yaml = true,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
-- Customize Mason plugins
|
||||
--
|
||||
-- NOTE: Issue - mason.nvim does not support NixOS:
|
||||
-- https://github.com/williamboman/mason.nvim/issues/428
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
@@ -42,13 +45,14 @@ return {
|
||||
-- end,
|
||||
},
|
||||
{
|
||||
-- https://docs.astronvim.com/recipes/dap/
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
-- mason is unusable on NixOS, disable it.
|
||||
-- ensure_installed nothing
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = nil
|
||||
opts.automatic_installation = false
|
||||
end,
|
||||
-- opts = function(_, opts)
|
||||
-- opts.ensure_installed = nil
|
||||
-- opts.automatic_installation = false
|
||||
-- end,
|
||||
|
||||
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||
-- opts = function(_, opts)
|
||||
@@ -59,4 +63,16 @@ return {
|
||||
-- })
|
||||
-- end,
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
-- Where Mason should put its bin location in your PATH. Can be one of:
|
||||
-- - "prepend" (default, Mason's bin location is put first in PATH)
|
||||
-- - "append" (Mason's bin location is put at the end of PATH)
|
||||
-- - "skip" (doesn't modify PATH)
|
||||
---@type '"prepend"' | '"append"' | '"skip"'
|
||||
opts.PATH = "append" -- use mason's package only when no other package is found
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
return {
|
||||
"nvim-orgmode/orgmode",
|
||||
dependencies = {
|
||||
{ "nvim-treesitter/nvim-treesitter", lazy = true },
|
||||
},
|
||||
event = "VeryLazy",
|
||||
'nvim-orgmode/orgmode',
|
||||
event = 'VeryLazy',
|
||||
ft = { 'org' },
|
||||
config = function()
|
||||
-- Load treesitter grammar for org
|
||||
require("orgmode").setup_ts_grammar()
|
||||
|
||||
-- Setup treesitter
|
||||
require("nvim-treesitter.configs").setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
ensure_installed = { "org" },
|
||||
}
|
||||
|
||||
-- Setup orgmode
|
||||
require("orgmode").setup {
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = "~/org/**/*",
|
||||
org_default_notes_file = "~/org/refile.org",
|
||||
}
|
||||
})
|
||||
|
||||
-- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option
|
||||
-- add ~org~ to ignore_install
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = 'all',
|
||||
ignore_install = { 'org' },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
-- NOTE: additional parser
|
||||
{ "nushell/tree-sitter-nu" }, -- nushell scripts
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.incremental_selection = {
|
||||
enable = true,
|
||||
@@ -13,48 +17,26 @@ return {
|
||||
node_decremental = "<bs>", -- Backspace
|
||||
},
|
||||
}
|
||||
opts.ignore_install = { "gotmpl" }
|
||||
opts.ignore_install = { "gotmpl", "wing" }
|
||||
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter/tree/master
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
|
||||
-- neovim
|
||||
"vim",
|
||||
"lua",
|
||||
-- operation & cloud native
|
||||
"dockerfile",
|
||||
"hcl",
|
||||
"jsonnet",
|
||||
"regex",
|
||||
"terraform",
|
||||
"nix",
|
||||
-- please add only the tree-sitters that are not available in nixpkgs here
|
||||
|
||||
"just",
|
||||
"kdl",
|
||||
"csv",
|
||||
-- other programming language
|
||||
"xml",
|
||||
|
||||
---- Misc
|
||||
"diff",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitignore",
|
||||
"gitcommit",
|
||||
"latex",
|
||||
"sql",
|
||||
-- Lisp like
|
||||
"fennel",
|
||||
"clojure",
|
||||
"commonlisp",
|
||||
-- customized languages:
|
||||
"scheme",
|
||||
"gitattributes",
|
||||
"ssh_config",
|
||||
})
|
||||
|
||||
-- add support for scheme
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_config.scheme = {
|
||||
install_info = {
|
||||
url = "https://github.com/6cdh/tree-sitter-scheme", -- local path or git repo
|
||||
files = { "src/parser.c" },
|
||||
-- optional entries:
|
||||
branch = "main", -- default branch in case of git repo if different from master
|
||||
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
||||
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
|
||||
},
|
||||
}
|
||||
-- use scheme parser for filetypes: scm
|
||||
vim.treesitter.language.register("scheme", "scm")
|
||||
end,
|
||||
}
|
||||
|
||||
+145
-110
@@ -1,133 +1,168 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config = {
|
||||
programs.npm.npmrc = ''
|
||||
prefix = ''${HOME}/.npm-global
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
#-- c/c++
|
||||
cmake
|
||||
cmake-language-server
|
||||
gnumake
|
||||
checkmake
|
||||
# c/c++ compiler, required by nvim-treesitter!
|
||||
gcc
|
||||
# c/c++ tools with clang-tools, the unwrapped version won't
|
||||
# add alias like `cc` and `c++`, so that it won't conflict with gcc
|
||||
llvmPackages.clang-unwrapped
|
||||
lldb
|
||||
home.packages = with pkgs; (
|
||||
# -*- Data & Configuration Languages -*-#
|
||||
[
|
||||
#-- nix
|
||||
nil
|
||||
# rnix-lsp
|
||||
# nixd
|
||||
statix # Lints and suggestions for the nix programming language
|
||||
deadnix # Find and remove unused code in .nix source files
|
||||
alejandra # Nix Code Formatter
|
||||
|
||||
#-- python
|
||||
nodePackages.pyright # python language server
|
||||
(python311.withPackages (
|
||||
ps:
|
||||
with ps; [
|
||||
ruff-lsp
|
||||
black # python formatter
|
||||
#-- nickel lang
|
||||
nickel
|
||||
|
||||
jupyter
|
||||
ipython
|
||||
pandas
|
||||
requests
|
||||
pyquery
|
||||
pyyaml
|
||||
#-- json like
|
||||
# terraform # install via brew on macOS
|
||||
terraform-ls
|
||||
jsonnet
|
||||
jsonnet-language-server
|
||||
taplo # TOML language server / formatter / validator
|
||||
nodePackages.yaml-language-server
|
||||
actionlint # GitHub Actions linter
|
||||
|
||||
## emacs's lsp-bridge dependenciesge
|
||||
epc
|
||||
orjson
|
||||
sexpdata
|
||||
six
|
||||
setuptools
|
||||
paramiko
|
||||
rapidfuzz
|
||||
]
|
||||
))
|
||||
#-- dockerfile
|
||||
hadolint # Dockerfile linter
|
||||
nodePackages.dockerfile-language-server-nodejs
|
||||
|
||||
#-- rust
|
||||
rust-analyzer
|
||||
cargo # rust package manager
|
||||
rustfmt
|
||||
#-- markdown
|
||||
marksman # language server for markdown
|
||||
glow # markdown previewer
|
||||
pandoc # document converter
|
||||
pkgs-unstable.hugo # static site generator
|
||||
|
||||
#-- nix
|
||||
nil
|
||||
# rnix-lsp
|
||||
# nixd
|
||||
statix # Lints and suggestions for the nix programming language
|
||||
deadnix # Find and remove unused code in .nix source files
|
||||
alejandra # Nix Code Formatter
|
||||
#-- sql
|
||||
sqlfluff
|
||||
|
||||
#-- golang
|
||||
go
|
||||
gomodifytags
|
||||
iferr # generate error handling code for go
|
||||
impl # generate function implementation for go
|
||||
gotools # contains tools like: godoc, goimports, etc.
|
||||
gopls # go language server
|
||||
delve # go debugger
|
||||
#-- protocol buffer
|
||||
buf # linting and formatting
|
||||
]
|
||||
++
|
||||
#-*- General Purpose Languages -*-#
|
||||
[
|
||||
#-- c/c++
|
||||
cmake
|
||||
cmake-language-server
|
||||
gnumake
|
||||
checkmake
|
||||
# c/c++ compiler, required by nvim-treesitter!
|
||||
gcc
|
||||
gdb
|
||||
# c/c++ tools with clang-tools, the unwrapped version won't
|
||||
# add alias like `cc` and `c++`, so that it won't conflict with gcc
|
||||
# llvmPackages.clang-unwrapped
|
||||
clang-tools
|
||||
lldb
|
||||
vscode-extensions.vadimcn.vscode-lldb.adapter # codelldb - debugger
|
||||
|
||||
# -- java
|
||||
jdk17
|
||||
gradle
|
||||
maven
|
||||
spring-boot-cli
|
||||
#-- python
|
||||
pyright # python language server
|
||||
(python311.withPackages (
|
||||
ps:
|
||||
with ps; [
|
||||
ruff-lsp
|
||||
black # python formatter
|
||||
# debugpy
|
||||
|
||||
#-- lua
|
||||
stylua
|
||||
lua-language-server
|
||||
# my commonly used python packages
|
||||
jupyter
|
||||
ipython
|
||||
pandas
|
||||
requests
|
||||
pyquery
|
||||
pyyaml
|
||||
boto3
|
||||
|
||||
#-- bash
|
||||
nodePackages.bash-language-server
|
||||
shellcheck
|
||||
shfmt
|
||||
## emacs's lsp-bridge dependenciesge
|
||||
# epc
|
||||
# orjson
|
||||
# sexpdata
|
||||
# six
|
||||
# setuptools
|
||||
# paramiko
|
||||
# rapidfuzz
|
||||
]
|
||||
))
|
||||
|
||||
#-- javascript/typescript --#
|
||||
nodePackages.nodejs
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages."@tailwindcss/language-server"
|
||||
emmet-ls
|
||||
#-- rust
|
||||
# we'd better use the rust-overlays for rust development
|
||||
pkgs-unstable.rustc
|
||||
pkgs-unstable.rust-analyzer
|
||||
pkgs-unstable.cargo # rust package manager
|
||||
pkgs-unstable.rustfmt
|
||||
pkgs-unstable.clippy # rust linter
|
||||
|
||||
# -- Lisp like Languages
|
||||
guile
|
||||
racket-minimal
|
||||
fnlfmt # fennel
|
||||
#-- golang
|
||||
go
|
||||
gomodifytags
|
||||
iferr # generate error handling code for go
|
||||
impl # generate function implementation for go
|
||||
gotools # contains tools like: godoc, goimports, etc.
|
||||
gopls # go language server
|
||||
delve # go debugger
|
||||
|
||||
#-- Others
|
||||
taplo # TOML language server / formatter / validator
|
||||
nodePackages.yaml-language-server
|
||||
sqlfluff # SQL linter
|
||||
actionlint # GitHub Actions linter
|
||||
buf # protoc plugin for linting and formatting
|
||||
proselint # English prose linter
|
||||
# -- java
|
||||
jdk17
|
||||
gradle
|
||||
maven
|
||||
spring-boot-cli
|
||||
jdt-language-server
|
||||
|
||||
#-- Misc
|
||||
tree-sitter # common language parser/highlighter
|
||||
nodePackages.prettier # common code formatter
|
||||
marksman # language server for markdown
|
||||
glow # markdown previewer
|
||||
fzf
|
||||
pandoc # document converter
|
||||
hugo # static site generator
|
||||
#-- zig
|
||||
zls
|
||||
|
||||
#-- Optional Requirements:
|
||||
gdu # disk usage analyzer, required by AstroNvim
|
||||
(ripgrep.override {withPCRE2 = true;}) # recursively searches directories for a regex pattern
|
||||
#-- lua
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
#-- CloudNative
|
||||
nodePackages.dockerfile-language-server-nodejs
|
||||
# terraform # install via brew on macOS
|
||||
terraform-ls
|
||||
jsonnet
|
||||
jsonnet-language-server
|
||||
hadolint # Dockerfile linter
|
||||
#-- bash
|
||||
nodePackages.bash-language-server
|
||||
shellcheck
|
||||
shfmt
|
||||
]
|
||||
#-*- Web Development -*-#
|
||||
++ [
|
||||
nodePackages.nodejs
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages."@tailwindcss/language-server"
|
||||
emmet-ls
|
||||
]
|
||||
# -*- Lisp like Languages -*-#
|
||||
++ [
|
||||
guile
|
||||
racket-minimal
|
||||
fnlfmt # fennel
|
||||
(
|
||||
if pkgs.stdenv.isDarwin
|
||||
then pkgs.emptyDirectory
|
||||
else pkgs-unstable.akkuPackages.scheme-langserver
|
||||
)
|
||||
]
|
||||
++ [
|
||||
proselint # English prose linter
|
||||
|
||||
#-- zig
|
||||
zls
|
||||
#-- verilog / systemverilog
|
||||
verible
|
||||
gdb
|
||||
];
|
||||
#-- verilog / systemverilog
|
||||
verible
|
||||
|
||||
#-- Optional Requirements:
|
||||
nodePackages.prettier # common code formatter
|
||||
fzf
|
||||
gdu # disk usage analyzer, required by AstroNvim
|
||||
(ripgrep.override {withPCRE2 = true;}) # recursively searches directories for a regex pattern
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ using a Cloud provider for key management.
|
||||
Both age, Sops & GnuPG provide asymmetric encryption, which is useful for encrypting files for a
|
||||
specific user.
|
||||
|
||||
For morden use, age is recommended, as it use [AEAD encryption function -
|
||||
For modern use, age is recommended, as it use [AEAD encryption function -
|
||||
ChaCha20-Poly1305][age Format v1], If you do not want to manage the keys by yourself, Sops is
|
||||
recommended, as it use KMS for key management.
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
age
|
||||
sops
|
||||
pkgs-unstable.sops
|
||||
rclone
|
||||
];
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ one keypair, or a keyring/keychain(which contains multiple sub key-pairs).
|
||||
|
||||
Let's generate a keypair interactively:
|
||||
|
||||
> Now in 2024, GnuPG 2.4.1 defaults to ECC algorithm (9) and Curve 25519 for ECC, which is morden
|
||||
> Now in 2024, GnuPG 2.4.1 defaults to ECC algorithm (9) and Curve 25519 for ECC, which is modern
|
||||
> and safe, I would recommend to use these defaults directly.
|
||||
|
||||
```bash
|
||||
|
||||
@@ -31,9 +31,9 @@ in {
|
||||
use ${nu_scripts}/share/nu_scripts/custom-completions/cargo/cargo-completions.nu *
|
||||
use ${nu_scripts}/share/nu_scripts/custom-completions/zellij/zellij-completions.nu *
|
||||
# alias
|
||||
use ${nu_scripts}/share/nu_scripts/aliases/git/git-aliases.nu *
|
||||
# use ${nu_scripts}/share/nu_scripts/aliases/git/git-aliases.nu *
|
||||
use ${nu_scripts}/share/nu_scripts/aliases/eza/eza-aliases.nu *
|
||||
# use ${nu_scripts}/share/nu_scripts/aliases/bat/bat-aliases.nu *
|
||||
use ${nu_scripts}/share/nu_scripts/aliases/bat/bat-aliases.nu *
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: let
|
||||
shellAliases = {
|
||||
"zj" = "zellij";
|
||||
};
|
||||
in {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
# [Linux] Revert to old v0.40.1 to fix:
|
||||
# https://github.com/zellij-org/zellij/issues/3592
|
||||
package =
|
||||
if pkgs.stdenv.isLinux
|
||||
then pkgs-stable.zellij
|
||||
else pkgs.zellij;
|
||||
};
|
||||
# auto start zellij in nushell
|
||||
programs.nushell.extraConfig = ''
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
# Place a copy of this config to ~/.aerospace.toml
|
||||
# After that, you can edit ~/.aerospace.toml to your liking
|
||||
|
||||
# It's not necessary to copy all keys to your config.
|
||||
# If the key is missing in your config, "default-config.toml" will serve as a fallback
|
||||
|
||||
# You can use it to add commands that run after login to macOS user session.
|
||||
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
|
||||
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
|
||||
after-login-command = []
|
||||
|
||||
# You can use it to add commands that run after AeroSpace startup.
|
||||
# 'after-startup-command' is run after 'after-login-command'
|
||||
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
|
||||
after-startup-command = [
|
||||
# Highlight focused windows with colored borders
|
||||
#
|
||||
# JankyBorders has a built-in detection of already running process,
|
||||
# so it won't be run twice on AeroSpace restart
|
||||
'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0',
|
||||
]
|
||||
|
||||
# Start AeroSpace at login
|
||||
start-at-login = false
|
||||
|
||||
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
||||
enable-normalization-flatten-containers = true
|
||||
enable-normalization-opposite-orientation-for-nested-containers = true
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
||||
# The 'accordion-padding' specifies the size of accordion padding
|
||||
# You can set 0 to disable the padding feature
|
||||
accordion-padding = 30
|
||||
|
||||
# Possible values: tiles|accordion
|
||||
default-root-container-layout = 'tiles'
|
||||
|
||||
# Possible values: horizontal|vertical|auto
|
||||
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
|
||||
# tall monitor (anything higher than wide) gets vertical orientation
|
||||
default-root-container-orientation = 'auto'
|
||||
|
||||
# Possible values: (qwerty|dvorak)
|
||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||
key-mapping.preset = 'qwerty'
|
||||
|
||||
# Mouse follows focus when focused monitor changes
|
||||
# Drop it from your config, if you don't like this behavior
|
||||
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
||||
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
||||
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
||||
|
||||
# Gaps between windows (inner-*) and between monitor edges (outer-*).
|
||||
# Possible values:
|
||||
# - Constant: gaps.outer.top = 8
|
||||
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
|
||||
# In this example, 24 is a default value when there is no match.
|
||||
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
||||
[gaps]
|
||||
inner.horizontal = 5
|
||||
inner.vertical = 5
|
||||
outer.left = 5
|
||||
outer.bottom = 5
|
||||
outer.top = 5
|
||||
outer.right = 5
|
||||
|
||||
[exec]
|
||||
inherit-env-vars = true
|
||||
[exec.env-vars]
|
||||
PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}'
|
||||
|
||||
# 'main' binding mode declaration
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||
# 'main' binding mode must be always presented
|
||||
[mode.main.binding]
|
||||
|
||||
# All possible keys:
|
||||
# - Letters. a, b, c, ..., z
|
||||
# - Numbers. 0, 1, 2, ..., 9
|
||||
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
||||
# - F-keys. f1, f2, ..., f20
|
||||
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
|
||||
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
|
||||
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
||||
# keypadMinus, keypadMultiply, keypadPlus
|
||||
# - Arrows. left, down, up, right
|
||||
|
||||
# All possible modifiers: cmd, alt, ctrl, shift
|
||||
|
||||
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
||||
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
|
||||
alt-enter = '''exec-and-forget osascript -e '
|
||||
tell application "kitty"
|
||||
do script
|
||||
activate
|
||||
end tell'
|
||||
'''
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
||||
alt-slash = 'layout tiles horizontal vertical'
|
||||
alt-comma = 'layout accordion horizontal vertical'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
||||
alt-h = 'focus left'
|
||||
alt-j = 'focus down'
|
||||
alt-k = 'focus up'
|
||||
alt-l = 'focus right'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
||||
alt-shift-h = 'move left'
|
||||
alt-shift-j = 'move down'
|
||||
alt-shift-k = 'move up'
|
||||
alt-shift-l = 'move right'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
||||
alt-shift-minus = 'resize smart -50'
|
||||
alt-shift-equal = 'resize smart +50'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||
alt-1 = 'workspace 1Kitty'
|
||||
alt-2 = 'workspace 2Alacritty'
|
||||
alt-3 = 'workspace 3Work'
|
||||
alt-4 = 'workspace 4Firefox'
|
||||
alt-5 = 'workspace 5Chrome'
|
||||
alt-6 = 'workspace 6Chat'
|
||||
alt-7 = 'workspace 7Music'
|
||||
alt-8 = 'workspace 8'
|
||||
alt-9 = 'workspace 9'
|
||||
alt-0 = 'workspace 10'
|
||||
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||
alt-shift-1 = 'move-node-to-workspace 1Kitty'
|
||||
alt-shift-2 = 'move-node-to-workspace 2Alacritty'
|
||||
alt-shift-3 = 'move-node-to-workspace 3Work'
|
||||
alt-shift-4 = 'move-node-to-workspace 4Firefox'
|
||||
alt-shift-5 = 'move-node-to-workspace 5Chrome'
|
||||
alt-shift-6 = 'move-node-to-workspace 6Chat'
|
||||
alt-shift-7 = 'move-node-to-workspace 7Music'
|
||||
alt-shift-8 = 'move-node-to-workspace 8'
|
||||
alt-shift-9 = 'move-node-to-workspace 9'
|
||||
alt-shift-0 = 'move-node-to-workspace 10'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
||||
alt-tab = 'workspace-back-and-forth'
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
|
||||
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||
alt-shift-semicolon = 'mode service'
|
||||
|
||||
cmd-h = [] # Disable "hide application"
|
||||
cmd-alt-h = [] # Disable "hide others"
|
||||
|
||||
alt-shift-c = 'reload-config'
|
||||
|
||||
alt-r = 'mode resize'
|
||||
|
||||
# Declare 'resize' binding mode
|
||||
[mode.resize.binding]
|
||||
h = 'resize width -50'
|
||||
j = 'resize height +50'
|
||||
k = 'resize height -50'
|
||||
l = 'resize width +50'
|
||||
enter = 'mode main'
|
||||
esc = 'mode main'
|
||||
|
||||
# 'service' binding mode declaration.
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||
[mode.service.binding]
|
||||
esc = ['reload-config', 'mode main']
|
||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||
#s = ['layout sticky tiling', 'mode main'] # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
|
||||
f = [
|
||||
'layout floating tiling',
|
||||
'mode main',
|
||||
] # Toggle between floating and tiling layout
|
||||
backspace = ['close-all-windows-but-current', 'mode main']
|
||||
|
||||
alt-shift-h = ['join-with left', 'mode main']
|
||||
alt-shift-j = ['join-with down', 'mode main']
|
||||
alt-shift-k = ['join-with up', 'mode main']
|
||||
alt-shift-l = ['join-with right', 'mode main']
|
||||
|
||||
|
||||
# =================================================================
|
||||
#
|
||||
# Assign apps on particular workspaces
|
||||
#
|
||||
# Use this command to get IDs of running applications:
|
||||
# aerospace list-apps
|
||||
#
|
||||
# =================================================================
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'net.kovidgoyal.kitty'
|
||||
run = 'move-node-to-workspace 1Kitty'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'org.alacritty'
|
||||
run = 'move-node-to-workspace 2Alacritty'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.tencent.WeWorkMac'
|
||||
run = 'move-node-to-workspace 3Work'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'org.mozilla.firefox'
|
||||
run = 'move-node-to-workspace 4Firefox'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.google.Chrome'
|
||||
run = 'move-node-to-workspace 5Chrome'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'ru.keepcoder.Telegram'
|
||||
run = 'move-node-to-workspace 6Chat'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.tencent.xinWeChat'
|
||||
run = 'move-node-to-workspace 6Chat'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.tencent.qq'
|
||||
run = 'move-node-to-workspace 6Chat'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.tencent.QQMusicMac'
|
||||
run = 'move-node-to-workspace 7Music'
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.netease.163music'
|
||||
run = 'move-node-to-workspace 7Music'
|
||||
|
||||
# Make all windows float by default
|
||||
[[on-window-detected]]
|
||||
check-further-callbacks = true
|
||||
run = 'layout floating'
|
||||
|
||||
# =================================================================
|
||||
# Multiple monitor configuration
|
||||
# =================================================================
|
||||
|
||||
[workspace-to-monitor-force-assignment]
|
||||
1Kitty = 'secondary' # Non-main monitor in case when there are only two monitors'
|
||||
2Alacritty = 'main' # "Main" monitor ("main" as in System Settings → Displays → Use as)
|
||||
3Work = 'main'
|
||||
4Firefox = 'main'
|
||||
5Chrome = 'secondary'
|
||||
6Chat = 'main'
|
||||
7Music = 'main'
|
||||
8 = 'main'
|
||||
9 = 'main'
|
||||
0 = 'main'
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
home.file.".aerospace.toml".source = ./aerospace.toml;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{myvars, ...}: {
|
||||
home.homeDirectory = "/Users/${myvars.username}";
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
{mylib, ...}: {
|
||||
{
|
||||
mylib,
|
||||
myvars,
|
||||
...
|
||||
}: {
|
||||
home.homeDirectory = "/Users/${myvars.username}";
|
||||
imports =
|
||||
(mylib.scanPaths ./.)
|
||||
++ [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
let
|
||||
{lib, ...}: let
|
||||
envExtra = ''
|
||||
export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"
|
||||
'';
|
||||
@@ -28,7 +28,7 @@ in {
|
||||
# in /opt/homebrew for Apple Silicon and /usr/local for Rosetta 2 to coexist and use bottles.
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
bashrcExtra = envExtra + initExtra;
|
||||
bashrcExtra = lib.mkAfter (envExtra + initExtra);
|
||||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
3. `base`: all common configurations for all desktops.
|
||||
4. `hyprland`: Hyprland's configuration.
|
||||
5. `i3`: i3's configuration.
|
||||
|
||||
## Why install I3/Hyprland in Home Manager instead of a NixOS Module?
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
pkgs-stable,
|
||||
# pkgs-stable,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
@@ -15,11 +15,15 @@
|
||||
# reaper # audio production
|
||||
# sonic-pi # music programming
|
||||
|
||||
# 2d game design
|
||||
ldtk # A modern, versatile 2D level editor
|
||||
aseprite # Animated sprite editor & pixel art tool
|
||||
|
||||
# this app consumes a lot of storage, so do not install it currently
|
||||
# kicad # 3d printing, eletrical engineering
|
||||
|
||||
# fpga
|
||||
pkgs-unstable.python311Packages.apycula # gowin fpga
|
||||
pkgs-unstable.python312Packages.apycula # gowin fpga
|
||||
pkgs-unstable.yosys # fpga synthesis
|
||||
pkgs-unstable.nextpnr # fpga place and route
|
||||
pkgs-unstable.openfpgaloader # fpga programming
|
||||
@@ -30,7 +34,7 @@
|
||||
# live streaming
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs-stable.obs-studio-plugins; [
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
# screen capture
|
||||
wlrobs
|
||||
# obs-ndi
|
||||
@@ -53,7 +57,7 @@
|
||||
obs-command-source
|
||||
obs-move-transition
|
||||
obs-backgroundremoval
|
||||
advanced-scene-switcher
|
||||
# advanced-scene-switcher
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# nix-gaming.packages.${pkgs.system}.osu-lazer-bin
|
||||
# nix-gaming.packages.${pkgs.system}.osu-laser-bin
|
||||
gamescope # SteamOS session compositing window manager
|
||||
prismlauncher # A free, open source launcher for Minecraft
|
||||
winetricks # A script to install DLLs needed to work around problems in Wine
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
theme = {
|
||||
# https://github.com/catppuccin/gtk
|
||||
name = "Catppuccin-Macchiato-Compact-Pink-Dark";
|
||||
name = "catppuccin-macchiato-pink-compact";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/data/themes/catppuccin-gtk/default.nix
|
||||
accents = ["pink"];
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
|
||||
# instant messaging
|
||||
telegram-desktop
|
||||
discord
|
||||
pkgs-unstable.qq # https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/networking/instant-messengers/qq
|
||||
# discord # update too frequently, use the web version instead
|
||||
|
||||
# remote desktop(rdp connect)
|
||||
remmina
|
||||
@@ -21,6 +20,14 @@
|
||||
# misc
|
||||
flameshot
|
||||
ventoy # multi-boot usb creator
|
||||
|
||||
# my custom hardened packages
|
||||
pkgs.nixpaks.qq
|
||||
pkgs.nixpaks.qq-desktop-item
|
||||
|
||||
wechat-uos
|
||||
# pkgs.nixpaks.wechat-uos
|
||||
# pkgs.nixpaks.wechat-uos-desktop-item
|
||||
];
|
||||
|
||||
# GitHub CLI tool
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
# https://joplinapp.org/help/
|
||||
joplin # joplin-cli
|
||||
joplin-desktop
|
||||
|
||||
@@ -64,11 +64,10 @@
|
||||
# all other unknown schemes will be opened by this default application.
|
||||
# "x-scheme-handler/unknown" = editor;
|
||||
|
||||
"x-scheme-handler/discord" = ["discord.desktop"];
|
||||
"x-scheme-handler/tg" = ["org.telegram.desktop.desktop "];
|
||||
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.dekstop"];
|
||||
"video/*" = ["mpv.desktop"];
|
||||
"image/*" = ["imv-dir.desktop"];
|
||||
"image/gif" = ["imv-dir.desktop"];
|
||||
"image/jpeg" = ["imv-dir.desktop"];
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Hyprland
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
show hyprland's log:
|
||||
|
||||
```bash
|
||||
hyprctl rollinglog
|
||||
```
|
||||
@@ -24,9 +24,6 @@ input {
|
||||
#-- General ----------------------------------------------------
|
||||
# General settings like MOD key, Gaps, Colors, etc.
|
||||
general {
|
||||
sensitivity=2.0
|
||||
apply_sens_to_raw=0
|
||||
|
||||
gaps_in=5
|
||||
gaps_out=10
|
||||
|
||||
@@ -90,7 +87,7 @@ windowrule=size 100% 100%,wlogout
|
||||
windowrule=animation slide,wlogout
|
||||
|
||||
#-- Keybindings ----------------------------------------------------
|
||||
$term = kitty
|
||||
$term = foot
|
||||
$app_launcher = ~/.config/hypr/scripts/menu
|
||||
$volume = ~/.config/hypr/scripts/volume
|
||||
$backlight = ~/.config/hypr/scripts/brightness
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Fix anyrun
|
||||
## https://github.com/anyrun-org/anyrun/issues/153
|
||||
ln -s $XDG_RUNTIME_DIR/hypr /tmp/hypr
|
||||
|
||||
## Autostart Programs
|
||||
|
||||
# Kill already running process
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
"cpu": {
|
||||
"format": "\udb80\udf5b {usage}%",
|
||||
"interval": 1,
|
||||
"on-click-middle": "kitty btop",
|
||||
"on-click-right": "kitty btop",
|
||||
"on-click-middle": "foot btop",
|
||||
"on-click-right": "foot btop",
|
||||
},
|
||||
"custom/launcher": {
|
||||
"format": "\uf313 ",
|
||||
@@ -122,7 +122,7 @@
|
||||
"format-alt": " {bandwidthUpBytes} | {bandwidthDownBytes}",
|
||||
"tooltip-format": " {ifname} via {gwaddr}",
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "kitty nmtui",
|
||||
"on-click-right": "foot nmtui",
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"format": "{volume}% {icon} {format_source}",
|
||||
|
||||
@@ -16,6 +16,7 @@ in {
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"AQ_DRM_DEVICES,/dev/dri/card1"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
# fix https://github.com/hyprwm/Hyprland/issues/1520
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hyprland,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: let
|
||||
package = hyprland.packages.${pkgs.system}.hyprland;
|
||||
package = pkgs.hyprland;
|
||||
in {
|
||||
# NOTE:
|
||||
# We have to enable hyprland/i3's systemd user service in home-manager,
|
||||
@@ -30,7 +29,10 @@ in {
|
||||
};
|
||||
extraConfig = builtins.readFile ../conf/hyprland.conf;
|
||||
# gammastep/wallpaper-switcher need this to be enabled.
|
||||
systemd.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
};
|
||||
};
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
''
|
||||
+ (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf");
|
||||
|
||||
home.packages = [
|
||||
# pkgs.firefox-wayland
|
||||
pkgs.nixpaks.firefox
|
||||
pkgs.nixpaks.firefox-desktop-item
|
||||
];
|
||||
|
||||
programs = {
|
||||
# a wayland only terminal emulator
|
||||
foot = {
|
||||
@@ -54,12 +60,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = true;
|
||||
enableGnomeExtensions = false;
|
||||
package = pkgs.firefox-wayland; # firefox with wayland support
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
# let vscode sync and update its configuration & extensions across devices, using github account.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
xrandr --output DP-2 --brightness $@
|
||||
@@ -1 +0,0 @@
|
||||
i3-msg exit
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
xrandr \
|
||||
--output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate normal \
|
||||
--output DP-0 --off \
|
||||
--output DP-1 --off \
|
||||
--output DP-2 --primary --mode 3840x2160 --pos 0x0 --rotate normal \
|
||||
--output DP-3 --off \
|
||||
--output DP-4 --off \
|
||||
--output DP-5 --off
|
||||
@@ -1,333 +0,0 @@
|
||||
# This file is a modified version based on default i3-config-wizard config
|
||||
# Maintainer: ryan4yin [xiaoyin_c@qq.com]
|
||||
|
||||
#######################
|
||||
# config starts here: #
|
||||
#######################
|
||||
|
||||
# Font for window titles.
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
font pango: Noto Sans Regular 10
|
||||
|
||||
# set the mod key to the winkey:
|
||||
set $mod Mod4
|
||||
|
||||
workspace_layout default
|
||||
|
||||
|
||||
##############################
|
||||
# extra options for windows: #
|
||||
##############################
|
||||
|
||||
#border indicator on windows:
|
||||
new_window pixel 1
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 6
|
||||
gaps outer 3
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# switch/iterate between workspaces
|
||||
bindsym $mod+Tab workspace next
|
||||
bindsym $mod+Shift+Tab workspace prev
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws0
|
||||
|
||||
# switch to workspace with numpad keys
|
||||
bindcode $mod+87 workspace 1
|
||||
bindcode $mod+88 workspace 2
|
||||
bindcode $mod+89 workspace 3
|
||||
bindcode $mod+83 workspace 4
|
||||
bindcode $mod+84 workspace 5
|
||||
bindcode $mod+85 workspace 6
|
||||
bindcode $mod+79 workspace 7
|
||||
bindcode $mod+80 workspace 8
|
||||
bindcode $mod+81 workspace 9
|
||||
bindcode $mod+90 workspace 0
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws0
|
||||
|
||||
# resize window (you can also use the mouse for that):
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
|
||||
######################################
|
||||
# keybindings for different actions: #
|
||||
######################################
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec kitty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# Lock the system
|
||||
# lock with a picture:
|
||||
#bindsym $mod+l exec i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
||||
# lock by blurring the screen:
|
||||
bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# Backlight control
|
||||
bindsym XF86MonBrightnessUp exec xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+b focus up
|
||||
bindsym $mod+o focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+b move up
|
||||
bindsym $mod+Shift+o move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+g layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# open new empty workspace
|
||||
bindsym $mod+Shift+n exec ~/.config/i3/scripts/empty_workspace
|
||||
|
||||
# Multimedia Keys
|
||||
|
||||
# volume
|
||||
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 polybar
|
||||
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 polybar
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 polybar
|
||||
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 polybar
|
||||
|
||||
# mute
|
||||
bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 polybar
|
||||
|
||||
# audio control
|
||||
bindsym XF86AudioPlay exec playerctl play
|
||||
bindsym XF86AudioPause exec playerctl pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Redirect sound to headphones
|
||||
bindsym $mod+p exec /usr/local/bin/switch-audio-port
|
||||
|
||||
## App shortcuts
|
||||
bindsym $mod+w exec /usr/bin/firefox
|
||||
bindsym $mod+n exec /usr/bin/thunar
|
||||
bindsym Print exec scrot ~/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||
|
||||
##########################################
|
||||
# configuration for workspace behaviour: #
|
||||
##########################################
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "1: "
|
||||
set $ws2 "2: "
|
||||
# visual studio code
|
||||
set $ws3 "3: "
|
||||
set $ws4 "4: "
|
||||
set $ws5 "5: "
|
||||
set $ws6 "6: "
|
||||
set $ws7 "7: "
|
||||
set $ws8 "8:"
|
||||
set $ws9 "9:"
|
||||
set $ws0 "10: "
|
||||
|
||||
# use workspaces on different displays:
|
||||
# where you have to replace VGA-0/HDMI-0 with the names for your displays
|
||||
# you can get from xrandr command
|
||||
workspace $ws1 output DP-2
|
||||
workspace $ws6 output HDMI-0
|
||||
|
||||
# bind program to workspace and focus to them on startup:
|
||||
# assign [class="kitty"] $ws1
|
||||
assign [class="(?i)firefox"] $ws2
|
||||
assign [class="Thunar"] $ws8
|
||||
assign [class="thunderbird"] $ws9
|
||||
assign [class="TelegramDesktop"] $ws5
|
||||
|
||||
# automatic set focus new window if it opens on another workspace than the current:
|
||||
for_window [class=(?i)firefox] focus
|
||||
for_window [class=Thunar] focus
|
||||
for_window [class=Thunderbird] focus
|
||||
for_window [class=TelegramDesktop] focus
|
||||
|
||||
|
||||
##############
|
||||
# compositor #
|
||||
##############
|
||||
|
||||
# transparency
|
||||
# options could need changes, related to used GPU and drivers.
|
||||
# to find the right setting consult the archwiki or ask at the forum.
|
||||
#
|
||||
# picom: https://wiki.archlinux.org/title/Picom
|
||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||
# The default configuration is available in /etc/xdg/picom.conf
|
||||
# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
|
||||
# install picom package (yay -S picom)
|
||||
# start using default config
|
||||
exec_always --no-startup-id picom -b
|
||||
#
|
||||
# for custom config:
|
||||
#exec_always --no-startup-id picom --config ~/.config/picom.conf
|
||||
|
||||
#############################################
|
||||
# autostart applications/services on login: #
|
||||
#############################################
|
||||
|
||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# start a script to setup displays
|
||||
# use arandr to setup displays and save the file as monitor
|
||||
exec --no-startup-id ~/.screenlayout/monitor.sh
|
||||
|
||||
# set wallpaper
|
||||
exec --no-startup-id sleep 1 && systemctl --user restart wallpaper.service
|
||||
|
||||
# set powersavings for display:
|
||||
exec --no-startup-id xset s 480 dpms 600 600 600
|
||||
|
||||
# Desktop notifications
|
||||
#exec --no-startup-id /usr/bin/dunst --config ~/.config/dunst/dunstrc
|
||||
exec --no-startup-id /usr/bin/dunst
|
||||
|
||||
# screenshot tool
|
||||
exec --no-startup-id flameshot
|
||||
|
||||
# autotiling script
|
||||
# https://github.com/nwg-piotr/autotiling
|
||||
exec_always --no-startup-id autotiling
|
||||
|
||||
exec --no-startup-id i3-msg "workspace $ws2; exec firefox"
|
||||
|
||||
##################
|
||||
# floating rules #
|
||||
##################
|
||||
|
||||
# set floating (nontiling) for apps needing it
|
||||
for_window [class="Galculator" instance="galculator"] floating enable
|
||||
|
||||
# set floating (nontiling) for special apps
|
||||
for_window [class="Xsane" instance="xsane"] floating enable
|
||||
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
||||
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||
for_window [window_role="About"] floating enable
|
||||
|
||||
# set border of floating window
|
||||
for_window [class="urxvt"] border pixel 1
|
||||
|
||||
# set size of floating window
|
||||
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
||||
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
||||
|
||||
# set position of floating window
|
||||
#for_window [class=".*"] move position center
|
||||
|
||||
######################################
|
||||
# color settings for windows #
|
||||
######################################
|
||||
|
||||
# https://github.com/catppuccin/i3/blob/main/themes/catppuccin-mocha
|
||||
set $rosewater #f5e0dc
|
||||
set $flamingo #f2cdcd
|
||||
set $pink #f5c2e7
|
||||
set $mauve #cba6f7
|
||||
set $red #f38ba8
|
||||
set $maroon #eba0ac
|
||||
set $peach #fab387
|
||||
set $green #a6e3a1
|
||||
set $teal #94e2d5
|
||||
set $sky #89dceb
|
||||
set $sapphire #74c7ec
|
||||
set $blue #89b4fa
|
||||
set $lavender #b4befe
|
||||
set $text #cdd6f4
|
||||
set $subtext1 #bac2de
|
||||
set $subtext0 #a6adc8
|
||||
set $overlay2 #9399b2
|
||||
set $overlay1 #7f849c
|
||||
set $overlay0 #6c7086
|
||||
set $surface2 #585b70
|
||||
set $surface1 #45475a
|
||||
set $surface0 #313244
|
||||
set $base #1e1e2e
|
||||
# use colors in the RGBA format, the last two digits are transparency
|
||||
set $mantle #181825
|
||||
set $crust #11111b
|
||||
|
||||
# target title bg text indicator border
|
||||
client.focused $red $base $text $rosewater $red
|
||||
client.focused_inactive $mauve $base $text $rosewater $mauve
|
||||
client.unfocused $lavender $base $text $rosewater $lavender
|
||||
client.urgent $pink $base $lavender $overlay0 $pink
|
||||
client.placeholder $overlay0 $base $text $overlay0 $overlay0
|
||||
client.background $base
|
||||
|
||||
# Start Polybar
|
||||
exec_always --no-startup-id $HOME/.config/polybar/launch.sh --shapes
|
||||
|
||||
@@ -1,600 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar]
|
||||
fill = ⏽
|
||||
empty = ⏽
|
||||
indicator = ⏽
|
||||
; Nerd font : , ⏽, 樂 籠 錄 , 雷 絛
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
|
||||
; Soundcard to be used
|
||||
; Usually in the format hw:# where # is the card number
|
||||
; You can find the different card numbers in `/proc/asound/cards`
|
||||
master-soundcard = default
|
||||
speaker-soundcard = default
|
||||
headphone-soundcard = default
|
||||
|
||||
; Name of the master, speaker and headphone mixers
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
; If master, speaker or headphone-soundcard isn't the default,
|
||||
; use `amixer -c # scontrols` instead where # is the number
|
||||
; of the master, speaker or headphone soundcard respectively
|
||||
;
|
||||
; Default: Master
|
||||
master-mixer = Master
|
||||
|
||||
; Optionally define speaker and headphone mixers
|
||||
; Default: none
|
||||
;;speaker-mixer = Speaker
|
||||
; Default: none
|
||||
;;headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; Use the following command to list available device controls
|
||||
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
|
||||
; You may also need to use `amixer -c # controls` as above for the mixer names
|
||||
; Default: none
|
||||
;;headphone-id = 9
|
||||
|
||||
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
|
||||
; Default: false
|
||||
;;mapped = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <bar-volume>
|
||||
format-volume-prefix =
|
||||
format-volume-prefix-padding = 1
|
||||
format-volume-prefix-background = ${color.blue}
|
||||
format-volume-prefix-foreground = ${color.foreground}
|
||||
format-volume-background = ${color.background-alt}
|
||||
format-volume-foreground = ${color.foreground}
|
||||
format-volume-overline = ${color.background}
|
||||
format-volume-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-padding = 1
|
||||
format-muted-prefix-background = ${color.red}
|
||||
format-muted-overline = ${color.background}
|
||||
format-muted-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-volume = %percentage%%
|
||||
label-volume-background = ${color.background-alt}
|
||||
label-volume-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default
|
||||
label-muted = "Muted"
|
||||
label-muted-foreground = ${color.foreground}
|
||||
label-muted-background = ${color.background-alt}
|
||||
label-muted-padding = 1
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-background = ${color.blue}
|
||||
ramp-volume-padding = 1
|
||||
|
||||
; Only applies if <bar-volume> is used
|
||||
bar-volume-format = " %fill%%indicator%%empty% "
|
||||
bar-volume-width = 10
|
||||
bar-volume-gradient = false
|
||||
|
||||
bar-volume-indicator = ${bar.indicator}
|
||||
bar-volume-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-volume-fill = ${bar.fill}
|
||||
bar-volume-foreground-0 = ${color.foreground}
|
||||
bar-volume-foreground-1 = ${color.foreground}
|
||||
bar-volume-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-volume-empty = ${bar.empty}
|
||||
bar-volume-empty-foreground = ${color.gray}
|
||||
|
||||
; If defined, it will replace <ramp-volume> when
|
||||
; headphones are plugged in to `headphone_control_numid`
|
||||
; If undefined, <ramp-volume> will be used for both
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-headphones-0 =
|
||||
ramp-headphones-background = ${color.blue}
|
||||
ramp-headphones-padding = 1
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/brightness]
|
||||
;type = internal/xbacklight
|
||||
type = internal/backlight
|
||||
|
||||
; Use the following command to list available cards:
|
||||
; $ ls -1 /sys/class/backlight/
|
||||
;card = intel_backlight
|
||||
card = amdgpu_bl0
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <ramp>
|
||||
; <bar>
|
||||
format = <bar>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.lime}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label = %percentage%%
|
||||
|
||||
; Only applies if <ramp> is used
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
|
||||
; Only applies if <bar> is used
|
||||
bar-format = " %fill%%indicator%%empty% "
|
||||
bar-width = 10
|
||||
bar-gradient = false
|
||||
|
||||
bar-indicator = ${bar.indicator}
|
||||
bar-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-fill = ${bar.fill}
|
||||
bar-foreground-0 = ${color.foreground}
|
||||
bar-foreground-1 = ${color.foreground}
|
||||
bar-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-empty = ${bar.empty}
|
||||
bar-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/battery_bar]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT1
|
||||
adapter = ACAD
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <bar-capacity>
|
||||
format-charging-prefix = ""
|
||||
format-charging-prefix-padding = 1
|
||||
format-charging-prefix-background = ${color.green}
|
||||
format-charging-prefix-foreground = ${color.foreground}
|
||||
format-charging-background = ${color.background-alt}
|
||||
format-charging-foreground = ${color.foreground}
|
||||
format-charging-overline = ${color.background}
|
||||
format-charging-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <bar-capacity>
|
||||
format-discharging-prefix = ""
|
||||
format-discharging-prefix-padding = 1
|
||||
format-discharging-prefix-background = ${color.pink}
|
||||
format-discharging-prefix-foreground = ${color.foreground}
|
||||
format-discharging-background = ${color.background-alt}
|
||||
format-discharging-foreground = ${color.foreground}
|
||||
format-discharging-overline = ${color.background}
|
||||
format-discharging-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix = ""
|
||||
format-full-prefix-padding = 1
|
||||
format-full-prefix-background = ${color.red}
|
||||
format-full-prefix-foreground = ${color.foreground}
|
||||
format-full-background = ${color.background-alt}
|
||||
format-full-foreground = ${color.foreground}
|
||||
format-full-overline = ${color.background}
|
||||
format-full-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
|
||||
label-charging = %percentage%%
|
||||
label-charging-background = ${color.background-alt}
|
||||
label-charging-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
label-discharging-background = ${color.background-alt}
|
||||
label-discharging-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = Full
|
||||
label-full-background = ${color.background-alt}
|
||||
label-full-padding = 1
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
bar-capacity-format = " %fill%%indicator%%empty% "
|
||||
bar-capacity-width = 10
|
||||
bar-capacity-gradient = false
|
||||
|
||||
bar-capacity-indicator = ${bar.indicator}
|
||||
bar-capacity-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-capacity-fill = ${bar.fill}
|
||||
bar-capacity-foreground-0 = ${color.foreground}
|
||||
bar-capacity-foreground-1 = ${color.foreground}
|
||||
bar-capacity-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-capacity-empty = ${bar.empty}
|
||||
bar-capacity-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/cpu_bar]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
;;format = <label> <ramp-coreload>
|
||||
format = <bar-load><label>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.teal}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = "%percentage%% "
|
||||
|
||||
; Only applies if <bar-load> is used
|
||||
bar-load-format = " %fill%%indicator%%empty% "
|
||||
bar-load-width = 10
|
||||
bar-load-gradient = false
|
||||
|
||||
bar-load-indicator = ${bar.indicator}
|
||||
bar-load-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-load-fill = ${bar.fill}
|
||||
bar-load-foreground-0 = ${color.foreground}
|
||||
bar-load-foreground-1 = ${color.foreground}
|
||||
bar-load-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-load-empty = ${bar.empty}
|
||||
bar-load-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/filesystem_bar]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
;;mount-1 = /home
|
||||
;;mount-2 = /var
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 30
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = false
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
;;spacing = 4
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <bar-used><label-mounted>
|
||||
format-mounted-prefix =
|
||||
format-mounted-prefix-padding = 1
|
||||
format-mounted-prefix-background = ${color.purple}
|
||||
format-mounted-prefix-foreground = ${color.foreground}
|
||||
format-mounted-background = ${color.background-alt}
|
||||
format-mounted-foreground = ${color.foreground}
|
||||
format-mounted-overline = ${color.background}
|
||||
format-mounted-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-prefix =
|
||||
format-unmounted-prefix-padding = 1
|
||||
format-unmounted-prefix-background = ${color.red}
|
||||
format-unmounted-prefix-foreground = ${color.foreground}
|
||||
format-unmounted-background = ${color.background-alt}
|
||||
format-unmounted-foreground = ${color.foreground}
|
||||
format-unmounted-overline = ${color.background}
|
||||
format-unmounted-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = "%used%/%total% "
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = " %mountpoint%: not mounted "
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-format = " %fill%%indicator%%empty% "
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 2
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = <bar-used><label>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.indigo}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = "%mb_used% "
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-format = " %fill%%indicator%%empty% "
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/mpd_bar]
|
||||
type = internal/mpd
|
||||
|
||||
; Host where mpd is running (either ip or domain name)
|
||||
; Can also be the full path to a unix socket where mpd is running.
|
||||
;;host = 127.0.0.1
|
||||
;;port = 6600
|
||||
;;password = mysecretpassword
|
||||
|
||||
; Seconds to sleep between progressbar/song timer sync
|
||||
; Default: 1
|
||||
interval = 1
|
||||
|
||||
; Available tags:
|
||||
; <label-song> (default)
|
||||
; <label-time>
|
||||
; <bar-progress>
|
||||
; <toggle> - gets replaced with <icon-(pause|play)>
|
||||
; <toggle-stop> - gets replaced with <icon-(stop|play)>
|
||||
; <icon-random>
|
||||
; <icon-repeat>
|
||||
; <icon-repeatone> (deprecated)
|
||||
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
|
||||
; <icon-consume>
|
||||
; <icon-prev>
|
||||
; <icon-stop>
|
||||
; <icon-play>
|
||||
; <icon-pause>
|
||||
; <icon-next>
|
||||
; <icon-seekb>
|
||||
; <icon-seekf>
|
||||
format-online = <label-song><bar-progress><label-time>
|
||||
format-online-prefix =
|
||||
format-online-prefix-padding = 1
|
||||
format-online-prefix-background = ${color.green}
|
||||
format-online-prefix-foreground = ${color.foreground}
|
||||
format-online-background = ${color.background-alt}
|
||||
format-online-foreground = ${color.foreground}
|
||||
format-online-overline = ${color.background}
|
||||
format-online-underline = ${color.background}
|
||||
|
||||
;format-playing = ${self.format-online}
|
||||
;format-paused = ${self.format-online}
|
||||
;format-stopped = ${self.format-online}
|
||||
|
||||
; Available tags:
|
||||
; <label-offline>
|
||||
format-offline = <label-offline>
|
||||
format-offline-prefix =
|
||||
format-offline-prefix-padding = 1
|
||||
format-offline-prefix-background = ${color.red}
|
||||
format-offline-prefix-foreground = ${color.foreground}
|
||||
format-offline-background = ${color.background-alt}
|
||||
format-offline-foreground = ${color.foreground}
|
||||
format-offline-overline = ${color.background}
|
||||
format-offline-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %artist%
|
||||
; %album-artist%
|
||||
; %album%
|
||||
; %date%
|
||||
; %title%
|
||||
; Default: %artist% - %title%
|
||||
label-song = " %artist% - %title%"
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
; Available tokens:
|
||||
; %elapsed%
|
||||
; %total%
|
||||
; Default: %elapsed% / %total%
|
||||
label-time = "%elapsed% / %total% "
|
||||
|
||||
; Available tokens:
|
||||
; None
|
||||
label-offline = " Offline "
|
||||
|
||||
; Only applies if <icon-X> is used
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-stop =
|
||||
icon-next =
|
||||
icon-prev =
|
||||
icon-seekf =
|
||||
icon-seekb =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
icon-repeatone =
|
||||
icon-single =
|
||||
icon-consume =
|
||||
|
||||
; Used to display the state of random/repeat/repeatone/single
|
||||
; Only applies if <icon-[random|repeat|repeatone|single]> is used
|
||||
toggle-on-foreground = ${color.primary}
|
||||
toggle-off-foreground = ${color.secondary}
|
||||
|
||||
; Only applies if <bar-progress> is used
|
||||
bar-progress-format = " %fill%%indicator%%empty% "
|
||||
bar-progress-width = 10
|
||||
bar-progress-gradient = false
|
||||
|
||||
bar-progress-indicator = ${bar.indicator}
|
||||
bar-progress-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-progress-fill = ${bar.fill}
|
||||
bar-progress-foreground-0 = ${color.foreground}
|
||||
bar-progress-foreground-1 = ${color.foreground}
|
||||
bar-progress-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-progress-empty = ${bar.empty}
|
||||
bar-progress-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,39 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█░░░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░░░█░█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[color]
|
||||
|
||||
;; Use pywal.sh in scripts directory to use colors from an image/wallpaper.
|
||||
|
||||
;; main colors
|
||||
background = #2f343f
|
||||
background-alt = #C4C7C5
|
||||
foreground = #1C1E20
|
||||
foreground-alt = #C4C7C5
|
||||
primary = #B4BC67
|
||||
|
||||
white = #FFFFFF
|
||||
black = #000000
|
||||
red = #EC7875
|
||||
pink = #EC6798
|
||||
purple = #BE78D1
|
||||
blue = #75A4CD
|
||||
cyan = #00C7DF
|
||||
teal = #00B19F
|
||||
green = #61C766
|
||||
lime = #B9C244
|
||||
yellow = #EBD369
|
||||
amber = #EDB83F
|
||||
orange = #E57C46
|
||||
brown = #AC8476
|
||||
gray = #9E9E9E
|
||||
indigo = #6C77BB
|
||||
blue-gray = #6D8895
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,293 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░█░█▀▀░░█░░█░█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/blocks/bars.ini
|
||||
include-file = ~/.config/polybar/blocks/colors.ini
|
||||
include-file = ~/.config/polybar/blocks/modules.ini
|
||||
include-file = ~/.config/polybar/blocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 100%
|
||||
height = 34
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.background}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
line-size = 5
|
||||
line-color = ${color.background}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.primary}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:size=10;4"
|
||||
font-1 = "feather:size=10;3"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
modules-left = sep launcher sep workspaces sep mpd
|
||||
modules-center = title
|
||||
modules-right = color-switch sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Add this script to your wm startup file.
|
||||
|
||||
DIR="$HOME/.config/polybar/blocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the bar
|
||||
polybar -q main -c "$DIR"/config.ini &
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,309 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀▀░█░█░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▀░█▀▄░█▀▀░▀▄▀░░█░░█▀▀░█▄█░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░░░▀░▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/blocks/bars.ini
|
||||
include-file = ~/.config/polybar/blocks/colors.ini
|
||||
include-file = ~/.config/polybar/blocks/modules.ini
|
||||
include-file = ~/.config/polybar/blocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 100%
|
||||
height = 34
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.background}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
line-size = 5
|
||||
line-color = ${color.background}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.primary}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:size=10;4"
|
||||
font-1 = "feather:size=10;3"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar/top]
|
||||
inherit = bar/main
|
||||
offset-y = 10
|
||||
modules-center = sep launcher sep workspaces sep cpu sep memory sep mpd sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
enable-ipc = true
|
||||
|
||||
[bar/mid]
|
||||
inherit = bar/main
|
||||
offset-y = 54
|
||||
modules-center = volume sep brightness sep battery_bar sep cpu_bar sep filesystem_bar sep memory_bar sep mpd_bar
|
||||
enable-ipc = true
|
||||
|
||||
[bar/bottom]
|
||||
inherit = bar/main
|
||||
offset-y = 98
|
||||
modules-center = title sep menu sep term files browser settings sep filesystem sep temperature sep color-switch sep keyboard sep pulseaudio sep backlight sep updates sep powermenu sep
|
||||
enable-ipc = true
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
;enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$HOME/.config/polybar/blocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the preview bar
|
||||
polybar -q top -c "$DIR"/preview.ini &
|
||||
polybar -q mid -c "$DIR"/preview.ini &
|
||||
polybar -q bottom -c "$DIR"/preview.ini &
|
||||
@@ -1,117 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
#
|
||||
# checkupdates: Safely print a list of pending updates.
|
||||
#
|
||||
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
declare -r myname='checkupdates'
|
||||
declare -r myver='1.0.0'
|
||||
|
||||
plain() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg2() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
ask() {
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
|
||||
}
|
||||
|
||||
warning() {
|
||||
local mesg=$1; shift
|
||||
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
error() {
|
||||
local mesg=$1; shift
|
||||
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
# check if messages are to be printed using color
|
||||
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
|
||||
# prefer terminal safe colored and bold text when tput is supported
|
||||
if tput setaf 0 &>/dev/null; then
|
||||
ALL_OFF="$(tput sgr0)"
|
||||
BOLD="$(tput bold)"
|
||||
BLUE="${BOLD}$(tput setaf 4)"
|
||||
GREEN="${BOLD}$(tput setaf 2)"
|
||||
RED="${BOLD}$(tput setaf 1)"
|
||||
YELLOW="${BOLD}$(tput setaf 3)"
|
||||
else
|
||||
ALL_OFF="\e[1;0m"
|
||||
BOLD="\e[1;1m"
|
||||
BLUE="${BOLD}\e[1;34m"
|
||||
GREEN="${BOLD}\e[1;32m"
|
||||
RED="${BOLD}\e[1;31m"
|
||||
YELLOW="${BOLD}\e[1;33m"
|
||||
fi
|
||||
fi
|
||||
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
|
||||
|
||||
if (( $# > 0 )); then
|
||||
echo "${myname} v${myver}"
|
||||
echo
|
||||
echo "Safely print a list of pending updates"
|
||||
echo
|
||||
echo "Usage: ${myname}"
|
||||
echo
|
||||
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! type -P fakeroot >/dev/null; then
|
||||
error 'Cannot find the fakeroot binary.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $CHECKUPDATES_DB ]]; then
|
||||
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
|
||||
fi
|
||||
|
||||
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
|
||||
|
||||
DBPath="$(pacman-conf DBPath)"
|
||||
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
|
||||
DBPath="/var/lib/pacman/"
|
||||
fi
|
||||
|
||||
mkdir -p "$CHECKUPDATES_DB"
|
||||
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
|
||||
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
|
||||
error 'Cannot fetch updates'
|
||||
exit 1
|
||||
fi
|
||||
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
|
||||
|
||||
exit 0
|
||||
|
||||
# vim: set noet:
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi"
|
||||
|
||||
# random accent color
|
||||
COLORS=('#EC7875' '#EC6798' '#BE78D1' '#75A4CD' '#00C7DF' '#00B19F' '#61C766' \
|
||||
'#B9C244' '#EBD369' '#EDB83F' '#E57C46' '#AC8476' '#6C77BB' '#6D8895')
|
||||
AC="${COLORS[$(( $RANDOM % 14 ))]}"
|
||||
sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE
|
||||
sed -i -e "s/se: .*/se: ${AC}40;/g" $FILE
|
||||
|
||||
rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/blocks/scripts/rofi/launcher.rasi
|
||||
@@ -1,95 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Author : Aditya Shakya
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Twitter : @adi1090x
|
||||
|
||||
dir="~/.config/polybar/blocks/scripts/rofi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
rofi_command="rofi -no-config -theme $dir/powermenu.rasi"
|
||||
|
||||
# Options
|
||||
shutdown=" Shutdown"
|
||||
reboot=" Restart"
|
||||
lock=" Lock"
|
||||
suspend=" Sleep"
|
||||
logout=" Logout"
|
||||
|
||||
# Confirmation
|
||||
confirm_exit() {
|
||||
rofi -dmenu\
|
||||
-no-config\
|
||||
-i\
|
||||
-no-fixed-num-lines\
|
||||
-p "Are You Sure? : "\
|
||||
-theme $dir/confirm.rasi
|
||||
}
|
||||
|
||||
# Message
|
||||
msg() {
|
||||
rofi -no-config -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
|
||||
}
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
if [[ -f /usr/bin/i3lock ]]; then
|
||||
i3lock
|
||||
elif [[ -f /usr/bin/betterlockscreen ]]; then
|
||||
betterlockscreen -l
|
||||
fi
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then
|
||||
openbox --exit
|
||||
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
|
||||
bspc quit
|
||||
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
|
||||
i3-msg exit
|
||||
fi
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -1,11 +0,0 @@
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: #2f343fFF;
|
||||
bga: #C4C7C5FF;
|
||||
fga: #C4C7C5FF;
|
||||
fg: #1C1E20FF;
|
||||
ac: #00C7DFFF;
|
||||
se: #00C7DF40;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bg;
|
||||
text-color: @fga;
|
||||
font: "Iosevka Nerd Font 10";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 210px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 550px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ prompt, entry ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 2;
|
||||
lines: 8;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bg;
|
||||
text-color: @fga;
|
||||
font: "Iosevka Nerd Font 10";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 320px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 400px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 8;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -12px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -23px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -23px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SDIR="$HOME/.config/polybar/blocks/scripts"
|
||||
|
||||
# Launch Rofi
|
||||
MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \
|
||||
-theme $SDIR/rofi/styles.rasi \
|
||||
<<< " Default| Nord| Gruvbox| Adapta| Cherry|")"
|
||||
case "$MENU" in
|
||||
*Default) "$SDIR"/styles.sh --default ;;
|
||||
*Nord) "$SDIR"/styles.sh --nord ;;
|
||||
*Gruvbox) "$SDIR"/styles.sh --gruvbox ;;
|
||||
*Adapta) "$SDIR"/styles.sh --adapta ;;
|
||||
*Cherry) "$SDIR"/styles.sh --cherry ;;
|
||||
esac
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Color files
|
||||
PFILE="$HOME/.config/polybar/blocks/colors.ini"
|
||||
RFILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi"
|
||||
|
||||
# Change colors
|
||||
change_color() {
|
||||
# polybar
|
||||
sed -i -e "s/background = #.*/background = $BG/g" $PFILE
|
||||
sed -i -e "s/background-alt = #.*/background-alt = $BGA/g" $PFILE
|
||||
sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
|
||||
sed -i -e "s/foreground-alt = #.*/foreground-alt = $FGA/g" $PFILE
|
||||
sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE
|
||||
|
||||
# rofi
|
||||
cat > $RFILE <<- EOF
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: ${BG}FF;
|
||||
bga: ${BGA}FF;
|
||||
fga: ${FGA}FF;
|
||||
fg: ${FG}FF;
|
||||
ac: ${AC}FF;
|
||||
se: ${AC}40;
|
||||
}
|
||||
EOF
|
||||
|
||||
polybar-msg cmd restart
|
||||
}
|
||||
|
||||
if [[ $1 = "--default" ]]; then
|
||||
BG="#2f343f"
|
||||
BGA="#C4C7C5"
|
||||
FGA="#C4C7C5"
|
||||
FG="#1C1E20"
|
||||
AC="#B4BC67"
|
||||
change_color
|
||||
elif [[ $1 = "--nord" ]]; then
|
||||
BG="#3B4252"
|
||||
BGA="#4C566A"
|
||||
FGA="#E5E9F0"
|
||||
FG="#ECEFF4"
|
||||
AC="#A3BE8C"
|
||||
change_color
|
||||
elif [[ $1 = "--gruvbox" ]]; then
|
||||
BG="#282828"
|
||||
BGA="#EBDBB2"
|
||||
FGA="#EBDBB2"
|
||||
FG="#282828"
|
||||
AC="#CC241D"
|
||||
change_color
|
||||
elif [[ $1 = "--adapta" ]]; then
|
||||
BG="#243035"
|
||||
BGA="#38444A"
|
||||
FGA="#FDF6E3"
|
||||
FG="#FFFFFF"
|
||||
AC="#4DD0E1"
|
||||
change_color
|
||||
elif [[ $1 = "--cherry" ]]; then
|
||||
BG="#1F1626"
|
||||
BGA="#423949"
|
||||
FGA="#FFFFFF"
|
||||
FG="#FFFFFF"
|
||||
AC="#D94085"
|
||||
change_color
|
||||
else
|
||||
cat <<- _EOF_
|
||||
No option specified, Available options:
|
||||
--default --nord --gruvbox --adapta --cherry
|
||||
_EOF_
|
||||
fi
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
|
||||
|
||||
get_total_updates() { UPDATES=$(~/.config/polybar/blocks/scripts/checkupdates 2>/dev/null | wc -l); }
|
||||
|
||||
while true; do
|
||||
get_total_updates
|
||||
|
||||
# notify user of updates
|
||||
if hash notify-send &>/dev/null; then
|
||||
if (( UPDATES > 50 )); then
|
||||
notify-send -u critical -i $NOTIFY_ICON \
|
||||
"You really need to update!!" "$UPDATES New packages"
|
||||
elif (( UPDATES > 25 )); then
|
||||
notify-send -u normal -i $NOTIFY_ICON \
|
||||
"You should update soon" "$UPDATES New packages"
|
||||
elif (( UPDATES > 2 )); then
|
||||
notify-send -u low -i $NOTIFY_ICON \
|
||||
"$UPDATES New packages"
|
||||
fi
|
||||
fi
|
||||
|
||||
# when there are updates available
|
||||
# every 10 seconds another check for updates is done
|
||||
while (( UPDATES > 0 )); do
|
||||
if (( UPDATES == 1 )); then
|
||||
echo "$UPDATES"
|
||||
elif (( UPDATES > 1 )); then
|
||||
echo "$UPDATES"
|
||||
else
|
||||
echo "None"
|
||||
fi
|
||||
sleep 10
|
||||
get_total_updates
|
||||
done
|
||||
|
||||
# when no updates are available, use a longer loop, this saves on CPU
|
||||
# and network uptime, only checking once every 30 min for new updates
|
||||
while (( UPDATES == 0 )); do
|
||||
echo "None"
|
||||
sleep 1800
|
||||
get_total_updates
|
||||
done
|
||||
done
|
||||
@@ -1,292 +0,0 @@
|
||||
;; ┌──────────────────────────────────────────────────────────────────────────────-----┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█░█░█▀▀░█▀▀░█▀▄░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀ │
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░▀▀█░█▀▀░█▀▄░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█ │
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀ │
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └──────────────────────────────────────────────────────────────────────────────-----┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/updates]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/usr/bin/env sh -c [command]")
|
||||
exec = ~/.config/polybar/blocks/scripts/updates.sh
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
;;exec-if = ""
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = true
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 2 (0 if `tail = true`)
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-background = ${color.yellow}
|
||||
format-prefix-padding = 1
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-background = ${color.background-alt}
|
||||
label-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
|
||||
click-left = exo-open --launch TerminalEmulator &
|
||||
click-right = exo-open --launch TerminalEmulator &
|
||||
;;double-click-left = echo double left %counter%
|
||||
;;double-click-middle = echo double middle %counter%
|
||||
;;double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
|
||||
;;scroll-up = echo scroll up %counter%
|
||||
;;scroll-down = echo scroll down %counter%
|
||||
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/launcher]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.teal}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " Menu "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
click-left = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
;;click-middle = ~/.config/polybar/blocks/scripts/launcher-full
|
||||
click-right = ~/.config/polybar/blocks/scripts/style-switch.sh &
|
||||
|
||||
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
;;scroll-up = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
;;scroll-down = ~/.config/polybar/blocks/scripts/color-switch.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/sysmenu]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.cyan}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " System "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
click-left = ~/.config/polybar/blocks/scripts/powermenu.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/color-switch]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.orange}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " Style "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
click-left = ~/.config/polybar/blocks/scripts/style-switch.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/sep]
|
||||
type = custom/text
|
||||
content = |
|
||||
|
||||
content-background = ${color.background}
|
||||
content-foreground = ${color.background}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/apps]
|
||||
type = custom/text
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
content-padding = 1
|
||||
|
||||
[module/term]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.blue-gray}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = termite &
|
||||
click-middle = urxvt &
|
||||
click-right = xfce4-terminal &
|
||||
|
||||
[module/files]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.blue}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = thunar &
|
||||
click-right = pcmanfm &
|
||||
|
||||
[module/browser]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.orange}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = firefox &
|
||||
click-right = chromium &
|
||||
|
||||
[module/settings]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.teal}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = xfce4-settings-manager &
|
||||
click-right = lxappearance &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
; If true, <label-toggle> will be to the left of the menu items (default).
|
||||
; If false, it will be on the right of all the items.
|
||||
expand-right = true
|
||||
|
||||
; "menu-LEVEL-N" has the same properties as "label-NAME" with
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
menu-0-0 = " Reboot |"
|
||||
menu-0-0-background = ${color.background-alt}
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = " Shutdown "
|
||||
menu-0-1-background = ${color.background-alt}
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
menu-1-0 = " Back |"
|
||||
menu-1-0-background = ${color.background-alt}
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = " Reboot "
|
||||
menu-1-1-background = ${color.background-alt}
|
||||
menu-1-1-exec = systemctl reboot
|
||||
|
||||
menu-2-0 = " Shutdown |"
|
||||
menu-2-0-background = ${color.background-alt}
|
||||
menu-2-0-exec = systemctl poweroff
|
||||
menu-2-1 = " Back "
|
||||
menu-2-1-background = ${color.background-alt}
|
||||
menu-2-1-exec = menu-open-0
|
||||
|
||||
; Available tags:
|
||||
; <label-toggle> (default) - gets replaced with <label-(open|close)>
|
||||
; <menu> (default)
|
||||
; Note that if you use <label-toggle> you must also include
|
||||
; the definition for <label-open>
|
||||
|
||||
format = <label-toggle><menu>
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
label-open =
|
||||
label-open-background = ${color.cyan}
|
||||
label-open-padding = 1
|
||||
label-close =
|
||||
label-close-background = ${color.red}
|
||||
label-close-padding = 1
|
||||
|
||||
; Optional item separator
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
;label-separator-foreground = ${color.foreground}
|
||||
;label-separator-background = ${color.background-alt}
|
||||
|
||||
;;label-open-foreground = ${color.foreground}
|
||||
;;label-close-foreground = ${color.background}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/menu]
|
||||
type = custom/menu
|
||||
|
||||
; If true, <label-toggle> will be to the left of the menu items (default).
|
||||
; If false, it will be on the right of all the items.
|
||||
expand-right = true
|
||||
|
||||
; "menu-LEVEL-N" has the same properties as "label-NAME" with
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
menu-0-0 =" Menu | "
|
||||
menu-0-0-background = ${color.background-alt}
|
||||
menu-0-0-exec = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
|
||||
menu-0-1 =" Files | "
|
||||
menu-0-1-background = ${color.background-alt}
|
||||
menu-0-1-exec = thunar &
|
||||
|
||||
menu-0-2 =" Terminal | "
|
||||
menu-0-2-background = ${color.background-alt}
|
||||
menu-0-2-exec = termite &
|
||||
|
||||
menu-0-3 =" Browser "
|
||||
menu-0-3-background = ${color.background-alt}
|
||||
menu-0-3-exec = firefox &
|
||||
|
||||
; Available tags:
|
||||
; <label-toggle> (default) - gets replaced with <label-(open|close)>
|
||||
; <menu> (default)
|
||||
; Note that if you use <label-toggle> you must also include
|
||||
; the definition for <label-open>
|
||||
|
||||
format = <label-toggle><menu>
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
label-open =
|
||||
label-open-background = ${color.yellow}
|
||||
label-open-padding = 1
|
||||
label-close =
|
||||
label-close-background = ${color.red}
|
||||
label-close-padding = 1
|
||||
|
||||
; Optional item separator
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,534 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar]
|
||||
fill =
|
||||
empty =
|
||||
indicator = ⏽
|
||||
; Nerd font : , ⏽, 樂 籠 錄 , 雷 絛
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
|
||||
; Soundcard to be used
|
||||
; Usually in the format hw:# where # is the card number
|
||||
; You can find the different card numbers in `/proc/asound/cards`
|
||||
master-soundcard = default
|
||||
speaker-soundcard = default
|
||||
headphone-soundcard = default
|
||||
|
||||
; Name of the master, speaker and headphone mixers
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
; If master, speaker or headphone-soundcard isn't the default,
|
||||
; use `amixer -c # scontrols` instead where # is the number
|
||||
; of the master, speaker or headphone soundcard respectively
|
||||
;
|
||||
; Default: Master
|
||||
master-mixer = Master
|
||||
|
||||
; Optionally define speaker and headphone mixers
|
||||
; Default: none
|
||||
;;speaker-mixer = Speaker
|
||||
; Default: none
|
||||
;;headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; Use the following command to list available device controls
|
||||
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
|
||||
; You may also need to use `amixer -c # controls` as above for the mixer names
|
||||
; Default: none
|
||||
;;headphone-id = 9
|
||||
|
||||
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
|
||||
; Default: false
|
||||
;;mapped = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
format-volume-background = ${color.shade6}
|
||||
format-volume-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-font = 2
|
||||
format-muted-background = ${color.shade6}
|
||||
format-muted-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-volume = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default
|
||||
label-muted = " Muted"
|
||||
label-muted-foreground = ${color.foreground}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-font = 2
|
||||
|
||||
; Only applies if <bar-volume> is used
|
||||
bar-volume-width = 10
|
||||
bar-volume-gradient = false
|
||||
|
||||
bar-volume-indicator = ${bar.indicator}
|
||||
bar-volume-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-volume-fill = ${bar.fill}
|
||||
bar-volume-foreground-0 = ${color.foreground}
|
||||
bar-volume-foreground-1 = ${color.foreground}
|
||||
bar-volume-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-volume-empty = ${bar.empty}
|
||||
bar-volume-empty-foreground = ${color.foreground}
|
||||
|
||||
; If defined, it will replace <ramp-volume> when
|
||||
; headphones are plugged in to `headphone_control_numid`
|
||||
; If undefined, <ramp-volume> will be used for both
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-headphones-0 =
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/brightness]
|
||||
;type = internal/xbacklight
|
||||
type = internal/backlight
|
||||
|
||||
; Use the following command to list available cards:
|
||||
; $ ls -1 /sys/class/backlight/
|
||||
;card = intel_backlight
|
||||
card = amdgpu_bl0
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <ramp>
|
||||
; <bar>
|
||||
format = <ramp> <bar>
|
||||
format-background = ${color.shade7}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label = %percentage%%
|
||||
|
||||
; Only applies if <ramp> is used
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
ramp-font = 2
|
||||
|
||||
; Only applies if <bar> is used
|
||||
bar-width = 10
|
||||
bar-gradient = false
|
||||
|
||||
bar-indicator = ${bar.indicator}
|
||||
bar-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-fill = ${bar.fill}
|
||||
bar-foreground-0 = ${color.foreground}
|
||||
bar-foreground-1 = ${color.foreground}
|
||||
bar-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-empty = ${bar.empty}
|
||||
bar-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/battery_bar]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT1
|
||||
adapter = ACAD
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <bar-capacity>
|
||||
format-charging-prefix = " "
|
||||
format-charging-prefix-font = 2
|
||||
format-charging-background = ${color.shade5}
|
||||
format-charging-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <bar-capacity>
|
||||
format-discharging-prefix = " "
|
||||
format-discharging-prefix-font = 2
|
||||
format-discharging-background = ${color.shade5}
|
||||
format-discharging-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-font = 2
|
||||
format-full-background = ${color.shade5}
|
||||
format-full-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
|
||||
label-charging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = "Full"
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
bar-capacity-width = 10
|
||||
bar-capacity-gradient = false
|
||||
|
||||
bar-capacity-indicator = ${bar.indicator}
|
||||
bar-capacity-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-capacity-fill = ${bar.fill}
|
||||
bar-capacity-foreground-0 = ${color.foreground}
|
||||
bar-capacity-foreground-1 = ${color.foreground}
|
||||
bar-capacity-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-capacity-empty = ${bar.empty}
|
||||
bar-capacity-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/cpu_bar]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
;;format = <label> <ramp-coreload>
|
||||
format = <bar-load> <label>
|
||||
format-prefix = " "
|
||||
format-prefix-font = 2
|
||||
format-background = ${color.shade7}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = "%percentage%%"
|
||||
|
||||
; Only applies if <bar-load> is used
|
||||
bar-load-width = 10
|
||||
bar-load-gradient = false
|
||||
|
||||
bar-load-indicator = ${bar.indicator}
|
||||
bar-load-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-load-fill = ${bar.fill}
|
||||
bar-load-foreground-0 = ${color.foreground}
|
||||
bar-load-foreground-1 = ${color.foreground}
|
||||
bar-load-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-load-empty = ${bar.empty}
|
||||
bar-load-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/filesystem_bar]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
;;mount-1 = /home
|
||||
;;mount-2 = /var
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 30
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = false
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
;;spacing = 4
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <bar-used> <label-mounted>
|
||||
format-mounted-prefix = " "
|
||||
format-mounted-prefix-font = 2
|
||||
format-mounted-background = ${color.shade5}
|
||||
format-mounted-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-prefix = " "
|
||||
format-unmounted-prefix-font = 2
|
||||
format-unmounted-background = ${color.shade5}
|
||||
format-unmounted-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = %used%/%total%
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = "%mountpoint%: not mounted"
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 2
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = <bar-used> <label>
|
||||
format-prefix = " "
|
||||
format-prefix-font = 2
|
||||
format-background = ${color.shade6}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = "%mb_used%"
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/mpd_bar]
|
||||
type = internal/mpd
|
||||
|
||||
; Host where mpd is running (either ip or domain name)
|
||||
; Can also be the full path to a unix socket where mpd is running.
|
||||
;;host = 127.0.0.1
|
||||
;;port = 6600
|
||||
;;password = mysecretpassword
|
||||
|
||||
; Seconds to sleep between progressbar/song timer sync
|
||||
; Default: 1
|
||||
interval = 1
|
||||
|
||||
; Available tags:
|
||||
; <label-song> (default)
|
||||
; <label-time>
|
||||
; <bar-progress>
|
||||
; <toggle> - gets replaced with <icon-(pause|play)>
|
||||
; <toggle-stop> - gets replaced with <icon-(stop|play)>
|
||||
; <icon-random>
|
||||
; <icon-repeat>
|
||||
; <icon-repeatone> (deprecated)
|
||||
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
|
||||
; <icon-consume>
|
||||
; <icon-prev>
|
||||
; <icon-stop>
|
||||
; <icon-play>
|
||||
; <icon-pause>
|
||||
; <icon-next>
|
||||
; <icon-seekb>
|
||||
; <icon-seekf>
|
||||
format-online = <label-song> <bar-progress> <label-time>
|
||||
format-online-prefix = ﱘ
|
||||
format-online-prefix-font = 2
|
||||
format-online-background = ${color.shade4}
|
||||
format-online-padding = 2
|
||||
|
||||
;format-playing = ${self.format-online}
|
||||
;format-paused = ${self.format-online}
|
||||
;format-stopped = ${self.format-online}
|
||||
|
||||
; Available tags:
|
||||
; <label-offline>
|
||||
format-offline = <label-offline>
|
||||
format-offline-prefix = ﱘ
|
||||
format-offline-prefix-font = 2
|
||||
format-offline-background = ${color.shade4}
|
||||
format-offline-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %artist%
|
||||
; %album-artist%
|
||||
; %album%
|
||||
; %date%
|
||||
; %title%
|
||||
; Default: %artist% - %title%
|
||||
label-song = " %artist% - %title%"
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
; Available tokens:
|
||||
; %elapsed%
|
||||
; %total%
|
||||
; Default: %elapsed% / %total%
|
||||
label-time = %elapsed% / %total%
|
||||
|
||||
; Available tokens:
|
||||
; None
|
||||
label-offline = " Offline"
|
||||
|
||||
; Only applies if <icon-X> is used
|
||||
icon-play = 喇
|
||||
icon-pause =
|
||||
icon-stop =
|
||||
icon-prev =
|
||||
icon-next =
|
||||
icon-seekb =
|
||||
icon-seekf =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
icon-repeatone =
|
||||
icon-single =
|
||||
icon-consume =
|
||||
|
||||
; Used to display the state of random/repeat/repeatone/single
|
||||
; Only applies if <icon-[random|repeat|repeatone|single]> is used
|
||||
toggle-on-foreground = ${color.foreground}
|
||||
toggle-off-foreground = ${color.background}
|
||||
|
||||
; Only applies if <bar-progress> is used
|
||||
bar-progress-width = 10
|
||||
bar-progress-gradient = false
|
||||
|
||||
bar-progress-indicator = ${bar.indicator}
|
||||
bar-progress-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-progress-fill = ${bar.fill}
|
||||
bar-progress-foreground-0 = ${color.foreground}
|
||||
bar-progress-foreground-1 = ${color.foreground}
|
||||
bar-progress-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-progress-empty = ${bar.empty}
|
||||
bar-progress-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@@ -1,30 +0,0 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█░░░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░░░█░█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[color]
|
||||
|
||||
;; Use pywal.sh in scripts directory to use colors from an image/wallpaper.
|
||||
|
||||
;; main colors
|
||||
background = #141C21
|
||||
foreground = #F5F5F5
|
||||
foreground-alt = #FFFFFF
|
||||
alpha = #00000000
|
||||
|
||||
;; shades
|
||||
shade1 = #BF360C
|
||||
shade2 = #D84315
|
||||
shade3 = #E64A19
|
||||
shade4 = #F4511E
|
||||
shade5 = #FF5722
|
||||
shade6 = #FF7043
|
||||
shade7 = #FF8A65
|
||||
shade8 = #FFAB91
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user