Compare commits
364 Commits
test2
...
3ff8990a35
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ff8990a35 | |||
| 5792877f25 | |||
| 1e5719c94c | |||
| ca58ee0c61 | |||
| 0d703b7cad | |||
| 5662e68a16 | |||
| 6db59607eb | |||
| 7040170468 | |||
| 40c2b659c7 | |||
| 9ae91e724d | |||
| 974a659216 | |||
| 9ed7db6327 | |||
| 38b3285d49 | |||
| 9e4931f37e | |||
| f6fae531d6 | |||
| 7f507ec4c3 | |||
| 4073ac5930 | |||
| a7d23f06c4 | |||
| e5d23adcab | |||
| db329973ec | |||
| e2395d12cf | |||
| 40ef2ad2fd | |||
| c0a2e34fd5 | |||
| ecdbedf4b2 | |||
| fff382e5fa | |||
| 3371d03421 | |||
| 1f27aee39c | |||
| 5dd7cfc6af | |||
| 2b62592bdf | |||
| c66d39fa5a | |||
| 99d14f5f6b | |||
| cc1ebcfd86 | |||
| 8205d867a0 | |||
| 971ce13043 | |||
| f9355f7b9c | |||
| f384a8a1b6 | |||
| fd3f5c4bd6 | |||
| c54278cc7c | |||
| 8209b459d8 | |||
| 86d55197cb | |||
| 50932f8faa | |||
| 35da0e349c | |||
| 97f467f6ec | |||
| ccb10a97d7 | |||
| f29d92dad4 | |||
| 4b6c442d6b | |||
| 6e894943f9 | |||
| 7370df1680 | |||
| 7f352e0910 | |||
| a557b35187 | |||
| 3d0b88031b | |||
| cd8c5f7cf3 | |||
| 5531ce1fda | |||
| 2a58bcadb3 | |||
| f219630319 | |||
| 77d9406f2e | |||
| a6efc6c43d | |||
| 4f1ef573e8 | |||
| 49c95f5be1 | |||
| 5ffc046537 | |||
| 8b4e01b538 | |||
| d6c0df83f1 | |||
| aed9e65c44 | |||
| a71942a69e | |||
| 891c761e66 | |||
| 72386b0005 | |||
| 6763f4105f | |||
| e88b1dd5fa | |||
| 7b892b7d56 | |||
| 67dc8a99f2 | |||
| 4b09d22cfc | |||
| 40f4f73efb | |||
| 504e6784da | |||
| 79a9c7eebd | |||
| 4403719e13 | |||
| 24616ec1db | |||
| 15d2b54eb7 | |||
| 3e4d59348b | |||
| 374c939fdb | |||
| 4dfe80d56b | |||
| 45c48b39bc | |||
| 0d9076d5ed | |||
| 6e4c633b42 | |||
| 316502744b | |||
| c3c22c5944 | |||
| a5c83fb4ac | |||
| 6116088396 | |||
| fe49d682a9 | |||
| 26d5535f0d | |||
| f5456a82fa | |||
| 4060b2f840 | |||
| 032b601561 | |||
| b3d18f3dd9 | |||
| 2c2aaf5de8 | |||
| 3703fd3d3b | |||
| 4c34680a10 | |||
| 478bb17fd1 | |||
| f9c640eecb | |||
| 8a09cb050c | |||
| 84105ba6f6 | |||
| 3970d71363 | |||
| 06674d7b99 | |||
| d62b8ca11d | |||
| 5db5a4fe2a | |||
| c9ee90f889 | |||
| f2aafc1ba7 | |||
| add0adb9a0 | |||
| 7661621c00 | |||
| 0228edc5c7 | |||
| edf62e7622 | |||
| 7fd54e39ca | |||
| a49ea2ee2b | |||
| f0b732ce79 | |||
| 1c06d9ca2e | |||
| 3e336eac2c | |||
| 8ef941ccd3 | |||
| 1532f95ea4 | |||
| e29138ba9b | |||
| 374fd85af6 | |||
| fa05b32485 | |||
| 489b80d136 | |||
| fafca0e743 | |||
| 290bcbe172 | |||
| 6b0db2f804 | |||
| 1a31586fbe | |||
| d00cf5b11c | |||
| 7671b3e48e | |||
| 5462ab0790 | |||
| f6715dedc6 | |||
| 0030cc2ca9 | |||
| 5d116becfb | |||
| 01ebaea6c2 | |||
| 916d67d22f | |||
| 329f2a6e2c | |||
| 8307a4d4ca | |||
| 040e5d09e5 | |||
| 1bc03cffcc | |||
| 465a413ae9 | |||
| 83d7386b25 | |||
| eb07b67107 | |||
| 1c6fe13112 | |||
| 1ae605a52a | |||
| 05618cf533 | |||
| c1c9d7bbad | |||
| 08efa386fc | |||
| 7016c97f9d | |||
| ecde49ce4a | |||
| 3bc6db63cb | |||
| 20eee74860 | |||
| 42c55c6f53 | |||
| 583a2c856b | |||
| 00536c6260 | |||
| ff9d2b547f | |||
| b4fdaae8c5 | |||
| 92a78cf2f4 | |||
| 355443acc6 | |||
| 3b24d2bac4 | |||
| 8d6dc18bb0 | |||
| cef0463e89 | |||
| d9b1a4ca5d | |||
| 4039174e45 | |||
| 0759483348 | |||
| a6dd7e0c21 | |||
| 98bdcb1b2c | |||
| 351fe1bb9a | |||
| 3cf20a7306 | |||
| 06c5871ed4 | |||
| c781636516 | |||
| 22f0586995 | |||
| f4f2f47ee2 | |||
| 86d417264a | |||
| e9647aca00 | |||
| 8067e31901 | |||
| 77c637524f | |||
| d1fe361df6 | |||
| 09d06ac7e7 | |||
| abb78d6248 | |||
| 74e645dd96 | |||
| a2aedcfef3 | |||
| f06f98604f | |||
| d631cdba30 | |||
| 839c941f9e | |||
| 9bd8b62dc4 | |||
| 339798448a | |||
| 9d401a8e69 | |||
| 5cc8f0f0ed | |||
| ebca8ce6e3 | |||
| 7acb66688b | |||
| 0f6629109a | |||
| cb19d91c2b | |||
| a35c8c0dbe | |||
| 8575e7471b | |||
| fe82fa28be | |||
| a74410228a | |||
| dd615deb94 | |||
| 4c7515bbf7 | |||
| 961632639e | |||
| 0dd81432c0 | |||
| 942eec9a0d | |||
| e9412abd21 | |||
| 7b80f3d19d | |||
| ddac3190bd | |||
| b069d87c93 | |||
| 0b52b54c7b | |||
| 658bace2c6 | |||
| c27be08ab1 | |||
| 009b263e9e | |||
| 08bce6511b | |||
| 509f9914e4 | |||
| 09389db745 | |||
| 6a4a410a3c | |||
| 465d332b1a | |||
| 284767614a | |||
| dd589f8b21 | |||
| 6f4a0b01e9 | |||
| 92cc4c31d6 | |||
| 10c96b1862 | |||
| 60e9290414 | |||
| 802c149399 | |||
| ba5aa49a0f | |||
| f59558f29f | |||
| d7791b94c1 | |||
| 5c38e9a5f7 | |||
| c8aa56fe47 | |||
| 9a50d540de | |||
| 091218a685 | |||
| 12fccd6962 | |||
| 3b52181d23 | |||
| 1974f3a939 | |||
| eaf84748f9 | |||
| 0ce4262e64 | |||
| a6969ff360 | |||
| 414bb0f90b | |||
| a284f02869 | |||
| 80cbaa6cab | |||
| 1e895e3cb6 | |||
| ddb3c496e3 | |||
| b2c827a24f | |||
| 104259a58b | |||
| 1f664148cc | |||
| c6adff587a | |||
| c75a116b29 | |||
| 6e8a4ec8c9 | |||
| 625f1c4060 | |||
| 7dfe49b3a3 | |||
| 30973771f4 | |||
| ec17163206 | |||
| efba2a92a2 | |||
| f80e24cc28 | |||
| df1edce5c6 | |||
| f6f7303172 | |||
| fe193ec37e | |||
| a03d9c9cd7 | |||
| 8011c1827a | |||
| 05a00fad3a | |||
| c03c01cd2a | |||
| 5839134243 | |||
| e150f1a2b0 | |||
| 15367851e3 | |||
| 26080d353b | |||
| 138a1d2f32 | |||
| 2cbe7dde04 | |||
| c3b211d0c5 | |||
| 44f7cc4152 | |||
| 9eb5d1362b | |||
| 0c1b622f73 | |||
| 385306319a | |||
| 7db70452d8 | |||
| b00b2781be | |||
| b1d83a7bdc | |||
| 084bf82ea9 | |||
| ef1e07f1f4 | |||
| cf3670cefc | |||
| 5692de9cca | |||
| c212b302f1 | |||
| 381445f0ae | |||
| 55b11f3d90 | |||
| 2b8a9fdcc6 | |||
| 9d4bfa624a | |||
| 6aeda1eac2 | |||
| 4cfdbe6e6a | |||
| 79b2254f28 | |||
| 1590055049 | |||
| 168d986213 | |||
| cb085ae7df | |||
| d1f02f0e46 | |||
| c43172e281 | |||
| 897a37822a | |||
| 708a913046 | |||
| 1d6bb3df9c | |||
| 9160036e1a | |||
| b574b07b11 | |||
| 0a61b619c4 | |||
| 9ac6482127 | |||
| da373d0a62 | |||
| 0548ed7da4 | |||
| 312da06756 | |||
| 0bbf5eb080 | |||
| 6b363120ce | |||
| 02e5ac542c | |||
| bc6abb6492 | |||
| 689b00e46c | |||
| ca70989963 | |||
| 5dab967b6c | |||
| a3deaf6546 | |||
| a527942356 | |||
| 0827d7ba35 | |||
| b65659d631 | |||
| 2a8e1354f8 | |||
| da5245071d | |||
| 67a7d47a1d | |||
| 1551ef8ce0 | |||
| 3765d22ab8 | |||
| 46d6cdf9ba | |||
| ab1c48aefc | |||
| 1d1a2e2e55 | |||
| 969fabe77c | |||
| ca727cf906 | |||
| 86257e57da | |||
| b4f073bd1d | |||
| 2c21846b06 | |||
| 6ea2fe1cac | |||
| ce7ed9420a | |||
| ef2e0e4919 | |||
| 59d57ee694 | |||
| c61d31a568 | |||
| b592d4516e | |||
| 6232638023 | |||
| 5f3c8b43db | |||
| 1cb92ad7b9 | |||
| f454bae025 | |||
| 3f77ddb377 | |||
| 24db348ef8 | |||
| 66485f7219 | |||
| 3ff4718408 | |||
| c381a2c006 | |||
| b6c78e01ff | |||
| 6eb4d5b1d6 | |||
| ec1205f6fa | |||
| 7b57d170bd | |||
| 90ec23a80a | |||
| e6bee6f56b | |||
| f1122edb0e | |||
| 45145efcb8 | |||
| a24bf7f146 | |||
| dd93c0a30b | |||
| 3feee6543c | |||
| b33b79d9a7 | |||
| 956e7abf0d | |||
| 18833de76b | |||
| 04d93333bf | |||
| 895a2dae62 | |||
| aecfaab249 | |||
| 78f50ff693 | |||
| 55120fa816 | |||
| 660ef9ca23 | |||
| b1723520d2 | |||
| a650a72554 | |||
| 7b21921b9d | |||
| a3c42992c7 | |||
| cb97244afa | |||
| 7aea8c0dda | |||
| f723d64780 | |||
| 55728112ce |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
|||||||
/venv/
|
/*.bundle
|
||||||
|
|||||||
37
Makefile
37
Makefile
@@ -1,17 +1,16 @@
|
|||||||
venv = ./venv
|
ansible_run = ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
|
||||||
requirements = requirements.txt
|
|
||||||
activate = . $(venv)/bin/activate
|
|
||||||
pip = pip
|
|
||||||
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}
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: | venv $(ansible)
|
all:
|
||||||
$(ansible_run)
|
$(ansible_run)
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: config
|
||||||
update: $(ansible)
|
config:
|
||||||
$(ansible_run) --tags update
|
$(ansible_run) --skip-tags system-update
|
||||||
|
|
||||||
|
.PHONY: system-update
|
||||||
|
system-update:
|
||||||
|
$(ansible_run) --tags system-update
|
||||||
|
|
||||||
.PHONY: reboot
|
.PHONY: reboot
|
||||||
reboot:
|
reboot:
|
||||||
@@ -25,27 +24,13 @@ poweroff:
|
|||||||
weekend: | update poweroff
|
weekend: | update poweroff
|
||||||
|
|
||||||
.PHONY: packages
|
.PHONY: packages
|
||||||
packages: $(ansible)
|
packages:
|
||||||
$(ansible_run) --tags packages
|
$(ansible_run) --tags packages
|
||||||
|
|
||||||
.PHONY: dotfiles
|
.PHONY: dotfiles
|
||||||
dotfiles: $(ansible)
|
dotfiles:
|
||||||
$(ansible_run) --tags dotfiles
|
$(ansible_run) --tags dotfiles
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf venv
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
./test-in-docker.sh
|
./test-in-docker.sh
|
||||||
|
|
||||||
$(ansible): venv
|
|
||||||
|
|
||||||
venv:
|
|
||||||
python3 -m venv $(venv)
|
|
||||||
$(activate) && $(pip) install -r $(requirements)
|
|
||||||
|
|
||||||
.PHONY: freeze
|
|
||||||
freeze:
|
|
||||||
$(activate) && $(pip) freeze > $(requirements)
|
|
||||||
|
|||||||
@@ -15,8 +15,18 @@ 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
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
|
ssh_agent: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
gpg_agent_for_ssh: true
|
gpg_agent_for_ssh: true
|
||||||
gpg_key:
|
gpg_key:
|
||||||
@@ -45,9 +55,9 @@ screen:
|
|||||||
screencfgs: []
|
screencfgs: []
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
1: www
|
1: ""
|
||||||
9: comm
|
9: ""
|
||||||
10: music
|
10: ""
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
MACHINE_TYPE: "workstation"
|
MACHINE_TYPE: "workstation"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ users:
|
|||||||
manage_css: false
|
manage_css: false
|
||||||
mail: hannes.koerber@tradebyte.com
|
mail: hannes.koerber@tradebyte.com
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
|
ssh_agent: true
|
||||||
gpg_agent: false
|
gpg_agent: false
|
||||||
gpg_agent_for_ssh: false
|
gpg_agent_for_ssh: false
|
||||||
environment:
|
environment:
|
||||||
@@ -42,6 +43,7 @@ users:
|
|||||||
manage_css: true
|
manage_css: true
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
|
ssh_agent: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
gpg_agent_for_ssh: true
|
gpg_agent_for_ssh: true
|
||||||
gpg_key:
|
gpg_key:
|
||||||
@@ -71,14 +73,14 @@ screen:
|
|||||||
0: eDP-1
|
0: eDP-1
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
1: www
|
1: ""
|
||||||
2: www
|
2: ""
|
||||||
3: term-local
|
3: " local"
|
||||||
4: term-remote
|
4: " remote"
|
||||||
7: comm
|
7: ""
|
||||||
8: pass
|
8: ""
|
||||||
9: music
|
9: ""
|
||||||
10: pim
|
10: ""
|
||||||
|
|
||||||
screencfgs:
|
screencfgs:
|
||||||
- name: three-screens
|
- name: three-screens
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ users:
|
|||||||
manage_css: false
|
manage_css: false
|
||||||
mail: hannes.koerber@tradebyte.com
|
mail: hannes.koerber@tradebyte.com
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
|
ssh_agent: true
|
||||||
gpg_agent: false
|
gpg_agent: false
|
||||||
gpg_agent_for_ssh: false
|
gpg_agent_for_ssh: false
|
||||||
environment:
|
environment:
|
||||||
@@ -27,6 +28,10 @@ users:
|
|||||||
MACHINE_HAS_KEEPASSX: "true"
|
MACHINE_HAS_KEEPASSX: "true"
|
||||||
has_yubikey: false
|
has_yubikey: false
|
||||||
repositories: []
|
repositories: []
|
||||||
|
overrides:
|
||||||
|
terraform_version: 1.1.3
|
||||||
|
terraform_check_updates: false
|
||||||
|
|
||||||
- name: hannes-private
|
- name: hannes-private
|
||||||
group: hannes-private
|
group: hannes-private
|
||||||
vt: 2
|
vt: 2
|
||||||
@@ -42,6 +47,7 @@ users:
|
|||||||
manage_css: true
|
manage_css: true
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
|
ssh_agent: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
gpg_agent_for_ssh: true
|
gpg_agent_for_ssh: true
|
||||||
gpg_key:
|
gpg_key:
|
||||||
@@ -59,26 +65,26 @@ users:
|
|||||||
- personal_projects
|
- personal_projects
|
||||||
|
|
||||||
screen:
|
screen:
|
||||||
1: DP-1-1
|
1: DP-3
|
||||||
2: DP-1-1
|
2: DP-3
|
||||||
3: DP-1-2
|
3: DP-4
|
||||||
4: DP-1-2
|
4: DP-4
|
||||||
5: DP-1-2
|
5: DP-4
|
||||||
6: DP-1-2
|
6: DP-4
|
||||||
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: www
|
1: ""
|
||||||
2: www
|
2: ""
|
||||||
3: term-local
|
3: " local"
|
||||||
4: term-remote
|
4: " remote"
|
||||||
7: comm
|
7: ""
|
||||||
8: pass
|
8: ""
|
||||||
9: music
|
9: ""
|
||||||
10: pim
|
10: ""
|
||||||
|
|
||||||
screencfgs:
|
screencfgs:
|
||||||
- name: three-screens
|
- name: three-screens
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ env:
|
|||||||
# each instance of Alacritty. If it is not present, alacritty will
|
# each instance of Alacritty. If it is not present, alacritty will
|
||||||
# check the local terminfo database and use `alacritty` if it is
|
# check the local terminfo database and use `alacritty` if it is
|
||||||
# available, otherwise `xterm-256color` is used.
|
# available, otherwise `xterm-256color` is used.
|
||||||
TERM: xterm-256color
|
TERM: alacritty
|
||||||
|
|
||||||
window:
|
window:
|
||||||
# Window dimensions (changes require restart)
|
# Window dimensions (changes require restart)
|
||||||
@@ -184,7 +184,7 @@ colors:
|
|||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: '#272822'
|
black: '#000000'
|
||||||
red: '#F92672'
|
red: '#F92672'
|
||||||
green: '#A6E22E'
|
green: '#A6E22E'
|
||||||
yellow: '#F4BF75'
|
yellow: '#F4BF75'
|
||||||
|
|||||||
@@ -6,8 +6,15 @@ Wants=blueman.service
|
|||||||
Wants=dpms.service
|
Wants=dpms.service
|
||||||
Wants=dunst.service
|
Wants=dunst.service
|
||||||
Wants=element.service
|
Wants=element.service
|
||||||
{% for profile in (user.firefox_profiles|default({})).keys() %}
|
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
||||||
|
{% if config.bigger_font|default(false) is sameas false %}
|
||||||
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
|
||||||
@@ -25,4 +32,5 @@ 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
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[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
|
||||||
8
autostart/services/kdeconnect.service
Normal file
8
autostart/services/kdeconnect.service
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env kdeconnect-indicator
|
||||||
|
PassEnvironment=DISPLAY
|
||||||
|
Restart=always
|
||||||
@@ -3,6 +3,7 @@ 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
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ ConditionPathExists=%h/.var/run/features/restic_backup
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=%h/bin/restic-backup
|
ExecStart=%h/restic/restic-backup
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
|
PartOf=gpg-agent.service
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
After=gpg-agent.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
cd ~/projects/personal/time-tracking/
|
cd ~/code/personal/time-tracking/
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
source ~/.attendance_env
|
source ~/.attendance_env
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ log() {
|
|||||||
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
|
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1 $2" in
|
||||||
enable)
|
"set-paused false")
|
||||||
log "Enabling dunst"
|
log "Enabling dunst"
|
||||||
systemctl --user --no-block kill --signal SIGUSR2 dunst
|
systemctl --user --no-block kill --signal SIGUSR2 dunst
|
||||||
|
|
||||||
;;
|
;;
|
||||||
disable)
|
"set-paused true")
|
||||||
log "Disabling dunst"
|
log "Disabling dunst"
|
||||||
systemctl --user --no-block kill --signal SIGUSR1 dunst
|
systemctl --user --no-block kill --signal SIGUSR1 dunst
|
||||||
;;
|
;;
|
||||||
|
|||||||
40
bin/nato
40
bin/nato
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os.path
|
||||||
|
|
||||||
hash = {
|
hash = {
|
||||||
'A': 'Alpha',
|
'A': 'Alpha',
|
||||||
@@ -43,6 +44,45 @@ 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
bin/natode
Symbolic link
1
bin/natode
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
nato
|
||||||
14
bin/pf
Executable file
14
bin/pf
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/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)
|
||||||
18
dotfiles.yml
18
dotfiles.yml
@@ -5,6 +5,9 @@ empty_directories:
|
|||||||
- 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
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- from: git/gitconfig
|
- from: git/gitconfig
|
||||||
@@ -24,6 +27,8 @@ dotfiles:
|
|||||||
- from: i3/i3status.conf
|
- from: i3/i3status.conf
|
||||||
to: .i3/i3status.conf
|
to: .i3/i3status.conf
|
||||||
template: true
|
template: true
|
||||||
|
- from: i3/i3status-rs.toml
|
||||||
|
to: .i3/i3status-rs.toml
|
||||||
- from: i3/scripts
|
- from: i3/scripts
|
||||||
to: .i3/scripts
|
to: .i3/scripts
|
||||||
- from: tmux/tmux.conf
|
- from: tmux/tmux.conf
|
||||||
@@ -50,10 +55,12 @@ dotfiles:
|
|||||||
template: true
|
template: true
|
||||||
- from: redshift/redshift.conf
|
- from: redshift/redshift.conf
|
||||||
to: .config/redshift.conf
|
to: .config/redshift.conf
|
||||||
- from: vscode/settings.json
|
- from: vscodium/product.json
|
||||||
to: .config/Code/User/settings.json
|
to: .config/VSCodium/product.json
|
||||||
- from: vscode/keybindings.json
|
- from: vscodium/settings.json
|
||||||
to: .config/Code/User/keybindings.json
|
to: .config/VSCodium/User/settings.json
|
||||||
|
- from: vscodium/keybindings.json
|
||||||
|
to: .config/VSCodium/User/keybindings.json
|
||||||
- from: alacritty/alacritty.yml
|
- from: alacritty/alacritty.yml
|
||||||
to: .config/alacritty.yml
|
to: .config/alacritty.yml
|
||||||
template: true
|
template: true
|
||||||
@@ -62,6 +69,9 @@ dotfiles:
|
|||||||
- 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: .gtkrc-2.0
|
to: .gtkrc-2.0
|
||||||
template: true
|
template: true
|
||||||
|
|||||||
@@ -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 = "#e16b40"
|
frame_color = "#ff964f"
|
||||||
|
|
||||||
# Define a color for the separator.
|
# Define a color for the separator.
|
||||||
# possible values are:
|
# possible values are:
|
||||||
|
|||||||
@@ -120,3 +120,5 @@
|
|||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = master
|
defaultBranch = master
|
||||||
|
[safe]
|
||||||
|
directory = /var/lib/dotfiles
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ name = "misc/rbackupd"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "github"
|
name = "github"
|
||||||
url = "git@github.com:hakoerber/rbackupd.git"
|
url = "ssh://git@github.com/hakoerber/rbackupd.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -59,7 +59,7 @@ name = "misc/wifiqr"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "github"
|
name = "github"
|
||||||
url = "ssh://git@github.com/hakoerber/wifi-qr.git"
|
url = "ssh://git@github.com/hakoerber/wifiqr.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -74,7 +74,7 @@ type = "ssh"
|
|||||||
name = "misc/xftwidth"
|
name = "misc/xftwidth"
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "github"
|
||||||
url = "ssh://git@github.com/hakoerber/xftwidth.git"
|
url = "ssh://git@github.com/hakoerber/xftwidth.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
@@ -83,10 +83,6 @@ name = "upstream"
|
|||||||
url = "https://github.com/vixus0/xftwidth"
|
url = "https://github.com/vixus0/xftwidth"
|
||||||
type = "https"
|
type = "https"
|
||||||
|
|
||||||
[[trees.repos]]
|
|
||||||
name = "x-hidecursor"
|
|
||||||
remotes = []
|
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "git-repo-manager"
|
name = "git-repo-manager"
|
||||||
|
|
||||||
@@ -124,11 +120,6 @@ name = "github"
|
|||||||
url = "ssh://git@github.com/hakoerber/acimaker.git"
|
url = "ssh://git@github.com/hakoerber/acimaker.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
|
||||||
name = "private"
|
|
||||||
url = "git@code.sys.haktec.de:container/acimaker.git"
|
|
||||||
type = "ssh"
|
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "container/drone-kaniko"
|
name = "container/drone-kaniko"
|
||||||
|
|
||||||
@@ -204,7 +195,11 @@ type = "ssh"
|
|||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "lea-michael-hochzeit"
|
name = "lea-michael-hochzeit"
|
||||||
remotes = []
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "origin"
|
||||||
|
url = "ssh://git@code.hkoerber.de:2222/hannes/lea-michi-hochzeit.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "builddoc"
|
name = "builddoc"
|
||||||
@@ -236,11 +231,11 @@ url = "ssh://git@github.com/hakoerber/fizzbuzz.git"
|
|||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "ggj/2018/the-lost-son"
|
name = "ggj/2018-the-lost-son"
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@github.com:niklas-heer/the-lost-son.git"
|
url = "ssh://git@github.com/niklas-heer/the-lost-son.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -248,7 +243,7 @@ name = "ggj/2019-claim-your-world"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@github.com:theintroverts/claim-your-world.git"
|
url = "ssh://git@github.com/theintroverts/claim-your-world.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -313,5 +308,18 @@ type = "ssh"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@code.hkoerber.de:2222/hakoerber/aws-glacier-backup.git"
|
url = "ssh://git@code.hkoerber.de:2222/hannes/aws-glacier-backup.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "unclutter-xfixes"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "github"
|
||||||
|
url = "git@github.com:hakoerber/unclutter-xfixes.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "upstream"
|
||||||
|
url = "https://github.com/Airblader/unclutter-xfixes"
|
||||||
|
type = "https"
|
||||||
|
|||||||
15
gtk/gtk-3.0-bigger-font.ini.j2
Normal file
15
gtk/gtk-3.0-bigger-font.ini.j2
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[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-dark
|
gtk-icon-theme-name=breeze
|
||||||
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-dark"
|
gtk-icon-theme-name="breeze"
|
||||||
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
|
||||||
|
|||||||
57
i3/config.j2
57
i3/config.j2
@@ -115,8 +115,8 @@ workspace $workspace10 output {{ machine.screen.0 }}
|
|||||||
assign [class="^Keepassx$"] $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 $workspace10
|
||||||
assign [class="^Spotify$"] $workspace9
|
assign [class="^Spotify$"] $workspace10
|
||||||
|
|
||||||
assign [class="^Google-chrome$"] $workspace7
|
assign [class="^Google-chrome$"] $workspace7
|
||||||
assign [class="^Chromium$"] $workspace7
|
assign [class="^Chromium$"] $workspace7
|
||||||
@@ -226,27 +226,7 @@ assign [class="^Wine$"] $workspace10
|
|||||||
|
|
||||||
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
|
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
|
||||||
|
|
||||||
# bindsym $mod+$pim_toggle \
|
bindsym $mod+$pim_toggle exec --no-startup-id ~/.i3/scripts/swap-from-workspace.sh $workspace10
|
||||||
# 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 ######################################################################
|
||||||
@@ -319,10 +299,10 @@ assign [class="^Wine$"] $workspace10
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# class border backgr. text indicator
|
# class border backgr. text indicator
|
||||||
client.focused #E16B40 #E16B40 #000000 #FF0000
|
client.focused #e5b567 #e5b567 #000000 #FF0000
|
||||||
client.focused_inactive #333333 #5f676a #ffffff #484e50
|
client.focused_inactive #272822 #5f676a #ffffff #484e50
|
||||||
client.unfocused #333333 #202020 #cccccc #292d2e
|
client.unfocused #1C1C1C #272822 #cccccc #292d2e
|
||||||
client.urgent #2f343a #900000 #ffffff #900000
|
client.urgent #272822 #ff7777 #000000 #900000
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### APPLICATION SPECIFIC SETTINGS ##############################################
|
### APPLICATION SPECIFIC SETTINGS ##############################################
|
||||||
@@ -357,13 +337,11 @@ bindsym $mod+space exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
### BARS #######################################################################
|
### BARS #######################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
|
||||||
bar {
|
bar {
|
||||||
mode dock
|
mode dock
|
||||||
position bottom
|
position bottom
|
||||||
|
|
||||||
|
|
||||||
#tray_output HDMI3
|
|
||||||
tray_output primary
|
tray_output primary
|
||||||
tray_padding 2
|
tray_padding 2
|
||||||
|
|
||||||
@@ -380,19 +358,18 @@ bar {
|
|||||||
colors {
|
colors {
|
||||||
background #272822
|
background #272822
|
||||||
statusline #ffffff
|
statusline #ffffff
|
||||||
separator #444444
|
separator #555555
|
||||||
# separator #e16b40
|
|
||||||
|
|
||||||
# focused_background #303030
|
focused_separator #e5b567
|
||||||
# focused_separator #272822
|
focused_background #272822
|
||||||
|
|
||||||
focused_workspace #e16b40 #272822 #ffffff
|
# border bg text
|
||||||
active_workspace #272822 #5f676a #ffffff
|
focused_workspace #e5b567 #4f676a #ffffff
|
||||||
|
active_workspace #272822 #4f676a #ffffff
|
||||||
inactive_workspace #272822 #272822 #dddddd
|
inactive_workspace #272822 #272822 #dddddd
|
||||||
urgent_workspace #D00000 #D00000 #272822
|
urgent_workspace #272822 #ff7777 #272822
|
||||||
binding_mode #272822 #e16b40 #272822
|
binding_mode #272822 #e5b567 #272822
|
||||||
}
|
}
|
||||||
|
|
||||||
i3bar_command i3bar
|
status_command i3status-rs ~/.i3/i3status-rs.toml
|
||||||
status_command py3status --standalone --dbus-notify -c ~/.i3/i3status.conf
|
|
||||||
}
|
}
|
||||||
|
|||||||
87
i3/i3status-rs.toml
Normal file
87
i3/i3status-rs.toml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
icons_format = " {icon} "
|
||||||
|
|
||||||
|
[icons]
|
||||||
|
name = "awesome6"
|
||||||
|
|
||||||
|
[icons.overrides]
|
||||||
|
|
||||||
|
[theme]
|
||||||
|
name = "native"
|
||||||
|
|
||||||
|
[theme.overrides]
|
||||||
|
warning_fg = "#000000"
|
||||||
|
warning_bg = "#F4Bf75"
|
||||||
|
critical_fg = "#000000"
|
||||||
|
critical_bg = "#F92672"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "music"
|
||||||
|
player = "spotify"
|
||||||
|
buttons = ["prev", "play", "next"]
|
||||||
|
on_click = "exec $HOME/.i3/scripts/spotify-control toggle"
|
||||||
|
separator = " — "
|
||||||
|
dynamic_width = true
|
||||||
|
max_width = 1024
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "sound"
|
||||||
|
driver = "pulseaudio"
|
||||||
|
max_vol = 100
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "sound"
|
||||||
|
driver = "pulseaudio"
|
||||||
|
device_kind = "source"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "networkmanager"
|
||||||
|
primary_only = true
|
||||||
|
ap_format = "{strength} {ssid}"
|
||||||
|
device_format = "{icon}{ap}"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "load"
|
||||||
|
format = "{1m}"
|
||||||
|
warning = 8
|
||||||
|
critical = 1000
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "toggle"
|
||||||
|
text = " "
|
||||||
|
command_on = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs"
|
||||||
|
command_off = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs"
|
||||||
|
command_state = "[[ $($HOME/.i3/scripts/presentation-mode status) == off ]] || echo active"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "battery"
|
||||||
|
interval = 10
|
||||||
|
format = "{percentage} {time}"
|
||||||
|
hide_missing = true
|
||||||
|
if_command = "test -e /sys/class/power_supply/BAT0"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "toggle"
|
||||||
|
text = " "
|
||||||
|
command_on = "systemctl --user start redshift"
|
||||||
|
command_off = "systemctl --user stop redshift"
|
||||||
|
command_state = "[[ $(systemctl --user is-active redshift) == active ]] && echo active"
|
||||||
|
signal = 0
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "toggle"
|
||||||
|
text = " "
|
||||||
|
command_on = "systemctl --user start spotify"
|
||||||
|
command_off = "systemctl --user stop spotify"
|
||||||
|
command_state = "[[ $(systemctl --user is-active spotify) == active ]] && echo active"
|
||||||
|
signal = 0
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "custom"
|
||||||
|
command = "ping -c 1 8.8.8.8 >/dev/null 2>/dev/null && echo || echo "
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "time"
|
||||||
|
interval = 1
|
||||||
|
locale = "de_DE"
|
||||||
|
format = "[CW %V] %a %d.%m.%Y %H:%M:%S"
|
||||||
@@ -52,10 +52,11 @@ reset_screen() {
|
|||||||
lock_and_screen_off() {
|
lock_and_screen_off() {
|
||||||
lock &
|
lock &
|
||||||
_pid=$!
|
_pid=$!
|
||||||
dunstctl disable
|
dunst_paused=$(dunstctl is-paused)
|
||||||
|
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused true
|
||||||
screen_off
|
screen_off
|
||||||
wait $_pid
|
wait $_pid
|
||||||
dunstctl enable
|
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused false
|
||||||
reset_screen
|
reset_screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ is_on() {
|
|||||||
|
|
||||||
switch_on() {
|
switch_on() {
|
||||||
touch "${_status_file}"
|
touch "${_status_file}"
|
||||||
dunstctl disable &
|
dunstctl set-paused true &
|
||||||
systemctl --user --no-block stop redshift.service
|
systemctl --user --no-block stop redshift.service
|
||||||
systemctl --user --no-block stop spotify.service
|
systemctl --user --no-block stop spotify.service
|
||||||
~/.i3/scripts/bar-update "external_script presentation_mode"
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
@@ -19,7 +19,7 @@ switch_on() {
|
|||||||
|
|
||||||
switch_off() {
|
switch_off() {
|
||||||
rm -f "${_status_file}"
|
rm -f "${_status_file}"
|
||||||
dunstctl enable &
|
dunstctl set-paused false &
|
||||||
systemctl --user --no-block start redshift.service
|
systemctl --user --no-block start redshift.service
|
||||||
systemctl --user --no-block start spotify.service
|
systemctl --user --no-block start spotify.service
|
||||||
~/.i3/scripts/bar-update "external_script presentation_mode"
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
|
|||||||
59
i3/scripts/swap-from-workspace.sh
Executable file
59
i3/scripts/swap-from-workspace.sh
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/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}"
|
||||||
21
install.sh
21
install.sh
@@ -52,7 +52,7 @@ _install() {
|
|||||||
_package="$1" ; shift
|
_package="$1" ; shift
|
||||||
if [[ $NAME == "Ubuntu" ]] ; then
|
if [[ $NAME == "Ubuntu" ]] ; then
|
||||||
if ! (( cache_updated )) ; then
|
if ! (( cache_updated )) ; then
|
||||||
apt-get update
|
sudowrap apt-get update
|
||||||
cache_updated=1
|
cache_updated=1
|
||||||
fi
|
fi
|
||||||
sudowrap apt-get install --assume-yes "${_package}"
|
sudowrap apt-get install --assume-yes "${_package}"
|
||||||
@@ -68,7 +68,6 @@ _install() {
|
|||||||
if ! command -v python3 >/dev/null ; then
|
if ! command -v python3 >/dev/null ; then
|
||||||
printf 'Python3 not installed, installing ...\n'
|
printf 'Python3 not installed, installing ...\n'
|
||||||
_install "python3"
|
_install "python3"
|
||||||
_install "python3-venv"
|
|
||||||
printf 'Done\n'
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -78,21 +77,13 @@ if ! command -v make >/dev/null ; then
|
|||||||
printf 'Done\n'
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Required for compiling modules in venv.
|
if [[ $NAME == "Arch Linux" ]] ; then
|
||||||
if ! command -v gcc >/dev/null ; then
|
_install "ansible"
|
||||||
printf 'gcc not installed, installing ...\n'
|
|
||||||
_install "gcc"
|
|
||||||
printf 'Done\n'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! python3 -c 'import venv' 2>/dev/null ; then
|
if [[ $NAME == "Ubuntu" ]] ; then
|
||||||
printf 'Python3 venv module not installed, installing ...\n'
|
_install "ansible"
|
||||||
_install python3-venv
|
_install "python3-jmespath"
|
||||||
printf 'Done\n'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$DOTDIR" && make
|
cd "$DOTDIR" && make
|
||||||
|
|
||||||
# fix permissions of the directory
|
|
||||||
sudowrap chgrp -R dotfiles "${DOTDIR}"
|
|
||||||
sudowrap chmod g+wX "${DOTDIR}"
|
|
||||||
|
|||||||
14
packages.yml
14
packages.yml
@@ -183,6 +183,9 @@ packages:
|
|||||||
- python-ruamel-yaml
|
- python-ruamel-yaml
|
||||||
- python-gitpython
|
- python-gitpython
|
||||||
- python-semver
|
- python-semver
|
||||||
|
black:
|
||||||
|
ubuntu: ["black"]
|
||||||
|
archlinux: ["python-black"]
|
||||||
xbacklight:
|
xbacklight:
|
||||||
ubuntu: ["xbacklight"]
|
ubuntu: ["xbacklight"]
|
||||||
archlinux: ["xorg-xbacklight"]
|
archlinux: ["xorg-xbacklight"]
|
||||||
@@ -377,7 +380,16 @@ packages:
|
|||||||
archlinux: ["ncdu"]
|
archlinux: ["ncdu"]
|
||||||
font-utils:
|
font-utils:
|
||||||
ubuntu: ["woff-tools", "woff2"]
|
ubuntu: ["woff-tools", "woff2"]
|
||||||
archinux: ["woff2"]
|
archlinux: ["woff2"]
|
||||||
|
jq:
|
||||||
|
ubuntu: ["jq"]
|
||||||
|
archlinux: ["jq"]
|
||||||
|
musl:
|
||||||
|
ubuntu: ["musl", "musl-tools"]
|
||||||
|
archlinux: ["musl"]
|
||||||
|
kdeconnect:
|
||||||
|
ubuntu: ["kdeconnect"]
|
||||||
|
archlinux: ["kdeconnect"]
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
mousepad:
|
mousepad:
|
||||||
|
|||||||
356
playbook.yml
356
playbook.yml
@@ -49,6 +49,19 @@
|
|||||||
become: true
|
become: true
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: install ansible requirements
|
||||||
|
package:
|
||||||
|
name: "{{ packages[distro] }}"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
archlinux:
|
||||||
|
- python-jmespath
|
||||||
|
ubuntu:
|
||||||
|
- python3-jmespath
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: enable multilib repository
|
- name: enable multilib repository
|
||||||
blockinfile:
|
blockinfile:
|
||||||
@@ -81,13 +94,95 @@
|
|||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: clean cache
|
- block:
|
||||||
command: paccache -rk2 -ruk0
|
- name: install pacman cache clean service
|
||||||
become: true
|
copy:
|
||||||
changed_when: false
|
dest: /etc/systemd/system/pacman-cache-cleanup.service
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
content: |
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/sh -c '/usr/bin/paccache -rk1 && /usr/bin/paccache -ruk0'
|
||||||
|
RemainAfterExit=true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: install pacman cache clean timer
|
||||||
|
copy:
|
||||||
|
dest: /etc/systemd/system/pacman-cache-cleanup.timer
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
content: |
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: enable pacman cache clean timer
|
||||||
|
systemd:
|
||||||
|
name: pacman-cache-cleanup.timer
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
|
daemon_reload: true
|
||||||
|
become: true
|
||||||
|
tags: [pacman_cache_cleanup]
|
||||||
|
|
||||||
when: distro == 'archlinux'
|
when: distro == 'archlinux'
|
||||||
tags: [update]
|
tags: [system-update]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: create dotfiles group
|
||||||
|
group:
|
||||||
|
name: dotfiles
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: create dotfiles user
|
||||||
|
user:
|
||||||
|
name: dotfiles
|
||||||
|
group: dotfiles
|
||||||
|
home: /var/lib/dotfiles
|
||||||
|
create_home: false
|
||||||
|
shell: /bin/bash
|
||||||
|
system: true
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: create dotfiles directory
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: /var/lib/dotfiles
|
||||||
|
owner: dotfiles
|
||||||
|
group: dotfiles
|
||||||
|
mode: '0775' # group needs write access!
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: fix permissions for dotfiles directory
|
||||||
|
shell: |
|
||||||
|
cd /var/lib/dotfiles
|
||||||
|
if [[ -e .git ]] ; then
|
||||||
|
# There is no sane way to specify the global .gitconfig to use, so we
|
||||||
|
# actually have to override HOME so git looks into ~/.gitconfig
|
||||||
|
export HOME="$(mktemp -d)"
|
||||||
|
set -o pipefail
|
||||||
|
set -o errexit
|
||||||
|
git config --global --add safe.directory /var/lib/dotfiles
|
||||||
|
git ls-tree -z --name-only HEAD | xargs --null chown --changes --recursive dotfiles:dotfiles
|
||||||
|
git ls-tree -z --name-only HEAD | xargs --null chmod --changes --recursive g+wX
|
||||||
|
else
|
||||||
|
chown --changes --recursive dotfiles:dotfiles .
|
||||||
|
chmod --changes --recursive g+wX .
|
||||||
|
fi
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
register: dotfiles_permission_change
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
changed_when: dotfiles_permission_change.stdout_lines|length > 0
|
||||||
|
tags: [dotfiles-directory]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: install sudo
|
- name: install sudo
|
||||||
@@ -101,9 +196,6 @@
|
|||||||
name:
|
name:
|
||||||
- base-devel
|
- base-devel
|
||||||
- git
|
- git
|
||||||
- cargo
|
|
||||||
- asp
|
|
||||||
- bat
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: create build user on arch
|
- name: create build user on arch
|
||||||
@@ -138,7 +230,7 @@
|
|||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
if pacman -Qi paru >/dev/null 2>&1; then
|
if pacman -Qi paru-bin >/dev/null 2>&1; then
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
@@ -156,9 +248,9 @@
|
|||||||
mkdir -p /tmp/paru-build
|
mkdir -p /tmp/paru-build
|
||||||
cd /tmp/paru-build
|
cd /tmp/paru-build
|
||||||
|
|
||||||
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru.tar.gz
|
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru-bin.tar.gz
|
||||||
tar xvf paru.tar.gz
|
tar xvf paru-bin.tar.gz
|
||||||
cd paru
|
cd paru-bin
|
||||||
makepkg
|
makepkg
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@@ -170,7 +262,7 @@
|
|||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
pacman --noconfirm -U /tmp/paru-build/paru/paru-*.pkg.tar.zst
|
pacman --noconfirm -U /tmp/paru-build/paru-bin/paru-bin-*.pkg.tar.zst
|
||||||
rm -rf /tmp/paru-build
|
rm -rf /tmp/paru-build
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@@ -186,7 +278,7 @@
|
|||||||
file: packages.yml
|
file: packages.yml
|
||||||
|
|
||||||
- name: force-update iptables to iptables-nft on arch
|
- name: force-update iptables to iptables-nft on arch
|
||||||
shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
|
shell: pacman -Q iptables && yes | pacman -S iptables-nft
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: true
|
become: true
|
||||||
when: distro == 'archlinux'
|
when: distro == 'archlinux'
|
||||||
@@ -211,6 +303,15 @@
|
|||||||
assert:
|
assert:
|
||||||
that: "defined_packages_remove|length == distro_packages_remove|length"
|
that: "defined_packages_remove|length == distro_packages_remove|length"
|
||||||
|
|
||||||
|
- name: remove packages
|
||||||
|
package:
|
||||||
|
name: "{{ packages|json_query(query) }}"
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
vars:
|
||||||
|
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
||||||
|
when: distro != 'ubuntu'
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
package:
|
package:
|
||||||
name: "{{ packages|json_query(query) }}"
|
name: "{{ packages|json_query(query) }}"
|
||||||
@@ -220,12 +321,14 @@
|
|||||||
query: "{{ 'list.*.%s[]'|format(distro) }}"
|
query: "{{ 'list.*.%s[]'|format(distro) }}"
|
||||||
|
|
||||||
- name: remove packages
|
- name: remove packages
|
||||||
package:
|
apt:
|
||||||
name: "{{ packages|json_query(query) }}"
|
name: "{{ packages|json_query(query) }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
purge: true
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
||||||
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
- name: install machine-specific packages
|
- name: install machine-specific packages
|
||||||
package:
|
package:
|
||||||
@@ -400,8 +503,18 @@
|
|||||||
system: true
|
system: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
cargo_env: . ~/.cargo/env
|
||||||
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
# Do NOT just use `"true"`. Due to some YAML fuckery, it will be
|
||||||
|
# capitalized and the commands will fail.
|
||||||
|
cargo_env: "/bin/true"
|
||||||
|
when: distro == 'archlinux'
|
||||||
|
|
||||||
- name: install rustup on ubuntu
|
- name: install rustup on ubuntu
|
||||||
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
|
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/rustup
|
creates: /var/lib/rust_build/.cargo/bin/rustup
|
||||||
become: true
|
become: true
|
||||||
@@ -409,54 +522,104 @@
|
|||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
- name: add rustup stable toolchain
|
- name: add rustup stable toolchain
|
||||||
shell: . ~/.cargo/env && rustup toolchain install stable && rustup default stable
|
shell: "{{ cargo_env }} && rustup toolchain install stable && rustup default stable"
|
||||||
become: true
|
|
||||||
become_user: rust_build
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: update rustup stable toolchain
|
|
||||||
shell: . ~/.cargo/env && rustup update stable
|
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: add rustup nightly toolchain
|
- name: add rustup nightly toolchain
|
||||||
shell: . ~/.cargo/env && rustup toolchain install nightly
|
shell: "{{ cargo_env }} && rustup toolchain install nightly"
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: update rustup nightly toolchain
|
- name: add rustup additional toolchains
|
||||||
shell: . ~/.cargo/env && rustup update nightly
|
shell: "{{ cargo_env }} && rustup toolchain install {{ item }}"
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
loop: "{{ cargo_crate_list|selectattr('toolchain', 'defined')|map(attribute='toolchain')|reject('in', ['none', 'stable', 'nightly'])|list }}"
|
||||||
|
|
||||||
|
- name: add additional targets
|
||||||
|
shell: "{{ cargo_env }} && rustup +{{ item.toolchain|default('stable') }} target add {{ item.target }}"
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- '"target" in item'
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
|
- name: assert that nofeatures is not actually a flag
|
||||||
|
assert:
|
||||||
|
that: '"nofeatures" not in item.features|default([])'
|
||||||
|
msg: Wow, "nofeatures" is actually a feature. Update the playbook!
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
|
- name: assert that only proper sources are defined
|
||||||
|
assert:
|
||||||
|
that: item.source|default("crates.io") in ("crates.io", "git")
|
||||||
|
msg: "Invalid source: {{ item.source|default('x') }}"
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
|
- name: install required packages
|
||||||
|
package:
|
||||||
|
state: present
|
||||||
|
name: "{{ item.required_packages|map(attribute=distro)|list }}"
|
||||||
|
when: item.required_packages is defined
|
||||||
|
become: true
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
|
- name: check if binary already exists for crates.io
|
||||||
|
stat:
|
||||||
|
path: /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
||||||
|
register: rust_binary_cratesio
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.binary }}"
|
||||||
|
when: item.source|default('crates.io') == 'crates.io'
|
||||||
|
|
||||||
|
- name: check if binary already exists for git
|
||||||
|
stat:
|
||||||
|
path: /usr/local/lib/binaries/{{ binary_id_git }}
|
||||||
|
register: rust_binary_git
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.binary }}"
|
||||||
|
when: item.source|default('crates.io') == 'git'
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
var: rust_binary_cratesio
|
||||||
|
|
||||||
- name: build rust crates from crates.io
|
- name: build rust crates from crates.io
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
. ~/.cargo/env
|
{{ cargo_env }}
|
||||||
|
|
||||||
rustup run {{ item.toolchain|default('stable') }} cargo install --version {{ item.version }} {{ item.crate }}
|
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --version {{ item.version }} {{ item.crate }}
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }}
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }}
|
||||||
become: true # do not build as root!
|
become: true # do not build as root!
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'crates.io'
|
when:
|
||||||
|
- item.source|default('crates.io') == 'crates.io'
|
||||||
|
- not (rust_binary_cratesio.results | selectattr("item.binary", "match", item.binary))[0].stat.exists
|
||||||
|
|
||||||
- name: build rust crates from git
|
- name: build rust crates from git
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
. ~/.cargo/env
|
{{ cargo_env }}
|
||||||
rustup run {{ item.toolchain|default('stable') }} cargo install --git {{ item.url }} --branch {{ item.branch }}
|
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --git {{ item.url }} --branch {{ item.branch }}
|
||||||
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}
|
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
|
||||||
become: true # do not build as root!
|
become: true # do not build as root!
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'git'
|
when:
|
||||||
|
- item.source|default('crates.io') == 'git'
|
||||||
|
- not (rust_binary_git.results | selectattr("item.binary", "match", item.binary))[0].stat.exists
|
||||||
|
|
||||||
- name: create target directory
|
- name: create target directory
|
||||||
file:
|
file:
|
||||||
@@ -469,27 +632,29 @@
|
|||||||
|
|
||||||
- name: move binaries for crates.io
|
- name: move binaries for crates.io
|
||||||
shell: |
|
shell: |
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }} /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }} /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
||||||
ln -s /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
creates: /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'crates.io'
|
when:
|
||||||
|
- item.source|default('crates.io') == 'crates.io'
|
||||||
|
- not (rust_binary_cratesio.results | selectattr("item.binary", "match", item.binary))[0].stat.exists
|
||||||
|
|
||||||
- name: move binaries for git
|
- name: move binaries for git
|
||||||
shell: |
|
shell: |
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /usr/local/lib/binaries/{{ item.binary }}
|
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_git }} /usr/local/lib/binaries/{{ binary_id_git }}
|
||||||
ln -s /usr/local/lib/binaries/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}
|
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/lib/binaries/{{ item.binary }}
|
creates: /usr/local/lib/binaries/{{ binary_id_git }}
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'git'
|
when:
|
||||||
|
- item.source|default('crates.io') == 'git'
|
||||||
|
- not (rust_binary_git.results | selectattr("item.binary", "match", item.binary))[0].stat.exists
|
||||||
|
|
||||||
- name: link binaries for crates.io
|
- name: link binaries for crates.io
|
||||||
file:
|
file:
|
||||||
src: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
src: /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
||||||
dest: /usr/local/bin/{{ item.binary }}
|
dest: /usr/local/bin/{{ item.binary }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -501,7 +666,7 @@
|
|||||||
|
|
||||||
- name: link binaries for git
|
- name: link binaries for git
|
||||||
file:
|
file:
|
||||||
src: /usr/local/lib/binaries/{{ item.binary }}
|
src: /usr/local/lib/binaries/{{ binary_id_git }}
|
||||||
dest: /usr/local/bin/{{ item.binary }}
|
dest: /usr/local/bin/{{ item.binary }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -510,6 +675,57 @@
|
|||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'git'
|
when: item.source|default('crates.io') == 'git'
|
||||||
|
|
||||||
|
# Important: clean up the symlinks BEFORE the binaries they point to.
|
||||||
|
# Otherwise, ansible will skip them because `ansible.builtin.fileglob`
|
||||||
|
# does not match broken symlinks for some reason.
|
||||||
|
- name: clean up old binaries for creates.io in /var/lib/rust_build
|
||||||
|
command: rm -- {{ binaries | join (" ") }}
|
||||||
|
vars:
|
||||||
|
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_cratesio) | list }}"
|
||||||
|
changed_when: binaries | length > 0
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
become: true
|
||||||
|
when:
|
||||||
|
- item.source|default('crates.io') == 'crates.io'
|
||||||
|
- binaries | length > 0
|
||||||
|
|
||||||
|
- name: clean up old binaries for creates.io in /usr/local/lib
|
||||||
|
command: rm -- {{ binaries | join (" ") }}
|
||||||
|
vars:
|
||||||
|
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_cratesio) | list }}"
|
||||||
|
changed_when: binaries | length > 0
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
become: true
|
||||||
|
when:
|
||||||
|
- item.source|default('crates.io') == 'crates.io'
|
||||||
|
- binaries | length > 0
|
||||||
|
|
||||||
|
- name: clean up old binaries for git in /var/lib/rust_build
|
||||||
|
command: rm -- {{ binaries | join (" ") }}
|
||||||
|
vars:
|
||||||
|
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_git) | list }}"
|
||||||
|
changed_when: binaries | length > 0
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
become: true
|
||||||
|
when:
|
||||||
|
- item.source|default('crates.io') == 'git'
|
||||||
|
- binaries | length > 0
|
||||||
|
|
||||||
|
- name: clean up old binaries for git in /usr/local/lib
|
||||||
|
command: rm -- {{ binaries | join (" ") }}
|
||||||
|
vars:
|
||||||
|
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_git) | list }}"
|
||||||
|
changed_when: binaries | length > 0
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
become: true
|
||||||
|
when:
|
||||||
|
- item.source|default('crates.io') == 'git'
|
||||||
|
- binaries | length > 0
|
||||||
|
|
||||||
|
vars:
|
||||||
|
binary_id_cratesio: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.version }}"
|
||||||
|
binary_id_git: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.branch }}"
|
||||||
tags:
|
tags:
|
||||||
- rust_binaries
|
- rust_binaries
|
||||||
|
|
||||||
@@ -529,6 +745,7 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
||||||
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
||||||
|
force: false
|
||||||
|
|
||||||
- name: unpack go
|
- name: unpack go
|
||||||
unarchive:
|
unarchive:
|
||||||
@@ -549,7 +766,7 @@
|
|||||||
path: "{{ go_download.path }}"
|
path: "{{ go_download.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
when: not go_target_stat.stat.exists
|
when: not go_target_stat.stat.exists and not ansible_check_mode
|
||||||
|
|
||||||
- name: link to the current go version
|
- name: link to the current go version
|
||||||
file:
|
file:
|
||||||
@@ -565,7 +782,7 @@
|
|||||||
copy:
|
copy:
|
||||||
dest: /etc/profile.d/go.sh
|
dest: /etc/profile.d/go.sh
|
||||||
content: |
|
content: |
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
export PATH=/usr/local/go/bin:$PATH
|
||||||
export GOROOT=/usr/local/go
|
export GOROOT=/usr/local/go
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -598,12 +815,16 @@
|
|||||||
tempfile:
|
tempfile:
|
||||||
state: directory
|
state: directory
|
||||||
register: alacritty_build_tempdir
|
register: alacritty_build_tempdir
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
- name: build alacritty
|
- name: build alacritty
|
||||||
command: cargo install alacritty --root ./out
|
shell: . ~/.cargo/env && rustup run stable cargo install alacritty --root ./out
|
||||||
args:
|
args:
|
||||||
chdir: "{{ alacritty_build_tempdir.path }}"
|
chdir: "{{ alacritty_build_tempdir.path }}"
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
- name: install alacritty
|
- name: install alacritty
|
||||||
@@ -615,6 +836,8 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ alacritty_build_tempdir.path }}"
|
path: "{{ alacritty_build_tempdir.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
@@ -633,7 +856,7 @@
|
|||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
|
|
||||||
- name: build yubikey-touch-detector
|
- name: build yubikey-touch-detector
|
||||||
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go get -u github.com/maximbaz/yubikey-touch-detector'
|
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go install github.com/maximbaz/yubikey-touch-detector@main'
|
||||||
args:
|
args:
|
||||||
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
@@ -650,6 +873,7 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
path: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
become: true
|
||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
|
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
@@ -659,8 +883,8 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: add spotify apt key
|
- name: add spotify apt key
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
|
url: "https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg"
|
||||||
id: "D1742AD60D811D58"
|
id: "5E3C45D7B312C643"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: add spotify repository
|
- name: add spotify repository
|
||||||
@@ -679,7 +903,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: install spotify from AUR via paru
|
- name: install spotify from AUR via paru
|
||||||
shell: |
|
shell: |
|
||||||
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import
|
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | gpg --import
|
||||||
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
|
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
|
||||||
become: true
|
become: true
|
||||||
become_user: paru
|
become_user: paru
|
||||||
@@ -689,34 +913,6 @@
|
|||||||
|
|
||||||
tags: [spotify]
|
tags: [spotify]
|
||||||
|
|
||||||
- name: create dotfiles group
|
|
||||||
group:
|
|
||||||
name: dotfiles
|
|
||||||
state: present
|
|
||||||
become: true
|
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- name: create dotfiles user
|
|
||||||
user:
|
|
||||||
name: dotfiles
|
|
||||||
group: dotfiles
|
|
||||||
home: /var/lib/dotfiles
|
|
||||||
create_home: false
|
|
||||||
shell: /bin/bash
|
|
||||||
system: true
|
|
||||||
become: true
|
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- name: create dotfiles directory
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: /var/lib/dotfiles
|
|
||||||
owner: dotfiles
|
|
||||||
group: dotfiles
|
|
||||||
mode: '0775' # group needs write access!
|
|
||||||
become: true
|
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
users: "{{ machine.users }}"
|
users: "{{ machine.users }}"
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
ansible==4.6.0
|
|
||||||
ansible-core==2.11.5
|
|
||||||
cffi==1.14.6
|
|
||||||
cryptography==35.0.0
|
|
||||||
Jinja2==3.0.1
|
|
||||||
jmespath==0.10.0
|
|
||||||
MarkupSafe==2.0.1
|
|
||||||
packaging==21.0
|
|
||||||
pycparser==2.20
|
|
||||||
pyparsing==2.4.7
|
|
||||||
PyYAML==5.4.1
|
|
||||||
resolvelib==0.5.4
|
|
||||||
@@ -6,9 +6,13 @@ outputs:
|
|||||||
mode: 1920x1080
|
mode: 1920x1080
|
||||||
scale: 1x1
|
scale: 1x1
|
||||||
pos: "0x0" # beware of hex
|
pos: "0x0" # beware of hex
|
||||||
- name: DP-1-1
|
- name: DP-1
|
||||||
disable: true
|
disable: true
|
||||||
- name: DP-1-2
|
- name: DP-2
|
||||||
disable: true
|
disable: true
|
||||||
- name: DP-1-3
|
- name: DP-3
|
||||||
|
disable: true
|
||||||
|
- name: DP-4
|
||||||
|
disable: true
|
||||||
|
- name: DP-5
|
||||||
disable: true
|
disable: true
|
||||||
|
|||||||
21
screencfg/neptune/three-screens-laptop-right.yml
Normal file
21
screencfg/neptune/three-screens-laptop-right.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
reset: true
|
||||||
|
outputs:
|
||||||
|
- name: eDP-1
|
||||||
|
opts:
|
||||||
|
mode: 1920x1080
|
||||||
|
scale: 0.7x0.7
|
||||||
|
# x: 2*1920
|
||||||
|
# y: 1080-(0.7*1080)
|
||||||
|
pos: "3840x324" # beware of hex
|
||||||
|
- name: DP-4
|
||||||
|
opts:
|
||||||
|
mode: 1920x1080
|
||||||
|
pos: "1920x0" # beware of hex
|
||||||
|
reset: true
|
||||||
|
- name: DP-3
|
||||||
|
primary: True
|
||||||
|
opts:
|
||||||
|
mode: 1920x1080
|
||||||
|
left-of: DP-4
|
||||||
|
pos: "0x0" # beware of hex
|
||||||
|
reset: true
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Steam setting: Proton 4.11-13
|
||||||
|
#
|
||||||
|
# * It *must not* have any symlinks for the directmusic dlls like:
|
||||||
|
# pfx/dosdevices/c:/windows/syswow64/dmusic.dll
|
||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
BASEDIR=/var/games/gothic2
|
|
||||||
|
STEAMAPPS=/var/games/steamapps/
|
||||||
|
|
||||||
|
BASEDIR="${STEAMAPPS}/common/Gothic II"
|
||||||
|
|
||||||
export GAMEDATA=${BASEDIR}/data/
|
export GAMEDATA=${BASEDIR}/data/
|
||||||
export ARCHIVE=${BASEDIR}/gothic2.data.tar.zstd
|
export ARCHIVE=${BASEDIR}/gothic2.data.tar.zstd
|
||||||
export WINEPREFIX=${BASEDIR}/wineprefix
|
export WINEPREFIX="${STEAMAPPS}/compatdata/39510/pfx/"
|
||||||
export WINEARCH=win64
|
export WINEARCH=win64
|
||||||
|
|
||||||
export WINEVERSION=6.3
|
export WINEVERSION=6.3
|
||||||
@@ -17,17 +25,17 @@ DOWNLOADDIR=~/download/gothic2
|
|||||||
|
|
||||||
mkdir -p "${WINEPREFIX}"
|
mkdir -p "${WINEPREFIX}"
|
||||||
|
|
||||||
if [[ "$(wine --version)" != "wine-${WINEVERSION}" ]] ; then
|
# if [[ "$(wine --version)" != "wine-${WINEVERSION}" ]] ; then
|
||||||
printf '%s\n' "Wine version ${WINEVERSION} required" >&2
|
# printf '%s\n' "Wine version ${WINEVERSION} required" >&2
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
archive() {
|
archive() {
|
||||||
origin="$1"
|
origin="$1"
|
||||||
if [[ -e "${ARCHIVE}" ]] ; then
|
if [[ -e "${ARCHIVE}" ]] ; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
tar -cv --zstd -p -f "${ARCHIVE}" -C "$1" .
|
tar -cv --zstd -p -f "${ARCHIVE}" -C "${GAMEDATA}" .
|
||||||
}
|
}
|
||||||
|
|
||||||
extract() {
|
extract() {
|
||||||
@@ -118,16 +126,12 @@ case $1 in
|
|||||||
|
|
||||||
curl -C - -L -O "https://github.com/Kirides/GD3D11/releases/download/v17.7-dev20/Gothic2-GD3D11-v17.7-dev20.zip"
|
curl -C - -L -O "https://github.com/Kirides/GD3D11/releases/download/v17.7-dev20/Gothic2-GD3D11-v17.7-dev20.zip"
|
||||||
|
|
||||||
curl -C - -L -o Normalmaps_LHiver.zip "http://www.gothic-dx11.de/download/Normalmaps_LHiver.zip"
|
curl -C - -L -o Normalmaps_LHiver.zip "https://www.worldofgothic.de/download.php?id=1530"
|
||||||
|
|
||||||
curl -C - -L -O https://github.com/Kirides/ninja-quickloot/releases/download/v1.9.5/Quickloot.vdf
|
curl -C - -L -O https://github.com/Kirides/ninja-quickloot/releases/download/v1.9.5/Quickloot.vdf
|
||||||
|
|
||||||
curl -C - -L -O https://github.com/szapp/Ninja/releases/download/v2.7.12/Ninja-2.7.12.exe
|
curl -C - -L -O https://github.com/szapp/Ninja/releases/download/v2.7.12/Ninja-2.7.12.exe
|
||||||
|
|
||||||
laatmp=$(mktemp -d)
|
|
||||||
|
|
||||||
unzip -o LaaHack.zip -d "${laatmp}"
|
|
||||||
|
|
||||||
# winetricks -q dxvk
|
# winetricks -q dxvk
|
||||||
winetricks -q directmusic
|
winetricks -q directmusic
|
||||||
if command -v setup_dxvk >/dev/null ; then
|
if command -v setup_dxvk >/dev/null ; then
|
||||||
@@ -137,7 +141,7 @@ case $1 in
|
|||||||
winetricks dxvk
|
winetricks dxvk
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p 'During installation, use "Z:\var\games\gothic2\data" as the install directory! <Enter> to continue, <CTRL+C> to abort '
|
read -p 'During installation, use "${GAMEDATA//\//\\}" as the install directory! <Enter> to continue, <CTRL+C> to abort '
|
||||||
|
|
||||||
wine "${DOWNLOADDIR}"/g2addon-2_6.exe
|
wine "${DOWNLOADDIR}"/g2addon-2_6.exe
|
||||||
wine "${DOWNLOADDIR}"/gothic2_fix-2.6.0.0-rev2.exe
|
wine "${DOWNLOADDIR}"/gothic2_fix-2.6.0.0-rev2.exe
|
||||||
@@ -150,13 +154,26 @@ case $1 in
|
|||||||
|
|
||||||
unzip -o "${DOWNLOADDIR}"/Gothic2-GD3D11-v17.7-dev20.zip -d ./system/
|
unzip -o "${DOWNLOADDIR}"/Gothic2-GD3D11-v17.7-dev20.zip -d ./system/
|
||||||
|
|
||||||
|
ln Data/ModVDF/LHE204_DE.mod Data/LHE204_DE.mod
|
||||||
|
|
||||||
cp "${DOWNLOADDIR}"/Quickloot.vdf ./Data
|
cp "${DOWNLOADDIR}"/Quickloot.vdf ./Data
|
||||||
|
|
||||||
t="./system/GD3D11/Textures/replacements/Normalmaps_xxx"
|
t="./system/GD3D11/Textures/replacements/Normalmaps_xxx"
|
||||||
mkdir -p "${t}"
|
mkdir -p "${t}"
|
||||||
|
set +o errexit
|
||||||
unzip -o "${DOWNLOADDIR}"/Normalmaps_LHiver.zip -d "${t}"
|
unzip -o "${DOWNLOADDIR}"/Normalmaps_LHiver.zip -d "${t}"
|
||||||
|
zip_exit="$?"
|
||||||
|
set -o errexit
|
||||||
|
if (( $zip_exit != 0 )) && (( $zip_exit != 2 )) ; then
|
||||||
|
echo zip failed
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
unset t
|
unset t
|
||||||
|
|
||||||
|
laatmp=$(mktemp -d)
|
||||||
|
|
||||||
|
unzip -o "${DOWNLOADDIR}"/LaaHack.zip -d "${laatmp}"
|
||||||
|
|
||||||
read -p "For the LAA Hack, select only ${GAMEDATA}/system/Gothic2.exe [<Enter> to continue] "
|
read -p "For the LAA Hack, select only ${GAMEDATA}/system/Gothic2.exe [<Enter> to continue] "
|
||||||
wine "${laatmp}"/LaaHack.exe
|
wine "${laatmp}"/LaaHack.exe
|
||||||
rm -rf "${laatmp}"
|
rm -rf "${laatmp}"
|
||||||
@@ -165,7 +182,6 @@ case $1 in
|
|||||||
read -p "Now run the game once and exit! [<Enter> to continue] "
|
read -p "Now run the game once and exit! [<Enter> to continue] "
|
||||||
|
|
||||||
ini
|
ini
|
||||||
ln Data/ModVDF/LHE204_DE.mod Data/LHE204_DE.mod
|
|
||||||
;;
|
;;
|
||||||
ini)
|
ini)
|
||||||
ini
|
ini
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ gzip -k -f -v "${tmpdir}/dotfiles.tar"
|
|||||||
test_ares() {
|
test_ares() {
|
||||||
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
|
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
|
||||||
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
|
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
|
||||||
|
else
|
||||||
|
echo "Warning: /var/cache/pacman/pkg/ does not exist. Create it to speed up multiple runs" >&2
|
||||||
fi
|
fi
|
||||||
docker pull docker.io/library/archlinux:base
|
docker pull docker.io/library/archlinux:base
|
||||||
docker run \
|
docker run \
|
||||||
@@ -38,10 +40,10 @@ test_ares() {
|
|||||||
# At worst, the cache directory will be ignored if it does not exist
|
# At worst, the cache directory will be ignored if it does not exist
|
||||||
# Pacman will always prefer the first cache directory, so newly downloaded
|
# Pacman will always prefer the first cache directory, so newly downloaded
|
||||||
# packages will stay in the container
|
# packages will stay in the container
|
||||||
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
|
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf
|
||||||
|
|
||||||
pacman -Syu --noconfirm linux python3
|
mkdir -p /var/cache/pacman/pkg_host/
|
||||||
mkdir /var/cache/pacman/pkg_host/
|
pacman -Syu --noconfirm linux
|
||||||
cd $(mktemp -d)
|
cd $(mktemp -d)
|
||||||
tar xf /tmp/dotfiles.tar.gz -C .
|
tar xf /tmp/dotfiles.tar.gz -C .
|
||||||
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
||||||
|
|||||||
100
tmux/tmux.conf
100
tmux/tmux.conf
@@ -1,68 +1,76 @@
|
|||||||
set -g default-command "${SHELL}"
|
set-option -g default-command "${SHELL}"
|
||||||
set -g default-terminal "xterm-256color"
|
# This *has* to be set to something with `screen-`, do not set this bindly
|
||||||
|
# to $TERM, e.g. "alacritty"!
|
||||||
|
set-option -g default-terminal "screen-256color"
|
||||||
|
|
||||||
set -g set-titles on
|
set-option -g set-titles on
|
||||||
set -g set-titles-string '#S'
|
set-option -g set-titles-string '#S'
|
||||||
setw -g automatic-rename
|
set-option -g automatic-rename
|
||||||
|
|
||||||
set -g prefix C-a
|
set-option -g escape-time 0
|
||||||
unbind C-b
|
set-option -g aggressive-resize on
|
||||||
bind C-a send-prefix
|
|
||||||
|
|
||||||
unbind C-j
|
set-option -g mouse on
|
||||||
|
|
||||||
set -s escape-time 0
|
set-option -g mode-keys vi
|
||||||
set-window-option -g aggressive-resize on
|
|
||||||
|
|
||||||
set -g mouse on
|
|
||||||
|
|
||||||
set -g mode-keys vi
|
|
||||||
|
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
bind-key k confirm kill-window
|
set-option -g history-limit 50000
|
||||||
bind-key K confirm kill-server
|
|
||||||
|
|
||||||
bind h select-pane -L
|
set-option -g base-index 1
|
||||||
bind j select-pane -D
|
set-option -g pane-base-index 1
|
||||||
bind k select-pane -U
|
|
||||||
bind l select-pane -R
|
|
||||||
|
|
||||||
set -g bell-action any
|
set-option -g status-position bottom
|
||||||
|
set-option -g status-justify left
|
||||||
|
|
||||||
set -g history-limit 50000
|
# https://wiki.archlinux.org/title/tmux#256_colors
|
||||||
|
set-option -g -a terminal-overrides ",alacritty:Tc"
|
||||||
|
|
||||||
set -g base-index 1
|
set-option -g pane-border-status off
|
||||||
set-window-option -g pane-base-index 1
|
set-option -g pane-border-format ''
|
||||||
|
set-option -g -q pane-border-lines double;
|
||||||
|
set-option -g -q pane-border-indicators colour;
|
||||||
|
|
||||||
set -g status-position bottom
|
set-option -g pane-border-style "fg=#555555"
|
||||||
set -g status-justify left
|
set-option -g pane-active-border-style "fg=#e5b567"
|
||||||
|
|
||||||
|
set-option -g status-style bg=default
|
||||||
|
|
||||||
set-option -g status-bg '#272822'
|
set-option -g window-status-format ' #I: #W #F '
|
||||||
set-option -g status-fg white
|
set-option -g window-status-current-format ' #I: #W #F '
|
||||||
|
set-option -g window-status-current-style "bg=#e5b567,fg=black"
|
||||||
|
|
||||||
set-window-option -g window-status-format ' #I: #W #F '
|
set-option -g monitor-activity on
|
||||||
set-window-option -g window-status-current-format ' #I: #W #F '
|
set-option -g visual-activity off
|
||||||
|
set-option -g window-status-activity-style "bg=#ff7777,fg=black"
|
||||||
|
set-option -g monitor-bell on
|
||||||
|
set-option -g bell-action any
|
||||||
|
|
||||||
set-window-option -g monitor-activity on
|
set-option -g automatic-rename on
|
||||||
set -g visual-activity on
|
set-option -g automatic-rename-format '#{pane_current_command}'
|
||||||
|
|
||||||
set-window-option -g automatic-rename on
|
set-option -g window-status-separator ' '
|
||||||
set-window-option -g automatic-rename-format '#{pane_current_command}'
|
|
||||||
|
|
||||||
set-window-option -g window-status-separator ' '
|
set-option -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] "
|
||||||
|
set-option -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
|
||||||
|
set-option -g status-left-length 100
|
||||||
|
|
||||||
set -g status-left " #[bg=#A6E22E,fg=#000000] #{session_name} #[bg=#272822] "
|
set-option -g message-style "bg=#CCCCCC,fg=#555555"
|
||||||
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=#272822] "
|
|
||||||
set -g status-left-length 100
|
|
||||||
|
|
||||||
set -g status-style "bg=#272822,fg=#FFFFFF"
|
# Use C-a as the prefix
|
||||||
set -g message-style "bg=#CCCCCC,fg=#555555"
|
set-option -g prefix C-a
|
||||||
|
unbind-key C-b
|
||||||
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
|
bind-key h select-pane -L
|
||||||
|
bind-key j select-pane -D
|
||||||
|
bind-key k select-pane -U
|
||||||
|
bind-key l select-pane -R
|
||||||
|
|
||||||
# vertical = | in this case
|
# vertical = | in this case
|
||||||
unbind %
|
unbind-key %
|
||||||
unbind '"'
|
unbind-key '"'
|
||||||
bind-key s split-window -v -c "#{pane_current_path}"
|
bind-key s split-window -v -c "#{pane_current_path}"
|
||||||
bind-key v split-window -h -c "#{pane_current_path}"
|
bind-key v split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
@@ -75,10 +83,4 @@ bind-key -n S-down new-window
|
|||||||
bind-key -n S-left prev
|
bind-key -n S-left prev
|
||||||
bind-key -n S-right next
|
bind-key -n S-right next
|
||||||
|
|
||||||
bind-key -n C-F1 command-prompt "split-window -h 'exec man %%'"
|
|
||||||
bind-key -n C-F2 split-window -h "exec htop"
|
|
||||||
bind-key -n C-F3 set-option status
|
|
||||||
|
|
||||||
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
|
||||||
|
|
||||||
bind P paste-buffer
|
|
||||||
|
|||||||
123
user.yml
123
user.yml
@@ -302,20 +302,6 @@
|
|||||||
src: ~/.vim/autoload/plug.vim
|
src: ~/.vim/autoload/plug.vim
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
- name: get ycm version before update
|
|
||||||
shell: |
|
|
||||||
if ! [[ -d ~/.local/share/nvim/plugged/YouCompleteMe ]] ; then
|
|
||||||
exit 200
|
|
||||||
fi
|
|
||||||
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
|
||||||
git rev-parse HEAD
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
register: ycm_before_update
|
|
||||||
changed_when: false
|
|
||||||
failed_when: ycm_before_update.rc not in (0, 200)
|
|
||||||
tags: [update]
|
|
||||||
|
|
||||||
- name: install vim plugins
|
- name: install vim plugins
|
||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
|
||||||
register: vim_plugin_install
|
register: vim_plugin_install
|
||||||
@@ -329,39 +315,12 @@
|
|||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
|
||||||
register: vim_plugin_update
|
register: vim_plugin_update
|
||||||
changed_when: vim_plugin_update.stderr != ""
|
changed_when: vim_plugin_update.stderr != ""
|
||||||
tags: [update]
|
tags: [user-update]
|
||||||
|
|
||||||
- name: update go binaries for vim
|
- name: update go binaries for vim
|
||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags: [update]
|
tags: [user-update]
|
||||||
|
|
||||||
- name: get ycm version after update
|
|
||||||
shell: |
|
|
||||||
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
|
||||||
git rev-parse HEAD
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
register: ycm_after_update
|
|
||||||
changed_when: false
|
|
||||||
tags: [update]
|
|
||||||
|
|
||||||
- name: compile youcompleteme
|
|
||||||
# --force-sudo is required, as the script refuses to run in a sudo
|
|
||||||
# environment (i.e. if the SUDO_USER env variable is set). But of course,
|
|
||||||
# ansible uses that to assume the other user. It's fine.
|
|
||||||
shell: |
|
|
||||||
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
|
||||||
python3 ./install.py --force-sudo
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
register: ycm_compile_output
|
|
||||||
failed_when: ycm_compile_output.rc not in (0, 200)
|
|
||||||
when: >
|
|
||||||
(ycm_before_update.rc == 200)
|
|
||||||
or
|
|
||||||
(ycm_before_update.stdout != ycm_after_update.stdout)
|
|
||||||
tags: [update]
|
|
||||||
tags: [vim-plugins]
|
tags: [vim-plugins]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
@@ -382,7 +341,6 @@
|
|||||||
- set_fact:
|
- set_fact:
|
||||||
firefox_preferences:
|
firefox_preferences:
|
||||||
browser.aboutConfig.showWarning: false
|
browser.aboutConfig.showWarning: false
|
||||||
browser.download.useDownloadDir: false
|
|
||||||
extensions.pocket.enabled: false
|
extensions.pocket.enabled: false
|
||||||
toolkit.legacyUserProfileCustomizations.stylesheets: true
|
toolkit.legacyUserProfileCustomizations.stylesheets: true
|
||||||
browser.contentblocking.category: "strict"
|
browser.contentblocking.category: "strict"
|
||||||
@@ -414,6 +372,22 @@
|
|||||||
# "Allow Firefox to install and run studies"
|
# "Allow Firefox to install and run studies"
|
||||||
app.shield.optoutstudies.enabled: false
|
app.shield.optoutstudies.enabled: false
|
||||||
|
|
||||||
|
# "Check spelling as you type"
|
||||||
|
layout.spellcheckDefault: 0
|
||||||
|
|
||||||
|
# Ask for download directory
|
||||||
|
browser.download.useDownloadDir: false
|
||||||
|
|
||||||
|
# (Try to) disable automatic update, as firefox is pulling a Windows
|
||||||
|
app.update.auto: false
|
||||||
|
app.update.service.enabled: false
|
||||||
|
|
||||||
|
# remove this camera / microphone overlay when in calls or similar
|
||||||
|
privacy.webrtc.legacyGlobalIndicator: false
|
||||||
|
|
||||||
|
# use distro updates instead
|
||||||
|
app.update.auto: false
|
||||||
|
|
||||||
- include_role:
|
- include_role:
|
||||||
name: firefox
|
name: firefox
|
||||||
vars:
|
vars:
|
||||||
@@ -428,6 +402,14 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: check if host application file already exists
|
||||||
|
stat:
|
||||||
|
path: ~/.mozilla/native-messaging-hosts/{{ item.name }}
|
||||||
|
register: passff_file
|
||||||
|
loop:
|
||||||
|
- name: passff.json
|
||||||
|
- name: passff.py
|
||||||
|
|
||||||
- name: firefox - get passff host application
|
- name: firefox - get passff host application
|
||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
||||||
@@ -435,6 +417,8 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
|
force: false
|
||||||
|
when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists
|
||||||
loop:
|
loop:
|
||||||
- name: passff.json
|
- name: passff.json
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
@@ -444,8 +428,10 @@
|
|||||||
- name: firefox - configure path to passff
|
- name: firefox - configure path to passff
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: ~/.mozilla/native-messaging-hosts/passff.json
|
path: ~/.mozilla/native-messaging-hosts/passff.json
|
||||||
search_string: '"path": "PLACEHOLDER"'
|
regexp: '"path": ".*"'
|
||||||
line: " \"path\": \"/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py\","
|
line: " \"path\": \"{{ path }}\","
|
||||||
|
vars:
|
||||||
|
path: "/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py"
|
||||||
|
|
||||||
- name: firefox - create chrome directory
|
- name: firefox - create chrome directory
|
||||||
file:
|
file:
|
||||||
@@ -491,6 +477,7 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz
|
url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz
|
||||||
dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz"
|
dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz"
|
||||||
|
force: false
|
||||||
|
|
||||||
- name: create destination directory
|
- name: create destination directory
|
||||||
file:
|
file:
|
||||||
@@ -563,6 +550,7 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
force: false
|
||||||
|
|
||||||
- name: make kubectl executable
|
- name: make kubectl executable
|
||||||
file:
|
file:
|
||||||
@@ -579,9 +567,13 @@
|
|||||||
- kubectl
|
- kubectl
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
- set_fact:
|
||||||
|
tf_version: "{{ user.overrides.terraform_version|default(terraform_version) }}"
|
||||||
|
tf_check_updates: "{{ user.overrides.terraform_check_updates|default(terraform_check_updates)|default(true) }}"
|
||||||
|
|
||||||
- name: stat current terraform binary
|
- name: stat current terraform binary
|
||||||
stat:
|
stat:
|
||||||
path: "/home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}"
|
path: "/home/{{ user.name }}/.opt/terraform-v{{ tf_version }}"
|
||||||
register: terraform_binary
|
register: terraform_binary
|
||||||
|
|
||||||
- name: create temporary download directory for terraform
|
- name: create temporary download directory for terraform
|
||||||
@@ -592,8 +584,9 @@
|
|||||||
|
|
||||||
- name: get terraform
|
- name: get terraform
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
|
url: "https://releases.hashicorp.com/terraform/{{ tf_version }}/terraform_{{ tf_version }}_linux_amd64.zip"
|
||||||
dest: "{{ terraform_download_dir.path }}/terraform.zip"
|
dest: "{{ terraform_download_dir.path }}/terraform.zip"
|
||||||
|
force: false
|
||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: unpack terraform zip
|
- name: unpack terraform zip
|
||||||
@@ -604,7 +597,7 @@
|
|||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: install terraform
|
- name: install terraform
|
||||||
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
|
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
|
||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: clean up download directory
|
- name: clean up download directory
|
||||||
@@ -615,26 +608,28 @@
|
|||||||
|
|
||||||
- name: link terraform
|
- name: link terraform
|
||||||
file:
|
file:
|
||||||
src: /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
|
src: /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
|
||||||
dest: /home/{{ user.name }}/.optbin/terraform
|
dest: /home/{{ user.name }}/.optbin/terraform
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: get terraform version info
|
- block:
|
||||||
command: /home/{{ user.name }}/.optbin/terraform version -json
|
- name: get terraform version info
|
||||||
register: terraform_version_output
|
command: /home/{{ user.name }}/.optbin/terraform version -json
|
||||||
check_mode: false
|
register: terraform_version_output
|
||||||
changed_when: false
|
check_mode: false
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: parse terraform version output
|
- name: parse terraform version output
|
||||||
set_fact:
|
set_fact:
|
||||||
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
|
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: warn if terraform is outdated
|
- name: warn if terraform is outdated
|
||||||
fail:
|
fail:
|
||||||
msg: "current terraform v{{ terraform_version }} is out of date"
|
msg: "current terraform v{{ tf_version }} is out of date"
|
||||||
when: terraform_outdated is sameas true
|
when: terraform_outdated is sameas true
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
when: tf_check_updates
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- terraform
|
- terraform
|
||||||
|
|||||||
@@ -1,28 +1,38 @@
|
|||||||
terraform_version: 1.0.2
|
terraform_version: 1.3.6
|
||||||
kubectl_version: v1.22.3
|
kubectl_version: v1.26.0
|
||||||
go_version: "1.17.1"
|
go_version: "1.19.4"
|
||||||
portfolio_performace_version: "0.55.0"
|
portfolio_performace_version: "0.57.2"
|
||||||
cargo_crate_list:
|
cargo_crate_list:
|
||||||
- crate: just
|
- crate: just
|
||||||
binary: just
|
binary: just
|
||||||
version: 0.10.2
|
version: 1.9.0
|
||||||
- crate: ripgrep
|
- crate: ripgrep
|
||||||
binary: rg
|
binary: rg
|
||||||
version: 13.0.0
|
version: 13.0.0
|
||||||
|
features:
|
||||||
|
- pcre2
|
||||||
|
- simd-accel
|
||||||
|
toolchain: nightly # necessary for SIMD
|
||||||
|
required_packages:
|
||||||
|
- ubuntu: libpcre2-dev
|
||||||
|
archlinux: pcre2
|
||||||
- crate: fd-find
|
- crate: fd-find
|
||||||
binary: fd
|
binary: fd
|
||||||
version: 8.2.1
|
version: 8.6.0
|
||||||
- crate: bat
|
- crate: bat
|
||||||
binary: bat
|
binary: bat
|
||||||
version: 0.18.3
|
version: 0.22.1
|
||||||
- crate: exa
|
- crate: exa
|
||||||
binary: exa
|
binary: exa
|
||||||
version: 0.10.1
|
version: 0.10.1
|
||||||
- crate: watchexec-cli
|
- crate: mdbook
|
||||||
binary: watchexec
|
binary: mdbook
|
||||||
version: 1.17.1
|
version: 0.4.24
|
||||||
- url: https://github.com/hakoerber/git-repo-manager
|
- url: https://github.com/hakoerber/git-repo-manager
|
||||||
binary: grm
|
binary: grm
|
||||||
branch: master
|
branch: develop
|
||||||
source: git
|
source: git
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
|
features:
|
||||||
|
- static-build
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
|||||||
270
vim/vimrc
270
vim/vimrc
@@ -4,74 +4,38 @@ call plug#begin('~/.local/share/nvim/plugged')
|
|||||||
|
|
||||||
" === plugins ===
|
" === plugins ===
|
||||||
|
|
||||||
"Plug 'vim-airline/vim-airline'
|
function! Cond(Cond, ...)
|
||||||
"Plug 'vim-airline/vim-airline-themes'
|
let opts = get(a:000, 0, {})
|
||||||
Plug 'itchyny/lightline.vim'
|
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
||||||
Plug 'godlygeek/tabular'
|
endfunction
|
||||||
Plug 'lepture/vim-jinja'
|
|
||||||
Plug 'majutsushi/tagbar'
|
|
||||||
" Plug 'nblock/vim-dokuwiki'
|
|
||||||
Plug 'reedes/vim-pencil'
|
|
||||||
Plug 'saltstack/salt-vim'
|
|
||||||
"Plug 'sickill/vim-monokai'
|
|
||||||
Plug 'patstockwell/vim-monokai-tasty'
|
|
||||||
" Plug 'sjl/gundo.vim'
|
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
" Plug 'tpope/vim-speeddating'
|
|
||||||
" Plug 'tpope/vim-surround'
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
Plug 'junegunn/goyo.vim'
|
|
||||||
Plug 'junegunn/limelight.vim'
|
|
||||||
" Plug 'sheerun/vim-polyglot'
|
|
||||||
" Plug 'freitass/todo.txt-vim'
|
|
||||||
Plug 'Valloric/YouCompleteMe'
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides'
|
|
||||||
|
|
||||||
"Plugin 'Lokaltog/vim-easymotion'
|
" editing plugins
|
||||||
"Plugin 'PeterRincker/vim-argumentative'
|
Plug 'godlygeek/tabular', Cond(!exists('g:vscode'))
|
||||||
"Plugin 'flazz/vim-colorschemes'
|
Plug 'nathanaelkane/vim-indent-guides', Cond(!exists('g:vscode'))
|
||||||
"Plugin 'jmcantrell/vim-virtualenv'
|
Plug 'tpope/vim-commentary', Cond(!exists('g:vscode'))
|
||||||
"Plugin 'kien/ctrlp.vim'
|
Plug 'airblade/vim-gitgutter', Cond(!exists('g:vscode'))
|
||||||
"Plugin 'klen/python-mode'
|
|
||||||
"Plugin 'mbbill/undotree'
|
|
||||||
Plug 'scrooloose/nerdtree'
|
|
||||||
"Plugin 'sjl/gundo.vim'
|
|
||||||
"Plugin 'terryma/vim-expand-region'
|
|
||||||
"Plugin 'terryma/vim-multiple-cursors'
|
|
||||||
"Plugin 'wellle/targets.vim'
|
|
||||||
"Plugin 'wincent/Command-T'
|
|
||||||
Plug 'vimwiki/vimwiki'
|
|
||||||
"Plug 'blindFS/vim-taskwarrior'
|
|
||||||
" Plug 'tbabej/taskwiki'
|
|
||||||
Plug 'rodjek/vim-puppet'
|
|
||||||
Plug 'suan/vim-instant-markdown'
|
|
||||||
"Plug 'marshallward/vim-restructuredtext'
|
|
||||||
"Plug 'vim-syntastic/syntastic'
|
|
||||||
"Plug 'ElmCast/elm-vim'
|
|
||||||
"Plug 'avh4/elm-format'
|
|
||||||
|
|
||||||
Plug 'fatih/vim-go'
|
" ui
|
||||||
Plug 'hashivim/vim-terraform'
|
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
|
||||||
|
|
||||||
Plug 'editorconfig/editorconfig-vim'
|
" lang integrations
|
||||||
|
Plug 'lepture/vim-jinja', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'fatih/vim-go', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'hashivim/vim-terraform', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'editorconfig/editorconfig-vim', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'rust-lang/rust.vim', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'rodjek/vim-puppet', Cond(!exists('g:vscode'))
|
||||||
|
|
||||||
Plug 'leafgarland/typescript-vim'
|
" helpers
|
||||||
|
"" distraction free writing
|
||||||
|
Plug 'junegunn/limelight.vim', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'junegunn/goyo.vim', Cond(!exists('g:vscode'))
|
||||||
|
Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
|
||||||
|
|
||||||
Plug 'prettier/vim-prettier', { 'do': 'npm install' }
|
"" markdown
|
||||||
|
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
|
||||||
|
|
||||||
Plug 'yuezk/vim-js'
|
|
||||||
Plug 'maxmellon/vim-jsx-pretty'
|
|
||||||
|
|
||||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|
||||||
|
|
||||||
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
|
|
||||||
" Plug 'Chiel92/vim-autoformat'
|
|
||||||
|
|
||||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|
||||||
|
|
||||||
Plug 'cespare/vim-toml', { 'branch': 'main' }
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
@@ -105,7 +69,7 @@ set noerrorbells
|
|||||||
set noshowmode
|
set noshowmode
|
||||||
set numberwidth=2
|
set numberwidth=2
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set shortmess=rti
|
set shortmess=rtiF
|
||||||
set ruler
|
set ruler
|
||||||
set scrolloff=7
|
set scrolloff=7
|
||||||
set title
|
set title
|
||||||
@@ -174,6 +138,8 @@ set linebreak
|
|||||||
set wrap
|
set wrap
|
||||||
set wrapscan
|
set wrapscan
|
||||||
|
|
||||||
|
" == to use guicolors in terminal ==
|
||||||
|
set termguicolors
|
||||||
|
|
||||||
" === keybinds ===
|
" === keybinds ===
|
||||||
set pastetoggle=<F11>
|
set pastetoggle=<F11>
|
||||||
@@ -198,83 +164,53 @@ map Y y$
|
|||||||
map j gj
|
map j gj
|
||||||
map k gk
|
map k gk
|
||||||
|
|
||||||
nnoremap <C-h> <C-w>h
|
|
||||||
nnoremap <C-j> <C-w>j
|
|
||||||
nnoremap <C-k> <C-w>k
|
|
||||||
nnoremap <C-l> <C-w>l
|
|
||||||
|
|
||||||
nmap <C-n> :bnext<CR>
|
|
||||||
nmap <C-p> :bprev<CR>
|
|
||||||
|
|
||||||
map N Nzz
|
map N Nzz
|
||||||
map n nzz
|
map n nzz
|
||||||
|
|
||||||
inoremap jj <ESC>
|
inoremap jj <ESC>
|
||||||
|
|
||||||
nnoremap <leader>v <C-w>v<C-w>l
|
|
||||||
|
|
||||||
nnoremap <leader>m :InstantMarkdownPreview<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>u :GundoToggle<CR>
|
|
||||||
nnoremap <leader>d :diffupdate<CR>
|
|
||||||
|
|
||||||
nmap <F9> :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
|
|
||||||
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
|
|
||||||
|
|
||||||
nmap <leader>c :%w !xclip -selection clipboard<CR>
|
|
||||||
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
|
|
||||||
|
|
||||||
nmap <leader>f :Autoformat<CR>
|
|
||||||
|
|
||||||
" no more ex mode
|
" no more ex mode
|
||||||
nnoremap Q <nop>
|
nnoremap Q <nop>
|
||||||
|
|
||||||
" === autocommands ===
|
" Use // in visual mode to search for selection
|
||||||
|
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
|
||||||
|
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
||||||
|
|
||||||
"" autosave views when closing and restoring when opening again.
|
if exists('g:vscode')
|
||||||
"autocmd BufWinLeave *.* mkview
|
xmap gc <Plug>VSCodeCommentary
|
||||||
"autocmd BufWinEnter *.* silent loadview
|
nmap gc <Plug>VSCodeCommentary
|
||||||
|
omap gc <Plug>VSCodeCommentary
|
||||||
|
nmap gcc <Plug>VSCodeCommentaryLine
|
||||||
|
else
|
||||||
|
nnoremap <C-h> <C-w>h
|
||||||
|
nnoremap <C-j> <C-w>j
|
||||||
|
nnoremap <C-k> <C-w>k
|
||||||
|
nnoremap <C-l> <C-w>l
|
||||||
|
|
||||||
" === plugin setup ===
|
nmap <C-n> :bnext<CR>
|
||||||
|
nmap <C-p> :bprev<CR>
|
||||||
|
|
||||||
" == colorscheme ==
|
nnoremap <leader>m :InstantMarkdownPreview<CR>
|
||||||
" set background=light
|
|
||||||
" let g:solarized_termcolors=16
|
|
||||||
" let g:solarized_termtrans=1
|
|
||||||
" let g:solarized_contrast="normal"
|
|
||||||
" let g:solarized_visibility="normal"
|
|
||||||
syntax enable
|
|
||||||
silent! colorscheme vim-monokai-tasty
|
|
||||||
|
|
||||||
" == tagbar ==
|
nnoremap <leader>u :GundoToggle<CR>
|
||||||
nnoremap <F10> :TagbarToggle<CR>
|
nnoremap <leader>d :diffupdate<CR>
|
||||||
let g:tagbar_map_jump = "i"
|
|
||||||
let g:tagbar_left = 0
|
|
||||||
let g:tagbar_vertical = 0
|
|
||||||
let g:tagbar_width = 50
|
|
||||||
let g:tagbar_autoclose = 1
|
|
||||||
let g:tagbar_autofocus = 1
|
|
||||||
let g:tagbar_sort = 0 " 1: sort by name, 0: sort by position
|
|
||||||
let g:tagbar_compact = 1
|
|
||||||
let g:tagbar_indent = 2
|
|
||||||
let g:tagbar_show_linenumbers = 0
|
|
||||||
let g:tagbar_foldlevel = 99 " unfold all
|
|
||||||
|
|
||||||
" == airline ==
|
nmap <F9> :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
|
||||||
"let g:airline_right_sep = ''
|
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
|
||||||
"let g:airline_left_sep = ''
|
|
||||||
"let g:airline#extensions#disable_rtp_load = 1
|
|
||||||
"let g:airline_extensions = ['whitespace']
|
|
||||||
"let g:airline_theme='powerlineish'
|
|
||||||
"let g:airline_powerline_fonts = 1
|
|
||||||
"let g:airline_section_x = airline#section#create(['%{tagbar#currenttag("%s", "", "f")}','' , ' %{PencilMode()}', ' [', 'filetype', ']'])
|
|
||||||
"let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',}
|
|
||||||
"let g:airline#extensions#whitespace#enabled = 1
|
|
||||||
"let g:airline#extensions#whitespace#symbol = ''
|
|
||||||
"let g:airline#extensions#whitespace#checks = ['trailing']
|
|
||||||
|
|
||||||
let g:lightline = {
|
nmap <leader>c :%w !xclip -selection clipboard<CR>
|
||||||
\ 'colorscheme': 'powerline',
|
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
|
||||||
|
|
||||||
|
nmap <leader>f :Autoformat<CR>
|
||||||
|
|
||||||
|
nnoremap <leader>v <C-w>v<C-w>l
|
||||||
|
|
||||||
|
syntax enable
|
||||||
|
silent! colorscheme monokai
|
||||||
|
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
||||||
@@ -292,66 +228,44 @@ let g:lightline = {
|
|||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
function! LightLineFilename()
|
function! LightLineFilename()
|
||||||
return fnamemodify(expand('%F'), ":~:h")
|
return fnamemodify(expand('%F'), ":~:h")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" == pencil ==
|
" == pencil ==
|
||||||
let g:pencil#textwidth = 80
|
let g:pencil#textwidth = 80
|
||||||
let g:pencil#autoformat = 1
|
let g:pencil#autoformat = 1
|
||||||
let g:pencil#cursorwrap = 1
|
let g:pencil#cursorwrap = 1
|
||||||
let g:pencil#wrapModeDefault = 'soft'
|
let g:pencil#wrapModeDefault = 'soft'
|
||||||
let g:pencil#cursorwrap = 0
|
let g:pencil#cursorwrap = 0
|
||||||
|
|
||||||
" == goyo ==
|
" == goyo ==
|
||||||
let g:goyo_width = 100
|
let g:goyo_width = 100
|
||||||
let g:goyo_height = "90%"
|
let g:goyo_height = "90%"
|
||||||
let g:goyo_linenr = 0
|
let g:goyo_linenr = 0
|
||||||
|
|
||||||
" == limelight ==
|
" == limelight ==
|
||||||
let g:limelight_default_coefficient = 0.5
|
let g:limelight_default_coefficient = 0.5
|
||||||
|
|
||||||
" === functions ===
|
" === functions ===
|
||||||
function! DeleteTrailingWS()
|
function! DeleteTrailingWS()
|
||||||
exe "normal mz"
|
exe "normal mz"
|
||||||
%s/\s\+$//e
|
%s/\s\+$//e
|
||||||
exe "normal `z"
|
exe "normal `z"
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufWritePre * :call DeleteTrailingWS()
|
autocmd BufWritePre * :call DeleteTrailingWS()
|
||||||
|
|
||||||
autocmd FileType yaml set shiftwidth=2
|
autocmd FileType yaml set shiftwidth=2
|
||||||
autocmd FileType toml set shiftwidth=2
|
autocmd FileType toml set shiftwidth=2
|
||||||
set completeopt-=preview
|
autocmd FileType html setl shiftwidth=2
|
||||||
let g:ycm_add_preview_to_completeopt = 0
|
|
||||||
|
|
||||||
set completeopt-=preview
|
let g:instant_markdown_autostart = 0
|
||||||
let g:ycm_add_preview_to_completeopt = 0
|
|
||||||
|
|
||||||
let g:instant_markdown_autostart = 0
|
let g:terraform_align = 1
|
||||||
|
let g:terraform_fmt_on_save=1
|
||||||
|
|
||||||
let g:terraform_align = 1
|
let g:rustfmt_autosave = 1
|
||||||
let g:terraform_fmt_on_save=1
|
|
||||||
|
|
||||||
if has("autocmd")
|
" https://stackoverflow.com/a/8585343
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:ycm_server_python_interpreter = "python3"
|
|
||||||
|
|
||||||
au FileType html setl shiftwidth=2
|
|
||||||
|
|
||||||
" Use // in visual mode to search for selection
|
|
||||||
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
|
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
if v:version >= 700
|
|
||||||
au BufLeave * let b:winview = winsaveview()
|
|
||||||
au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" https://github.com/golang/tools/blob/master/gopls/doc/vim.md
|
|
||||||
let g:go_def_mode='gopls'
|
|
||||||
let g:go_info_mode='gopls'
|
|
||||||
|
|
||||||
" https://stackoverflow.com/a/8585343
|
|
||||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
// Place your key bindings in this file to override the defaultsauto[]
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"key": "ctrl+3",
|
|
||||||
"command": "workbench.action.terminal.focus"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
15
vscodium/install.sh
Executable file
15
vscodium/install.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
codium --install-extension ms-vscode.cpptools
|
||||||
|
codium --install-extension ms-python.python
|
||||||
|
codium --install-extension rust-lang.rust-analyzer
|
||||||
|
codium --install-extension asvetliakov.vscode-neovim
|
||||||
|
codium --install-extension monokai.theme-monokai-pro-vscode
|
||||||
|
codium --install-extension yzhang.markdown-all-in-one
|
||||||
|
codium --install-extension puppet.puppet-vscode
|
||||||
|
|
||||||
|
|
||||||
26
vscodium/keybindings.json
Normal file
26
vscodium/keybindings.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
// {
|
||||||
|
// "key": "ctrl+3",
|
||||||
|
// "command": "workbench.action.terminal.focus"
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
"key": "ctrl+alt+b",
|
||||||
|
"command": "workbench.action.toggleActivityBarVisibility"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+b",
|
||||||
|
"command": "workbench.action.toggleSidebarVisibility"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "vscode-neovim.compositeEscape1",
|
||||||
|
"key": "j",
|
||||||
|
"when": "neovim.mode == insert && editorTextFocus",
|
||||||
|
"args": "j"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "vscode-neovim.compositeEscape2",
|
||||||
|
"key": "k",
|
||||||
|
"when": "neovim.mode == insert && editorTextFocus",
|
||||||
|
"args": "k"
|
||||||
|
}
|
||||||
|
]
|
||||||
9
vscodium/product.json
Normal file
9
vscodium/product.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extensionsGallery": {
|
||||||
|
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
|
||||||
|
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
|
||||||
|
"itemUrl": "https://marketplace.visualstudio.com/items",
|
||||||
|
"controlUrl": "",
|
||||||
|
"recommendationsUrl": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,60 +1,73 @@
|
|||||||
{
|
{
|
||||||
"workbench.colorTheme": "Visual Studio Light",
|
"ansible.dockerImage": "",
|
||||||
"vim.neovimPath": "/usr/bin/nvim",
|
|
||||||
"explorer.confirmDelete": false,
|
|
||||||
"window.zoomLevel": 0,
|
|
||||||
"terraform.telemetry.enabled": false,
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"vim.gdefault": true,
|
|
||||||
"vim.visualstar": true,
|
|
||||||
"vim.enableNeovim": true,
|
|
||||||
"git.detectSubmodulesLimit": 50,
|
|
||||||
"files.autoSave": "onFocusChange",
|
|
||||||
"editor.fontFamily": "'Inconsolata','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
|
|
||||||
"editor.accessibilitySupport": "off",
|
"editor.accessibilitySupport": "off",
|
||||||
"editor.lineNumbers": "relative",
|
|
||||||
"editor.mouseWheelZoom": true,
|
|
||||||
"editor.renderWhitespace": "none",
|
|
||||||
"editor.cursorSurroundingLines": 7,
|
"editor.cursorSurroundingLines": 7,
|
||||||
"editor.minimap.renderCharacters": false,
|
"editor.fontFamily": "'Droid Sans Mono'",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.lineNumbers": "off",
|
||||||
"editor.minimap.showSlider": "always",
|
"editor.minimap.showSlider": "always",
|
||||||
"editor.minimap.size": "fill",
|
"editor.renderWhitespace": "none",
|
||||||
|
"explorer.confirmDelete": false,
|
||||||
|
"explorer.confirmDragAndDrop": false,
|
||||||
|
"explorer.incrementalNaming": "smart",
|
||||||
|
"extensions.ignoreRecommendations": true,
|
||||||
"files.eol": "\n",
|
"files.eol": "\n",
|
||||||
"files.hotExit": "off",
|
"files.hotExit": "off",
|
||||||
"files.trimFinalNewlines": true,
|
"files.trimFinalNewlines": true,
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
"workbench.enableExperiments": false,
|
"git.detectSubmodulesLimit": 50,
|
||||||
"workbench.startupEditor": "newUntitledFile",
|
|
||||||
"workbench.activityBar.visible": false,
|
|
||||||
"workbench.iconTheme": "material-icon-theme",
|
|
||||||
"workbench.tree.indent": 12,
|
|
||||||
"window.menuBarVisibility": "toggle",
|
|
||||||
"window.title": "${rootName}${separator}${dirty}${activeEditorShort}${separator}VSCode",
|
|
||||||
"explorer.confirmDragAndDrop": false,
|
|
||||||
"explorer.incrementalNaming": "smart",
|
|
||||||
"search.smartCase": true,
|
|
||||||
"extensions.ignoreRecommendations": true,
|
|
||||||
"terminal.external.linuxExec": "alacritty",
|
|
||||||
"problems.showCurrentInStatus": true,
|
|
||||||
"problems.decorations.enabled": false,
|
"problems.decorations.enabled": false,
|
||||||
"update.mode": "none",
|
"problems.showCurrentInStatus": true,
|
||||||
|
"rust-client.autoStartRls": false,
|
||||||
|
"rust-client.disableRustup": true,
|
||||||
|
"search.smartCase": true,
|
||||||
"telemetry.enableCrashReporter": false,
|
"telemetry.enableCrashReporter": false,
|
||||||
"telemetry.enableTelemetry": false,
|
"telemetry.enableTelemetry": false,
|
||||||
"ansible.dockerImage": "",
|
"terminal.external.linuxExec": "",
|
||||||
"vim.cursorStylePerMode.normal": "block",
|
"terminal.integrated.mouseWheelScrollSensitivity": 3,
|
||||||
|
"terraform.telemetry.enabled": false,
|
||||||
|
"update.mode": "none",
|
||||||
"vim.cursorStylePerMode.insert": "line",
|
"vim.cursorStylePerMode.insert": "line",
|
||||||
|
"vim.cursorStylePerMode.normal": "block",
|
||||||
"vim.cursorStylePerMode.replace": "underline",
|
"vim.cursorStylePerMode.replace": "underline",
|
||||||
"vim.easymotion": true,
|
"vim.easymotion": true,
|
||||||
|
"vim.enableNeovim": true,
|
||||||
|
"vim.gdefault": true,
|
||||||
"vim.hlsearch": true,
|
"vim.hlsearch": true,
|
||||||
"vim.leader": "<space>",
|
"vim.leader": "<space>",
|
||||||
|
"vim.neovimPath": "/usr/bin/nvim",
|
||||||
|
"vim.vimrc.enable": true,
|
||||||
|
"vim.visualstar": true,
|
||||||
|
"editor.wordWrap": "off",
|
||||||
|
"vscode-neovim.neovimExecutablePaths.linux": "/usr/bin/nvim",
|
||||||
|
"window.menuBarVisibility": "toggle",
|
||||||
|
"window.title": "[code] ${rootName}${separator}${dirty}${activeEditorShort}${separator}VSCode",
|
||||||
"workbench.colorCustomizations": {
|
"workbench.colorCustomizations": {
|
||||||
"statusBar.background": "#005f5f",
|
"statusBar.background": "#005f5f",
|
||||||
"statusBar.noFolderBackground": "#005f5f",
|
"statusBar.noFolderBackground": "#005f5f",
|
||||||
"statusBar.debuggingBackground": "#005f5f"
|
"statusBar.debuggingBackground": "#005f5f"
|
||||||
},
|
},
|
||||||
"vim.vimrc.enable": true,
|
"workbench.enableExperiments": false,
|
||||||
"editor.fontSize": 15,
|
"workbench.iconTheme": "Monokai Classic Icons",
|
||||||
"rust-client.disableRustup": true,
|
"workbench.startupEditor": "newUntitledFile",
|
||||||
"rust-client.autoStartRls": false,
|
"workbench.tree.indent": 14,
|
||||||
"terminal.integrated.mouseWheelScrollSensitivity": 3
|
"security.workspace.trust.enabled": false,
|
||||||
}
|
"scm.inputFontSize": 12,
|
||||||
|
"debug.console.fontSize": 12,
|
||||||
|
"terminal.integrated.fontSize": 12,
|
||||||
|
"files.autoSave": "onFocusChange",
|
||||||
|
"editor.fontWeight": "normal",
|
||||||
|
"editor.cursorStyle": "block",
|
||||||
|
"editor.minimap.renderCharacters": false,
|
||||||
|
"editor.minimap.size": "fit",
|
||||||
|
"workbench.colorTheme": "Monokai Classic",
|
||||||
|
"workbench.tree.renderIndentGuides": "always",
|
||||||
|
"breadcrumbs.icons": false,
|
||||||
|
"window.titleSeparator": " — ",
|
||||||
|
"explorer.excludeGitIgnore": true,
|
||||||
|
"puppet.editorService.formatOnType.enable": true,
|
||||||
|
"puppet.installType": "agent",
|
||||||
|
"puppet.installDirectory": "/usr/bin/puppet",
|
||||||
|
"window.zoomLevel": 0.1,
|
||||||
|
"workbench.activityBar.visible": false
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ _path=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for part in ${_path[@]} ; do
|
for part in ${_path[@]} ; do
|
||||||
PATH="$PATH:${part}"
|
PATH="${part}:$PATH"
|
||||||
done
|
done
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ alias twa="task add"
|
|||||||
alias twd="task done"
|
alias twd="task done"
|
||||||
alias inbox="task add +inbox"
|
alias inbox="task add +inbox"
|
||||||
|
|
||||||
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)'"
|
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump([d for d in yaml.safe_load_all(sys.stdin)][-1], sys.stdout, indent=4)'"
|
||||||
alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
|
alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
|
||||||
|
|
||||||
alias currentbranch='git rev-parse --abbrev-ref HEAD'
|
alias currentbranch='git rev-parse --abbrev-ref HEAD'
|
||||||
|
|||||||
@@ -214,3 +214,33 @@ kubectl_pod() {
|
|||||||
kubectl_deployment() {
|
kubectl_deployment() {
|
||||||
kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}'
|
kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The semver_ checks are inspired by
|
||||||
|
# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
|
||||||
|
semver_lte() {
|
||||||
|
v1="${1}"
|
||||||
|
v2="${2}"
|
||||||
|
|
||||||
|
printf '%s\n%s' "${v1}" "${v2}" | sort --version-sort --check=silent
|
||||||
|
}
|
||||||
|
|
||||||
|
semver_lt() {
|
||||||
|
v1="${1}"
|
||||||
|
v2="${2}"
|
||||||
|
|
||||||
|
semver_lte "${v1}" "${v2}" && [[ ! "${v1}" == "${v2}" ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
semver_gte() {
|
||||||
|
v1="${1}"
|
||||||
|
v2="${2}"
|
||||||
|
|
||||||
|
! semver_lt "${v1}" "${v2}"
|
||||||
|
}
|
||||||
|
|
||||||
|
semver_gt() {
|
||||||
|
v1="${1}"
|
||||||
|
v2="${2}"
|
||||||
|
|
||||||
|
! semver_lte "${v1}" "${v2}"
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,6 +19,15 @@ elif [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlightin
|
|||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
{% if user.ssh_agent %}
|
||||||
|
if ! pgrep -u "$USER" ssh-agent > /dev/null ; then
|
||||||
|
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
||||||
|
fi
|
||||||
|
if [[ ! "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
||||||
|
fi
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if distro == 'ubuntu' %}
|
{% if distro == 'ubuntu' %}
|
||||||
alias imv=imv-x11
|
alias imv=imv-x11
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user