Compare commits
224 Commits
e322bf65fc
...
test2
| Author | SHA1 | Date | |
|---|---|---|---|
| f7d448f63b | |||
| 2a9a66fb06 | |||
| a29940a65a | |||
| d283bcddcd | |||
| efb3e54dcb | |||
| 872c9314e9 | |||
| 84c738ce64 | |||
| d814a13602 | |||
| 35b7ff0567 | |||
| ee10eb8779 | |||
| cc69e21613 | |||
| 0c6ffc6dbd | |||
| c21a76907c | |||
| 36dcdad8b7 | |||
| 3215c88ee1 | |||
| d2509eb0aa | |||
| d7305dc070 | |||
| 95a87d5112 | |||
| 9c11f4b357 | |||
| 05b7b53677 | |||
| 9170f6af1d | |||
| 14270d4217 | |||
| 214de1d2a2 | |||
| 8e22012b23 | |||
| bf44b943ac | |||
| fef4fd5ce1 | |||
| 2aa6073b5e | |||
| f722d06a28 | |||
| ec32037212 | |||
| 375935205e | |||
| 6b29f628db | |||
| 5890dd13d6 | |||
| 58dd4470fa | |||
| 680762b999 | |||
| 96ba4fd0b3 | |||
| b0b5833502 | |||
| 18c73ef8f1 | |||
| 9385652e8b | |||
| 5198256bf7 | |||
| 67ac6797df | |||
| 7703621506 | |||
| 0e125af3f7 | |||
| a9850d527c | |||
| cc6f4cb102 | |||
|
|
8d59331de5 | ||
|
|
066308e9ae | ||
|
|
6159d33cd6 | ||
| c70c39f28f | |||
| 468f1ee9c0 | |||
| bad23c0796 | |||
| d1b302a234 | |||
| 6fa75cad60 | |||
| f24e48d5cd | |||
| 579e97a3be | |||
| ba7153ce4a | |||
| 48d4788e55 | |||
| b9b12d07a3 | |||
| 4c998c4a21 | |||
| 7e119171dd | |||
| 2f339474e8 | |||
| 7d100dbbe5 | |||
| d03d13975f | |||
| cd0f9ab719 | |||
| c791055d7f | |||
| 9ac0a9895c | |||
| 7aea9806ad | |||
| a3e3c88204 | |||
| 5cbbf5e777 | |||
| 4b442be5ac | |||
| 87d8a43119 | |||
| 3f9dd1a39a | |||
| 91a3099822 | |||
| 78ec2715bd | |||
| cd937acc60 | |||
| c0b9631ecf | |||
| 06e2e847e9 | |||
| a14e884302 | |||
| d719481f4d | |||
| 3bb8f8bd56 | |||
| a71f9b7bc5 | |||
| 3cf49371e1 | |||
| 69f6ba29fc | |||
| 52525ba8ce | |||
| 19ca3f7980 | |||
| cf12e48c41 | |||
| b2b80a7ba4 | |||
| 903f6975fc | |||
|
|
284387581e | ||
| 1e05fe61f0 | |||
| 9f4cebde56 | |||
| 296f3e9f76 | |||
| bd7c4d270d | |||
| 617f63ed17 | |||
| 5ba2bda934 | |||
| 73c18fa7b7 | |||
| 546c08a28e | |||
| 40f08b3783 | |||
| 90fd75b2ba | |||
| 442e6e0986 | |||
| be07205cbb | |||
| 0c1ddd96c3 | |||
| abd7b450c9 | |||
| 7b92000dde | |||
| 7f5e51651a | |||
| f9cbe9fbea | |||
| ab75df4095 | |||
| 2668f4ffad | |||
| 1e706c8ed9 | |||
| 4f0f775a5d | |||
| c737c3a0f4 | |||
| fd3c106b29 | |||
| 1405b0621d | |||
| 75af2aba0f | |||
| 65455aff68 | |||
| da77ab91c7 | |||
| 03fbae33e4 | |||
| f844c3cc48 | |||
| f88cbf2a32 | |||
| adb32321a3 | |||
| 18b32adfc9 | |||
| 8f850ec2c8 | |||
| 73fe37e50f | |||
| 5e8820da53 | |||
| 7e0a937516 | |||
| ea1b3ecc3d | |||
| b4f502e964 | |||
| f84ed5f28d | |||
| 89799c2ccd | |||
| c51a326278 | |||
| cedecc54b9 | |||
| 0b01fd236e | |||
| 6e518966e0 | |||
| e8f2888ead | |||
| d9bb925581 | |||
| eac0c05a56 | |||
| ea512bb92d | |||
| 06bdbb608c | |||
| d5c8aaa6d8 | |||
| 60667c81a2 | |||
| c194f06137 | |||
| f93ce57d11 | |||
| cc3dcb9979 | |||
| d0c39c4dc6 | |||
| 42b8685182 | |||
| e369cf1917 | |||
| 10dd7a588e | |||
| b733b560b8 | |||
| 55b494a045 | |||
| db7e251b94 | |||
| 76de35c9a0 | |||
| 73a26bb372 | |||
| 7eefa3c800 | |||
| 959dc9dd80 | |||
| 614e3434e8 | |||
| c9d1fa8b0f | |||
| fa756766e5 | |||
| 4f4a9b919f | |||
| d086928ecc | |||
| 6008fb53db | |||
| 3fceca6d87 | |||
| aea05be674 | |||
| b9a9097f95 | |||
| d9dd1e7acf | |||
| 2018e47525 | |||
| d946aa4b4c | |||
| 408595d7e1 | |||
| b924e780c3 | |||
| e3158e02e4 | |||
| a706259322 | |||
| 20f7fe43d2 | |||
| b678d929ff | |||
| 9e5d3c5262 | |||
| cad6720173 | |||
| 0866a310cc | |||
|
|
a35d7d78e1 | ||
| 2128028113 | |||
| cc6a0673b9 | |||
| c859f7f76c | |||
| 1907fb2547 | |||
| 7b20ee2875 | |||
| 513e401099 | |||
| 1b22fe6116 | |||
| c6a056b77c | |||
| 236954d557 | |||
| f1c9e4a6f3 | |||
| c12185af79 | |||
| 57d3c570c0 | |||
| 8d3a4ff778 | |||
| ffb295d858 | |||
| fb3c3d8c19 | |||
| 41abaf2533 | |||
| b83ced88a5 | |||
| 9723753b5b | |||
| d2d2ddace4 | |||
|
|
eb31b393e9 | ||
| d74d7866ff | |||
| 75fdf52586 | |||
|
|
bdb0fd00bd | ||
|
|
2ae40edccc | ||
| 825ff4e770 | |||
| 2b9d974659 | |||
| 2895c33fbc | |||
| 5c3cf1b887 | |||
| a0968ba34a | |||
| 71a0886d46 | |||
|
|
83c9d72afe | ||
|
|
39b45df38e | ||
|
|
55477c5919 | ||
|
|
fd2a274668 | ||
|
|
613f249f64 | ||
|
|
9ac25a152d | ||
|
|
735568adfa | ||
|
|
5a803a578b | ||
|
|
818ac7ef8c | ||
|
|
c22d769ab5 | ||
|
|
96765dbf76 | ||
|
|
6f2e7d20b4 | ||
|
|
b742d63193 | ||
|
|
d78ba65063 | ||
|
|
7231b614fa | ||
|
|
f174a4e558 | ||
|
|
8c18407688 | ||
|
|
a396c0c739 | ||
|
|
d6ecdeb796 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
|||||||
/*.bundle
|
/venv/
|
||||||
|
|||||||
60
.gitmodules
vendored
60
.gitmodules
vendored
@@ -1,60 +1,6 @@
|
|||||||
|
[submodule "contrib/vim-plug"]
|
||||||
|
path = contrib/vim-plug
|
||||||
|
url = https://github.com/junegunn/vim-plug
|
||||||
[submodule "ansible_roles/firefox"]
|
[submodule "ansible_roles/firefox"]
|
||||||
path = ansible_roles/firefox
|
path = ansible_roles/firefox
|
||||||
url = https://github.com/staticdev/ansible-role-firefox
|
url = https://github.com/staticdev/ansible-role-firefox
|
||||||
[submodule "pkgbuilds/spotify"]
|
|
||||||
path = pkgbuilds/spotify
|
|
||||||
url = https://aur.archlinux.org/spotify.git
|
|
||||||
[submodule "pkgbuilds/nodejs-intelephense"]
|
|
||||||
path = pkgbuilds/nodejs-intelephense
|
|
||||||
url = https://aur.archlinux.org/nodejs-intelephense.git
|
|
||||||
[submodule "pkgbuilds/portfolio-performance-bin"]
|
|
||||||
path = pkgbuilds/portfolio-performance-bin
|
|
||||||
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
|
||||||
[submodule "pkgbuilds/vim-plug"]
|
|
||||||
path = pkgbuilds/vim-plug
|
|
||||||
url = https://aur.archlinux.org/vim-plug.git
|
|
||||||
[submodule "pkgbuilds/terraform-ls-bin"]
|
|
||||||
path = pkgbuilds/terraform-ls-bin
|
|
||||||
url = https://aur.archlinux.org/terraform-ls-bin.git
|
|
||||||
[submodule "pkgbuilds/grm-git"]
|
|
||||||
path = pkgbuilds/grm-git
|
|
||||||
url = https://aur.archlinux.org/grm-git.git
|
|
||||||
[submodule "pkgbuilds/screencfg-git"]
|
|
||||||
path = pkgbuilds/screencfg-git
|
|
||||||
url = https://aur.archlinux.org/screencfg-git.git
|
|
||||||
[submodule "pkgbuilds/google-earth-pro"]
|
|
||||||
path = pkgbuilds/google-earth-pro
|
|
||||||
url = https://aur.archlinux.org/google-earth-pro.git
|
|
||||||
[submodule "pkgbuilds/aws-sam-cli"]
|
|
||||||
path = pkgbuilds/aws-sam-cli
|
|
||||||
url = https://aur.archlinux.org/aws-sam-cli.git
|
|
||||||
[submodule "pkgbuilds/python-boto3-stubs"]
|
|
||||||
path = pkgbuilds/python-boto3-stubs
|
|
||||||
url = https://aur.archlinux.org/python-boto3-stubs.git
|
|
||||||
[submodule "pkgbuilds/python-botocore-stubs"]
|
|
||||||
path = pkgbuilds/python-botocore-stubs
|
|
||||||
url = https://aur.archlinux.org/python-botocore-stubs.git
|
|
||||||
[submodule "pkgbuilds/python-chevron"]
|
|
||||||
path = pkgbuilds/python-chevron
|
|
||||||
url = https://aur.archlinux.org/python-chevron.git
|
|
||||||
[submodule "pkgbuilds/python-aws-lambda-builders"]
|
|
||||||
path = pkgbuilds/python-aws-lambda-builders
|
|
||||||
url = https://aur.archlinux.org/python-aws-lambda-builders.git
|
|
||||||
[submodule "pkgbuilds/python-vdf"]
|
|
||||||
path = pkgbuilds/python-vdf
|
|
||||||
url = https://aur.archlinux.org/python-vdf.git
|
|
||||||
[submodule "pkgbuilds/protontricks"]
|
|
||||||
path = pkgbuilds/protontricks
|
|
||||||
url = https://aur.archlinux.org/protontricks.git
|
|
||||||
[submodule "pkgbuilds/slack-desktop"]
|
|
||||||
path = pkgbuilds/slack-desktop
|
|
||||||
url = https://aur.archlinux.org/slack-desktop.git
|
|
||||||
[submodule "pkgbuilds/backblaze-b2"]
|
|
||||||
path = pkgbuilds/backblaze-b2
|
|
||||||
url = https://aur.archlinux.org/backblaze-b2.git
|
|
||||||
[submodule "pkgbuilds/python-class-registry"]
|
|
||||||
path = pkgbuilds/python-class-registry
|
|
||||||
url = https://aur.archlinux.org/python-class-registry.git
|
|
||||||
[submodule "pkgbuilds/python-rst2ansi"]
|
|
||||||
path = pkgbuilds/python-rst2ansi
|
|
||||||
url = https://aur.archlinux.org/python-rst2ansi.git
|
|
||||||
|
|||||||
59
Makefile
59
Makefile
@@ -1,24 +1,51 @@
|
|||||||
# Make sure to standardize locale, regardless of the machine config
|
venv = ./venv
|
||||||
#
|
requirements = requirements.txt
|
||||||
# Having a different locale broke "yes | pacman -S" to force-install
|
activate = . $(venv)/bin/activate
|
||||||
# iptables, for example
|
pip = pip
|
||||||
export LC_ALL = en_US.UTF-8
|
ansible = venv/bin/ansible-playbook
|
||||||
|
ansible_run = $(activate) && ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff --verbose ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
|
||||||
|
|
||||||
ansible_run = ansible-playbook --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
|
.PHONY: all
|
||||||
|
all: | venv $(ansible)
|
||||||
.PHONY: config
|
|
||||||
config:
|
|
||||||
$(ansible_run)
|
$(ansible_run)
|
||||||
|
|
||||||
.PHONY: maintenance
|
.PHONY: update
|
||||||
maintenance:
|
update: $(ansible)
|
||||||
./maintenance.sh
|
$(ansible_run) --tags update
|
||||||
|
|
||||||
|
.PHONY: reboot
|
||||||
|
reboot:
|
||||||
|
sudo reboot
|
||||||
|
|
||||||
|
.PHONY: poweroff
|
||||||
|
poweroff:
|
||||||
|
sudo poweroff
|
||||||
|
|
||||||
|
.PHONY: weekend
|
||||||
|
weekend: | update poweroff
|
||||||
|
|
||||||
|
.PHONY: packages
|
||||||
|
packages: $(ansible)
|
||||||
|
$(ansible_run) --tags packages
|
||||||
|
|
||||||
|
.PHONY: dotfiles
|
||||||
|
dotfiles: $(ansible)
|
||||||
|
$(ansible_run) --tags dotfiles
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
./test-in-docker.sh
|
./test-in-docker.sh
|
||||||
|
|
||||||
.PHONY: fmt
|
$(ansible): venv
|
||||||
fmt:
|
|
||||||
git ls-files -z '*.md' | xargs -0 prettier --print-width 80 --prose-wrap always --write
|
venv:
|
||||||
git ls-files -z '*.toml' | xargs -0 taplo format
|
python3 -m venv $(venv)
|
||||||
|
$(activate) && $(pip) install -r $(requirements)
|
||||||
|
|
||||||
|
.PHONY: freeze
|
||||||
|
freeze:
|
||||||
|
$(activate) && $(pip) freeze > $(requirements)
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -1,43 +1,25 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
My configuration files for my systems. Uses Ansible for local configuration.
|
My configuration files.
|
||||||
|
|
||||||
## Supported OS
|
# Installation
|
||||||
|
|
||||||
Only Arch Linux is supported
|
|
||||||
|
|
||||||
## Bootstrapping
|
|
||||||
|
|
||||||
Bootstrapping is specific to the exact machine that is installed. See
|
|
||||||
`_machines/` for machine-specific configuration, and `install_scripts/` for the
|
|
||||||
machine install scripts.
|
|
||||||
|
|
||||||
They are keyed by hostname.
|
|
||||||
|
|
||||||
For easier installation, the install scripts are available via shortlinks. To
|
|
||||||
(re)install a new machine from a Arch live environment:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl --proto '=https' -sSfL https://s.hkoerber.de/i/${hostname}.sh | bash
|
|
||||||
```
|
|
||||||
|
|
||||||
## Manual Installation
|
|
||||||
|
|
||||||
Because it manages multiple users on the system, the directory is supposed to be
|
Because it manages multiple users on the system, the directory is supposed to be
|
||||||
at `/var/lib/dotfiles`.
|
at `/var/lib/dotfiles`.
|
||||||
|
|
||||||
To set up the dotfiles:
|
To setup the dotfiles:
|
||||||
|
|
||||||
1. `git clone https://github.com/hakoerber/dotfiles.git ~/dotfiles`
|
1. `git clone https://github.com/hakoerber/dotfiles.git ~/dotfiles`
|
||||||
2. `cd ~/dotfiles && ./install.sh`
|
2. `cd ~/dotfiles && ./install.sh`
|
||||||
|
|
||||||
## Partial application
|
# Partial application
|
||||||
|
|
||||||
To apply only a subset of the changes, use ansible tags that are available via
|
To apply only a subset of the changes, use ansible tags that are available via
|
||||||
the Makefile:
|
the Makefile:
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| --------------- | -------------------------------------------------- |
|
| --- | --- |
|
||||||
|
| `make update` | Updates the system with the latest packages |
|
||||||
| `make packages` | Installs all defined packages (see `packages.yml`) |
|
| `make packages` | Installs all defined packages (see `packages.yml`) |
|
||||||
| `make dotfiles` | Manages the users' dotfiles |
|
| `make dotfiles` | Manages the users' dotfiles |
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
font_size: 11
|
font_size: 12
|
||||||
|
|
||||||
gpu: amd
|
gpu: amd
|
||||||
cpu: amd
|
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: hannes
|
- name: hannes
|
||||||
@@ -16,25 +15,20 @@ users:
|
|||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
manage_css: true
|
manage_css: true
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
ssh_agent: false
|
git_gpg_sign: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
gpg_agent_for_ssh: true
|
gpg_agent_for_ssh: true
|
||||||
gpg_key:
|
gpg_key:
|
||||||
email: hannes@hkoerber.de
|
email: hannes@hkoerber.de
|
||||||
id: "0xB5C002530C6A2053"
|
id: "0xB5C002530C6A2053"
|
||||||
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
||||||
|
enable_passwordstore: true
|
||||||
environment:
|
environment:
|
||||||
MACHINE_HAS_NEXTCLOUD: "true"
|
MACHINE_HAS_NEXTCLOUD: "true"
|
||||||
|
has_yubikey: true
|
||||||
|
repositories:
|
||||||
|
- personal_projects
|
||||||
|
|
||||||
screen:
|
screen:
|
||||||
1: DisplayPort-0
|
1: DisplayPort-0
|
||||||
@@ -48,15 +42,19 @@ screen:
|
|||||||
9: DisplayPort-0
|
9: DisplayPort-0
|
||||||
0: DisplayPort-0
|
0: DisplayPort-0
|
||||||
|
|
||||||
|
screencfgs: []
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
1: ""
|
1: www
|
||||||
9: ""
|
9: comm
|
||||||
10: ""
|
10: music
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
MACHINE_TYPE: "workstation"
|
MACHINE_TYPE: "workstation"
|
||||||
MACHINE_HAS_KEEPASSXC: "false"
|
MACHINE_HAS_KEEPASSX: "false"
|
||||||
MACHINE_HAS_NEXTCLOUD: "true"
|
MACHINE_HAS_NEXTCLOUD: "true"
|
||||||
MACHINE_HAS_STEAM: "true"
|
MACHINE_HAS_STEAM: "true"
|
||||||
|
MACHINE_HAS_RESTIC_BACKUP: "false"
|
||||||
|
MACHINE_HAS_ELEMENT: "true"
|
||||||
MACHINE_RESOLUTION_X: "2560"
|
MACHINE_RESOLUTION_X: "2560"
|
||||||
MACHINE_RESOLUTION_Y: "1440"
|
MACHINE_RESOLUTION_Y: "1440"
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
font_size: 11
|
|
||||||
|
|
||||||
gpu: intel
|
|
||||||
cpu: intel
|
|
||||||
|
|
||||||
users:
|
|
||||||
- name: hannes
|
|
||||||
vt: 1
|
|
||||||
firefox_profiles:
|
|
||||||
default:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
- floccus
|
|
||||||
manage_css: true
|
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
|
||||||
ssh_agent: false
|
|
||||||
gpg_agent: true
|
|
||||||
gpg_agent_for_ssh: true
|
|
||||||
gpg_key:
|
|
||||||
email: hannes@hkoerber.de
|
|
||||||
id: "0xB5C002530C6A2053"
|
|
||||||
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
|
||||||
environment:
|
|
||||||
MACHINE_HAS_NEXTCLOUD: "true"
|
|
||||||
|
|
||||||
screen:
|
|
||||||
1: HDMI-1
|
|
||||||
2: HDMI-1
|
|
||||||
3: HDMI-1
|
|
||||||
4: HDMI-1
|
|
||||||
5: HDMI-1
|
|
||||||
6: HDMI-1
|
|
||||||
7: HDMI-1
|
|
||||||
8: HDMI-1
|
|
||||||
9: HDMI-1
|
|
||||||
0: HDMI-1
|
|
||||||
|
|
||||||
workspace:
|
|
||||||
1: ""
|
|
||||||
2: ""
|
|
||||||
3: ""
|
|
||||||
|
|
||||||
environment:
|
|
||||||
MACHINE_TYPE: "tv"
|
|
||||||
MACHINE_HAS_KEEPASSXC: "false"
|
|
||||||
MACHINE_HAS_NEXTCLOUD: "true"
|
|
||||||
MACHINE_HAS_STEAM: "false"
|
|
||||||
MACHINE_RESOLUTION_X: "1920"
|
|
||||||
MACHINE_RESOLUTION_Y: "1080"
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
font_size: 11
|
|
||||||
|
|
||||||
gpu: intel
|
|
||||||
cpu: intel
|
|
||||||
|
|
||||||
# make sure that display manager works
|
|
||||||
system_default_target: "graphical.target"
|
|
||||||
|
|
||||||
users:
|
|
||||||
- name: hannes
|
|
||||||
vt: 1
|
|
||||||
firefox_profiles:
|
|
||||||
default:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
- floccus
|
|
||||||
manage_css: true
|
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
|
||||||
autologin: false
|
|
||||||
ssh_agent: false
|
|
||||||
gpg_agent: true
|
|
||||||
gpg_agent_for_ssh: true
|
|
||||||
gpg_key:
|
|
||||||
email: hannes@hkoerber.de
|
|
||||||
id: "0xB5C002530C6A2053"
|
|
||||||
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
|
||||||
environment: {}
|
|
||||||
|
|
||||||
screen:
|
|
||||||
1: HDMI-1
|
|
||||||
2: HDMI-1
|
|
||||||
3: HDMI-1
|
|
||||||
4: HDMI-1
|
|
||||||
5: HDMI-1
|
|
||||||
6: HDMI-1
|
|
||||||
7: HDMI-1
|
|
||||||
8: HDMI-1
|
|
||||||
9: HDMI-1
|
|
||||||
0: HDMI-1
|
|
||||||
|
|
||||||
workspace: []
|
|
||||||
|
|
||||||
environment:
|
|
||||||
MACHINE_TYPE: "workstation"
|
|
||||||
MACHINE_HAS_KEEPASSXC: "false"
|
|
||||||
MACHINE_HAS_NEXTCLOUD: "false"
|
|
||||||
MACHINE_HAS_STEAM: "false"
|
|
||||||
MACHINE_RESOLUTION_X: "1920"
|
|
||||||
MACHINE_RESOLUTION_Y: "1080"
|
|
||||||
90
_machines/mars.yml
Normal file
90
_machines/mars.yml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
font_size: 12
|
||||||
|
|
||||||
|
users:
|
||||||
|
- name: hannes-work
|
||||||
|
group: hannes-work
|
||||||
|
vt: 1
|
||||||
|
firefox_profiles:
|
||||||
|
default:
|
||||||
|
extensions:
|
||||||
|
- ublock-origin
|
||||||
|
- privacy-badger17
|
||||||
|
- tree-style-tab
|
||||||
|
- i-dont-care-about-cookies
|
||||||
|
manage_css: true
|
||||||
|
meet:
|
||||||
|
extensions:
|
||||||
|
- ublock-origin
|
||||||
|
manage_css: false
|
||||||
|
mail: hannes.koerber@tradebyte.com
|
||||||
|
git_gpg_sign: false
|
||||||
|
gpg_agent: false
|
||||||
|
gpg_agent_for_ssh: false
|
||||||
|
environment:
|
||||||
|
MACHINE_HAS_NEXTCLOUD: "false"
|
||||||
|
MACHINE_HAS_RESTIC_BACKUP: "true"
|
||||||
|
MACHINE_HAS_ELEMENT: "false"
|
||||||
|
MACHINE_HAS_KEEPASSX: "true"
|
||||||
|
has_yubikey: false
|
||||||
|
repositories: []
|
||||||
|
- name: hannes-private
|
||||||
|
group: hannes-private
|
||||||
|
vt: 2
|
||||||
|
firefox_profiles:
|
||||||
|
default:
|
||||||
|
extensions:
|
||||||
|
- ublock-origin
|
||||||
|
- passff
|
||||||
|
- privacy-badger17
|
||||||
|
- tree-style-tab
|
||||||
|
- i-dont-care-about-cookies
|
||||||
|
- floccus
|
||||||
|
manage_css: true
|
||||||
|
mail: hannes@hkoerber.de
|
||||||
|
git_gpg_sign: false
|
||||||
|
gpg_agent: true
|
||||||
|
gpg_agent_for_ssh: true
|
||||||
|
gpg_key:
|
||||||
|
email: hannes@hkoerber.de
|
||||||
|
id: "0xB5C002530C6A2053"
|
||||||
|
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
||||||
|
enable_passwordstore: true
|
||||||
|
environment:
|
||||||
|
MACHINE_HAS_NEXTCLOUD: "true"
|
||||||
|
MACHINE_HAS_RESTIC_BACKUP: "false"
|
||||||
|
MACHINE_HAS_ELEMENT: "true"
|
||||||
|
MACHINE_HAS_KEEPASSX: "false"
|
||||||
|
has_yubikey: true
|
||||||
|
repositories:
|
||||||
|
- personal_projects
|
||||||
|
|
||||||
|
screen:
|
||||||
|
1: DP-1-1
|
||||||
|
2: DP-1-1
|
||||||
|
3: DP-1-2
|
||||||
|
4: DP-1-2
|
||||||
|
5: DP-1-2
|
||||||
|
6: DP-1-2
|
||||||
|
7: eDP-1
|
||||||
|
8: eDP-1
|
||||||
|
9: eDP-1
|
||||||
|
0: eDP-1
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
1: www
|
||||||
|
2: www
|
||||||
|
3: term-local
|
||||||
|
4: term-remote
|
||||||
|
7: comm
|
||||||
|
8: pass
|
||||||
|
9: music
|
||||||
|
10: pim
|
||||||
|
|
||||||
|
screencfgs:
|
||||||
|
- name: three-screens
|
||||||
|
key: F3
|
||||||
|
|
||||||
|
environment:
|
||||||
|
MACHINE_TYPE: "laptop"
|
||||||
|
MACHINE_RESOLUTION_X: "1920"
|
||||||
|
MACHINE_RESOLUTION_Y: "1080"
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
font_size: 11
|
font_size: 12
|
||||||
|
|
||||||
gpu: nvidia
|
|
||||||
cpu: intel
|
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: hannes-work
|
- name: hannes-work
|
||||||
|
group: hannes-work
|
||||||
vt: 1
|
vt: 1
|
||||||
firefox_profiles:
|
firefox_profiles:
|
||||||
default:
|
default:
|
||||||
@@ -18,15 +16,19 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
manage_css: false
|
manage_css: false
|
||||||
mail: h.koerber@clipmyhorse.tv
|
mail: hannes.koerber@tradebyte.com
|
||||||
ssh_agent: true
|
git_gpg_sign: false
|
||||||
gpg_agent: false
|
gpg_agent: false
|
||||||
gpg_agent_for_ssh: false
|
gpg_agent_for_ssh: false
|
||||||
environment:
|
environment:
|
||||||
MACHINE_HAS_NEXTCLOUD: "false"
|
MACHINE_HAS_NEXTCLOUD: "false"
|
||||||
MACHINE_HAS_KEEPASSXC: "true"
|
MACHINE_HAS_RESTIC_BACKUP: "true"
|
||||||
|
MACHINE_HAS_ELEMENT: "false"
|
||||||
|
MACHINE_HAS_KEEPASSX: "true"
|
||||||
|
has_yubikey: false
|
||||||
|
repositories: []
|
||||||
- name: hannes-private
|
- name: hannes-private
|
||||||
|
group: hannes-private
|
||||||
vt: 2
|
vt: 2
|
||||||
firefox_profiles:
|
firefox_profiles:
|
||||||
default:
|
default:
|
||||||
@@ -39,40 +41,50 @@ users:
|
|||||||
- floccus
|
- floccus
|
||||||
manage_css: true
|
manage_css: true
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
ssh_agent: false
|
git_gpg_sign: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
gpg_agent_for_ssh: true
|
gpg_agent_for_ssh: true
|
||||||
gpg_key:
|
gpg_key:
|
||||||
email: hannes@hkoerber.de
|
email: hannes@hkoerber.de
|
||||||
id: "0xB5C002530C6A2053"
|
id: "0xB5C002530C6A2053"
|
||||||
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
|
||||||
|
enable_passwordstore: true
|
||||||
environment:
|
environment:
|
||||||
MACHINE_HAS_NEXTCLOUD: "true"
|
MACHINE_HAS_NEXTCLOUD: "true"
|
||||||
MACHINE_HAS_KEEPASSXC: "false"
|
MACHINE_HAS_RESTIC_BACKUP: "false"
|
||||||
|
MACHINE_HAS_ELEMENT: "true"
|
||||||
|
MACHINE_HAS_KEEPASSX: "false"
|
||||||
|
has_yubikey: true
|
||||||
|
repositories:
|
||||||
|
- personal_projects
|
||||||
|
|
||||||
screen:
|
screen:
|
||||||
1: DP-4-1-6
|
1: DP-1-1
|
||||||
2: DP-4-1-6
|
2: DP-1-1
|
||||||
3: DP-4-1-6
|
3: DP-1-2
|
||||||
4: DP-4-1-6
|
4: DP-1-2
|
||||||
5: DP-4-1-6
|
5: DP-1-2
|
||||||
6: DP-4-1-6
|
6: DP-1-2
|
||||||
7: eDP-1
|
7: eDP-1
|
||||||
8: eDP-1
|
8: eDP-1
|
||||||
9: eDP-1
|
9: eDP-1
|
||||||
0: eDP-1
|
0: eDP-1
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
1: ""
|
1: www
|
||||||
2: ""
|
2: www
|
||||||
3: ""
|
3: term-local
|
||||||
4: ""
|
4: term-remote
|
||||||
7: ""
|
7: comm
|
||||||
8: ""
|
8: pass
|
||||||
9: ""
|
9: music
|
||||||
10: ""
|
10: pim
|
||||||
|
|
||||||
|
screencfgs:
|
||||||
|
- name: three-screens
|
||||||
|
key: F3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
MACHINE_TYPE: "laptop"
|
MACHINE_TYPE: "laptop"
|
||||||
MACHINE_RESOLUTION_X: "1920"
|
MACHINE_RESOLUTION_X: "1920"
|
||||||
MACHINE_RESOLUTION_Y: "1200"
|
MACHINE_RESOLUTION_Y: "1080"
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
[general]
|
|
||||||
live_config_reload = true
|
|
||||||
|
|
||||||
import = [
|
|
||||||
"~/.config/alacritty/themes/monokai.toml"
|
|
||||||
]
|
|
||||||
|
|
||||||
[env]
|
|
||||||
TERM = "alacritty"
|
|
||||||
WINIT_X11_SCALE_FACTOR = "1"
|
|
||||||
|
|
||||||
[font]
|
|
||||||
size = {{ machine.font_size }}
|
|
||||||
|
|
||||||
[font.bold]
|
|
||||||
family = "JetBrainsMono"
|
|
||||||
style = "Bold"
|
|
||||||
|
|
||||||
[font.bold_italic]
|
|
||||||
family = "JetBrainsMono"
|
|
||||||
style = "Bold Italic"
|
|
||||||
|
|
||||||
[font.italic]
|
|
||||||
family = "JetBrainsMono"
|
|
||||||
style = "Italic"
|
|
||||||
|
|
||||||
[font.normal]
|
|
||||||
family = "JetBrainsMono"
|
|
||||||
style = "Regular"
|
|
||||||
|
|
||||||
[selection]
|
|
||||||
save_to_clipboard = true
|
|
||||||
|
|
||||||
[window]
|
|
||||||
dynamic_title = true
|
|
||||||
title = "[terminal]"
|
|
||||||
|
|
||||||
[window.padding]
|
|
||||||
x = 3
|
|
||||||
y = 3
|
|
||||||
702
alacritty/alacritty.yml.j2
Normal file
702
alacritty/alacritty.yml.j2
Normal file
@@ -0,0 +1,702 @@
|
|||||||
|
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||||
|
|
||||||
|
# Import additional configuration files
|
||||||
|
#
|
||||||
|
# Imports are loaded in order, skipping all missing files, with the importing
|
||||||
|
# file being loaded last. If a field is already present in a previous import, it
|
||||||
|
# will be replaced.
|
||||||
|
#
|
||||||
|
# All imports must either be absolute paths starting with `/`, or paths relative
|
||||||
|
# to the user's home directory starting with `~/`.
|
||||||
|
#import:
|
||||||
|
# - /path/to/alacritty.yml
|
||||||
|
|
||||||
|
# Any items in the `env` entry below will be added as
|
||||||
|
# environment variables. Some entries may override variables
|
||||||
|
# set by alacritty itself.
|
||||||
|
env:
|
||||||
|
# TERM variable
|
||||||
|
#
|
||||||
|
# This value is used to set the `$TERM` environment variable for
|
||||||
|
# each instance of Alacritty. If it is not present, alacritty will
|
||||||
|
# check the local terminfo database and use `alacritty` if it is
|
||||||
|
# available, otherwise `xterm-256color` is used.
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
window:
|
||||||
|
# Window dimensions (changes require restart)
|
||||||
|
#
|
||||||
|
# Number of lines/columns (not pixels) in the terminal. The number of columns
|
||||||
|
# must be at least `2`, while using a value of `0` for columns and lines will
|
||||||
|
# fall back to the window manager's recommended size.
|
||||||
|
#dimensions:
|
||||||
|
# columns: 0
|
||||||
|
# lines: 0
|
||||||
|
|
||||||
|
# Window position (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of pixels.
|
||||||
|
# If the position is not set, the window manager will handle the placement.
|
||||||
|
#position:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Window padding (changes require restart)
|
||||||
|
#
|
||||||
|
# Blank space added around the window in pixels. This padding is scaled
|
||||||
|
# by DPI and the specified value is always added at both opposing sides.
|
||||||
|
padding:
|
||||||
|
x: 3
|
||||||
|
y: 3
|
||||||
|
|
||||||
|
# Spread additional padding evenly around the terminal content.
|
||||||
|
#dynamic_padding: false
|
||||||
|
|
||||||
|
# Window decorations
|
||||||
|
#
|
||||||
|
# Values for `decorations`:
|
||||||
|
# - full: Borders and title bar
|
||||||
|
# - none: Neither borders nor title bar
|
||||||
|
#
|
||||||
|
# Values for `decorations` (macOS only):
|
||||||
|
# - transparent: Title bar, transparent background and title bar buttons
|
||||||
|
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||||
|
#decorations: full
|
||||||
|
|
||||||
|
# Startup Mode (changes require restart)
|
||||||
|
#
|
||||||
|
# Values for `startup_mode`:
|
||||||
|
# - Windowed
|
||||||
|
# - Maximized
|
||||||
|
# - Fullscreen
|
||||||
|
#
|
||||||
|
# Values for `startup_mode` (macOS only):
|
||||||
|
# - SimpleFullscreen
|
||||||
|
#startup_mode: Windowed
|
||||||
|
|
||||||
|
# Window title
|
||||||
|
title: "[terminal]"
|
||||||
|
|
||||||
|
# Allow terminal applications to change Alacritty's window title.
|
||||||
|
dynamic_title: true
|
||||||
|
|
||||||
|
# Window class (Linux/BSD only):
|
||||||
|
#class:
|
||||||
|
# Application instance name
|
||||||
|
#instance: Alacritty
|
||||||
|
# General application class
|
||||||
|
#general: Alacritty
|
||||||
|
|
||||||
|
# GTK theme variant (Linux/BSD only)
|
||||||
|
#
|
||||||
|
# Override the variant of the GTK theme. Commonly supported values are `dark`
|
||||||
|
# and `light`. Set this to `None` to use the default theme variant.
|
||||||
|
#gtk_theme_variant: None
|
||||||
|
|
||||||
|
#scrolling:
|
||||||
|
# Maximum number of lines in the scrollback buffer.
|
||||||
|
# Specifying '0' will disable scrolling.
|
||||||
|
#history: 10000
|
||||||
|
|
||||||
|
# Scrolling distance multiplier.
|
||||||
|
#multiplier: 3
|
||||||
|
|
||||||
|
# Font configuration
|
||||||
|
font:
|
||||||
|
# Normal (roman) font face
|
||||||
|
normal:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) Menlo
|
||||||
|
# - (Linux/BSD) monospace
|
||||||
|
# - (Windows) Consolas
|
||||||
|
family: Inconsolata
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Regular
|
||||||
|
|
||||||
|
# Bold font face
|
||||||
|
bold:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
family: Inconsolata
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Bold
|
||||||
|
|
||||||
|
# Italic font face
|
||||||
|
italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
family: Inconsolata
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Italic
|
||||||
|
|
||||||
|
# Bold italic font face
|
||||||
|
bold_italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
family: Inconsolata
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Bold Italic
|
||||||
|
|
||||||
|
# Point size
|
||||||
|
size: {{ machine.font_size }}
|
||||||
|
|
||||||
|
# Offset is the extra space around each character. `offset.y` can be thought
|
||||||
|
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||||
|
# spacing.
|
||||||
|
#offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Glyph offset determines the locations of the glyphs within their cells with
|
||||||
|
# the default being at the bottom. Increasing `x` moves the glyph to the
|
||||||
|
# right, increasing `y` moves the glyph upward.
|
||||||
|
#glyph_offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Thin stroke font rendering (macOS only)
|
||||||
|
#
|
||||||
|
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||||
|
# it is recommended to set `use_thin_strokes` to `false`.
|
||||||
|
#use_thin_strokes: true
|
||||||
|
|
||||||
|
# If `true`, bold text is drawn using the bright color variants.
|
||||||
|
#draw_bold_text_with_bright_colors: false
|
||||||
|
|
||||||
|
# Colors (Monokai Dark)
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '#272822'
|
||||||
|
foreground: '#F8F8F2'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#272822'
|
||||||
|
red: '#F92672'
|
||||||
|
green: '#A6E22E'
|
||||||
|
yellow: '#F4BF75'
|
||||||
|
blue: '#66D9EF'
|
||||||
|
magenta: '#AE81FF'
|
||||||
|
cyan: '#A1EFE4'
|
||||||
|
white: '#F8F8F2'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#75715E'
|
||||||
|
red: '#F92672'
|
||||||
|
green: '#A6E22E'
|
||||||
|
yellow: '#F4BF75'
|
||||||
|
blue: '#66D9EF'
|
||||||
|
magenta: '#AE81FF'
|
||||||
|
cyan: '#A1EFE4'
|
||||||
|
white: '#F9F8F5'
|
||||||
|
|
||||||
|
# Bell
|
||||||
|
#
|
||||||
|
# The bell is rung every time the BEL control character is received.
|
||||||
|
#bell:
|
||||||
|
# Visual Bell Animation
|
||||||
|
#
|
||||||
|
# Animation effect for flashing the screen when the visual bell is rung.
|
||||||
|
#
|
||||||
|
# Values for `animation`:
|
||||||
|
# - Ease
|
||||||
|
# - EaseOut
|
||||||
|
# - EaseOutSine
|
||||||
|
# - EaseOutQuad
|
||||||
|
# - EaseOutCubic
|
||||||
|
# - EaseOutQuart
|
||||||
|
# - EaseOutQuint
|
||||||
|
# - EaseOutExpo
|
||||||
|
# - EaseOutCirc
|
||||||
|
# - Linear
|
||||||
|
#animation: EaseOutExpo
|
||||||
|
|
||||||
|
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
|
||||||
|
# disable the visual bell animation.
|
||||||
|
#duration: 0
|
||||||
|
|
||||||
|
# Visual bell animation color.
|
||||||
|
#color: '#ffffff'
|
||||||
|
|
||||||
|
# Bell Command
|
||||||
|
#
|
||||||
|
# This program is executed whenever the bell is rung.
|
||||||
|
#
|
||||||
|
# When set to `command: None`, no command will be executed.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# command:
|
||||||
|
# program: notify-send
|
||||||
|
# args: ["Hello, World!"]
|
||||||
|
#
|
||||||
|
#command: None
|
||||||
|
|
||||||
|
# Background opacity
|
||||||
|
#
|
||||||
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
|
#background_opacity: 1.0
|
||||||
|
|
||||||
|
selection:
|
||||||
|
# This string contains all characters that are used as separators for
|
||||||
|
# "semantic words" in Alacritty.
|
||||||
|
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
||||||
|
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||||
|
save_to_clipboard: true
|
||||||
|
|
||||||
|
#cursor:
|
||||||
|
# Cursor style
|
||||||
|
#style:
|
||||||
|
# Cursor shape
|
||||||
|
#
|
||||||
|
# Values for `shape`:
|
||||||
|
# - ▇ Block
|
||||||
|
# - _ Underline
|
||||||
|
# - | Beam
|
||||||
|
#shape: Block
|
||||||
|
|
||||||
|
# Cursor blinking state
|
||||||
|
#
|
||||||
|
# Values for `blinking`:
|
||||||
|
# - Never: Prevent the cursor from ever blinking
|
||||||
|
# - Off: Disable blinking by default
|
||||||
|
# - On: Enable blinking by default
|
||||||
|
# - Always: Force the cursor to always blink
|
||||||
|
#blinking: Off
|
||||||
|
|
||||||
|
# Vi mode cursor style
|
||||||
|
#
|
||||||
|
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||||
|
# the style of the active value of the normal cursor.
|
||||||
|
#
|
||||||
|
# See `cursor.style` for available options.
|
||||||
|
#vi_mode_style: None
|
||||||
|
|
||||||
|
# Cursor blinking interval in milliseconds.
|
||||||
|
#blink_interval: 750
|
||||||
|
|
||||||
|
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||||
|
# window is not focused.
|
||||||
|
#unfocused_hollow: true
|
||||||
|
|
||||||
|
# Thickness of the cursor relative to the cell width as floating point number
|
||||||
|
# from `0.0` to `1.0`.
|
||||||
|
#thickness: 0.15
|
||||||
|
|
||||||
|
# Live config reload (changes require restart)
|
||||||
|
live_config_reload: false
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||||
|
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||||
|
# shell.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) /bin/bash --login
|
||||||
|
# - (Linux/BSD) user login shell
|
||||||
|
# - (Windows) powershell
|
||||||
|
#shell:
|
||||||
|
# program: /bin/bash
|
||||||
|
# args:
|
||||||
|
# - --login
|
||||||
|
|
||||||
|
# Startup directory
|
||||||
|
#
|
||||||
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
|
# directory of the parent process will be used.
|
||||||
|
#working_directory: None
|
||||||
|
|
||||||
|
# WinPTY backend (Windows only)
|
||||||
|
#
|
||||||
|
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||||
|
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||||
|
# available, the WinPTY backend will be used instead.
|
||||||
|
#
|
||||||
|
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||||
|
# even if the ConPTY backend is available.
|
||||||
|
#winpty_backend: false
|
||||||
|
|
||||||
|
# Send ESC (\x1b) before characters when alt is pressed.
|
||||||
|
#alt_send_esc: true
|
||||||
|
|
||||||
|
#mouse:
|
||||||
|
# Click settings
|
||||||
|
#
|
||||||
|
# The `double_click` and `triple_click` settings control the time
|
||||||
|
# alacritty should wait for accepting multiple clicks as one double
|
||||||
|
# or triple click.
|
||||||
|
#double_click: { threshold: 300 }
|
||||||
|
#triple_click: { threshold: 300 }
|
||||||
|
|
||||||
|
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||||
|
#hide_when_typing: false
|
||||||
|
|
||||||
|
#url:
|
||||||
|
# URL launcher
|
||||||
|
#
|
||||||
|
# This program is executed when clicking on a text which is recognized as a
|
||||||
|
# URL. The URL is always added to the command as the last parameter.
|
||||||
|
#
|
||||||
|
# When set to `launcher: None`, URL launching will be disabled completely.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) open
|
||||||
|
# - (Linux/BSD) xdg-open
|
||||||
|
# - (Windows) explorer
|
||||||
|
#launcher:
|
||||||
|
# program: xdg-open
|
||||||
|
# args: []
|
||||||
|
|
||||||
|
# URL modifiers
|
||||||
|
#
|
||||||
|
# These are the modifiers that need to be held down for opening URLs when
|
||||||
|
# clicking on them. The available modifiers are documented in the key
|
||||||
|
# binding section.
|
||||||
|
#modifiers: None
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
#
|
||||||
|
# Mouse bindings are specified as a list of objects, much like the key
|
||||||
|
# bindings further below.
|
||||||
|
#
|
||||||
|
# To trigger mouse bindings when an application running within Alacritty
|
||||||
|
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||||
|
# requirement.
|
||||||
|
#
|
||||||
|
# Each mouse binding will specify a:
|
||||||
|
#
|
||||||
|
# - `mouse`:
|
||||||
|
#
|
||||||
|
# - Middle
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - Numeric identifier such as `5`
|
||||||
|
#
|
||||||
|
# - `action` (see key bindings)
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods` (see key bindings)
|
||||||
|
#mouse_bindings:
|
||||||
|
# - { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
#
|
||||||
|
# Key bindings are specified as a list of objects. For example, this is the
|
||||||
|
# default paste binding:
|
||||||
|
#
|
||||||
|
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||||
|
#
|
||||||
|
# Each key binding will specify a:
|
||||||
|
#
|
||||||
|
# - `key`: Identifier of the key pressed
|
||||||
|
#
|
||||||
|
# - A-Z
|
||||||
|
# - F1-F24
|
||||||
|
# - Key0-Key9
|
||||||
|
#
|
||||||
|
# A full list with available key codes can be found here:
|
||||||
|
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||||
|
#
|
||||||
|
# Instead of using the name of the keys, the `key` field also supports using
|
||||||
|
# the scancode of the desired key. Scancodes have to be specified as a
|
||||||
|
# decimal number. This command will allow you to display the hex scancodes
|
||||||
|
# for certain keys:
|
||||||
|
#
|
||||||
|
# `showkey --scancodes`.
|
||||||
|
#
|
||||||
|
# Then exactly one of:
|
||||||
|
#
|
||||||
|
# - `chars`: Send a byte sequence to the running application
|
||||||
|
#
|
||||||
|
# The `chars` field writes the specified string to the terminal. This makes
|
||||||
|
# it possible to pass escape sequences. To find escape codes for bindings
|
||||||
|
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||||
|
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||||
|
# to keys. It is therefore required to update the terminfo when changing an
|
||||||
|
# escape sequence.
|
||||||
|
#
|
||||||
|
# - `action`: Execute a predefined action
|
||||||
|
#
|
||||||
|
# - ToggleViMode
|
||||||
|
# - SearchForward
|
||||||
|
# Start searching toward the right of the search origin.
|
||||||
|
# - SearchBackward
|
||||||
|
# Start searching toward the left of the search origin.
|
||||||
|
# - Copy
|
||||||
|
# - Paste
|
||||||
|
# - IncreaseFontSize
|
||||||
|
# - DecreaseFontSize
|
||||||
|
# - ResetFontSize
|
||||||
|
# - ScrollPageUp
|
||||||
|
# - ScrollPageDown
|
||||||
|
# - ScrollHalfPageUp
|
||||||
|
# - ScrollHalfPageDown
|
||||||
|
# - ScrollLineUp
|
||||||
|
# - ScrollLineDown
|
||||||
|
# - ScrollToTop
|
||||||
|
# - ScrollToBottom
|
||||||
|
# - ClearHistory
|
||||||
|
# Remove the terminal's scrollback history.
|
||||||
|
# - Hide
|
||||||
|
# Hide the Alacritty window.
|
||||||
|
# - Minimize
|
||||||
|
# Minimize the Alacritty window.
|
||||||
|
# - Quit
|
||||||
|
# Quit Alacritty.
|
||||||
|
# - ToggleFullscreen
|
||||||
|
# - SpawnNewInstance
|
||||||
|
# Spawn a new instance of Alacritty.
|
||||||
|
# - ClearLogNotice
|
||||||
|
# Clear Alacritty's UI warning and error notice.
|
||||||
|
# - ClearSelection
|
||||||
|
# Remove the active selection.
|
||||||
|
# - ReceiveChar
|
||||||
|
# - None
|
||||||
|
#
|
||||||
|
# - Vi mode exclusive actions:
|
||||||
|
#
|
||||||
|
# - Open
|
||||||
|
# Open URLs at the cursor location with the launcher configured in
|
||||||
|
# `url.launcher`.
|
||||||
|
# - ToggleNormalSelection
|
||||||
|
# - ToggleLineSelection
|
||||||
|
# - ToggleBlockSelection
|
||||||
|
# - ToggleSemanticSelection
|
||||||
|
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||||
|
#
|
||||||
|
# - Vi mode exclusive cursor motion actions:
|
||||||
|
#
|
||||||
|
# - Up
|
||||||
|
# One line up.
|
||||||
|
# - Down
|
||||||
|
# One line down.
|
||||||
|
# - Left
|
||||||
|
# One character left.
|
||||||
|
# - Right
|
||||||
|
# One character right.
|
||||||
|
# - First
|
||||||
|
# First column, or beginning of the line when already at the first column.
|
||||||
|
# - Last
|
||||||
|
# Last column, or beginning of the line when already at the last column.
|
||||||
|
# - FirstOccupied
|
||||||
|
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||||
|
# the line when already at the first cell of the row.
|
||||||
|
# - High
|
||||||
|
# Top of the screen.
|
||||||
|
# - Middle
|
||||||
|
# Center of the screen.
|
||||||
|
# - Low
|
||||||
|
# Bottom of the screen.
|
||||||
|
# - SemanticLeft
|
||||||
|
# Start of the previous semantically separated word.
|
||||||
|
# - SemanticRight
|
||||||
|
# Start of the next semantically separated word.
|
||||||
|
# - SemanticLeftEnd
|
||||||
|
# End of the previous semantically separated word.
|
||||||
|
# - SemanticRightEnd
|
||||||
|
# End of the next semantically separated word.
|
||||||
|
# - WordLeft
|
||||||
|
# Start of the previous whitespace separated word.
|
||||||
|
# - WordRight
|
||||||
|
# Start of the next whitespace separated word.
|
||||||
|
# - WordLeftEnd
|
||||||
|
# End of the previous whitespace separated word.
|
||||||
|
# - WordRightEnd
|
||||||
|
# End of the next whitespace separated word.
|
||||||
|
# - Bracket
|
||||||
|
# Character matching the bracket at the cursor's location.
|
||||||
|
# - SearchNext
|
||||||
|
# Beginning of the next match.
|
||||||
|
# - SearchPrevious
|
||||||
|
# Beginning of the previous match.
|
||||||
|
# - SearchStart
|
||||||
|
# Start of the match to the left of the vi mode cursor.
|
||||||
|
# - SearchEnd
|
||||||
|
# End of the match to the right of the vi mode cursor.
|
||||||
|
#
|
||||||
|
# - macOS exclusive actions:
|
||||||
|
# - ToggleSimpleFullscreen
|
||||||
|
# Enter fullscreen without occupying another space.
|
||||||
|
#
|
||||||
|
# - Linux/BSD exclusive actions:
|
||||||
|
#
|
||||||
|
# - CopySelection
|
||||||
|
# Copy from the selection buffer.
|
||||||
|
# - PasteSelection
|
||||||
|
# Paste from the selection buffer.
|
||||||
|
#
|
||||||
|
# - `command`: Fork and execute a specified command plus arguments
|
||||||
|
#
|
||||||
|
# The `command` field must be a map containing a `program` string and an
|
||||||
|
# `args` array of command line parameter strings. For example:
|
||||||
|
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods`: Key modifiers to filter binding actions
|
||||||
|
#
|
||||||
|
# - Command
|
||||||
|
# - Control
|
||||||
|
# - Option
|
||||||
|
# - Super
|
||||||
|
# - Shift
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# Multiple `mods` can be combined using `|` like this:
|
||||||
|
# `mods: Control|Shift`.
|
||||||
|
# Whitespace and capitalization are relevant and must match the example.
|
||||||
|
#
|
||||||
|
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||||
|
#
|
||||||
|
# This is mainly used to send applications the correct escape sequences
|
||||||
|
# when in different modes.
|
||||||
|
#
|
||||||
|
# - AppCursor
|
||||||
|
# - AppKeypad
|
||||||
|
# - Alt
|
||||||
|
# - Vi
|
||||||
|
#
|
||||||
|
# A `~` operator can be used before a mode to apply the binding whenever
|
||||||
|
# the mode is *not* active, e.g. `~Alt`.
|
||||||
|
#
|
||||||
|
# Bindings are always filled by default, but will be replaced when a new
|
||||||
|
# binding with the same triggers is defined. To unset a default binding, it can
|
||||||
|
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||||
|
# a no-op if you do not wish to receive input characters for that binding.
|
||||||
|
#
|
||||||
|
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||||
|
# in the order they were defined in.
|
||||||
|
#key_bindings:
|
||||||
|
#- { key: Paste, action: Paste }
|
||||||
|
#- { key: Copy, action: Copy }
|
||||||
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
|
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
|
||||||
|
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||||
|
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||||
|
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||||
|
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||||
|
|
||||||
|
# Vi Mode
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: Space, mods: Shift|Control, action: ToggleViMode }
|
||||||
|
#- { key: Escape, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: I, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: I, mode: Vi, action: ToggleViMode }
|
||||||
|
#- { key: C, mods: Control, mode: Vi, action: ToggleViMode }
|
||||||
|
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
|
||||||
|
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
|
||||||
|
#- { key: G, mode: Vi, action: ScrollToTop }
|
||||||
|
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
|
||||||
|
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
|
||||||
|
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
|
||||||
|
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
|
||||||
|
#- { key: Y, mode: Vi, action: Copy }
|
||||||
|
#- { key: Y, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: Copy, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: V, mode: Vi, action: ToggleNormalSelection }
|
||||||
|
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
|
||||||
|
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
|
||||||
|
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
|
||||||
|
#- { key: Return, mode: Vi, action: Open }
|
||||||
|
#- { key: K, mode: Vi, action: Up }
|
||||||
|
#- { key: J, mode: Vi, action: Down }
|
||||||
|
#- { key: H, mode: Vi, action: Left }
|
||||||
|
#- { key: L, mode: Vi, action: Right }
|
||||||
|
#- { key: Up, mode: Vi, action: Up }
|
||||||
|
#- { key: Down, mode: Vi, action: Down }
|
||||||
|
#- { key: Left, mode: Vi, action: Left }
|
||||||
|
#- { key: Right, mode: Vi, action: Right }
|
||||||
|
#- { key: Key0, mode: Vi, action: First }
|
||||||
|
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
|
||||||
|
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
|
||||||
|
#- { key: H, mods: Shift, mode: Vi, action: High }
|
||||||
|
#- { key: M, mods: Shift, mode: Vi, action: Middle }
|
||||||
|
#- { key: L, mods: Shift, mode: Vi, action: Low }
|
||||||
|
#- { key: B, mode: Vi, action: SemanticLeft }
|
||||||
|
#- { key: W, mode: Vi, action: SemanticRight }
|
||||||
|
#- { key: E, mode: Vi, action: SemanticRightEnd }
|
||||||
|
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
|
||||||
|
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
|
||||||
|
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
|
||||||
|
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
|
||||||
|
#- { key: Slash, mode: Vi, action: SearchForward }
|
||||||
|
#- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward }
|
||||||
|
#- { key: N, mode: Vi, action: SearchNext }
|
||||||
|
#- { key: N, mods: Shift, mode: Vi, action: SearchPrevious }
|
||||||
|
|
||||||
|
# (Windows, Linux, and BSD only)
|
||||||
|
#- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
#- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
#- { key: F, mods: Control|Shift, action: SearchForward }
|
||||||
|
#- { key: B, mods: Control|Shift, action: SearchBackward }
|
||||||
|
#- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Plus, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||||
|
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
|
||||||
|
|
||||||
|
# (Windows only)
|
||||||
|
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
# (macOS only)
|
||||||
|
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
|
||||||
|
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Plus, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: K, mods: Command, action: ClearHistory }
|
||||||
|
#- { key: V, mods: Command, action: Paste }
|
||||||
|
#- { key: C, mods: Command, action: Copy }
|
||||||
|
#- { key: C, mods: Command, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: H, mods: Command, action: Hide }
|
||||||
|
#- { key: M, mods: Command, action: Minimize }
|
||||||
|
#- { key: Q, mods: Command, action: Quit }
|
||||||
|
#- { key: W, mods: Command, action: Quit }
|
||||||
|
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||||
|
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||||
|
#- { key: F, mods: Command, action: SearchForward }
|
||||||
|
#- { key: B, mods: Command, action: SearchBackward }
|
||||||
|
|
||||||
|
#debug:
|
||||||
|
# Display the time it takes to redraw each frame.
|
||||||
|
#render_timer: false
|
||||||
|
|
||||||
|
# Keep the log file after quitting Alacritty.
|
||||||
|
#persistent_logging: false
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# Values for `log_level`:
|
||||||
|
# - None
|
||||||
|
# - Error
|
||||||
|
# - Warn
|
||||||
|
# - Info
|
||||||
|
# - Debug
|
||||||
|
# - Trace
|
||||||
|
#log_level: Warn
|
||||||
|
|
||||||
|
# Print all received window events.
|
||||||
|
#print_events: false
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# github Alacritty Colors
|
|
||||||
|
|
||||||
# Default colors
|
|
||||||
[colors.primary]
|
|
||||||
background = '#ffffff'
|
|
||||||
foreground = '#24292f'
|
|
||||||
|
|
||||||
# Normal colors
|
|
||||||
[colors.normal]
|
|
||||||
black = '#24292e'
|
|
||||||
red = '#d73a49'
|
|
||||||
green = '#28a745'
|
|
||||||
yellow = '#dbab09'
|
|
||||||
blue = '#0366d6'
|
|
||||||
magenta = '#5a32a3'
|
|
||||||
cyan = '#0598bc'
|
|
||||||
white = '#6a737d'
|
|
||||||
|
|
||||||
# Bright colors
|
|
||||||
[colors.bright]
|
|
||||||
black = '#959da5'
|
|
||||||
red = '#cb2431'
|
|
||||||
green = '#22863a'
|
|
||||||
yellow = '#b08800'
|
|
||||||
blue = '#005cc5'
|
|
||||||
magenta = '#5a32a3'
|
|
||||||
cyan = '#3192aa'
|
|
||||||
white = '#d1d5da'
|
|
||||||
|
|
||||||
[[colors.indexed_colors]]
|
|
||||||
index = 16
|
|
||||||
color = '#d18616'
|
|
||||||
|
|
||||||
[[colors.indexed_colors]]
|
|
||||||
index = 17
|
|
||||||
color = '#cb2431'
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
[colors.primary]
|
|
||||||
background = "#272822"
|
|
||||||
foreground = "#f8f8f2"
|
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black = "#272822"
|
|
||||||
red = "#f92672"
|
|
||||||
green = "#a6e22e"
|
|
||||||
yellow = "#f4bf75"
|
|
||||||
blue = "#66d9ef"
|
|
||||||
magenta = "#ae81ff"
|
|
||||||
cyan = "#a1efe4"
|
|
||||||
white = "#f8f8f2"
|
|
||||||
|
|
||||||
[colors.bright]
|
|
||||||
black = "#75715e"
|
|
||||||
red = "#f92672"
|
|
||||||
green = "#a6e22e"
|
|
||||||
yellow = "#f4bf75"
|
|
||||||
blue = "#66d9ef"
|
|
||||||
magenta = "#ae81ff"
|
|
||||||
cyan = "#a1efe4"
|
|
||||||
white = "#f9f8f5"
|
|
||||||
Submodule ansible_roles/firefox updated: 2151dce632...fe50549acc
@@ -2,32 +2,27 @@
|
|||||||
BindsTo=windowmanager.target
|
BindsTo=windowmanager.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
|
Wants=blueman.service
|
||||||
Wants=dpms.service
|
Wants=dpms.service
|
||||||
Wants=dunst.service
|
Wants=dunst.service
|
||||||
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
Wants=element.service
|
||||||
{% if config.bigger_font|default(false) is sameas false %}
|
{% for profile in (user.firefox_profiles|default({})).keys() %}
|
||||||
Wants=firefox@{{ profile }}.service
|
Wants=firefox@{{ profile }}.service
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
|
||||||
{% if config.bigger_font|default(false) is sameas true %}
|
|
||||||
Wants=firefox-gtk-override-bigger-font@{{ profile }}.service
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
Wants=gpg-agent.service
|
Wants=gpg-agent.service
|
||||||
Wants=gnome-keyring.service
|
Wants=gnome-keyring.service
|
||||||
Wants=keepassxc.service
|
Wants=keepassx.service
|
||||||
Wants=keyboard.service
|
Wants=keyboard.service
|
||||||
Wants=laptop-lid.service
|
Wants=laptop-lid.service
|
||||||
Wants=nextcloud.service
|
Wants=nextcloud.service
|
||||||
Wants=nm-applet.service
|
Wants=nm-applet.service
|
||||||
Wants=pasystray.service
|
Wants=pasystray.service
|
||||||
Wants=redshift.service
|
Wants=redshift.service
|
||||||
|
Wants=restic.timer
|
||||||
|
Wants=screencfg.service
|
||||||
Wants=spotify.service
|
Wants=spotify.service
|
||||||
Wants=steam.service
|
Wants=steam.service
|
||||||
Wants=touchpad.service
|
Wants=touchpad.service
|
||||||
Wants=xresources.service
|
Wants=xresources.service
|
||||||
Wants=yubikey-touch-detector.service
|
Wants=yubikey-touch-detector.service
|
||||||
Wants=kdeconnect.service
|
|
||||||
Wants=color-theme-dark.service
|
|
||||||
Wants=workstation-mgr.service
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env kdeconnect-indicator
|
ExecStart=/usr/bin/env blueman-applet
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
Restart=always
|
Restart=always
|
||||||
@@ -5,5 +5,6 @@ After=windowmanager.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/env xset s off
|
ExecStart=/usr/bin/env xset s off
|
||||||
ExecStart=/usr/bin/env xset dpms 0 0 0
|
ExecStart=/usr/bin/env xset dpms 0 0 300
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
Restart=always
|
||||||
|
|||||||
11
autostart/services/element.service
Normal file
11
autostart/services/element.service
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
After=i3.service
|
||||||
|
|
||||||
|
ConditionPathExists=%h/.var/run/features/element
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env element-desktop
|
||||||
|
PassEnvironment=DISPLAY
|
||||||
|
Restart=always
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
Environment=XDG_CONFIG_HOME=%h/.config/gtk-3.0-overrides/bigger-font/
|
|
||||||
Restart=always
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
ConditionPathExists=%t/features/gpg_agent
|
ConditionPathExists=%h/.var/run/features/gpg_agent
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/bin/env gpg-agent --daemon
|
ExecStart=/usr/bin/env gpg-agent --homedir %h/.gnupg --no-detach --daemon
|
||||||
PassEnvironment=DISPLAY GNUPGHOME
|
PassEnvironment=DISPLAY
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/env i3 --config %h/.config/i3/config
|
ExecStart=/usr/bin/env i3 --config %h/.i3/config
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
|
||||||
Restart=no
|
Restart=no
|
||||||
|
|||||||
9
autostart/services/keepassx.service
Normal file
9
autostart/services/keepassx.service
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
ConditionPathExists=%h/.var/run/features/keepassx
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
|
||||||
|
PassEnvironment=DISPLAY
|
||||||
|
Restart=always
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
ConditionPathExists=%t/features/keepassxc
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/env keepassxc --keyfile %h/.secrets/main.keyx %h/.secrets/main.kdbx
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
Restart=always
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
ConditionPathExists=%t/features/machine_is_laptop
|
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/env bash -c 'grep "^LID.*enabled" /proc/acpi/wakeup && echo " LID" | sudo tee /proc/acpi/wakeup || true'
|
ExecStart=/usr/bin/env bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=%h/bin/mousespam
|
|
||||||
RemainAfterExit=True
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
@@ -3,7 +3,7 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=gnome-keyring.service
|
After=gnome-keyring.service
|
||||||
|
|
||||||
ConditionPathExists=%t/features/nextcloud
|
ConditionPathExists=%h/.var/run/features/nextcloud
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env nextcloud --background
|
ExecStart=/usr/bin/env nextcloud --background
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/env redshift-gtk -x
|
|
||||||
ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf
|
ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
8
autostart/services/restic.service
Normal file
8
autostart/services/restic.service
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
ConditionPathExists=%h/.var/run/features/restic_backup
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=%h/bin/restic-backup
|
||||||
|
RemainAfterExit=true
|
||||||
|
PassEnvironment=DISPLAY
|
||||||
6
autostart/services/restic.timer
Normal file
6
autostart/services/restic.timer
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Mon..Fri 12:00:00
|
||||||
13
autostart/services/screencfg.service
Normal file
13
autostart/services/screencfg.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
# systemd.service(5):
|
||||||
|
|
||||||
|
# > The command to execute may contain spaces, but control characters are not
|
||||||
|
# > allowed.
|
||||||
|
ExecStart=/usr/bin/env screencfg "%h/.screencfg/%H/default.yml"
|
||||||
|
RemainAfterExit=true
|
||||||
|
PassEnvironment=DISPLAY
|
||||||
@@ -3,10 +3,9 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=i3.service
|
After=i3.service
|
||||||
|
|
||||||
ConditionPathExists=%t/features/steam
|
ConditionPathExists=%h/.var/run/features/steam
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# `-system-composer`: https://github.com/ValveSoftware/steam-for-linux/issues/10806
|
ExecStart=/usr/bin/env steam
|
||||||
ExecStart=/usr/bin/env steam -system-composer
|
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
ConditionPathExists=%t/features/machine_is_laptop
|
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/workstation-mgr serve
|
|
||||||
Restart=always
|
|
||||||
@@ -4,6 +4,6 @@ After=windowmanager.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/env xrdb -merge -I%h %h/.config/Xresources
|
ExecStart=/usr/bin/env xrdb -merge -I%h %h/.Xresources
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
PartOf=gpg-agent.service
|
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=gpg-agent.service
|
|
||||||
ConditionPathExists=%t/features/gpg_agent
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
||||||
|
|||||||
9
bin/check
Executable file
9
bin/check
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
cd ~/projects/personal/time-tracking/
|
||||||
|
source venv/bin/activate
|
||||||
|
source ~/.attendance_env
|
||||||
|
|
||||||
|
./call.py "${@}"
|
||||||
25
bin/dunstctl
Executable file
25
bin/dunstctl
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
_logfile="$LOGDIR/dunstctl.log"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
enable)
|
||||||
|
log "Enabling dunst"
|
||||||
|
systemctl --user --no-block kill --signal SIGUSR2 dunst
|
||||||
|
|
||||||
|
;;
|
||||||
|
disable)
|
||||||
|
log "Disabling dunst"
|
||||||
|
systemctl --user --no-block kill --signal SIGUSR1 dunst
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
>&2 printf 'Unknown command\n'
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
23
bin/fuck-lxc
Executable file
23
bin/fuck-lxc
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
vagrant destroy -f
|
||||||
|
killall vagrant
|
||||||
|
killall -9 vagrant
|
||||||
|
|
||||||
|
pgrep -fa lxc | grep -v fuck-lxc | awk '{print $1}' | xargs sudo kill -9
|
||||||
|
|
||||||
|
sudo lxc-ls -1 | xargs -l1 sudo lxc-stop --kill --name ; sudo lxc-ls -1 | xargs -l1 sudo lxc-destroy --name
|
||||||
|
|
||||||
|
pgrep -fa lxc | grep -v fuck-lxc | awk '{print $1}' | xargs sudo kill -9
|
||||||
|
|
||||||
|
rm -rf .vagrant
|
||||||
|
|
||||||
|
sudo systemctl restart nfs-kernel-server
|
||||||
|
sudo systemctl restart lxc\*
|
||||||
|
|
||||||
|
sudo apt-get install --reinstall lxc
|
||||||
|
|
||||||
|
sudo systemctl restart nfs-kernel-server
|
||||||
|
sudo systemctl restart lxc\*
|
||||||
15
bin/git-sm-commit
Executable file
15
bin/git-sm-commit
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
submodule_count=$(git diff --staged --submodule=log | grep -c '^Submodule')
|
||||||
|
|
||||||
|
if (( $submodule_count == 1 )) ; then
|
||||||
|
msg="Update submodule $(git diff --staged --submodule=log | grep '^Submodule' | cut -d ' ' -f 2)"
|
||||||
|
else
|
||||||
|
msg="Update submodules"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git commit --edit --no-status \
|
||||||
|
--message="$msg" \
|
||||||
|
--message "$(git diff --staged --color=never --submodule=log | sed 's/^S/\nS/' | sed 's/^Submodule /* /' | sed 's/ >/ */')"
|
||||||
8
bin/git-worktree-rm
Executable file
8
bin/git-worktree-rm
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
rm -r "${1}"
|
||||||
|
cd ./.gitdir
|
||||||
|
git worktree remove "${1}"
|
||||||
|
git branch -D "${1}"
|
||||||
@@ -43,7 +43,7 @@ pandoc \
|
|||||||
--variable papersize=a4 \
|
--variable papersize=a4 \
|
||||||
--variable date=$(date --iso-8601=date) \
|
--variable date=$(date --iso-8601=date) \
|
||||||
--variable fontsize=12pt \
|
--variable fontsize=12pt \
|
||||||
--variable fontfamily=libertinus \
|
--variable fontfamily=libertine \
|
||||||
--variable familydefault=sfdefault \
|
--variable familydefault=sfdefault \
|
||||||
--variable documentclass=scrartcl \
|
--variable documentclass=scrartcl \
|
||||||
--variable fontfamilyoptions= \
|
--variable fontfamilyoptions= \
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
systemctl --no-pager --user status mousespam && systemctl --no-pager --user stop mousespam || systemctl --no-pager --user start mousespam
|
|
||||||
94
bin/mypass
Executable file
94
bin/mypass
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
PASS = '/usr/bin/pass'
|
||||||
|
|
||||||
|
def run(args):
|
||||||
|
return(subprocess.run(
|
||||||
|
args,
|
||||||
|
stdin=sys.stdin,
|
||||||
|
stdout=sys.stdout,
|
||||||
|
stderr=sys.stderr).returncode)
|
||||||
|
|
||||||
|
def get_stdout(args):
|
||||||
|
return(subprocess.run(
|
||||||
|
args,
|
||||||
|
stdout=subprocess.PIPE).stdout)
|
||||||
|
|
||||||
|
def extract_from_dict(d, k, last=None):
|
||||||
|
if '.' in k:
|
||||||
|
k1, k2 = k.split('.', 1)
|
||||||
|
try:
|
||||||
|
d1 = d[k1]
|
||||||
|
return extract_from_dict(d1, k2, last=k1)
|
||||||
|
except KeyError:
|
||||||
|
print("\"{}\" was not found in the data".format(k))
|
||||||
|
sys.exit(3)
|
||||||
|
else:
|
||||||
|
if not isinstance(d, dict):
|
||||||
|
print("element \"{}\" is not a dictionary".format(last))
|
||||||
|
sys.exit(3)
|
||||||
|
try:
|
||||||
|
return d[k]
|
||||||
|
except KeyError:
|
||||||
|
print("\"{}\" was not found in the data".format(k))
|
||||||
|
sys.exit(3)
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_get(*args):
|
||||||
|
if len(args) == 1:
|
||||||
|
print(get_stdout(['pass', 'show', args[0]]).split(b'\n')[0].decode())
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if len(args) < 2:
|
||||||
|
print("what do you want to get?")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
# get the pass output
|
||||||
|
out = get_stdout(['pass', 'show', args[0]])
|
||||||
|
try:
|
||||||
|
data = list(yaml.safe_load_all(out))[-1]
|
||||||
|
except yaml.scanner.ScannerError as e:
|
||||||
|
print("invalid YAML data: {}".format(str(e)))
|
||||||
|
return 2
|
||||||
|
except IndexError:
|
||||||
|
print("invalid YAML data: no YAML document found")
|
||||||
|
return 2
|
||||||
|
|
||||||
|
if not isinstance(data, dict):
|
||||||
|
print("invalid YAML data, not a dict")
|
||||||
|
return 2
|
||||||
|
|
||||||
|
for element in args[1:]:
|
||||||
|
keydata = extract_from_dict(data, element)
|
||||||
|
if isinstance(keydata, list) or isinstance(keydata, dict):
|
||||||
|
print(yaml.safe_dump(keydata, default_flow_style=False).strip())
|
||||||
|
else:
|
||||||
|
print(keydata)
|
||||||
|
|
||||||
|
cmds = ['get']
|
||||||
|
git_push_commands = ['insert', 'edit', 'generate', 'rm', 'mv', 'cp']
|
||||||
|
|
||||||
|
def run_pass(argv):
|
||||||
|
return run([PASS] + argv[1:])
|
||||||
|
|
||||||
|
def just_call_pass(argv):
|
||||||
|
sys.exit(run_pass(argv))
|
||||||
|
|
||||||
|
if len(sys.argv) == 1:
|
||||||
|
just_call_pass(sys.argv)
|
||||||
|
elif sys.argv[1] not in cmds:
|
||||||
|
if sys.argv[1] not in git_push_commands:
|
||||||
|
just_call_pass(sys.argv)
|
||||||
|
else:
|
||||||
|
e = run_pass(sys.argv)
|
||||||
|
if e == 0:
|
||||||
|
print("Pushing to remote repository...")
|
||||||
|
run([PASS, 'git', 'push'])
|
||||||
|
print("Done")
|
||||||
|
sys.exit(e)
|
||||||
|
else:
|
||||||
|
sys.exit(globals()['cmd_' + sys.argv[1]](*sys.argv[2:]))
|
||||||
40
bin/nato
40
bin/nato
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
|
||||||
|
|
||||||
hash = {
|
hash = {
|
||||||
'A': 'Alpha',
|
'A': 'Alpha',
|
||||||
@@ -44,45 +43,6 @@ hash = {
|
|||||||
'.': 'Stop',
|
'.': 'Stop',
|
||||||
}
|
}
|
||||||
|
|
||||||
de = {
|
|
||||||
'A': 'Anton',
|
|
||||||
'Ä': 'Ärger',
|
|
||||||
'B': 'Berta',
|
|
||||||
'C': 'Cäsar',
|
|
||||||
'D': 'Dora',
|
|
||||||
'E': 'Emil',
|
|
||||||
'F': 'Friedrich',
|
|
||||||
'G': 'Gustav',
|
|
||||||
'H': 'Heinrich',
|
|
||||||
'I': 'Ida',
|
|
||||||
'J': 'Julius',
|
|
||||||
'K': 'Kaufmann',
|
|
||||||
'L': 'Ludwig',
|
|
||||||
'M': 'Martha',
|
|
||||||
'N': 'Nordpol',
|
|
||||||
'O': 'Otto',
|
|
||||||
'Ö': 'Ökonom',
|
|
||||||
'P': 'Paula',
|
|
||||||
'Q': 'Quelle',
|
|
||||||
'R': 'Richard',
|
|
||||||
'S': 'Samuel',
|
|
||||||
'ß': 'Eszett',
|
|
||||||
'T': 'Theodor',
|
|
||||||
'U': 'Ulrich',
|
|
||||||
'Ü': 'Übermut',
|
|
||||||
'V': 'Viktor',
|
|
||||||
'W': 'Wilhelm',
|
|
||||||
'X': 'Xanthippe',
|
|
||||||
'Y': 'Ypsilon',
|
|
||||||
'Z': 'Zacharias',
|
|
||||||
'-': 'Strich',
|
|
||||||
'.': 'Punkt',
|
|
||||||
}
|
|
||||||
|
|
||||||
if os.path.basename(sys.argv[0]) == 'natode':
|
|
||||||
hash = de
|
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) < 2 or sys.argv[1] == '-':
|
if len(sys.argv) < 2 or sys.argv[1] == '-':
|
||||||
text = [line.strip() for line in sys.stdin.readlines()]
|
text = [line.strip() for line in sys.stdin.readlines()]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
nato
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
pacman -Qtdq | xargs --open-tty --no-run-if-empty sudo pacman -Rns
|
|
||||||
14
bin/pass
14
bin/pass
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
if [[ ! -e "${PASSWORD_STORE_DIR}" ]] ; then
|
|
||||||
printf '%s\n' 'This is the first time running pass, initializting repository ...'
|
|
||||||
|
|
||||||
git clone ssh://git@code.hkoerber.de:2222/hannes/passwordstore.git "${PASSWORD_STORE_DIR}"
|
|
||||||
|
|
||||||
printf '%s\n' 'Done'
|
|
||||||
fi
|
|
||||||
|
|
||||||
command -p pass "${@}"
|
|
||||||
14
bin/pf
14
bin/pf
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
import yaml
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
jqexpression = sys.argv[1]
|
|
||||||
|
|
||||||
jqprocess = subprocess.Popen(["jq", "-r", jqexpression], stdin=subprocess.PIPE, text=True)
|
|
||||||
|
|
||||||
document = [d for d in yaml.safe_load_all(sys.stdin)][-1]
|
|
||||||
|
|
||||||
json.dump(document, jqprocess.stdin)
|
|
||||||
62
bin/screencfg
Executable file
62
bin/screencfg
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
XRANDR = 'xrandr'
|
||||||
|
|
||||||
|
def run(cmd):
|
||||||
|
print('>>> ' + ' '.join(cmd))
|
||||||
|
start = time.time()
|
||||||
|
ret = subprocess.run(
|
||||||
|
cmd,
|
||||||
|
stdout=sys.stdout,
|
||||||
|
stderr=sys.stderr)
|
||||||
|
end = time.time()
|
||||||
|
print("exit code: {}".format(ret.returncode))
|
||||||
|
print("exec time: {}".format(end - start))
|
||||||
|
|
||||||
|
def fail(msg, code=1):
|
||||||
|
print(msg)
|
||||||
|
sys.exit(code)
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('config')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
config_path = args.config
|
||||||
|
|
||||||
|
try:
|
||||||
|
config = yaml.safe_load(open(config_path))
|
||||||
|
except FileNotFoundError:
|
||||||
|
fail("File {0} not found".format(config_path))
|
||||||
|
|
||||||
|
# reset
|
||||||
|
for output in config['outputs']:
|
||||||
|
if config.get('reset') and output.get('reset'):
|
||||||
|
run([XRANDR, '--output', output['name'], '--off'])
|
||||||
|
run([XRANDR, '--delmode', output['name'], output['opts']['mode']])
|
||||||
|
run([XRANDR, '--addmode', output['name'], output['opts']['mode']])
|
||||||
|
run([XRANDR, '--output', output['name'], '--mode', output['opts']['mode']])
|
||||||
|
|
||||||
|
cmd = [XRANDR]
|
||||||
|
for output in config['outputs']:
|
||||||
|
cmd.extend(['--output', output['name']])
|
||||||
|
if output.get('disable'):
|
||||||
|
cmd.append('--off')
|
||||||
|
else:
|
||||||
|
if output.get('primary', False):
|
||||||
|
cmd.append("--primary")
|
||||||
|
# cmd.append('--auto')
|
||||||
|
for k, v in output['opts'].items():
|
||||||
|
cmd.extend(['--{}'.format(k), str(v)])
|
||||||
|
for k,v in output.get('set', {}).items():
|
||||||
|
cmd.extend(['--set', k, v])
|
||||||
|
|
||||||
|
run(cmd)
|
||||||
|
run(['i3-msg', 'restart'])
|
||||||
|
run(['systemctl', '--user', 'restart', 'keyboard'])
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
apply() {
|
|
||||||
local mode="${1}"
|
|
||||||
|
|
||||||
case "${mode}" in
|
|
||||||
dark)
|
|
||||||
theme=monokai
|
|
||||||
;;
|
|
||||||
light)
|
|
||||||
theme=github_light
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sed -i "s#themes/.*\.toml#themes/${theme}.toml#" "${XDG_CONFIG_HOME}/alacritty/config.toml"
|
|
||||||
|
|
||||||
sed -i "s#theme = .*\$#theme = \"${theme}\"#" "${XDG_CONFIG_HOME}/helix/config.toml"
|
|
||||||
|
|
||||||
pkill -SIGUSR1 helix
|
|
||||||
|
|
||||||
printf '%s' "${mode}" > "${XDG_RUNTIME_DIR}"/color_mode
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${1:-}" in
|
|
||||||
dark)
|
|
||||||
apply dark
|
|
||||||
;;
|
|
||||||
light)
|
|
||||||
apply light
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Stolen from https://devops.stackexchange.com/a/8984 and adapted to my use case
|
# Stolen from https://devops.stackexchange.com/a/8984 and adapted to my use case
|
||||||
|
|
||||||
if (( $# == 0 )) ; then
|
if [[ -z "$@" ]]; then
|
||||||
echo "Missing file input arguments"
|
echo "Missing file input arguments"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for FILE in "$@"
|
for FILE in "$@"
|
||||||
do
|
do
|
||||||
RESOURCE=$(sed -n 's/^resource "\([^"]*\)" "\([^"]*\)".*/-target=\1.\2 /gp' "$FILE")
|
RESOURCE=$(sed -n 's/^resource "\([^"]*\)" "\([^"]*\)".*/-target=\1.\2 /gp' $FILE)
|
||||||
MODULE=$(sed -n 's/^module "\([^"]*\)".*/-target=module.\1 /gp' "$FILE")
|
MODULE=$(sed -n 's/^module "\([^"]*\)".*/-target=module.\1 /gp' $FILE)
|
||||||
if [[ -z "$RESOURCE" ]] && [[ -z "$MODULE" ]]; then
|
if [[ -z "$RESOURCE" ]] && [[ -z "$MODULE" ]]; then
|
||||||
echo "Cannot detect terraform resource and module in $FILE" >&2
|
echo "Cannot detect terraform resource and module in $FILE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$RESOURCE" ]]; then
|
if [[ ! -z "$RESOURCE" ]]; then
|
||||||
echo -e $"$RESOURCE"
|
echo -e $"$RESOURCE"
|
||||||
fi
|
fi
|
||||||
if [[ -n "$MODULE" ]]; then
|
if [[ ! -z "$MODULE" ]]; then
|
||||||
echo -e $"$MODULE"
|
echo -e $"$MODULE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import sys, yaml, json
|
|
||||||
|
|
||||||
json.dump([d for d in yaml.safe_load_all(sys.stdin)][-1], sys.stdout, indent=4)
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[build]
|
|
||||||
rustc-wrapper = "sccache"
|
|
||||||
|
|
||||||
[target.x86_64-unknown-linux-gnu]
|
|
||||||
linker = "/usr/bin/clang"
|
|
||||||
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
|
||||||
1
contrib/vim-plug
Submodule
1
contrib/vim-plug
Submodule
Submodule contrib/vim-plug added at c3b6b7c297
@@ -9,12 +9,11 @@ apps = yaml.safe_load(open(package_file, 'r'))
|
|||||||
|
|
||||||
missing_config = {}
|
missing_config = {}
|
||||||
|
|
||||||
for appname, appconfig in apps.items():
|
for appname, appconfig in apps['packages']['list'].items():
|
||||||
for distro, packagelist in appconfig.items():
|
for distro, packagelist in appconfig.items():
|
||||||
if len(packagelist) == 0:
|
if len(packagelist) == 0:
|
||||||
if distro not in missing_config.keys():
|
if distro not in missing_config.keys():
|
||||||
missing_config[distro] = []
|
missing_config[distro] = []
|
||||||
missing_config[distro].append(appname)
|
missing_config[distro].append(appname)
|
||||||
|
|
||||||
if missing_config:
|
print(yaml.dump(missing_config))
|
||||||
print(yaml.dump(missing_config), end="")
|
|
||||||
|
|||||||
103
dotfiles.yml
103
dotfiles.yml
@@ -1,116 +1,73 @@
|
|||||||
empty_directories:
|
empty_directories:
|
||||||
|
- name: .i3
|
||||||
|
- name: .gnupg
|
||||||
|
mode: '0700'
|
||||||
- name: .config/nvim
|
- name: .config/nvim
|
||||||
- name: .config/rofi
|
- name: .config/rofi
|
||||||
- name: .config/gtk-3.0
|
- name: .config/gtk-3.0
|
||||||
- name: .config/gtk-3.0-overrides
|
|
||||||
- name: .config/gtk-3.0-overrides/bigger-font/
|
|
||||||
- name: .config/gtk-3.0-overrides/bigger-font/gtk-3.0
|
|
||||||
- name: .config/qt5ct
|
- name: .config/qt5ct
|
||||||
- name: .config/i3status-rust
|
|
||||||
- name: .config/i3status-rust/icons
|
|
||||||
- name: .config/i3status-rust/themes
|
|
||||||
- name: .config/helix
|
|
||||||
- name: .config/git
|
|
||||||
- name: .config/tmux
|
|
||||||
- name: .config/i3
|
|
||||||
- name: .config/zsh
|
|
||||||
- name: .config/alacritty
|
|
||||||
- name: .local/state/gnupg/
|
|
||||||
mode: '0700'
|
|
||||||
- name: .local/state/cargo/
|
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- from: git/gitconfig
|
- from: git/gitconfig
|
||||||
to: .config/git/config
|
to: .gitconfig
|
||||||
template: true
|
template: true
|
||||||
- from: gnupg/dirmngr.conf
|
- from: gnupg/dirmngr.conf
|
||||||
to: .local/state/gnupg/dirmngr.conf
|
to: .gnupg/dirmngr.conf
|
||||||
- from: gnupg/scdaemon.conf
|
|
||||||
to: .local/state/gnupg/scdaemon.conf
|
|
||||||
- from: gnupg/gpg-agent.conf
|
- from: gnupg/gpg-agent.conf
|
||||||
to: .local/state/gnupg/gpg-agent.conf
|
to: .gnupg/gpg-agent.conf
|
||||||
template: true
|
template: true
|
||||||
- from: gnupg/gpg.conf
|
- from: gnupg/gpg.conf
|
||||||
to: .local/state/gnupg/gpg.conf
|
to: .gnupg/gpg.conf
|
||||||
template: true
|
template: true
|
||||||
- from: i3/config
|
- from: i3/config
|
||||||
to: .config/i3/config
|
to: .i3/config
|
||||||
template: true
|
template: true
|
||||||
- from: i3/i3status-rust/config.toml
|
- from: i3/i3status.conf
|
||||||
to: .config/i3status-rust/config.toml
|
to: .i3/i3status.conf
|
||||||
template: true
|
template: true
|
||||||
- from: i3/i3status-rust/themes/native.toml
|
|
||||||
to: .config/i3status-rust/themes/native.toml
|
|
||||||
- from: i3/i3status-rust/icons/awesome.toml
|
|
||||||
to: .config/i3status-rust/icons/awesome.toml
|
|
||||||
- from: i3/scripts
|
- from: i3/scripts
|
||||||
to: .config/i3/scripts
|
to: .i3/scripts
|
||||||
dir: true
|
|
||||||
- from: tmux/tmux.conf
|
- from: tmux/tmux.conf
|
||||||
to: .config/tmux/tmux.conf
|
to: .tmux.conf
|
||||||
- from: vim/vimrc
|
- from: vim/vimrc
|
||||||
to: .config/nvim/init.vim
|
to: .config/nvim/init.vim
|
||||||
|
- from: vim/vimrc
|
||||||
|
to: .vimrc
|
||||||
- from: x/Xresources
|
- from: x/Xresources
|
||||||
to: .config/Xresources
|
to: .Xresources
|
||||||
|
template: true
|
||||||
- from: x/xinitrc
|
- from: x/xinitrc
|
||||||
to: .config/xinitrc
|
to: .xinitrc
|
||||||
- from: zsh/zprofile
|
- from: zsh/zprofile
|
||||||
to: .config/zsh/.zprofile
|
to: .zprofile
|
||||||
template: true
|
template: true
|
||||||
- from: zsh/zshrc
|
- from: zsh/zshrc
|
||||||
to: .config/zsh/.zshrc
|
to: .zshrc
|
||||||
template: true
|
template: true
|
||||||
- from: zsh/zshenv
|
- from: zsh/zshrc.d
|
||||||
to: .zshenv
|
to: .zshrc.d
|
||||||
- from: dunst/dunstrc
|
- from: dunst/dunstrc
|
||||||
to: .config/dunstrc
|
to: .config/dunstrc
|
||||||
template: true
|
template: true
|
||||||
- from: redshift/redshift.conf
|
- from: redshift/redshift.conf
|
||||||
to: .config/redshift.conf
|
to: .config/redshift.conf
|
||||||
- from: vscodium/product.json
|
- from: vscode/settings.json
|
||||||
to: .config/VSCodium/product.json
|
to: .config/Code/User/settings.json
|
||||||
- from: vscodium/settings.json
|
- from: vscode/keybindings.json
|
||||||
to: .config/VSCodium/User/settings.json
|
to: .config/Code/User/keybindings.json
|
||||||
- from: vscodium/keybindings.json
|
- from: alacritty/alacritty.yml
|
||||||
to: .config/VSCodium/User/keybindings.json
|
to: .config/alacritty.yml
|
||||||
- from: alacritty/alacritty.toml
|
|
||||||
to: .config/alacritty/config.toml
|
|
||||||
template: true
|
template: true
|
||||||
- from: alacritty/themes
|
|
||||||
to: .config/alacritty/themes
|
|
||||||
dir: true
|
|
||||||
- from: rofi/config
|
- from: rofi/config
|
||||||
to: .config/rofi/config
|
to: .config/rofi/config
|
||||||
- from: gtk/gtk-3.0.ini
|
- from: gtk/gtk-3.0.ini
|
||||||
to: .config/gtk-3.0/settings.ini
|
to: .config/gtk-3.0/settings.ini
|
||||||
template: true
|
template: true
|
||||||
- from: gtk/gtk-3.0-bigger-font.ini
|
|
||||||
to: .config/gtk-3.0-overrides/bigger-font/gtk-3.0/settings.ini
|
|
||||||
template: true
|
|
||||||
- from: gtk/gtkrc-2.0
|
- from: gtk/gtkrc-2.0
|
||||||
to: .config/gtkrc-2.0
|
to: .gtkrc-2.0
|
||||||
template: true
|
template: true
|
||||||
- from: qt/qt5ct.conf
|
- from: qt/qt5ct.conf
|
||||||
to: .config/qt5ct/qt5ct.conf
|
to: .config/qt5ct/qt5ct.conf
|
||||||
|
- from: screencfg
|
||||||
|
to: .screencfg
|
||||||
- from: scripts
|
- from: scripts
|
||||||
to: scripts
|
to: scripts
|
||||||
dir: true
|
|
||||||
- from: helix/config.toml
|
|
||||||
to: .config/helix/config.toml
|
|
||||||
- from: helix/languages.toml
|
|
||||||
to: .config/helix/languages.toml
|
|
||||||
- from: screencfg/screencfg.toml
|
|
||||||
to: .config/screencfg.toml
|
|
||||||
- from: cargo/config.toml
|
|
||||||
to: .local/state/cargo/config.toml
|
|
||||||
dotfiles_remove:
|
|
||||||
- .gitconfig
|
|
||||||
- .vimrc
|
|
||||||
- .tmux.conf
|
|
||||||
- .i3
|
|
||||||
- .gtkrc-2.0
|
|
||||||
- .opt
|
|
||||||
- .optbin
|
|
||||||
- .usr
|
|
||||||
- .var
|
|
||||||
- .screenrc
|
|
||||||
- .zshrc.d
|
|
||||||
|
|||||||
28
drivers.yml
28
drivers.yml
@@ -1,28 +0,0 @@
|
|||||||
cpu:
|
|
||||||
amd:
|
|
||||||
- amd-ucode
|
|
||||||
intel:
|
|
||||||
- intel-ucode
|
|
||||||
|
|
||||||
gpu:
|
|
||||||
amd:
|
|
||||||
- mesa
|
|
||||||
- mesa-utils
|
|
||||||
- lib32-mesa
|
|
||||||
- xf86-video-amdgpu
|
|
||||||
- vulkan-radeon
|
|
||||||
- lib32-vulkan-radeon
|
|
||||||
- libva-mesa-driver
|
|
||||||
- lib32-libva-mesa-driver
|
|
||||||
- mesa-vdpau
|
|
||||||
- lib32-mesa-vdpau
|
|
||||||
- vulkan-headers
|
|
||||||
- vulkan-tools
|
|
||||||
nvidia:
|
|
||||||
- mesa
|
|
||||||
- mesa-utils
|
|
||||||
- lib32-mesa
|
|
||||||
- vulkan-nouveau
|
|
||||||
- lib32-vulkan-nouveau
|
|
||||||
- vulkan-headers
|
|
||||||
- vulkan-tools
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
frame_width = 2
|
frame_width = 2
|
||||||
|
|
||||||
# Defines color of the frame around the notification window.
|
# Defines color of the frame around the notification window.
|
||||||
frame_color = "#ff964f"
|
frame_color = "#e16b40"
|
||||||
|
|
||||||
# Define a color for the separator.
|
# Define a color for the separator.
|
||||||
# possible values are:
|
# possible values are:
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
### Text ###
|
### Text ###
|
||||||
|
|
||||||
font = JetBrainsMono, Fontawesome {{ machine.font_size }}
|
font = DejaVu Sans {{ machine.font_size }}
|
||||||
|
|
||||||
# The spacing between lines. If the height is smaller than the
|
# The spacing between lines. If the height is smaller than the
|
||||||
# font height, it will get raised to the font height.
|
# font height, it will get raised to the font height.
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
name = Hannes Körber
|
name = Hannes Körber
|
||||||
email = {{ user.mail }}
|
email = {{ user.mail }}
|
||||||
useConfigOnly = true
|
useConfigOnly = true
|
||||||
|
{% if user.git_gpg_sign|bool %}
|
||||||
|
signingkey = {{ user.gpg_key.id }}
|
||||||
|
{% endif %}
|
||||||
[github]
|
[github]
|
||||||
user = hakoerber
|
user = hakoerber
|
||||||
[alias]
|
[alias]
|
||||||
@@ -41,7 +44,7 @@
|
|||||||
|
|
||||||
pushall = "!bash -c 'for r in $(git remote) ; do [[ "$r" != "upstream" ]] && { echo \"--- [$r] ---\" ; git push $r \"$@\" ; } ; done' -"
|
pushall = "!bash -c 'for r in $(git remote) ; do [[ "$r" != "upstream" ]] && { echo \"--- [$r] ---\" ; git push $r \"$@\" ; } ; done' -"
|
||||||
|
|
||||||
branch-clean = "!sh -c 'git branch --merged | grep -v -e master -e develop -e main -e '^*' | xargs --no-run-if-empty git branch -d'"
|
branch-clean = "!sh -c 'git branch --merged | grep -v -e master -e develop -e '^*' | xargs --no-run-if-empty git branch -d'"
|
||||||
brc = "!git branch-clean"
|
brc = "!git branch-clean"
|
||||||
|
|
||||||
graph = log --graph --pretty=format:'%C(yellow)%h%Creset%C(bold red)% D%Creset %C(green)(%cr) %C(blue)%an<%ae>%Creset%n %C(bold white)%s%Creset' --all
|
graph = log --graph --pretty=format:'%C(yellow)%h%Creset%C(bold red)% D%Creset %C(green)(%cr) %C(blue)%an<%ae>%Creset%n %C(bold white)%s%Creset' --all
|
||||||
@@ -68,18 +71,14 @@
|
|||||||
fileMode = true
|
fileMode = true
|
||||||
whitespace = "blank-at-eol,space-before-tab,blank-at-eof"
|
whitespace = "blank-at-eol,space-before-tab,blank-at-eof"
|
||||||
abbrev = 8
|
abbrev = 8
|
||||||
pager = delta
|
|
||||||
[interactive]
|
|
||||||
diffFilter = delta --color-only
|
|
||||||
[color]
|
[color]
|
||||||
ui = true
|
ui = true
|
||||||
[column]
|
[column]
|
||||||
ui = auto
|
ui = auto
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
autoSetupRemote = true
|
|
||||||
[merge]
|
[merge]
|
||||||
conflictstyle = diff3
|
tool = vimdiff
|
||||||
[gc]
|
[gc]
|
||||||
auto = 0
|
auto = 0
|
||||||
[advice]
|
[advice]
|
||||||
@@ -89,7 +88,7 @@
|
|||||||
commitBeforeMerge = false
|
commitBeforeMerge = false
|
||||||
detachedHead = false
|
detachedHead = false
|
||||||
[commit]
|
[commit]
|
||||||
gpgSign = false
|
gpgSign = {{ user.git_gpg_sign|bool }}
|
||||||
cleanup = strip
|
cleanup = strip
|
||||||
status = true
|
status = true
|
||||||
[status]
|
[status]
|
||||||
@@ -106,6 +105,7 @@
|
|||||||
autoStash = true
|
autoStash = true
|
||||||
[diff]
|
[diff]
|
||||||
submodule = log
|
submodule = log
|
||||||
|
mnemonicPrefix = true
|
||||||
renameLimit = 1199
|
renameLimit = 1199
|
||||||
[branch]
|
[branch]
|
||||||
autoSetupMerge = true
|
autoSetupMerge = true
|
||||||
@@ -119,17 +119,4 @@
|
|||||||
insteadOf = https://code.hkoerber.de/
|
insteadOf = https://code.hkoerber.de/
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = master
|
||||||
[safe]
|
|
||||||
directory = /var/lib/dotfiles
|
|
||||||
directory = /var/lib/dotfiles/*
|
|
||||||
[includeIf "gitdir:/var/lib/dotfiles/.git"]
|
|
||||||
path = /var/lib/dotfiles/gitcfg
|
|
||||||
[delta]
|
|
||||||
navigate = true # use n and N to move between diff sections
|
|
||||||
|
|
||||||
# delta detects terminal colors automatically; set one of these to disable auto-detection
|
|
||||||
# dark = true
|
|
||||||
# light = true
|
|
||||||
[rerere]
|
|
||||||
enabled = true
|
|
||||||
|
|||||||
@@ -9,6 +9,3 @@ enable-ssh-support
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
pinentry-program /usr/bin/pinentry-qt
|
pinentry-program /usr/bin/pinentry-qt
|
||||||
|
|
||||||
extra-socket none
|
|
||||||
browser-socket none
|
|
||||||
|
|||||||
@@ -34,7 +34,12 @@ fixed-list-mode
|
|||||||
no-mangle-dos-filenames
|
no-mangle-dos-filenames
|
||||||
require-cross-certification
|
require-cross-certification
|
||||||
|
|
||||||
|
{% if not (distro == 'ubuntu' and ansible_distribution_version == '18.04') -%}
|
||||||
|
{# looks like the gpg version in that ubuntu release it too old and does not
|
||||||
|
{# contain the setting #}
|
||||||
# do not cache keys for symmetric encryption
|
# do not cache keys for symmetric encryption
|
||||||
no-symkey-cache
|
no-symkey-cache
|
||||||
|
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
keyserver-options no-honor-keyserver-url no-auto-key-retrieve include-revoked
|
keyserver-options no-honor-keyserver-url no-auto-key-retrieve include-revoked
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
# makes yubikey work more reliably
|
|
||||||
disable-ccid
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
provider = "github"
|
|
||||||
token_command = "pass show github | ~/bin/yaml2json | jq -r '.personal_access_token.grm.value'"
|
|
||||||
root = "~/code/github.com"
|
|
||||||
worktree = true
|
|
||||||
force_ssh = true
|
|
||||||
|
|
||||||
[filters]
|
|
||||||
owner = true
|
|
||||||
317
grm/personal_projects.toml
Normal file
317
grm/personal_projects.toml
Normal file
@@ -0,0 +1,317 @@
|
|||||||
|
[[trees]]
|
||||||
|
root = "~/projects"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/rbackupd"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "git@github.com:hakoerber/rbackupd.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/cobbler-kickstart"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/cobbler-kickstart.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/postfix-grok-patterns"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/postfix-grok-patterns.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "upstream"
|
||||||
|
url = "https://github.com/whyscream/postfix-grok-patterns.git"
|
||||||
|
type = "https"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/syncrepo"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/syncrepo.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/pkgbuilds"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/pkgbuilds.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/openvpn-helper"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/openvpn-helper.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/wifiqr"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/wifi-qr.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/checkconn"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/checkconn.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "misc/xftwidth"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/xftwidth.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "upstream"
|
||||||
|
url = "https://github.com/vixus0/xftwidth"
|
||||||
|
type = "https"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "x-hidecursor"
|
||||||
|
remotes = []
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "git-repo-manager"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/git-repo-manager.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/git-repo-manager.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "talks"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/talks.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "container/openresty-oidc"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/container/openresty-oidc.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "container/acimaker"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/acimaker.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "private"
|
||||||
|
url = "git@code.sys.haktec.de:container/acimaker.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "container/drone-kaniko"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/container/drone-kaniko.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "upstream"
|
||||||
|
url = "https://github.com/banzaicloud/drone-kaniko"
|
||||||
|
type = "https"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "container/roundcube"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/container/roundcube.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "container/mycloud-homer"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/container/mycloud-homer.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "projects/misc/cobbler-kickstart"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/cobbler-kickstart.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "finance-auto-import"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/finance-auto-import.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "guitar_practice"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com/hakoerber/guitar-practice.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "picture-cleaner"
|
||||||
|
remotes = []
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "mycloud"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/mycloud.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "resume"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/resume.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "lea-michael-hochzeit"
|
||||||
|
remotes = []
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "builddoc"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/builddoc.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "blog"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/blog.hkoerber.de.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/blog.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "fizzbuzz"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/fizzbuzz.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "ggj/2018/the-lost-son"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com:niklas-heer/the-lost-son.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "ggj/2019-claim-your-world"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@github.com:theintroverts/claim-your-world.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "prometheus-restic-backblaze"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/prometheus-restic-backblaze.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/container/prometheus-restic-backblaze.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "dotfiles"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/dotfiles.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/dotfiles.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "packager"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/packager.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/packager.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "time-tracking"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/time-tracking.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/time-tracking.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "aws-glacier-backup"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "ssh://git@github.com/hakoerber/aws-glacier-backup.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hakoerber/aws-glacier-backup.git"
|
||||||
|
type = "ssh"
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
[Settings]
|
|
||||||
gtk-theme-name=Breeze
|
|
||||||
gtk-icon-theme-name=breeze
|
|
||||||
gtk-font-name=DejaVu Sans {{ ((machine.font_size|int - 2)|float * 2.0) | round(0, 'floor') | int }}
|
|
||||||
gtk-cursor-theme-name=breeze_cursors
|
|
||||||
gtk-cursor-theme-size=0
|
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
|
||||||
gtk-button-images=1
|
|
||||||
gtk-menu-images=1
|
|
||||||
gtk-enable-event-sounds=1
|
|
||||||
gtk-enable-input-feedback-sounds=1
|
|
||||||
gtk-xft-antialias=1
|
|
||||||
gtk-xft-hinting=1
|
|
||||||
gtk-xft-hintstyle=hintfull
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name=Breeze
|
gtk-theme-name=Breeze
|
||||||
gtk-icon-theme-name=breeze
|
gtk-icon-theme-name=breeze-dark
|
||||||
gtk-font-name=DejaVu Sans {{ machine.font_size|int - 2 }}
|
gtk-font-name=DejaVu Sans {{ machine.font_size|int - 2 }}
|
||||||
gtk-cursor-theme-name=breeze_cursors
|
gtk-cursor-theme-name=breeze_cursors
|
||||||
gtk-cursor-theme-size=0
|
gtk-cursor-theme-size=0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||||
|
|
||||||
gtk-theme-name="Breeze"
|
gtk-theme-name="Breeze"
|
||||||
gtk-icon-theme-name="breeze"
|
gtk-icon-theme-name="breeze-dark"
|
||||||
gtk-font-name="DejaVu Sans {{ machine.font_size| int - 2 }}"
|
gtk-font-name="DejaVu Sans {{ machine.font_size| int - 2 }}"
|
||||||
gtk-cursor-theme-name="breeze_cursors"
|
gtk-cursor-theme-name="breeze_cursors"
|
||||||
gtk-cursor-theme-size=0
|
gtk-cursor-theme-size=0
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
theme = "monokai"
|
|
||||||
|
|
||||||
[editor]
|
|
||||||
idle-timeout = 0
|
|
||||||
completion-trigger-len = 2
|
|
||||||
|
|
||||||
[editor.statusline]
|
|
||||||
left = ["mode", "separator", "file-name", "file-modification-indicator"]
|
|
||||||
|
|
||||||
right = [
|
|
||||||
"spinner",
|
|
||||||
"spacer",
|
|
||||||
"diagnostics",
|
|
||||||
"separator",
|
|
||||||
"selections",
|
|
||||||
"separator",
|
|
||||||
"position",
|
|
||||||
"position-percentage",
|
|
||||||
"file-type",
|
|
||||||
]
|
|
||||||
|
|
||||||
mode.normal = "N"
|
|
||||||
mode.insert = "I"
|
|
||||||
mode.select = "S"
|
|
||||||
|
|
||||||
[editor.lsp]
|
|
||||||
display-inlay-hints = true
|
|
||||||
|
|
||||||
[editor.cursor-shape]
|
|
||||||
insert = "bar"
|
|
||||||
|
|
||||||
[editor.file-picker]
|
|
||||||
hidden = false
|
|
||||||
|
|
||||||
[editor.indent-guides]
|
|
||||||
render = true
|
|
||||||
|
|
||||||
[editor.soft-wrap]
|
|
||||||
enable = true
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
[[language]]
|
|
||||||
name = "bash"
|
|
||||||
indent = { unit = " ", tab-width = 4 }
|
|
||||||
|
|
||||||
[language-server.pylsp.config.pylsp.plugins]
|
|
||||||
flake8 = { enabled = false }
|
|
||||||
|
|
||||||
[[language]]
|
|
||||||
name = "python"
|
|
||||||
indent = { unit = " ", tab-width = 4 }
|
|
||||||
|
|
||||||
[[language]]
|
|
||||||
name = "dockerfile"
|
|
||||||
indent = { unit = " ", tab-width = 4 }
|
|
||||||
113
i3/config.j2
113
i3/config.j2
@@ -17,10 +17,10 @@
|
|||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
|
||||||
# The default terminal
|
# The default terminal
|
||||||
set $terminal "alacritty --config-file ~/.config/alacritty/config.toml"
|
set $terminal "alacritty --config-file ~/.config/alacritty.yml"
|
||||||
set $calc "alacritty --config-file ~/.config/alacritty/config.toml -e $SHELL -i -c calc"
|
set $calc "alacritty --config-file ~/.config/alacritty.yml -e $SHELL -i -c calc"
|
||||||
|
|
||||||
set $scriptdir ~/.config/i3/scripts
|
set $scriptdir ~/.i3/scripts
|
||||||
|
|
||||||
# Keys for the exit mode
|
# Keys for the exit mode
|
||||||
set $key_lock l
|
set $key_lock l
|
||||||
@@ -95,6 +95,7 @@
|
|||||||
|
|
||||||
set $screenshot o
|
set $screenshot o
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### WORKSPACE ASSIGNMENTS ######################################################
|
### WORKSPACE ASSIGNMENTS ######################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -110,7 +111,8 @@ workspace $workspace8 output {{ machine.screen.8 }}
|
|||||||
workspace $workspace9 output {{ machine.screen.9 }}
|
workspace $workspace9 output {{ machine.screen.9 }}
|
||||||
workspace $workspace10 output {{ machine.screen.0 }}
|
workspace $workspace10 output {{ machine.screen.0 }}
|
||||||
|
|
||||||
assign [class="^KeePassXC$"] $workspace8
|
|
||||||
|
assign [class="^Keepassx$"] $workspace8
|
||||||
|
|
||||||
# See https://github.com/i3/i3/issues/2060
|
# See https://github.com/i3/i3/issues/2060
|
||||||
for_window [class="^Spotify$"] move to workspace $workspace9
|
for_window [class="^Spotify$"] move to workspace $workspace9
|
||||||
@@ -118,8 +120,8 @@ assign [class="^Spotify$"] $workspace9
|
|||||||
|
|
||||||
assign [class="^Google-chrome$"] $workspace7
|
assign [class="^Google-chrome$"] $workspace7
|
||||||
assign [class="^Chromium$"] $workspace7
|
assign [class="^Chromium$"] $workspace7
|
||||||
assign [class="^[Ss]team$"] $workspace5
|
assign [class="^Steam"] $workspace5
|
||||||
for_window [class="^[Ss]team$"] move to workspace $workspace5
|
for_window [class="^Steam$"] move to workspace $workspace5
|
||||||
|
|
||||||
assign [class="^dota2$"] $workspace10
|
assign [class="^dota2$"] $workspace10
|
||||||
assign [class="^Wine$"] $workspace10
|
assign [class="^Wine$"] $workspace10
|
||||||
@@ -204,19 +206,47 @@ assign [class="^Wine$"] $workspace10
|
|||||||
|
|
||||||
### START APPLICATIONS #####################################################
|
### START APPLICATIONS #####################################################
|
||||||
|
|
||||||
bindsym $mod+d exec --no-startup-id rofi -show combi -combi-modi run -display-combi "run"
|
bindsym $mod+d exec --no-startup-id ~/.i3/scripts/appmenu
|
||||||
|
|
||||||
bindsym $mod+Return exec $terminal
|
bindsym $mod+Return exec $terminal
|
||||||
bindsym $mod+Shift+Return exec $calc
|
bindsym $mod+Shift+Return exec $calc
|
||||||
|
|
||||||
bindsym F1 exec --no-startup-id workstation-client power menu
|
bindsym F1 exec --no-startup-id ~/.i3/scripts/shutdown-menu
|
||||||
|
bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu
|
||||||
|
|
||||||
bindsym $mod+F1 exec --no-startup-id workstation-client power lock
|
bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock
|
||||||
|
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/default.yml ; exec systemctl --user restart keyboard.service
|
||||||
|
{% for screencfg in machine.screencfgs -%}
|
||||||
|
bindsym $mod+{{ screencfg.key }} exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/{{ screencfg.name }}.yml ; exec systemctl --user restart keyboard.service
|
||||||
|
{% endfor -%}
|
||||||
|
bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend
|
||||||
|
bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu
|
||||||
|
|
||||||
bindsym $mod+$screenshot exec --no-startup-id sh -c 'maim | xclip -selection clipboard -t image/png'
|
bindsym $mod+$screenshot exec --no-startup-id sh -c 'maim | xclip -selection clipboard -t image/png'
|
||||||
bindsym $mod+Shift+$screenshot exec --no-startup-id sh -c 'maim --select | xclip -selection clipboard -t image/png'
|
bindsym $mod+Shift+$screenshot exec --no-startup-id sh -c 'maim --select | xclip -selection clipboard -t image/png'
|
||||||
|
|
||||||
bindsym $mod+$pim_toggle exec --no-startup-id $scriptdir/swap-from-workspace $workspace10
|
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
|
||||||
|
|
||||||
|
# bindsym $mod+$pim_toggle \
|
||||||
|
# mark --add _source; \
|
||||||
|
# focus output eDP-1; \
|
||||||
|
# mark --add _origin; \
|
||||||
|
# workspace $workspace10; \
|
||||||
|
# mark --add _destination; \
|
||||||
|
# [con_mark="^_destination$"] swap container with mark "_source"; \
|
||||||
|
# [con_mark="^_source$"] focus; unmark _source; \
|
||||||
|
# [con_mark="^_origin$"] focus; unmark _origin; \
|
||||||
|
# [con_mark="^_destination$"] focus; unmark _destination; \
|
||||||
|
|
||||||
|
bindsym $mod+$pim_toggle \
|
||||||
|
unmark _destination; \
|
||||||
|
mark _source; \
|
||||||
|
workspace $workspace10; \
|
||||||
|
mark --add _destination; \
|
||||||
|
[con_mark="^_destination$"] swap container with mark "_source"; \
|
||||||
|
[con_mark="^_source$"] focus; \
|
||||||
|
unmark _source; \
|
||||||
|
[con_mark="^_destination$"] focus; \
|
||||||
|
unmark _destination;
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### MODES ######################################################################
|
### MODES ######################################################################
|
||||||
@@ -282,17 +312,17 @@ assign [class="^Wine$"] $workspace10
|
|||||||
floating_minimum_size 0 x 0
|
floating_minimum_size 0 x 0
|
||||||
floating_maximum_size 0 x 0
|
floating_maximum_size 0 x 0
|
||||||
|
|
||||||
font pango:JetBrainsMono {{ machine.font_size }}
|
font pango:Inconsolata {{ machine.font_size }}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### COLOR SETTINGS #############################################################
|
### COLOR SETTINGS #############################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# class border backgr. text indicator
|
# class border backgr. text indicator
|
||||||
client.focused #e5b567 #e5b567 #000000 #FF0000
|
client.focused #E16B40 #E16B40 #000000 #FF0000
|
||||||
client.focused_inactive #272822 #5f676a #ffffff #484e50
|
client.focused_inactive #333333 #5f676a #ffffff #484e50
|
||||||
client.unfocused #1C1C1C #272822 #cccccc #292d2e
|
client.unfocused #333333 #202020 #cccccc #292d2e
|
||||||
client.urgent #272822 #ff7777 #000000 #900000
|
client.urgent #2f343a #900000 #ffffff #900000
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### APPLICATION SPECIFIC SETTINGS ##############################################
|
### APPLICATION SPECIFIC SETTINGS ##############################################
|
||||||
@@ -308,31 +338,33 @@ bindsym $mod+F9 exec --no-startup-id evolution
|
|||||||
### SPECIAL KEYBINDS ###########################################################
|
### SPECIAL KEYBINDS ###########################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
bindsym XF86Sleep exec --no-startup-id workstation-client power lock
|
bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id $scriptdir/pa-volume mute-toggle
|
||||||
|
bindsym XF86AudioRaiseVolume exec --no-startup-id $scriptdir/pa-volume set-vol +3
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id $scriptdir/pa-volume set-vol -3
|
||||||
|
|
||||||
bindsym XF86AudioMute exec --no-startup-id workstation-client pulseaudio output toggle
|
bindsym XF86AudioPlay exec $scriptdir/spotify-control toggle
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id workstation-client pulseaudio output inc
|
bindsym XF86AudioNext exec $scriptdir/spotify-control next
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id workstation-client pulseaudio output dec
|
bindsym XF86AudioPrev exec $scriptdir/spotify-control previous
|
||||||
|
|
||||||
bindsym XF86AudioPlay exec --no-startup-id workstation-client spotify toggle
|
# keys seemingly switched
|
||||||
bindsym XF86AudioNext exec --no-startup-id workstation-client spotify next
|
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 8 ; exec --no-startup-id $scriptdir/update-status
|
||||||
bindsym XF86AudioPrev exec --no-startup-id workstation-client spotify previous
|
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 8 ; exec --no-startup-id $scriptdir/update-status
|
||||||
|
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id workstation-client brightness inc
|
bindsym $mod+m exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id workstation-client brightness dec
|
bindsym $mod+space exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
|
||||||
|
|
||||||
bindsym $mod+m exec --no-startup-id workstation-client pulseaudio input toggle
|
|
||||||
bindsym $mod+space exec --no-startup-id workstation-client pulseaudio input toggle
|
|
||||||
bindsym KP_Enter exec --no-startup-id workstation-client pulseaudio input toggle
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### BARS #######################################################################
|
### BARS #######################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
|
#
|
||||||
bar {
|
bar {
|
||||||
mode dock
|
mode dock
|
||||||
position bottom
|
position bottom
|
||||||
|
|
||||||
|
|
||||||
|
#tray_output HDMI3
|
||||||
|
tray_output primary
|
||||||
tray_padding 2
|
tray_padding 2
|
||||||
|
|
||||||
strip_workspace_numbers no
|
strip_workspace_numbers no
|
||||||
@@ -343,23 +375,24 @@ bar {
|
|||||||
|
|
||||||
id bar-0
|
id bar-0
|
||||||
|
|
||||||
font pango:JetBrainsMono, FontAwesome {{ machine.font_size }}
|
font pango:Inconsolata, FontAwesome {{ machine.font_size }}
|
||||||
|
|
||||||
colors {
|
colors {
|
||||||
background #272822
|
background #272822
|
||||||
statusline #ffffff
|
statusline #ffffff
|
||||||
separator #555555
|
separator #444444
|
||||||
|
# separator #e16b40
|
||||||
|
|
||||||
focused_separator #e5b567
|
# focused_background #303030
|
||||||
focused_background #272822
|
# focused_separator #272822
|
||||||
|
|
||||||
# border bg text
|
focused_workspace #e16b40 #272822 #ffffff
|
||||||
focused_workspace #e5b567 #4f676a #ffffff
|
active_workspace #272822 #5f676a #ffffff
|
||||||
active_workspace #272822 #4f676a #ffffff
|
|
||||||
inactive_workspace #272822 #272822 #dddddd
|
inactive_workspace #272822 #272822 #dddddd
|
||||||
urgent_workspace #272822 #ff7777 #272822
|
urgent_workspace #D00000 #D00000 #272822
|
||||||
binding_mode #272822 #e5b567 #272822
|
binding_mode #272822 #e16b40 #272822
|
||||||
}
|
}
|
||||||
|
|
||||||
status_command i3status-rs ~/.config/i3status-rust/config.toml
|
i3bar_command i3bar
|
||||||
|
status_command py3status --standalone --dbus-notify -c ~/.i3/i3status.conf
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,112 +0,0 @@
|
|||||||
icons_format = "{icon}"
|
|
||||||
|
|
||||||
[icons]
|
|
||||||
icons = "awesome"
|
|
||||||
|
|
||||||
[icons.overrides]
|
|
||||||
microphone = ""
|
|
||||||
volume = ""
|
|
||||||
bat = "\uf240"
|
|
||||||
music = "\uf1bc"
|
|
||||||
|
|
||||||
[theme]
|
|
||||||
theme = "native"
|
|
||||||
|
|
||||||
[theme.overrides]
|
|
||||||
warning_fg = "#000000"
|
|
||||||
warning_bg = "#F4Bf75"
|
|
||||||
critical_fg = "#000000"
|
|
||||||
critical_bg = "#F92672"
|
|
||||||
end_separator = ""
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "music"
|
|
||||||
player = "spotify"
|
|
||||||
separator = " — "
|
|
||||||
format = " $icon {$combo $prev $play $next|-} "
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "sound"
|
|
||||||
driver = "pulseaudio"
|
|
||||||
max_vol = 100
|
|
||||||
format = " $icon{ $volume.eng(w:2)|} "
|
|
||||||
|
|
||||||
[[block.click]]
|
|
||||||
button = "left"
|
|
||||||
cmd = "workstation-client pulseaudio output toggle"
|
|
||||||
update = true
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "sound"
|
|
||||||
driver = "pulseaudio"
|
|
||||||
device_kind = "source"
|
|
||||||
format = " $icon "
|
|
||||||
|
|
||||||
[block.theme_overrides]
|
|
||||||
warning_fg = { link = "idle_fg" }
|
|
||||||
warning_bg = { link = "idle_bg" }
|
|
||||||
idle_fg = { link = "warning_fg" }
|
|
||||||
idle_bg = { link = "warning_bg" }
|
|
||||||
|
|
||||||
[[block.click]]
|
|
||||||
button = "left"
|
|
||||||
cmd = "workstation-client pulseaudio input toggle"
|
|
||||||
update = true
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "net"
|
|
||||||
format = " $icon{ $signal_strength|}{ $ssid.str(max_width:10) | }"
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "battery"
|
|
||||||
interval = 10
|
|
||||||
format = " $icon $percentage $time "
|
|
||||||
charging_format = " $icon $percentage "
|
|
||||||
missing_format = ""
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "toggle"
|
|
||||||
format = " $icon "
|
|
||||||
signal = 1
|
|
||||||
command_on = "workstation-client present toggle ; pkill -SIGRTMIN+1 i3status-rs"
|
|
||||||
command_off = "workstation-client present toggle ; pkill -SIGRTMIN+1 i3status-rs"
|
|
||||||
command_state = "[[ $(workstation-client present status) == on ]] && echo active"
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "toggle"
|
|
||||||
format = " $icon "
|
|
||||||
command_on = "workstation-client theme light"
|
|
||||||
command_off = "workstation-client theme dark"
|
|
||||||
command_state = "[[ $(workstation-client theme status) == light ]] && echo 1"
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "toggle"
|
|
||||||
format = " $icon "
|
|
||||||
command_on = "workstation-client redshift start"
|
|
||||||
command_off = "workstation-client redshift stop"
|
|
||||||
command_state = "[[ $(workstation-client redshift status) == active ]] && echo 1"
|
|
||||||
signal = 0
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "toggle"
|
|
||||||
format = " $icon "
|
|
||||||
command_on = "workstation-client spotify start"
|
|
||||||
command_off = "workstation-client spotify stop"
|
|
||||||
command_state = "[[ $(workstation-client spotify status) == active ]] && echo 1"
|
|
||||||
signal = 0
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "custom"
|
|
||||||
json = true
|
|
||||||
command = "ping -n -q -w 2 -c 1 8.8.8.8 >/dev/null 2>/dev/null && printf '{\"text\":\"\",\"state\":\"Info\"}' || printf '{\"text\":\"\",\"state\":\"Critical\"}'"
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "custom"
|
|
||||||
command = "workstation-client weather get"
|
|
||||||
# caching is handled by the workstation daemon
|
|
||||||
interval = 60
|
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "time"
|
|
||||||
interval = 1
|
|
||||||
format = " $timestamp.datetime(f:'[CW %V] %a %d.%m.%Y %H:%M:%S', l:de_DE) "
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
# FontAwesome 4: https://fontawesome.com/v4.7.0/cheatsheet/
|
|
||||||
backlight_empty = "\U0001f315"
|
|
||||||
backlight_full = "\U0001f311"
|
|
||||||
backlight_1 = "\U0001f314"
|
|
||||||
backlight_2 = "\U0001f314"
|
|
||||||
backlight_3 = "\U0001f314"
|
|
||||||
backlight_4 = "\U0001f314"
|
|
||||||
backlight_5 = "\U0001f313"
|
|
||||||
backlight_6 = "\U0001f313"
|
|
||||||
backlight_7 = "\U0001f313"
|
|
||||||
backlight_8 = "\U0001f313"
|
|
||||||
backlight_9 = "\U0001f313"
|
|
||||||
backlight_10 = "\U0001f312"
|
|
||||||
backlight_11 = "\U0001f312"
|
|
||||||
backlight_12 = "\U0001f312"
|
|
||||||
backlight_13 = "\U0001f312"
|
|
||||||
bat_charging = "\uf1e6" # fa-plug
|
|
||||||
bat_discharging = "\uf242" # fa-battery-half
|
|
||||||
bat_10 = "\uf244" # fa-battery-empty
|
|
||||||
bat_20 = "\uf243" # fa-battery-quarter
|
|
||||||
bat_30 = "\uf243" # fa-battery-quarter
|
|
||||||
bat_40 = "\uf243" # fa-battery-quarter
|
|
||||||
bat_50 = "\uf242" # fa-battery-half
|
|
||||||
bat_60 = "\uf242" # fa-battery-half
|
|
||||||
bat_70 = "\uf241" # fa-battery-three-quarters
|
|
||||||
bat_80 = "\uf241" # fa-battery-three-quarters
|
|
||||||
bat_90 = "\uf241" # fa-battery-three-quarters
|
|
||||||
bat_full = "\uf240" # fa-battery-full
|
|
||||||
bat_not_available = "\uf244" # fa-battery-empty
|
|
||||||
bell = "\uf0f3" # fa-bell
|
|
||||||
bell-slash = "\uf1f7" # fa-bell-slash-o
|
|
||||||
bluetooth = "\uf294" # fa-bluetooth-b
|
|
||||||
calendar = "\uf073" # fa-calendar
|
|
||||||
cogs = "\uf085" # fa-cogs
|
|
||||||
cpu = "\uf0e4" # fa-dashboard
|
|
||||||
cpu_boost_off = "\uf204" # fa-toggle-off
|
|
||||||
cpu_boost_on = "\uf205" # fa-toggle-on
|
|
||||||
disk_drive = "\uf0a0" # fa-hdd-o
|
|
||||||
docker = "\uf21a" # fa-ship
|
|
||||||
github = "\uf09b" # fa-github
|
|
||||||
gpu = "\uf26c" # fa-television
|
|
||||||
headphones = "\uf025" # fa-headphones
|
|
||||||
joystick = "\uf11b" # fa-gamepad
|
|
||||||
keyboard = "\uf11c" # fa-keyboard-o
|
|
||||||
mail = "\uf0e0" # fa-envelope
|
|
||||||
memory_mem = "\uf2db" # fa-microchip
|
|
||||||
memory_swap = "\uf0a0" # fa-hdd-o
|
|
||||||
mouse = "\uf245" # fa-mouse-pointer
|
|
||||||
music = "\uf001" # fa-music
|
|
||||||
music_next = "\uf061" # fa-arrow-right
|
|
||||||
music_pause = "\uf04c" # fa-pause
|
|
||||||
music_play = "\uf04b" # fa-play
|
|
||||||
music_prev = "\uf060" # fa-arrow-left
|
|
||||||
net_bridge = "\uf0e8" # fa-sitemap
|
|
||||||
net_down = "\u2b07"
|
|
||||||
net_loopback = "LO"
|
|
||||||
net_modem = "\uf095" # fa-phone
|
|
||||||
net_up = "\u2b06"
|
|
||||||
net_vpn = "\uf023" # fa-lock
|
|
||||||
net_wired = "\uf0ac" # fa-globe
|
|
||||||
net_wireless = "\uf1eb" # fa-wifi
|
|
||||||
notification = "\uf0a2" # fa-bell-o
|
|
||||||
phone = "\uf10b" # fa-mobile
|
|
||||||
phone_disconnected = "\U0001f4f5" # https://unicode-table.com/en/1F4F5/
|
|
||||||
ping = "\u21ba"
|
|
||||||
pomodoro = "\U0001f345"
|
|
||||||
pomodoro_break = "\uf0f4" # fa-coffee
|
|
||||||
pomodoro_paused = "\uf04c" # fa-pause
|
|
||||||
pomodoro_started = "\uf04b" # fa-play
|
|
||||||
pomodoro_stopped = "\uf04d" # fa-stop
|
|
||||||
resolution = "\uf096" # fa-square-o
|
|
||||||
tasks = "\uf0ae" # fa-tasks
|
|
||||||
thermometer = "\uf2c8" # fa-thermometer-3
|
|
||||||
time = "\uf017" # fa-clock-o
|
|
||||||
toggle_off = "\uf204" # fa-toggle-off
|
|
||||||
toggle_on = "\uf205" # fa-toggle-on
|
|
||||||
unknown = "\uf128" # fa-question
|
|
||||||
update = "\uf062" # fa-arrow-up
|
|
||||||
uptime = "\uf017" # fa-clock-o
|
|
||||||
volume_empty = "\uf026" # fa-volume-off
|
|
||||||
volume_full = "\uf028" # fa-volume-up
|
|
||||||
volume_half = "\uf027" # fa-volume-down
|
|
||||||
volume_muted = "\uf026 \uf00d"
|
|
||||||
microphone_empty = "\uf130" # fa-microphone
|
|
||||||
microphone_full = "\uf130" # fa-microphone
|
|
||||||
microphone_half = "\uf130" # fa-microphone
|
|
||||||
microphone_muted = "\uf131" # fa-microphone-slash
|
|
||||||
weather_clouds = "\uf0c2" # fa-cloud
|
|
||||||
weather_default = "\uf0c2" # fa-cloud
|
|
||||||
weather_rain = "\uf043" # fa-tint
|
|
||||||
weather_snow = "\uf2dc" # fa-snowflake-o
|
|
||||||
weather_sun = "\uf185" # fa-sun-o
|
|
||||||
weather_thunder = "\uf0e7" # fa-bolt
|
|
||||||
xrandr = "\uf26c" # fa-television
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
123
i3/i3status.conf.j2
Normal file
123
i3/i3status.conf.j2
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# i3status configuration file.
|
||||||
|
# see "man i3status" for documentation.
|
||||||
|
|
||||||
|
# It is important that this file is edited as UTF-8.
|
||||||
|
# The following line should contain a sharp s:
|
||||||
|
# ß
|
||||||
|
# If the above line is not correctly displayed, fix your editor first!
|
||||||
|
|
||||||
|
general {
|
||||||
|
interval = 1
|
||||||
|
# color = '#FFFFFF'
|
||||||
|
# color_good = '#00FF00'
|
||||||
|
# color_bad = '#FF0000'
|
||||||
|
# color_degraded = '#FFFF00'
|
||||||
|
color = '#FFFFFF'
|
||||||
|
color_good = '#FFFFFF'
|
||||||
|
color_bad = '#F92672'
|
||||||
|
color_degraded = '#F4Bf75'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
order += spotify
|
||||||
|
{% if user.has_yubikey %}
|
||||||
|
order += "yubikey"
|
||||||
|
{% endif %}
|
||||||
|
order += "volume_status output"
|
||||||
|
order += "volume_status input"
|
||||||
|
order += "wifi"
|
||||||
|
order += "external_script presentation_mode"
|
||||||
|
order += "systemd redshift"
|
||||||
|
order += "systemd spotify"
|
||||||
|
order += online_status
|
||||||
|
order += "battery_level all"
|
||||||
|
order += "clock"
|
||||||
|
|
||||||
|
battery_level all {
|
||||||
|
battery_id = "all"
|
||||||
|
format = " {icon} {percent}% "
|
||||||
|
measurement_mode = "sys"
|
||||||
|
charging_character = ""
|
||||||
|
blocks = ""
|
||||||
|
notification = true
|
||||||
|
hide_when_full = false
|
||||||
|
hide_seconds = true
|
||||||
|
notify_low_level = true
|
||||||
|
threshold_full = 95
|
||||||
|
}
|
||||||
|
|
||||||
|
systemd redshift {
|
||||||
|
unit = "redshift.service"
|
||||||
|
user = true
|
||||||
|
format = " "
|
||||||
|
on_click 1 = "exec $HOME/.i3/scripts/toggle-app redshift"
|
||||||
|
color_bad = '#F4Bf75'
|
||||||
|
color_degraded = '#F4Bf75'
|
||||||
|
}
|
||||||
|
|
||||||
|
systemd spotify {
|
||||||
|
unit = "spotify.service"
|
||||||
|
user = true
|
||||||
|
format = " "
|
||||||
|
color_bad = '#F4Bf75'
|
||||||
|
color_degraded = '#F4Bf75'
|
||||||
|
}
|
||||||
|
|
||||||
|
yubikey {
|
||||||
|
format = '[ YubiKey[\?if=is_gpg ][\?if=is_u2f ] ]'
|
||||||
|
}
|
||||||
|
|
||||||
|
clock {
|
||||||
|
format = ["{DE}", "{NZ}", "{Cuba}", "{MX}", "{CZ}", "{NL}", "{VN}"]
|
||||||
|
format_time = " {name} \[KW %V\] %a %d.%m.%Y %H:%M:%S "
|
||||||
|
}
|
||||||
|
|
||||||
|
wifi {
|
||||||
|
bitrate_bad = 0
|
||||||
|
bitrate_degraded = 0
|
||||||
|
format = " {signal_percent} {ssid} | down "
|
||||||
|
down_color = "good"
|
||||||
|
}
|
||||||
|
|
||||||
|
spotify {
|
||||||
|
format = " {title} - {artist} "
|
||||||
|
format_down = " off "
|
||||||
|
format_stopped = " stopped "
|
||||||
|
cache_timeout = 1
|
||||||
|
color_offline = '#FFFFFF'
|
||||||
|
on_click 1 = "exec $HOME/.i3/scripts/spotify-control toggle"
|
||||||
|
on_click 3 = "exec $HOME/.i3/scripts/spotify-control next"
|
||||||
|
}
|
||||||
|
|
||||||
|
external_script presentation_mode {
|
||||||
|
format = " Present: {output} "
|
||||||
|
script_path = "$HOME/.i3/scripts/presentation-mode status"
|
||||||
|
strip_output = True
|
||||||
|
on_click 1 = "exec $HOME/.i3/scripts/presentation-mode toggle"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
online_status {
|
||||||
|
icon_on = ""
|
||||||
|
icon_off = ""
|
||||||
|
format = " {icon} "
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_status output {
|
||||||
|
cache_timeout = 10
|
||||||
|
format = " {percentage}% "
|
||||||
|
format_muted = " mute "
|
||||||
|
thresholds = []
|
||||||
|
command = "pactl"
|
||||||
|
color_muted = '#FFFFFF'
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_status input {
|
||||||
|
cache_timeout = 10
|
||||||
|
format = " active "
|
||||||
|
format_muted = " mute "
|
||||||
|
thresholds = [(0, 'good'), (1, 'bad')]
|
||||||
|
command = "pactl"
|
||||||
|
color_muted = '#FFFFFF'
|
||||||
|
is_input = True
|
||||||
|
}
|
||||||
2
i3/scripts/appmenu
Executable file
2
i3/scripts/appmenu
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
rofi -show combi -combi-modi run -display-combi "run"
|
||||||
9
i3/scripts/bar-update
Executable file
9
i3/scripts/bar-update
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$1" ]] ; then
|
||||||
|
modules="$1"
|
||||||
|
else
|
||||||
|
modules=all
|
||||||
|
fi
|
||||||
|
|
||||||
|
py3-cmd refresh "$modules"
|
||||||
103
i3/scripts/i3exit
Executable file
103
i3/scripts/i3exit
Executable file
@@ -0,0 +1,103 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
### From http://www.archlinux.org/index.php/i3
|
||||||
|
|
||||||
|
_logfile="$LOGDIR/i3/i3exit.log"
|
||||||
|
LOCKSCREEN="$LIBDIR/lockscreen"
|
||||||
|
|
||||||
|
_fallback_color="000000"
|
||||||
|
|
||||||
|
touch "$_logfile"
|
||||||
|
|
||||||
|
log()
|
||||||
|
{
|
||||||
|
echo "$*"
|
||||||
|
echo "[$(date +%FT%T)] $*" >> "$_logfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
lock()
|
||||||
|
{
|
||||||
|
set -x
|
||||||
|
playing=0
|
||||||
|
if [[ "$(playerctl -p spotify status)" == "Playing" ]] ; then
|
||||||
|
playing=1
|
||||||
|
fi
|
||||||
|
if (( $playing )) ; then
|
||||||
|
playerctl -p spotify pause
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$LOCKSCREEN" ]] ; then
|
||||||
|
resized_lockscreen=$(mktemp)
|
||||||
|
convert "${LOCKSCREEN}" -resize "${MACHINE_RESOLUTION_X}x${MACHINE_RESOLUTION_Y}" "${resized_lockscreen}"
|
||||||
|
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
||||||
|
--image "${resized_lockscreen}"
|
||||||
|
rm "${resized_lockscreen}"
|
||||||
|
else
|
||||||
|
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
||||||
|
--color "$_fallback_color"
|
||||||
|
fi
|
||||||
|
if (( $playing )) ; then
|
||||||
|
playerctl -p spotify play
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
screen_off() {
|
||||||
|
xset dpms force off
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_screen() {
|
||||||
|
systemctl --user restart dpms.service
|
||||||
|
}
|
||||||
|
|
||||||
|
lock_and_screen_off() {
|
||||||
|
lock &
|
||||||
|
_pid=$!
|
||||||
|
dunstctl disable
|
||||||
|
screen_off
|
||||||
|
wait $_pid
|
||||||
|
dunstctl enable
|
||||||
|
reset_screen
|
||||||
|
}
|
||||||
|
|
||||||
|
signal="$1"
|
||||||
|
log "[I] Received signal \"$signal\"."
|
||||||
|
|
||||||
|
case "$signal" in
|
||||||
|
lock)
|
||||||
|
log "[I] Locking session."
|
||||||
|
lock_and_screen_off
|
||||||
|
;;
|
||||||
|
logout)
|
||||||
|
log "[I] Exiting i3."
|
||||||
|
i3-msg exit
|
||||||
|
;;
|
||||||
|
suspend)
|
||||||
|
log "[I] Suspending."
|
||||||
|
lock &
|
||||||
|
sleep 0.1
|
||||||
|
systemctl suspend
|
||||||
|
;;
|
||||||
|
hibernate)
|
||||||
|
log "[I] Hibernating."
|
||||||
|
sudo systemctl hibernate
|
||||||
|
;;
|
||||||
|
reboot)
|
||||||
|
log "[I] Rebooting."
|
||||||
|
systemctl reboot
|
||||||
|
;;
|
||||||
|
shutdown)
|
||||||
|
log "[I] Shutting down."
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
|
screen-off)
|
||||||
|
log "[I] Turning screen off."
|
||||||
|
screen_off
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
|
||||||
|
log "[E] Signal \"$signal\" unknown. Aborting."
|
||||||
|
exit 2
|
||||||
|
esac
|
||||||
|
|
||||||
|
log "[I] Done."
|
||||||
|
exit 0
|
||||||
137
i3/scripts/pa-volume
Executable file
137
i3/scripts/pa-volume
Executable file
@@ -0,0 +1,137 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# name of the sink. execute pactl list sinks to get a list
|
||||||
|
SINKNAME="$(pactl info | grep '^Default Sink:' | cut -d ' ' -f 3-)"
|
||||||
|
|
||||||
|
# name of the sink. execute pactl list sinks to get a list
|
||||||
|
SOURCENAME="$(pactl info | grep '^Default Source:' | cut -d ' ' -f 3-)"
|
||||||
|
|
||||||
|
#SINKNAME="alsa_output.usb-Logitech_Logitech_Wireless_Headset_88C626354D45-00.analog-stereo"
|
||||||
|
# this is the worst
|
||||||
|
SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1))
|
||||||
|
|
||||||
|
SOURCE=$(( $(pactl list sources | grep "Name: " | grep -n "${SOURCENAME}"$ | grep -o "^[[:digit:]]*") -1))
|
||||||
|
|
||||||
|
|
||||||
|
getvol() {
|
||||||
|
echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
setvol() {
|
||||||
|
if [[ $1 =~ [+-][0-9]+ ]] ; then
|
||||||
|
oldvol="$(getvol)"
|
||||||
|
echo "oldvol $oldvol"
|
||||||
|
delta="$(echo "$1" | cut -c 2-)"
|
||||||
|
echo "delta $delta"
|
||||||
|
if [[ "$(echo "$1" | cut -c 1)" == "+" ]] ; then
|
||||||
|
echo "+"
|
||||||
|
newvol=$(( $oldvol + $delta ))
|
||||||
|
else
|
||||||
|
echo "-"
|
||||||
|
newvol=$(( $oldvol - $delta ))
|
||||||
|
echo $newvol
|
||||||
|
fi
|
||||||
|
if [[ $newvol -gt 100 ]]; then
|
||||||
|
echo "capping at 100 percent"
|
||||||
|
newvol=100
|
||||||
|
fi
|
||||||
|
if [[ $newvol -lt 0 ]]; then
|
||||||
|
echo "capping at 0 percent"
|
||||||
|
newvol=0
|
||||||
|
fi
|
||||||
|
echo "newvol $newvol"
|
||||||
|
else
|
||||||
|
newvol="$1"
|
||||||
|
fi
|
||||||
|
pactl set-sink-volume $SINKNAME $(( $newvol * 65536 / 100 ))
|
||||||
|
}
|
||||||
|
|
||||||
|
ismuted() {
|
||||||
|
muted=$(pactl list sinks | grep "^[[:space:]]*Mute" | head -n $(( $SINK + 1 )) | tail -n 1 | cut -d " " -f 2)
|
||||||
|
if [[ $muted == "no" ]]; then
|
||||||
|
echo 0
|
||||||
|
else
|
||||||
|
echo 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mute() {
|
||||||
|
pactl set-sink-mute $SINKNAME 1
|
||||||
|
}
|
||||||
|
|
||||||
|
unmute() {
|
||||||
|
pactl set-sink-mute $SINKNAME 0
|
||||||
|
}
|
||||||
|
|
||||||
|
mute-toggle() {
|
||||||
|
pactl set-sink-mute $SINKNAME toggle
|
||||||
|
}
|
||||||
|
|
||||||
|
mute-toggle-mic() {
|
||||||
|
pactl set-source-mute $SOURCENAME toggle
|
||||||
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
if [[ $(ismuted) == "1" ]] ; then
|
||||||
|
echo "mute"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "$(getvol)%"
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage:"
|
||||||
|
echo
|
||||||
|
echo "$0 get-vol"
|
||||||
|
echo "$0 set-vol VOL_PERC"
|
||||||
|
}
|
||||||
|
|
||||||
|
update_status_bar_sink() {
|
||||||
|
~/.i3/scripts/bar-update "volume_status output"
|
||||||
|
}
|
||||||
|
|
||||||
|
update_status_bar_source() {
|
||||||
|
~/.i3/scripts/bar-update "volume_status input"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"sink")
|
||||||
|
echo $SINKNAME
|
||||||
|
echo $SINK
|
||||||
|
;;
|
||||||
|
"get-vol")
|
||||||
|
echo $(getvol)
|
||||||
|
;;
|
||||||
|
"set-vol")
|
||||||
|
if [[ -z "$2" ]] ; then
|
||||||
|
usage
|
||||||
|
else
|
||||||
|
setvol "$2"
|
||||||
|
fi
|
||||||
|
update_status_bar_sink
|
||||||
|
;;
|
||||||
|
"mute")
|
||||||
|
mute
|
||||||
|
update_status_bar_sink
|
||||||
|
;;
|
||||||
|
"unmute")
|
||||||
|
unmute
|
||||||
|
update_status_bar_sink
|
||||||
|
;;
|
||||||
|
"mute-toggle")
|
||||||
|
mute-toggle
|
||||||
|
update_status_bar_sink
|
||||||
|
;;
|
||||||
|
"mute-toggle-mic")
|
||||||
|
mute-toggle-mic
|
||||||
|
update_status_bar_source
|
||||||
|
;;
|
||||||
|
"is-muted")
|
||||||
|
echo $(ismuted)
|
||||||
|
;;
|
||||||
|
"status")
|
||||||
|
echo $(status)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
esac
|
||||||
56
i3/scripts/presentation-mode
Executable file
56
i3/scripts/presentation-mode
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
_status_file="${XDG_RUNTIME_DIR}/presentation-mode-on"
|
||||||
|
_autostart="$HOME/.autostart.sh"
|
||||||
|
|
||||||
|
is_on() {
|
||||||
|
[[ -e "${_status_file}" ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_on() {
|
||||||
|
touch "${_status_file}"
|
||||||
|
dunstctl disable &
|
||||||
|
systemctl --user --no-block stop redshift.service
|
||||||
|
systemctl --user --no-block stop spotify.service
|
||||||
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
|
~/.i3/scripts/bar-update "systemd redshift"
|
||||||
|
~/.i3/scripts/bar-update "systemd spotify"
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_off() {
|
||||||
|
rm -f "${_status_file}"
|
||||||
|
dunstctl enable &
|
||||||
|
systemctl --user --no-block start redshift.service
|
||||||
|
systemctl --user --no-block start spotify.service
|
||||||
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
|
~/.i3/scripts/bar-update "systemd redshift"
|
||||||
|
~/.i3/scripts/bar-update "systemd spotify"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
status)
|
||||||
|
if is_on ; then
|
||||||
|
printf "on\n"
|
||||||
|
printf '#F4BF75'
|
||||||
|
else
|
||||||
|
printf "off\n"
|
||||||
|
# printf '#F4BF75'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
toggle)
|
||||||
|
if is_on ; then
|
||||||
|
switch_off
|
||||||
|
else
|
||||||
|
switch_on
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
off)
|
||||||
|
switch_off
|
||||||
|
;;
|
||||||
|
on)
|
||||||
|
switch_on
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
19
i3/scripts/shutdown-menu
Executable file
19
i3/scripts/shutdown-menu
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
options=(
|
||||||
|
"lock"
|
||||||
|
"logout"
|
||||||
|
"suspend"
|
||||||
|
"hibernate"
|
||||||
|
"reboot"
|
||||||
|
"shutdown"
|
||||||
|
"screen-off")
|
||||||
|
|
||||||
|
i=1
|
||||||
|
output=$(
|
||||||
|
for option in "${options[@]}"; do
|
||||||
|
echo "($i) $option"
|
||||||
|
(( i++ ))
|
||||||
|
done | rofi -dmenu -p "action" -no-custom)
|
||||||
|
|
||||||
|
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"
|
||||||
20
i3/scripts/spotify-control
Executable file
20
i3/scripts/spotify-control
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
toggle)
|
||||||
|
cmd="play-pause"
|
||||||
|
;;
|
||||||
|
next)
|
||||||
|
cmd="next"
|
||||||
|
;;
|
||||||
|
previous)
|
||||||
|
cmd="previous"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "wrong argument $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
playerctl -p spotify "${cmd}"
|
||||||
|
~/.i3/scripts/bar-update spotify
|
||||||
20
i3/scripts/spotify-current
Executable file
20
i3/scripts/spotify-current
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import dbus
|
||||||
|
session_bus = dbus.SessionBus()
|
||||||
|
spotify_bus = session_bus.get_object("org.mpris.MediaPlayer2.spotify",
|
||||||
|
"/org/mpris/MediaPlayer2")
|
||||||
|
spotify_properties = dbus.Interface(spotify_bus,
|
||||||
|
"org.freedesktop.DBus.Properties")
|
||||||
|
metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata")
|
||||||
|
|
||||||
|
# The property Metadata behaves like a python dict
|
||||||
|
# for key, value in metadata.items():
|
||||||
|
# print(key, value)
|
||||||
|
|
||||||
|
# To just print the title
|
||||||
|
print("{}: {} - [{}]".format(
|
||||||
|
metadata['xesam:artist'][0],
|
||||||
|
metadata['xesam:title'],
|
||||||
|
metadata['xesam:album']
|
||||||
|
))
|
||||||
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
set -o pipefail
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
cmds=()
|
|
||||||
|
|
||||||
workspacescratch="${1}"
|
|
||||||
|
|
||||||
i3msgworkspaces="$(i3-msg -t get_workspaces)"
|
|
||||||
|
|
||||||
output_of_pim=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.name == "'"${workspacescratch}"'")) | .[0].output')
|
|
||||||
|
|
||||||
active_workspace_on_target_output=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.output == "'"${output_of_pim}"'" and .visible)) | .[0].name')
|
|
||||||
|
|
||||||
focused_workspace_name=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.focused)) | .[0].name')
|
|
||||||
focused_workspace_output=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.focused)) | .[0].output')
|
|
||||||
|
|
||||||
if [[ "${focused_workspace_name}" == "${workspacescratch}" ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmds+=('unmark _destination')
|
|
||||||
cmds+=('mark _source')
|
|
||||||
|
|
||||||
if [[ "${active_workspace_on_target_output}" != "${workspacescratch}" ]] && [[ "${output_of_pim}" != "${focused_workspace_output}" ]]; then
|
|
||||||
need_output_reset=1
|
|
||||||
else
|
|
||||||
need_output_reset=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ((need_output_reset)); then
|
|
||||||
cmds+=('workspace "'"${active_workspace_on_target_output}"'"')
|
|
||||||
cmds+=("mark --add _origin")
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmds+=('workspace "'"${workspacescratch}"'"')
|
|
||||||
cmds+=('mark --add _destination')
|
|
||||||
|
|
||||||
cmds+=('[con_mark="^_destination$"] swap container with mark "_source"')
|
|
||||||
|
|
||||||
cmds+=('[con_mark="^_source$"] focus')
|
|
||||||
cmds+=('unmark _source')
|
|
||||||
|
|
||||||
if ((need_output_reset)); then
|
|
||||||
cmds+=('[con_mark="^_origin$"] focus')
|
|
||||||
cmds+=('unmark _origin')
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmds+=('[con_mark="^_destination$"] focus')
|
|
||||||
cmds+=('unmark _destination')
|
|
||||||
|
|
||||||
i3msgcmd=""
|
|
||||||
for cmd in "${cmds[@]}"; do
|
|
||||||
i3msgcmd="${i3msgcmd}${cmd};"
|
|
||||||
done
|
|
||||||
i3-msg "${i3msgcmd}"
|
|
||||||
17
i3/scripts/toggle-app
Executable file
17
i3/scripts/toggle-app
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
app="${1:?app missing}"
|
||||||
|
|
||||||
|
unitname="${app}.service"
|
||||||
|
|
||||||
|
running() {
|
||||||
|
systemctl --user --quiet status "${unitname}" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
if running ; then
|
||||||
|
systemctl --user stop "${unitname}"
|
||||||
|
else
|
||||||
|
systemctl --user start "${unitname}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
py3-cmd refresh "systemd $app"
|
||||||
85
install.sh
85
install.sh
@@ -8,25 +8,39 @@
|
|||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
# Make sure to standardize locale, regardless of the machine config
|
|
||||||
#
|
|
||||||
# Having a different locale broke "yes | pacman -S" to force-install
|
|
||||||
# iptables, for example
|
|
||||||
export LC_ALL="en_US.UTF-8"
|
|
||||||
|
|
||||||
DOTDIR="/var/lib/dotfiles"
|
DOTDIR="/var/lib/dotfiles"
|
||||||
|
_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
|
[[ -e './.git' ]] && git submodule update --init
|
||||||
|
|
||||||
|
if [[ "$(readlink "${_SCRIPT_DIR}")" != "${DOTDIR}" ]] && [[ "${_SCRIPT_DIR}" != "${DOTDIR}" ]] ; then
|
||||||
|
if [[ -e "${DOTDIR}" ]] ; then
|
||||||
|
2>&1 printf "${DOTDIR} already exists. This seems unsafe.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
printf "Moving directory to $DOTDIR ...\n"
|
||||||
|
sudo=""
|
||||||
|
if (( $(id -u ) != 0 )) ; then
|
||||||
|
sudo=sudo
|
||||||
|
fi
|
||||||
|
$sudo mv --no-target-directory "${_SCRIPT_DIR}" "${DOTDIR}"
|
||||||
|
printf "Done\n"
|
||||||
|
else
|
||||||
|
printf "Already working in ${DOTDIR}, nothing to do\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${DOTDIR}"
|
||||||
|
|
||||||
os_release_file=/etc/os-release
|
os_release_file=/etc/os-release
|
||||||
if [[ ! -e "${os_release_file}" ]] ; then
|
if [[ ! -e "${os_release_file}" ]] ; then
|
||||||
2>&1 printf 'Could not find %, exiting\n' "${os_release_file}"
|
2>&1 printf "Could not find ${os_release_file}, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck source=/etc/os-release
|
source /etc/os-release
|
||||||
source "${os_release_file}"
|
|
||||||
|
|
||||||
sudowrap() {
|
sudowrap() {
|
||||||
if (( $(id -u) != 0 )) ; then
|
if (( $(id -u ) != 0 )) ; then
|
||||||
sudo "${@}"
|
sudo "${@}"
|
||||||
else
|
else
|
||||||
"${@}"
|
"${@}"
|
||||||
@@ -34,22 +48,51 @@ sudowrap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cache_updated=0
|
cache_updated=0
|
||||||
install() {
|
_install() {
|
||||||
local package="$1" ; shift
|
_package="$1" ; shift
|
||||||
|
if [[ $NAME == "Ubuntu" ]] ; then
|
||||||
if [[ $NAME == "Arch Linux" ]] ; then
|
if ! (( cache_updated )) ; then
|
||||||
if (( ! cache_updated )) ; then
|
apt-get update
|
||||||
sudowrap pacman -Sy
|
|
||||||
cache_updated=1
|
cache_updated=1
|
||||||
fi
|
fi
|
||||||
sudowrap pacman -S --needed --noconfirm "${package}"
|
sudowrap apt-get install --assume-yes "${_package}"
|
||||||
|
elif [[ $NAME == "Arch Linux" ]] ; then
|
||||||
|
sudowrap pacman -S --noconfirm "${_package}"
|
||||||
else
|
else
|
||||||
2>&1 printf 'Unsupported distro %s, exiting\n' "$NAME"
|
2>&1 printf "Unsupported distro $NAME, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
command -v make >/dev/null || install "make"
|
|
||||||
command -v ansible >/dev/null || install "ansible"
|
|
||||||
|
|
||||||
cd "${DOTDIR}" && make
|
if ! command -v python3 >/dev/null ; then
|
||||||
|
printf 'Python3 not installed, installing ...\n'
|
||||||
|
_install "python3"
|
||||||
|
_install "python3-venv"
|
||||||
|
printf 'Done\n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v make >/dev/null ; then
|
||||||
|
printf 'Make not installed, installing ...\n'
|
||||||
|
_install "make"
|
||||||
|
printf 'Done\n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Required for compiling modules in venv.
|
||||||
|
if ! command -v gcc >/dev/null ; then
|
||||||
|
printf 'gcc not installed, installing ...\n'
|
||||||
|
_install "gcc"
|
||||||
|
printf 'Done\n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! python3 -c 'import venv' 2>/dev/null ; then
|
||||||
|
printf 'Python3 venv module not installed, installing ...\n'
|
||||||
|
_install python3-venv
|
||||||
|
printf 'Done\n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$DOTDIR" && make
|
||||||
|
|
||||||
|
# fix permissions of the directory
|
||||||
|
sudowrap chgrp -R dotfiles "${DOTDIR}"
|
||||||
|
sudowrap chmod g+wX "${DOTDIR}"
|
||||||
|
|||||||
24
install_scripts/ares-bootstrap.sh
Executable file
24
install_scripts/ares-bootstrap.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
pacman -Sy --noconfirm git # yes its a partial upgrade, but thats just the live cd
|
||||||
|
|
||||||
|
cd /root
|
||||||
|
git clone --recursive https://code.hkoerber.de/hannes/dotfiles.git
|
||||||
|
|
||||||
|
./dotfiles/install_scripts/ares.sh /dev/sda
|
||||||
|
|
||||||
|
mv /root/dotfiles /mnt/root/dotfiles
|
||||||
|
cat << EOF > /mnt/root/.bash_profile
|
||||||
|
if /root/dotfiles/install.sh ; then
|
||||||
|
rm -f /root/.bash_profile
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
umount -R /mnt
|
||||||
|
|
||||||
|
read -p "> Ready for reboot. Press enter for shutdown, then remove the installation media and boot again "
|
||||||
|
poweroff
|
||||||
@@ -1,18 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Parameters:
|
||||||
|
#
|
||||||
|
# $1: Device
|
||||||
|
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
DEVICE="/dev/sda"
|
DEVICE="${1:?}"
|
||||||
|
|
||||||
if [[ ! -b "${DEVICE}" ]] ; then
|
if [[ ! -b "${DEVICE}" ]] ; then
|
||||||
printf '%s does not look like a device\n' "${DEVICE}"
|
printf '%s does not look like a device' "${DEVICE}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
|
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
|
||||||
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
|
printf 'efivars does not exist, looks like the system is not booted in EFI mode'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -32,10 +36,8 @@ EOF
|
|||||||
# might take a bit for the new partion table to be updated in-kernel
|
# might take a bit for the new partion table to be updated in-kernel
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
while : ; do
|
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3
|
||||||
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3
|
cryptsetup --batch-mode open ${DEVICE}3 cryptpart
|
||||||
cryptsetup --batch-mode open --tries 1 ${DEVICE}3 cryptpart && break
|
|
||||||
done
|
|
||||||
|
|
||||||
pvcreate /dev/mapper/cryptpart
|
pvcreate /dev/mapper/cryptpart
|
||||||
vgcreate vgbase /dev/mapper/cryptpart
|
vgcreate vgbase /dev/mapper/cryptpart
|
||||||
@@ -104,32 +106,6 @@ grub-mkconfig -o /boot/grub/grub.cfg
|
|||||||
systemctl enable NetworkManager
|
systemctl enable NetworkManager
|
||||||
|
|
||||||
passwd
|
passwd
|
||||||
|
|
||||||
# enable root autologin on first boot
|
|
||||||
|
|
||||||
mkdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
cat << EOF > /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
[Service]
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM
|
|
||||||
EOF
|
|
||||||
# ExecStartPost=/bin/rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
# ExecStartPost=/bin/rmdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
|
|
||||||
# Run
|
|
||||||
cat << 'EOF' > /root/.bash_profile
|
|
||||||
if [[ "\$(tty)" == "/dev/tty1" ]] ; then
|
|
||||||
while ! ping -w 3 -c 3 8.8.8.8 ; do
|
|
||||||
nmtui
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
rm -rf /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
if /var/lib/dotfiles/install.sh ; then
|
|
||||||
rm -f /root/.bash_profile
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
CHROOTSCRIPT
|
CHROOTSCRIPT
|
||||||
|
|
||||||
chmod +x /mnt/chroot-script.sh
|
chmod +x /mnt/chroot-script.sh
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
host="${1}" ; shift
|
|
||||||
|
|
||||||
pacman -Sy --noconfirm git # yes its a partial upgrade, but thats just the live cd
|
|
||||||
|
|
||||||
cd /root
|
|
||||||
git clone --recursive https://code.hkoerber.de/hannes/dotfiles.git
|
|
||||||
|
|
||||||
./dotfiles/install_scripts/"${host}".sh
|
|
||||||
|
|
||||||
mv /root/dotfiles /mnt/var/lib/dotfiles
|
|
||||||
|
|
||||||
read -rp "> Ready for reboot. Press enter for shutdown, then remove the installation media and boot again "
|
|
||||||
|
|
||||||
poweroff
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
DEVICE="/dev/nvme0n1"
|
|
||||||
|
|
||||||
if [[ ! -b "${DEVICE}" ]] ; then
|
|
||||||
printf '%s does not look like a device\n' "${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
|
|
||||||
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
loadkeys de-latin1
|
|
||||||
|
|
||||||
timedatectl set-ntp true
|
|
||||||
|
|
||||||
sed -e 's/\s*\([^#]*\).*/\1/' << EOF | sfdisk ${DEVICE}
|
|
||||||
label: gpt
|
|
||||||
device: ${DEVICE}
|
|
||||||
|
|
||||||
${DEVICE}p1 : name=uefi , size=512M , type=uefi
|
|
||||||
${DEVICE}p2 : name=boot , size=512M , type=linux
|
|
||||||
${DEVICE}p3 : name=cryptpart , type=linux
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# might take a bit for the new partion table to be updated in-kernel
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
while : ; do
|
|
||||||
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}p3
|
|
||||||
cryptsetup --batch-mode open --tries 1 ${DEVICE}p3 cryptpart && break
|
|
||||||
done
|
|
||||||
|
|
||||||
pvcreate /dev/mapper/cryptpart
|
|
||||||
vgcreate vgbase /dev/mapper/cryptpart
|
|
||||||
|
|
||||||
lvcreate -L 16G vgbase -n swap
|
|
||||||
lvcreate -l 100%FREE vgbase -n root
|
|
||||||
|
|
||||||
yes | mkfs.fat -F32 ${DEVICE}p1
|
|
||||||
yes | mkfs.ext4 ${DEVICE}p2
|
|
||||||
yes | mkfs.ext4 /dev/vgbase/swap
|
|
||||||
yes | mkfs.ext4 /dev/vgbase/root
|
|
||||||
|
|
||||||
mount /dev/vgbase/root /mnt
|
|
||||||
|
|
||||||
mkdir /mnt/efi
|
|
||||||
mount ${DEVICE}p1 /mnt/efi
|
|
||||||
|
|
||||||
mkdir /mnt/boot
|
|
||||||
mount ${DEVICE}p2 /mnt/boot
|
|
||||||
|
|
||||||
mkswap /dev/vgbase/swap
|
|
||||||
swapon /dev/vgbase/swap
|
|
||||||
|
|
||||||
pacstrap /mnt base linux-zen linux-firmware networkmanager intel-ucode lvm2 grub efibootmgr
|
|
||||||
|
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
|
||||||
|
|
||||||
cat << CHROOTSCRIPT > /mnt/chroot-script.sh
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
|
||||||
hwclock --systohc
|
|
||||||
|
|
||||||
sed -i 's/^#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
|
|
||||||
locale-gen
|
|
||||||
|
|
||||||
printf 'LANG=en_US.UTF-8\n' > /etc/locale.conf
|
|
||||||
|
|
||||||
printf 'KEYMAP=de-latin1\nFONT=lat2-16\n' > /etc/vconsole.conf
|
|
||||||
|
|
||||||
printf 'dionysus\n' > /etc/hostname
|
|
||||||
|
|
||||||
cat <<EOF > /etc/hosts
|
|
||||||
127.0.0.1 localhost
|
|
||||||
::1 localhost
|
|
||||||
127.0.1.1 dionysus
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sed -i 's/^HOOKS=.*$/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems resume fsck)/' /etc/mkinitcpio.conf
|
|
||||||
|
|
||||||
mkinitcpio -P
|
|
||||||
|
|
||||||
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
|
|
||||||
|
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=\$(blkid -s UUID -o value ${DEVICE}p3):cryptpart root=UUID=\$(blkid -s UUID -o value /dev/vgbase/root)\"/" /etc/default/grub
|
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=\"resume=UUID=\$(blkid -s UUID -o value /dev/vgbase/swap)\"/" /etc/default/grub
|
|
||||||
sed -i 's/^GRUB_DISABLE_RECOVERY=.*$/GRUB_DISABLE_RECOVERY=/' /etc/default/grub
|
|
||||||
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
|
|
||||||
systemctl enable NetworkManager
|
|
||||||
|
|
||||||
passwd
|
|
||||||
|
|
||||||
# enable root autologin on first boot
|
|
||||||
|
|
||||||
mkdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
cat << EOF > /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
[Service]
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM
|
|
||||||
EOF
|
|
||||||
# ExecStartPost=/bin/rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
# ExecStartPost=/bin/rmdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
|
|
||||||
# Run
|
|
||||||
cat << 'EOF' > /root/.bash_profile
|
|
||||||
if [[ "\$(tty)" == "/dev/tty1" ]] ; then
|
|
||||||
while ! ping -w 3 -c 3 8.8.8.8 ; do
|
|
||||||
nmtui
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
rm -rf /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
if /var/lib/dotfiles/install.sh ; then
|
|
||||||
rm -f /root/.bash_profile
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
CHROOTSCRIPT
|
|
||||||
|
|
||||||
chmod +x /mnt/chroot-script.sh
|
|
||||||
arch-chroot /mnt /chroot-script.sh
|
|
||||||
rm -f /mnt/chroot-script.sh
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
DEVICE="/dev/nvme0n1"
|
|
||||||
|
|
||||||
if [[ ! -b "${DEVICE}" ]] ; then
|
|
||||||
printf '%s does not look like a device\n' "${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
|
|
||||||
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
loadkeys de-latin1
|
|
||||||
|
|
||||||
timedatectl set-ntp true
|
|
||||||
|
|
||||||
sed -e 's/\s*\([^#]*\).*/\1/' << EOF | sfdisk ${DEVICE}
|
|
||||||
label: gpt
|
|
||||||
device: ${DEVICE}
|
|
||||||
|
|
||||||
${DEVICE}p1 : name=uefi, size=512M , type=uefi
|
|
||||||
${DEVICE}p2 : name=boot, size=512M , type=linux
|
|
||||||
${DEVICE}p3 : name=swap, size=16G , type=linux
|
|
||||||
${DEVICE}p4 : name=root, size=60G , type=linux
|
|
||||||
${DEVICE}p5 : name=home, type=linux
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# might take a bit for the new partion table to be updated in-kernel
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
yes | mkfs.fat -F32 /dev/disk/by-partlabel/uefi
|
|
||||||
yes | mkfs.ext4 /dev/disk/by-partlabel/boot
|
|
||||||
yes | mkfs.ext4 /dev/disk/by-partlabel/root
|
|
||||||
yes | mkfs.ext4 /dev/disk/by-partlabel/home
|
|
||||||
|
|
||||||
mkswap /dev/disk/by-partlabel/swap
|
|
||||||
swapon /dev/disk/by-partlabel/swap
|
|
||||||
|
|
||||||
mount /dev/disk/by-partlabel/root /mnt
|
|
||||||
|
|
||||||
mkdir /mnt/efi
|
|
||||||
mount /dev/disk/by-partlabel/uefi /mnt/efi
|
|
||||||
|
|
||||||
mkdir /mnt/boot
|
|
||||||
mount /dev/disk/by-partlabel/boot /mnt/boot
|
|
||||||
|
|
||||||
mkdir /mnt/home
|
|
||||||
mount /dev/disk/by-partlabel/home /mnt/home
|
|
||||||
|
|
||||||
pacstrap /mnt base linux-zen linux-firmware networkmanager intel-ucode grub efibootmgr
|
|
||||||
|
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
|
||||||
|
|
||||||
cat << CHROOTSCRIPT > /mnt/chroot-script.sh
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
|
||||||
hwclock --systohc
|
|
||||||
|
|
||||||
sed -i 's/^#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
|
|
||||||
locale-gen
|
|
||||||
|
|
||||||
printf 'LANG=de_DE.UTF-8\n' > /etc/locale.conf
|
|
||||||
|
|
||||||
printf 'KEYMAP=de-latin1\nFONT=lat2-16\n' > /etc/vconsole.conf
|
|
||||||
|
|
||||||
printf 'hera\n' > /etc/hostname
|
|
||||||
|
|
||||||
cat <<EOF > /etc/hosts
|
|
||||||
127.0.0.1 localhost
|
|
||||||
::1 localhost
|
|
||||||
127.0.1.1 hera
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sed -i 's/^HOOKS=.*$/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block filesystems resume fsck)/' /etc/mkinitcpio.conf
|
|
||||||
|
|
||||||
mkinitcpio -P
|
|
||||||
|
|
||||||
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
|
|
||||||
|
|
||||||
sed -i 's/^GRUB_DISABLE_RECOVERY=.*$/GRUB_DISABLE_RECOVERY=/' /etc/default/grub
|
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=\"resume=UUID=\$(blkid -s UUID -o value /dev/disk/by-partlabel/swap)\"/" /etc/default/grub
|
|
||||||
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
|
|
||||||
systemctl enable NetworkManager
|
|
||||||
|
|
||||||
passwd
|
|
||||||
|
|
||||||
# enable root autologin on first boot
|
|
||||||
|
|
||||||
mkdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
cat << EOF > /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
[Service]
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM
|
|
||||||
EOF
|
|
||||||
# ExecStartPost=/bin/rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
# ExecStartPost=/bin/rmdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
|
|
||||||
# Run
|
|
||||||
cat << 'EOF' > /root/.bash_profile
|
|
||||||
if [[ "\$(tty)" == "/dev/tty1" ]] ; then
|
|
||||||
while ! ping -w 3 -c 3 8.8.8.8 ; do
|
|
||||||
nmtui
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
rm -rf /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
if /var/lib/dotfiles/install.sh ; then
|
|
||||||
rm -f /root/.bash_profile
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
CHROOTSCRIPT
|
|
||||||
|
|
||||||
chmod +x /mnt/chroot-script.sh
|
|
||||||
arch-chroot /mnt /chroot-script.sh
|
|
||||||
rm -f /mnt/chroot-script.sh
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
DEVICE="/dev/nvme0n1"
|
|
||||||
|
|
||||||
if [[ ! -b "${DEVICE}" ]] ; then
|
|
||||||
printf '%s does not look like a device\n' "${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d /sys/firmware/efi/efivars ]] ; then
|
|
||||||
printf 'efivars does not exist, looks like the system is not booted in EFI mode\n'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
loadkeys de-latin1
|
|
||||||
|
|
||||||
timedatectl set-ntp true
|
|
||||||
|
|
||||||
sed -e 's/\s*\([^#]*\).*/\1/' << EOF | sfdisk ${DEVICE}
|
|
||||||
label: gpt
|
|
||||||
device: ${DEVICE}
|
|
||||||
|
|
||||||
${DEVICE}p1 : name=uefi , size=512M , type=uefi
|
|
||||||
${DEVICE}p2 : name=boot , size=512M , type=linux
|
|
||||||
${DEVICE}p3 : name=cryptpart , type=linux
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# might take a bit for the new partion table to be updated in-kernel
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
while : ; do
|
|
||||||
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}p3
|
|
||||||
cryptsetup --batch-mode open --tries 1 ${DEVICE}p3 cryptpart && break
|
|
||||||
done
|
|
||||||
|
|
||||||
pvcreate /dev/mapper/cryptpart
|
|
||||||
vgcreate vgbase /dev/mapper/cryptpart
|
|
||||||
|
|
||||||
lvcreate -L 32G vgbase -n swap
|
|
||||||
lvcreate -l 100%FREE vgbase -n root
|
|
||||||
|
|
||||||
yes | mkfs.fat -F32 ${DEVICE}p1
|
|
||||||
yes | mkfs.ext4 ${DEVICE}p2
|
|
||||||
yes | mkfs.ext4 /dev/vgbase/swap
|
|
||||||
yes | mkfs.ext4 /dev/vgbase/root
|
|
||||||
|
|
||||||
mount /dev/vgbase/root /mnt
|
|
||||||
|
|
||||||
mkdir /mnt/efi
|
|
||||||
mount ${DEVICE}p1 /mnt/efi
|
|
||||||
|
|
||||||
mkdir /mnt/boot
|
|
||||||
mount ${DEVICE}p2 /mnt/boot
|
|
||||||
|
|
||||||
mkswap /dev/vgbase/swap
|
|
||||||
swapon /dev/vgbase/swap
|
|
||||||
|
|
||||||
pacstrap /mnt base linux-zen linux-firmware networkmanager intel-ucode lvm2 grub efibootmgr
|
|
||||||
|
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
|
||||||
|
|
||||||
cat << CHROOTSCRIPT > /mnt/chroot-script.sh
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
|
||||||
hwclock --systohc
|
|
||||||
|
|
||||||
sed -i 's/^#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
|
||||||
|
|
||||||
locale-gen
|
|
||||||
|
|
||||||
printf 'LANG=en_US.UTF-8\n' > /etc/locale.conf
|
|
||||||
|
|
||||||
printf 'KEYMAP=de-latin1\nFONT=lat2-16\n' > /etc/vconsole.conf
|
|
||||||
|
|
||||||
printf 'neptune\n' > /etc/hostname
|
|
||||||
|
|
||||||
cat <<EOF > /etc/hosts
|
|
||||||
127.0.0.1 localhost
|
|
||||||
::1 localhost
|
|
||||||
127.0.1.1 neptune
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sed -i 's/^HOOKS=.*$/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems resume fsck)/' /etc/mkinitcpio.conf
|
|
||||||
|
|
||||||
mkinitcpio -P
|
|
||||||
|
|
||||||
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
|
|
||||||
|
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=\$(blkid -s UUID -o value ${DEVICE}p3):cryptpart root=UUID=\$(blkid -s UUID -o value /dev/vgbase/root)\"/" /etc/default/grub
|
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=\"resume=UUID=\$(blkid -s UUID -o value /dev/vgbase/swap)\"/" /etc/default/grub
|
|
||||||
sed -i 's/^GRUB_DISABLE_RECOVERY=.*$/GRUB_DISABLE_RECOVERY=/' /etc/default/grub
|
|
||||||
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
|
|
||||||
systemctl enable NetworkManager
|
|
||||||
|
|
||||||
passwd
|
|
||||||
|
|
||||||
# enable root autologin on first boot
|
|
||||||
|
|
||||||
mkdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
cat << EOF > /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
[Service]
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM
|
|
||||||
EOF
|
|
||||||
# ExecStartPost=/bin/rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
||||||
# ExecStartPost=/bin/rmdir /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
|
|
||||||
# Run
|
|
||||||
cat << 'EOF' > /root/.bash_profile
|
|
||||||
if [[ "\$(tty)" == "/dev/tty1" ]] ; then
|
|
||||||
while ! ping -w 3 -c 3 8.8.8.8 ; do
|
|
||||||
nmtui
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
rm -rf /etc/systemd/system/getty@tty1.service.d/
|
|
||||||
if /var/lib/dotfiles/install.sh ; then
|
|
||||||
rm -f /root/.bash_profile
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
EOF
|
|
||||||
CHROOTSCRIPT
|
|
||||||
|
|
||||||
chmod +x /mnt/chroot-script.sh
|
|
||||||
arch-chroot /mnt /chroot-script.sh
|
|
||||||
rm -f /mnt/chroot-script.sh
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o nounset
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
sudo pacman -Syu
|
|
||||||
|
|
||||||
./update-aur-pkgs.sh
|
|
||||||
|
|
||||||
ANSIBLE_DISPLAY_OK_HOSTS=false \
|
|
||||||
ANSIBLE_DISPLAY_SKIPPED_HOSTS=false \
|
|
||||||
ANSIBLE_EXTRA_ARGS='' \
|
|
||||||
make
|
|
||||||
1
mgr/.gitignore
vendored
1
mgr/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/target
|
|
||||||
503
mgr/Cargo.lock
generated
503
mgr/Cargo.lock
generated
@@ -1,503 +0,0 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
version = 4
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "base64"
|
|
||||||
version = "0.22.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bytes"
|
|
||||||
version = "1.10.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cc"
|
|
||||||
version = "1.2.35"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "590f9024a68a8c40351881787f1934dc11afd69090f5edb6831464694d836ea3"
|
|
||||||
dependencies = [
|
|
||||||
"find-msvc-tools",
|
|
||||||
"shlex",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cfg-if"
|
|
||||||
version = "1.0.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "deranged"
|
|
||||||
version = "0.5.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc"
|
|
||||||
dependencies = [
|
|
||||||
"powerfmt",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "find-msvc-tools"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e178e4fba8a2726903f6ba98a6d221e76f9c12c650d5dc0e6afdc50677b49650"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "fnv"
|
|
||||||
version = "1.0.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "getrandom"
|
|
||||||
version = "0.2.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"libc",
|
|
||||||
"wasi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "http"
|
|
||||||
version = "1.3.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
|
|
||||||
dependencies = [
|
|
||||||
"bytes",
|
|
||||||
"fnv",
|
|
||||||
"itoa",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "httparse"
|
|
||||||
version = "1.10.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "itoa"
|
|
||||||
version = "1.0.15"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lazy_static"
|
|
||||||
version = "1.5.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libc"
|
|
||||||
version = "0.2.175"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "log"
|
|
||||||
version = "0.4.28"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mgr"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"thiserror",
|
|
||||||
"time",
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber",
|
|
||||||
"ureq",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-conv"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "once_cell"
|
|
||||||
version = "1.21.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "percent-encoding"
|
|
||||||
version = "2.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pin-project-lite"
|
|
||||||
version = "0.2.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "powerfmt"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro2"
|
|
||||||
version = "1.0.101"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "quote"
|
|
||||||
version = "1.0.40"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ring"
|
|
||||||
version = "0.17.14"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"cfg-if",
|
|
||||||
"getrandom",
|
|
||||||
"libc",
|
|
||||||
"untrusted",
|
|
||||||
"windows-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls"
|
|
||||||
version = "0.23.31"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc"
|
|
||||||
dependencies = [
|
|
||||||
"log",
|
|
||||||
"once_cell",
|
|
||||||
"ring",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"rustls-webpki",
|
|
||||||
"subtle",
|
|
||||||
"zeroize",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-pemfile"
|
|
||||||
version = "2.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
|
|
||||||
dependencies = [
|
|
||||||
"rustls-pki-types",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-pki-types"
|
|
||||||
version = "1.12.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"
|
|
||||||
dependencies = [
|
|
||||||
"zeroize",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-webpki"
|
|
||||||
version = "0.103.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"
|
|
||||||
dependencies = [
|
|
||||||
"ring",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"untrusted",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde"
|
|
||||||
version = "1.0.219"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
|
|
||||||
dependencies = [
|
|
||||||
"serde_derive",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_derive"
|
|
||||||
version = "1.0.219"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "sharded-slab"
|
|
||||||
version = "0.1.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
|
|
||||||
dependencies = [
|
|
||||||
"lazy_static",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "shlex"
|
|
||||||
version = "1.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "subtle"
|
|
||||||
version = "2.6.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syn"
|
|
||||||
version = "2.0.106"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thiserror"
|
|
||||||
version = "2.0.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
|
||||||
dependencies = [
|
|
||||||
"thiserror-impl",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thiserror-impl"
|
|
||||||
version = "2.0.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thread_local"
|
|
||||||
version = "1.1.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time"
|
|
||||||
version = "0.3.43"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031"
|
|
||||||
dependencies = [
|
|
||||||
"deranged",
|
|
||||||
"num-conv",
|
|
||||||
"powerfmt",
|
|
||||||
"serde",
|
|
||||||
"time-core",
|
|
||||||
"time-macros",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time-core"
|
|
||||||
version = "0.1.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time-macros"
|
|
||||||
version = "0.2.24"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3"
|
|
||||||
dependencies = [
|
|
||||||
"num-conv",
|
|
||||||
"time-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing"
|
|
||||||
version = "0.1.41"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
|
|
||||||
dependencies = [
|
|
||||||
"pin-project-lite",
|
|
||||||
"tracing-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-core"
|
|
||||||
version = "0.1.34"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
|
|
||||||
dependencies = [
|
|
||||||
"once_cell",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-subscriber"
|
|
||||||
version = "0.3.20"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
|
|
||||||
dependencies = [
|
|
||||||
"sharded-slab",
|
|
||||||
"thread_local",
|
|
||||||
"tracing-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-ident"
|
|
||||||
version = "1.0.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "untrusted"
|
|
||||||
version = "0.9.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ureq"
|
|
||||||
version = "3.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "00432f493971db5d8e47a65aeb3b02f8226b9b11f1450ff86bb772776ebadd70"
|
|
||||||
dependencies = [
|
|
||||||
"base64",
|
|
||||||
"log",
|
|
||||||
"percent-encoding",
|
|
||||||
"rustls",
|
|
||||||
"rustls-pemfile",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"ureq-proto",
|
|
||||||
"utf-8",
|
|
||||||
"webpki-roots",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ureq-proto"
|
|
||||||
version = "0.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bbe120bb823a0061680e66e9075942fcdba06d46551548c2c259766b9558bc9a"
|
|
||||||
dependencies = [
|
|
||||||
"base64",
|
|
||||||
"http",
|
|
||||||
"httparse",
|
|
||||||
"log",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "utf-8"
|
|
||||||
version = "0.7.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wasi"
|
|
||||||
version = "0.11.1+wasi-snapshot-preview1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "webpki-roots"
|
|
||||||
version = "1.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
|
|
||||||
dependencies = [
|
|
||||||
"rustls-pki-types",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-sys"
|
|
||||||
version = "0.52.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
|
||||||
dependencies = [
|
|
||||||
"windows-targets",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-targets"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
||||||
dependencies = [
|
|
||||||
"windows_aarch64_gnullvm",
|
|
||||||
"windows_aarch64_msvc",
|
|
||||||
"windows_i686_gnu",
|
|
||||||
"windows_i686_gnullvm",
|
|
||||||
"windows_i686_msvc",
|
|
||||||
"windows_x86_64_gnu",
|
|
||||||
"windows_x86_64_gnullvm",
|
|
||||||
"windows_x86_64_msvc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnu"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnu"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnullvm"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_msvc"
|
|
||||||
version = "0.52.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zeroize"
|
|
||||||
version = "1.8.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
|
|
||||||
184
mgr/Cargo.toml
184
mgr/Cargo.toml
@@ -1,184 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "mgr"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2024"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
thiserror = { version = "2.0.16", default-features = false }
|
|
||||||
time = { version = "0.3.43", default-features = false, features = ["formatting", "parsing", "std"] }
|
|
||||||
tracing = { version = "0.1.41", default-features = false }
|
|
||||||
tracing-subscriber = { version = "0.3.20", default-features = false, features = ["fmt"] }
|
|
||||||
ureq = { version = "3.1.0", default-features = false, features = ["rustls"] }
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "workstation-mgr"
|
|
||||||
path = "src/bin/main.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "workstation-client"
|
|
||||||
path = "src/bin/client.rs"
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
strip = true
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = "abort"
|
|
||||||
|
|
||||||
[lints.clippy]
|
|
||||||
# enabled groups
|
|
||||||
correctness = { level = "deny", priority = -1 }
|
|
||||||
suspicious = { level = "warn", priority = -1 }
|
|
||||||
style = { level = "warn", priority = -1 }
|
|
||||||
complexity = { level = "warn", priority = -1 }
|
|
||||||
perf = { level = "warn", priority = -1 }
|
|
||||||
cargo = { level = "warn", priority = -1 }
|
|
||||||
pedantic = { level = "warn", priority = -1 }
|
|
||||||
nursery = { level = "warn", priority = -1 }
|
|
||||||
|
|
||||||
# pedantic overrides
|
|
||||||
too_many_lines = "allow"
|
|
||||||
must_use_candidate = "allow"
|
|
||||||
map_unwrap_or = "allow"
|
|
||||||
missing_errors_doc = "allow"
|
|
||||||
if_not_else = "allow"
|
|
||||||
similar_names = "allow"
|
|
||||||
redundant_else = "allow"
|
|
||||||
|
|
||||||
# nursery overrides
|
|
||||||
missing_const_for_fn = "allow"
|
|
||||||
option_if_let_else = "allow"
|
|
||||||
redundant_pub_crate = "allow"
|
|
||||||
|
|
||||||
# complexity overrides
|
|
||||||
too_many_arguments = "allow"
|
|
||||||
|
|
||||||
# style overrides
|
|
||||||
new_without_default = "allow"
|
|
||||||
redundant_closure = "allow"
|
|
||||||
|
|
||||||
# cargo overrides
|
|
||||||
multiple_crate_versions = "allow"
|
|
||||||
cargo_common_metadata = "allow"
|
|
||||||
|
|
||||||
# selected restrictions
|
|
||||||
allow_attributes = "warn"
|
|
||||||
allow_attributes_without_reason = "warn"
|
|
||||||
arithmetic_side_effects = "warn"
|
|
||||||
as_conversions = "warn"
|
|
||||||
assertions_on_result_states = "warn"
|
|
||||||
cfg_not_test = "warn"
|
|
||||||
clone_on_ref_ptr = "warn"
|
|
||||||
create_dir = "warn"
|
|
||||||
dbg_macro = "warn"
|
|
||||||
decimal_literal_representation = "warn"
|
|
||||||
default_numeric_fallback = "warn"
|
|
||||||
deref_by_slicing = "warn"
|
|
||||||
disallowed_script_idents = "warn"
|
|
||||||
empty_drop = "warn"
|
|
||||||
empty_enum_variants_with_brackets = "warn"
|
|
||||||
empty_structs_with_brackets = "warn"
|
|
||||||
exit = "warn"
|
|
||||||
filetype_is_file = "warn"
|
|
||||||
float_arithmetic = "warn"
|
|
||||||
float_cmp_const = "warn"
|
|
||||||
fn_to_numeric_cast_any = "warn"
|
|
||||||
format_push_string = "warn"
|
|
||||||
get_unwrap = "warn"
|
|
||||||
indexing_slicing = "warn"
|
|
||||||
infinite_loop = "warn"
|
|
||||||
inline_asm_x86_att_syntax = "warn"
|
|
||||||
inline_asm_x86_intel_syntax = "warn"
|
|
||||||
integer_division = "warn"
|
|
||||||
iter_over_hash_type = "warn"
|
|
||||||
large_include_file = "warn"
|
|
||||||
let_underscore_must_use = "warn"
|
|
||||||
let_underscore_untyped = "warn"
|
|
||||||
little_endian_bytes = "warn"
|
|
||||||
lossy_float_literal = "warn"
|
|
||||||
map_err_ignore = "warn"
|
|
||||||
mem_forget = "warn"
|
|
||||||
missing_assert_message = "warn"
|
|
||||||
missing_asserts_for_indexing = "warn"
|
|
||||||
mixed_read_write_in_expression = "warn"
|
|
||||||
modulo_arithmetic = "warn"
|
|
||||||
multiple_inherent_impl = "warn"
|
|
||||||
multiple_unsafe_ops_per_block = "warn"
|
|
||||||
mutex_atomic = "warn"
|
|
||||||
panic = "warn"
|
|
||||||
partial_pub_fields = "warn"
|
|
||||||
pattern_type_mismatch = "warn"
|
|
||||||
print_stderr = "warn"
|
|
||||||
print_stdout = "warn"
|
|
||||||
pub_without_shorthand = "warn"
|
|
||||||
rc_buffer = "warn"
|
|
||||||
rc_mutex = "warn"
|
|
||||||
redundant_type_annotations = "warn"
|
|
||||||
renamed_function_params = "warn"
|
|
||||||
rest_pat_in_fully_bound_structs = "warn"
|
|
||||||
same_name_method = "warn"
|
|
||||||
self_named_module_files = "warn"
|
|
||||||
semicolon_inside_block = "warn"
|
|
||||||
str_to_string = "warn"
|
|
||||||
string_add = "warn"
|
|
||||||
string_lit_chars_any = "warn"
|
|
||||||
string_slice = "warn"
|
|
||||||
implicit_clone = "warn"
|
|
||||||
suspicious_xor_used_as_pow = "warn"
|
|
||||||
tests_outside_test_module = "warn"
|
|
||||||
todo = "warn"
|
|
||||||
try_err = "warn"
|
|
||||||
undocumented_unsafe_blocks = "warn"
|
|
||||||
unimplemented = "warn"
|
|
||||||
unnecessary_safety_comment = "warn"
|
|
||||||
unnecessary_safety_doc = "warn"
|
|
||||||
unnecessary_self_imports = "warn"
|
|
||||||
unneeded_field_pattern = "warn"
|
|
||||||
unseparated_literal_suffix = "warn"
|
|
||||||
unused_result_ok = "warn"
|
|
||||||
unwrap_used = "warn"
|
|
||||||
use_debug = "warn"
|
|
||||||
verbose_file_reads = "warn"
|
|
||||||
|
|
||||||
# restrictions explicit allows
|
|
||||||
absolute_paths = "allow"
|
|
||||||
alloc_instead_of_core = "allow"
|
|
||||||
as_underscore = "allow"
|
|
||||||
big_endian_bytes = "allow"
|
|
||||||
default_union_representation = "allow"
|
|
||||||
error_impl_error = "allow"
|
|
||||||
exhaustive_enums = "allow"
|
|
||||||
exhaustive_structs = "allow"
|
|
||||||
expect_used = "allow"
|
|
||||||
field_scoped_visibility_modifiers = "allow"
|
|
||||||
host_endian_bytes = "allow"
|
|
||||||
if_then_some_else_none = "allow"
|
|
||||||
impl_trait_in_params = "allow"
|
|
||||||
implicit_return = "allow"
|
|
||||||
integer_division_remainder_used = "allow"
|
|
||||||
min_ident_chars = "allow"
|
|
||||||
missing_docs_in_private_items = "allow"
|
|
||||||
missing_inline_in_public_items = "allow"
|
|
||||||
missing_trait_methods = "allow"
|
|
||||||
mod_module_files = "allow"
|
|
||||||
needless_raw_strings = "allow"
|
|
||||||
non_ascii_literal = "allow"
|
|
||||||
non_zero_suggestions = "allow"
|
|
||||||
panic_in_result_fn = "allow"
|
|
||||||
pathbuf_init_then_push = "allow"
|
|
||||||
pub_use = "allow"
|
|
||||||
pub_with_shorthand = "allow"
|
|
||||||
question_mark_used = "allow"
|
|
||||||
ref_patterns = "allow"
|
|
||||||
semicolon_outside_block = "allow"
|
|
||||||
separated_literal_suffix = "allow"
|
|
||||||
shadow_reuse = "allow"
|
|
||||||
shadow_same = "allow"
|
|
||||||
shadow_unrelated = "allow"
|
|
||||||
single_call_fn = "allow"
|
|
||||||
single_char_lifetime_names = "allow"
|
|
||||||
std_instead_of_alloc = "allow"
|
|
||||||
std_instead_of_core = "allow"
|
|
||||||
unreachable = "allow"
|
|
||||||
unused_trait_names = "allow"
|
|
||||||
unwrap_in_result = "allow"
|
|
||||||
wildcard_enum_match_arm = "allow"
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
#![expect(
|
|
||||||
clippy::print_stderr,
|
|
||||||
clippy::print_stdout,
|
|
||||||
reason = "output is fine for cli"
|
|
||||||
)]
|
|
||||||
|
|
||||||
use std::{
|
|
||||||
env,
|
|
||||||
io::{self, Read as _},
|
|
||||||
net,
|
|
||||||
os::unix::net::UnixStream,
|
|
||||||
process, str,
|
|
||||||
};
|
|
||||||
|
|
||||||
use thiserror::Error;
|
|
||||||
|
|
||||||
use mgr::{
|
|
||||||
Action,
|
|
||||||
cli::{self, CliCommand as _, ParseError},
|
|
||||||
wire::{client, socket},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
|
||||||
enum Error {
|
|
||||||
#[error(transparent)]
|
|
||||||
Io(#[from] io::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Socket(#[from] socket::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Send(#[from] client::SendError),
|
|
||||||
#[error(transparent)]
|
|
||||||
CliParse(#[from] cli::ParseError),
|
|
||||||
#[error("response is not valid utf8: {0}")]
|
|
||||||
ResponseNonUtf8(#[from] str::Utf8Error),
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MainResult {
|
|
||||||
Success,
|
|
||||||
Failure(Error),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl process::Termination for MainResult {
|
|
||||||
fn report(self) -> process::ExitCode {
|
|
||||||
match self {
|
|
||||||
Self::Success => process::ExitCode::SUCCESS,
|
|
||||||
Self::Failure(e) => {
|
|
||||||
eprintln!("Error: {e}");
|
|
||||||
process::ExitCode::FAILURE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() -> MainResult {
|
|
||||||
fn inner() -> Result<(), Error> {
|
|
||||||
let mut args = env::args().skip(1);
|
|
||||||
|
|
||||||
let action =
|
|
||||||
Action::parse_str(args.next().ok_or(ParseError::MissingAction)?.as_str(), args)?;
|
|
||||||
|
|
||||||
let socket = socket::get_socket_path()?;
|
|
||||||
let mut stream = UnixStream::connect(socket)?;
|
|
||||||
|
|
||||||
action.send(&mut stream)?;
|
|
||||||
|
|
||||||
stream.shutdown(net::Shutdown::Write)?;
|
|
||||||
|
|
||||||
let response = {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
stream.read_to_end(&mut buf)?;
|
|
||||||
let response = str::from_utf8(&buf)?.to_owned();
|
|
||||||
drop(stream);
|
|
||||||
response
|
|
||||||
};
|
|
||||||
|
|
||||||
if !response.is_empty() {
|
|
||||||
println!("{response}");
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
match inner() {
|
|
||||||
Ok(()) => MainResult::Success,
|
|
||||||
Err(e) => MainResult::Failure(e),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
#![expect(
|
|
||||||
clippy::print_stderr,
|
|
||||||
clippy::print_stdout,
|
|
||||||
reason = "output is fine for cli"
|
|
||||||
)]
|
|
||||||
|
|
||||||
use std::{env, process};
|
|
||||||
|
|
||||||
use thiserror::Error;
|
|
||||||
use tracing::Level;
|
|
||||||
|
|
||||||
use mgr::{
|
|
||||||
self, Action, Exec as _,
|
|
||||||
cli::{CliCommand as _, ParseError},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
|
||||||
enum Error {
|
|
||||||
#[error(transparent)]
|
|
||||||
Power(#[from] mgr::power::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Dmenu(#[from] mgr::dmenu::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Server(#[from] mgr::wire::server::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Presentation(#[from] mgr::present::Error),
|
|
||||||
#[error(transparent)]
|
|
||||||
Exec(#[from] mgr::ExecError),
|
|
||||||
#[error(transparent)]
|
|
||||||
ParseParse(#[from] ParseError),
|
|
||||||
#[error(transparent)]
|
|
||||||
Tracing(#[from] tracing::dispatcher::SetGlobalDefaultError),
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MainResult {
|
|
||||||
Success,
|
|
||||||
Failure(Error),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl process::Termination for MainResult {
|
|
||||||
fn report(self) -> process::ExitCode {
|
|
||||||
match self {
|
|
||||||
Self::Success => process::ExitCode::SUCCESS,
|
|
||||||
Self::Failure(e) => {
|
|
||||||
eprintln!("Error: {e}");
|
|
||||||
process::ExitCode::FAILURE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<Error> for MainResult {
|
|
||||||
fn from(value: Error) -> Self {
|
|
||||||
Self::Failure(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn init_tracing() -> Result<(), Error> {
|
|
||||||
tracing::subscriber::set_global_default(
|
|
||||||
tracing_subscriber::fmt()
|
|
||||||
.with_max_level(Level::DEBUG)
|
|
||||||
.event_format(
|
|
||||||
tracing_subscriber::fmt::format()
|
|
||||||
.with_ansi(false)
|
|
||||||
.with_target(false)
|
|
||||||
.compact(),
|
|
||||||
)
|
|
||||||
.finish(),
|
|
||||||
)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() -> MainResult {
|
|
||||||
fn inner() -> Result<(), Error> {
|
|
||||||
init_tracing()?;
|
|
||||||
|
|
||||||
let mut args = env::args().skip(1);
|
|
||||||
|
|
||||||
match args.next().ok_or(ParseError::MissingAction)?.as_str() {
|
|
||||||
"serve" => {
|
|
||||||
mgr::wire::server::run()?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
"run" => {
|
|
||||||
let action = Action::parse_str(
|
|
||||||
args.next().ok_or(ParseError::MissingAction)?.as_str(),
|
|
||||||
args,
|
|
||||||
)?;
|
|
||||||
if let Some(output) = action.execute()? {
|
|
||||||
println!("{output}");
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
input => Err(ParseError::UnknownAction {
|
|
||||||
action: input.to_owned(),
|
|
||||||
}
|
|
||||||
.into()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
match inner() {
|
|
||||||
Ok(()) => MainResult::Success,
|
|
||||||
Err(e) => MainResult::Failure(e),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
use thiserror::Error;
|
|
||||||
|
|
||||||
use super::{
|
|
||||||
Exec,
|
|
||||||
cli::{self, CliCommand},
|
|
||||||
cmd,
|
|
||||||
wire::{WireCommand, server},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Error, Debug)]
|
|
||||||
pub enum Error {
|
|
||||||
#[error(transparent)]
|
|
||||||
Cli(#[from] cli::ParseError),
|
|
||||||
#[error(transparent)]
|
|
||||||
Cmd(#[from] cmd::Error),
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
|
||||||
pub enum Action {
|
|
||||||
Inc,
|
|
||||||
Dec,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl WireCommand for Action {
|
|
||||||
fn parse_wire(mut input: impl Iterator<Item = u8>) -> Result<Self, server::ParseError> {
|
|
||||||
match input.next().ok_or(server::ParseError::Eof)? {
|
|
||||||
0x01 => Ok(Self::Inc),
|
|
||||||
0x02 => Ok(Self::Dec),
|
|
||||||
byte => Err(server::ParseError::Unknown(byte)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn to_wire(&self) -> Vec<u8> {
|
|
||||||
match *self {
|
|
||||||
Self::Inc => vec![0x01],
|
|
||||||
Self::Dec => vec![0x02],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl CliCommand for Action {
|
|
||||||
type ExecErr = Error;
|
|
||||||
|
|
||||||
fn parse_str(input: &str, rest: impl Iterator<Item = String>) -> Result<Self, cli::ParseError>
|
|
||||||
where
|
|
||||||
Self: Sized,
|
|
||||||
{
|
|
||||||
let result = match input {
|
|
||||||
"inc" => Self::Inc,
|
|
||||||
"dec" => Self::Dec,
|
|
||||||
s => {
|
|
||||||
return Err(cli::ParseError::UnknownAction {
|
|
||||||
action: s.to_owned(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let rest = rest.collect::<Vec<String>>();
|
|
||||||
if rest.is_empty() {
|
|
||||||
Ok(result)
|
|
||||||
} else {
|
|
||||||
Err(cli::ParseError::UnexpectedInput { rest })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Exec for Action {
|
|
||||||
type ExecErr = Error;
|
|
||||||
|
|
||||||
fn execute(&self) -> Result<Option<String>, Self::ExecErr> {
|
|
||||||
match *self {
|
|
||||||
Self::Inc => cmd::command("brightnessctl", &["set", "8%+"])?,
|
|
||||||
Self::Dec => cmd::command("brightnessctl", &["set", "8%-"])?,
|
|
||||||
}
|
|
||||||
Ok(None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user