Compare commits

..

311 Commits

Author SHA1 Message Date
f7d448f63b vim: Add TOML config 2021-11-18 12:18:13 +01:00
2a9a66fb06 Add personal repository configuration 2021-11-18 12:18:13 +01:00
a29940a65a Add GRM 2021-11-16 18:45:38 +01:00
d283bcddcd Add function to build crates directly from git 2021-11-16 18:45:31 +01:00
efb3e54dcb Always use rustup instead of rust 2021-11-01 13:12:46 +01:00
872c9314e9 Fix package list 2021-11-01 13:10:59 +01:00
84c738ce64 Update packages for ubuntu 2021-11-01 10:01:34 +01:00
d814a13602 Fix duplicated changed_when 2021-10-31 13:55:17 +01:00
35b7ff0567 Make inlcude_ tasks less spammy 2021-10-31 13:55:17 +01:00
ee10eb8779 Update kubectl to v1.22.3 2021-10-31 13:26:46 +01:00
cc69e21613 Improve idempotency 2021-10-31 13:26:46 +01:00
0c6ffc6dbd Read variables from separate file 2021-10-31 13:26:46 +01:00
c21a76907c Fix building rust crates via separate user 2021-10-31 13:09:00 +01:00
36dcdad8b7 Add ~/.cargo/bin to PATH 2021-10-31 12:52:37 +01:00
3215c88ee1 Install rustup on ubuntu 2021-10-31 12:52:37 +01:00
d2509eb0aa Cooler exa options! 2021-10-29 17:58:14 +02:00
d7305dc070 Fix laptop lid service 2021-10-29 17:45:05 +02:00
95a87d5112 Always restart services 2021-10-29 17:44:58 +02:00
9c11f4b357 Remove discord 2021-10-29 17:44:44 +02:00
05b7b53677 Do not keep binaries inside rust_build user home 2021-10-29 16:31:00 +02:00
9170f6af1d Use rustup properly to build rust binaries 2021-10-29 16:30:23 +02:00
14270d4217 Add some fancy rust cmdline programs 2021-10-29 15:50:50 +02:00
214de1d2a2 Fix font size for machines without scaling 2021-10-29 15:46:26 +02:00
8e22012b23 Configure i3 workspaces on ares 2021-10-29 15:39:54 +02:00
bf44b943ac Remove old urxvt config 2021-10-29 15:38:05 +02:00
fef4fd5ce1 Add dmideocde, required by libvirt on arch 2021-10-29 14:06:04 +02:00
2aa6073b5e Standardize capitalization of ansible task names 2021-10-29 14:06:04 +02:00
f722d06a28 Set GOROOT correctly 2021-10-29 14:06:04 +02:00
ec32037212 Fix some arch-specific "becomes" 2021-10-29 14:06:04 +02:00
375935205e Remove vim in favour of nvim 2021-10-29 14:06:03 +02:00
6b29f628db Remove signal 2021-10-25 19:44:09 +02:00
5890dd13d6 vim: Add shortcut to close buffer without closing window 2021-10-25 19:29:25 +02:00
58dd4470fa firefox: Install floccus 2021-10-25 19:10:45 +02:00
680762b999 Add ansible firefox role version 2021-10-22 23:00:25 +02:00
96ba4fd0b3 i3status: Do not report remaining battery time 2021-10-22 22:57:18 +02:00
b0b5833502 Remove unneeded scripts 2021-10-22 22:54:39 +02:00
18c73ef8f1 Try to standardize font size 2021-10-22 22:42:13 +02:00
9385652e8b Add imv alias on ubuntu 2021-10-22 22:39:02 +02:00
5198256bf7 rofi: Disable Desktop entries 2021-10-22 22:38:48 +02:00
67ac6797df Fix firefox list in autostart.target 2021-10-17 09:58:36 +02:00
7703621506 Use better vim monokai color scheme 2021-10-17 09:39:25 +02:00
0e125af3f7 Unify the "update" target 2021-10-13 08:10:36 +02:00
a9850d527c Drop dryrun target 2021-10-13 08:10:36 +02:00
cc6f4cb102 Use dotfiles group for dotfiles user 2021-10-13 08:10:36 +02:00
Hannes Körber
8d59331de5 zsh: Add docker aliases 2021-10-13 08:10:36 +02:00
Hannes Körber
066308e9ae Update alacritty default title 2021-10-13 08:10:36 +02:00
Hannes Körber
6159d33cd6 Drop terminal variable, always use alacritty 2021-10-13 08:10:36 +02:00
c70c39f28f Create a ~/tmp directory 2021-10-10 17:06:10 +02:00
468f1ee9c0 Configure firefox extensions & settings 2021-10-10 17:06:10 +02:00
bad23c0796 Set python interpreter to python3 2021-10-10 17:04:24 +02:00
d1b302a234 Add ansible firefox role 2021-10-10 17:04:19 +02:00
6fa75cad60 vim: Add vim-svelte 2021-10-06 21:02:08 +02:00
f24e48d5cd Use rustup instead of rust on arch 2021-10-06 21:02:08 +02:00
579e97a3be Remove discord from autostart 2021-10-06 21:02:08 +02:00
ba7153ce4a Add gothic install scripts 2021-10-06 21:02:08 +02:00
48d4788e55 pacman: Enable parallel downloads 2021-10-06 20:37:53 +02:00
b9b12d07a3 pulse: Install libpulse on arch 2021-10-06 20:37:53 +02:00
4c998c4a21 vim: Disable broken plugin elm-format 2021-10-03 23:22:31 +02:00
7e119171dd Use npm instead of yarn for vim plugin install 2021-10-03 23:22:31 +02:00
2f339474e8 Remove go binary install during vim plugin install 2021-10-03 23:22:31 +02:00
7d100dbbe5 Fix nvim plugin install 2021-10-03 23:22:31 +02:00
d03d13975f Move vim-plug directory creation into correct tagged block 2021-10-03 23:18:25 +02:00
cd0f9ab719 Fix setting of PATH for yubikey-touch-detector build 2021-10-03 22:57:46 +02:00
c791055d7f Remove all wallpaper-related stuff 2021-10-03 22:50:36 +02:00
9ac0a9895c Use /etc/profile for PATH 2021-10-03 22:33:28 +02:00
7aea9806ad Set PATH/GOPATH for go explicitly 2021-10-03 22:33:15 +02:00
a3e3c88204 Install go before building stuff with it 2021-10-03 22:32:52 +02:00
5cbbf5e777 Add go directory to PATH 2021-10-03 21:51:22 +02:00
4b442be5ac Remove unused path from PATH 2021-10-03 21:40:25 +02:00
87d8a43119 Install go manually 2021-10-03 21:40:25 +02:00
3f9dd1a39a Get rid of snap 2021-10-03 21:38:29 +02:00
91a3099822 Drop "--sync" from nvim plugin commands 2021-10-03 18:48:03 +02:00
78ec2715bd Remove duplicate manpage package definition 2021-10-03 18:32:14 +02:00
cd937acc60 Update portfolioperformance to v0.55.0 2021-10-03 15:51:14 +02:00
c0b9631ecf Use ~/.go as GOPATH 2021-10-03 15:48:38 +02:00
06e2e847e9 Install spotify via paru on arch 2021-10-03 15:44:59 +02:00
a14e884302 Add separate paru user for installs 2021-10-03 15:44:48 +02:00
d719481f4d Fix running mkinitcpio in docker 2021-10-03 15:25:35 +02:00
3bb8f8bd56 Install signal on arch 2021-10-03 15:13:42 +02:00
a71f9b7bc5 Update vim plugin installations 2021-10-03 14:41:35 +02:00
3cf49371e1 Install kernel in ares testing container 2021-10-03 13:29:08 +02:00
69f6ba29fc Install pass wrapper in .optbin 2021-10-03 12:55:22 +02:00
52525ba8ce Add test scripts for mars 2021-10-03 12:55:12 +02:00
19ca3f7980 Add vim plugin update 2021-10-03 12:30:09 +02:00
cf12e48c41 Add pass wrapper to check out store 2021-10-03 12:24:11 +02:00
b2b80a7ba4 Make kubectl executable after download 2021-10-03 12:09:09 +02:00
903f6975fc alacritty: Fix config 2021-10-03 11:48:45 +02:00
Hannes Körber
284387581e Fix youcompleteme output file path 2021-10-03 11:34:53 +02:00
1e05fe61f0 Add new machine "mars" 2021-10-03 11:07:44 +02:00
9f4cebde56 Only use iptables hack on arch 2021-10-03 11:07:35 +02:00
296f3e9f76 bin: Add time tracking entrypoint 2021-10-03 09:55:05 +02:00
bd7c4d270d vim: configure go module 2021-10-03 09:55:05 +02:00
617f63ed17 vim: Add autoformat shortcut 2021-10-03 09:55:05 +02:00
5ba2bda934 vim: Add clipboard commands 2021-10-03 09:55:05 +02:00
73c18fa7b7 vim: Add JS/JSX plugins 2021-10-03 09:55:04 +02:00
546c08a28e vim: Add editorconfig plugin 2021-10-03 09:55:04 +02:00
40f08b3783 i3: Add pim_toggle with switchback 2021-10-03 09:55:04 +02:00
90fd75b2ba Cleanup tempdir AFTER it is no longer used 2021-10-02 13:07:29 +02:00
442e6e0986 Decommission tb-hak machine 2021-10-02 13:05:51 +02:00
be07205cbb Fix syntax error in temp file cleanup 2021-10-02 13:04:10 +02:00
0c1ddd96c3 Remove sambashare group on ubuntu 2021-10-02 13:00:20 +02:00
abd7b450c9 Remove lpadmin group on ubuntu 2021-10-02 12:59:29 +02:00
7b92000dde testing: Enable selecting of host 2021-10-02 12:56:11 +02:00
7f5e51651a Skip waiting for input during testing 2021-10-02 12:55:56 +02:00
f9cbe9fbea Create cache directory on arch 2021-10-02 12:54:59 +02:00
ab75df4095 Do no install neovim PPA 2021-10-02 12:54:39 +02:00
2668f4ffad packages: Remove anki 2021-10-02 12:54:24 +02:00
1e706c8ed9 Fix iptables install on arch 2021-10-02 12:54:11 +02:00
4f0f775a5d Update apt package lists during bootstrap 2021-10-02 12:28:37 +02:00
c737c3a0f4 Only checkout submodules if in git 2021-10-02 12:20:19 +02:00
fd3c106b29 Add testing for neptune 2021-10-02 12:12:48 +02:00
1405b0621d Update ansible to v4.6.0 2021-10-02 12:10:37 +02:00
75af2aba0f Do initial passwordstore checkout 2021-10-02 12:02:36 +02:00
65455aff68 Add personal gpg key configuration 2021-10-02 12:02:24 +02:00
da77ab91c7 Add dedicated dotfiles user 2021-10-02 11:32:47 +02:00
03fbae33e4 zsh: Use python3 for aliases 2021-10-02 11:32:47 +02:00
f844c3cc48 Add new machine "neptune" 2021-10-02 11:32:47 +02:00
f88cbf2a32 Specify alacritty config file explicilty 2021-10-02 11:26:52 +02:00
adb32321a3 Fix typo for feature file 2021-10-02 11:26:52 +02:00
18b32adfc9 vim: Remove elm-vim 2021-10-02 11:26:52 +02:00
8f850ec2c8 Manage terraform binary 2021-10-02 11:26:52 +02:00
73fe37e50f Update warning on outdated kubectl 2021-10-02 11:26:52 +02:00
5e8820da53 Update kubectl 2021-10-02 11:26:52 +02:00
7e0a937516 PP: Remove temporary directory after download 2021-10-02 11:26:52 +02:00
ea1b3ecc3d YCM: Update compiled *.so path 2021-10-02 11:26:52 +02:00
b4f502e964 Update gpg-agent service blacklist 2021-10-02 11:07:33 +02:00
f84ed5f28d Install signal via third-party repo on ubuntu 2021-10-02 11:07:19 +02:00
89799c2ccd Install spotify via third-party repo on ubuntu 2021-10-02 11:07:14 +02:00
c51a326278 Build yubikey-touch-detector on ubuntu 2021-10-02 11:06:49 +02:00
cedecc54b9 Build alacritty on ubuntu 2021-10-02 11:06:08 +02:00
0b01fd236e ansible: Use correct "state" for package module 2021-10-02 11:04:22 +02:00
6e518966e0 gpg: Run agent conditionally 2021-10-02 11:03:45 +02:00
e8f2888ead packages: Add ncdu 2021-10-02 11:02:42 +02:00
d9bb925581 packages: Install synaptics packages 2021-10-02 11:02:27 +02:00
eac0c05a56 packages: Do not install terraform on ubuntu 2021-10-02 11:01:53 +02:00
ea512bb92d packages: Install maim on ubuntu 2021-10-02 11:01:37 +02:00
06bdbb608c packages: Install playerctl on ubuntu 2021-10-02 11:01:31 +02:00
d5c8aaa6d8 packages: Install stress on ubuntu 2021-10-02 11:01:22 +02:00
60667c81a2 packages: Install nextcloud on ubuntu 2021-10-02 11:01:14 +02:00
c194f06137 packages: Install man on ubuntu 2021-10-02 11:01:04 +02:00
f93ce57d11 packages: Install imv on ubuntu 2021-10-02 11:00:47 +02:00
cc3dcb9979 packages: Update musescore package name on ubuntu 2021-10-02 11:00:37 +02:00
d0c39c4dc6 packages: Install ssh on ubuntu 2021-10-02 11:00:06 +02:00
42b8685182 packages: Install virtualbox on arch 2021-10-02 10:59:54 +02:00
e369cf1917 packages: Add package required for openconnect on ubuntu 2021-10-02 10:59:35 +02:00
10dd7a588e packages: Add required packages for yubikey on ubuntu 2021-10-02 10:59:10 +02:00
b733b560b8 packages: Remove shutter 2021-10-02 10:58:47 +02:00
55b494a045 packages: Remove chrome & chromium 2021-10-02 10:58:37 +02:00
db7e251b94 packages: Add libvirt on ubuntu 2021-10-02 10:58:02 +02:00
76de35c9a0 packages: Add pdf tooling for ubuntu 2021-10-02 10:57:51 +02:00
73a26bb372 packages: Add fonts for ubuntu 2021-10-02 10:57:30 +02:00
7eefa3c800 packages: Add docker-compose for ubuntu 2021-10-02 10:57:21 +02:00
959dc9dd80 packages: Install cmake on ubuntu 2021-10-02 10:56:59 +02:00
614e3434e8 Bootstrap required venv python module 2021-10-02 10:56:14 +02:00
c9d1fa8b0f Bootstrap submodules 2021-10-02 10:55:53 +02:00
fa756766e5 py3status: Disable manual click events
The modules already support the click events natively.
2021-10-02 10:55:26 +02:00
4f4a9b919f i3: Remove scratchpad bindings 2021-10-02 10:55:10 +02:00
d086928ecc i3: Move screenshot hotkey 2021-10-02 10:55:01 +02:00
6008fb53db firefox: Enable multiple instances 2021-10-02 10:54:42 +02:00
3fceca6d87 alacritty: Set TERM 2021-10-02 10:53:54 +02:00
aea05be674 Enable yubikey-touch-detector conditionally 2021-10-02 10:53:46 +02:00
b9a9097f95 autostart: Template the autostart target unit file 2021-10-02 10:52:59 +02:00
d9dd1e7acf Bootstrap venv via Makefile 2021-10-02 10:52:00 +02:00
2018e47525 zsh: Remove GO* env variables 2021-09-25 19:11:59 +02:00
d946aa4b4c vim: Fix YCM compilation 2021-09-25 19:11:59 +02:00
408595d7e1 ansible: Fix systemd user unit masking 2021-09-25 19:11:59 +02:00
b924e780c3 i3: Move spotify to the very left of i3bar 2021-09-25 19:11:59 +02:00
e3158e02e4 i3: Add mic toggle mapping 2021-09-25 19:11:59 +02:00
a706259322 i3: Remap floating toggle 2021-09-25 19:11:59 +02:00
20f7fe43d2 git: ff-only on pull 2021-09-25 19:11:59 +02:00
b678d929ff dunst: Move window to bottom 2021-09-25 19:11:59 +02:00
9e5d3c5262 alacritty: Enable dynamic titles 2021-09-25 19:11:59 +02:00
cad6720173 Merge pull request #5 from hakoerber/dependabot/pip/cryptography-3.3.2
build(deps): bump cryptography from 3.2.1 to 3.3.2
2021-06-02 12:54:03 +02:00
0866a310cc Merge pull request #8 from hakoerber/dependabot/pip/ansible-2.10.7
build(deps): bump ansible from 2.10.4 to 2.10.7
2021-06-02 12:53:59 +02:00
dependabot[bot]
a35d7d78e1 build(deps): bump ansible from 2.10.4 to 2.10.7
Bumps [ansible](https://github.com/ansible/ansible) from 2.10.4 to 2.10.7.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/compare/v2.10.4...v2.10.7)

---
updated-dependencies:
- dependency-name: ansible
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 21:55:57 +00:00
2128028113 packages: Add terraform 2021-04-20 20:19:41 +02:00
cc6a0673b9 packages: Add some python modules 2021-04-20 20:19:41 +02:00
c859f7f76c Install mkinitcpio in arch 2021-04-20 20:19:41 +02:00
1907fb2547 Limit memory usage of nextcloud 2021-04-20 20:19:41 +02:00
7b20ee2875 Fix libvirt setup on arch 2021-04-20 20:19:41 +02:00
513e401099 Optimize pacman caching in docker test script 2021-04-20 20:19:41 +02:00
1b22fe6116 testscript: Clean up tmpdir 2021-04-20 20:19:41 +02:00
c6a056b77c Deprecate fedora 2021-04-20 20:19:41 +02:00
236954d557 Add script to detect missing packages in list 2021-04-20 20:19:41 +02:00
f1c9e4a6f3 zsh: Use yaml.safe_load for yaml2json 2021-04-20 20:19:41 +02:00
c12185af79 Refactor docker testing script 2021-04-20 20:19:41 +02:00
57d3c570c0 i3: Remove deprecated wallchanger hotkeys 2021-04-20 20:19:41 +02:00
8d3a4ff778 i3: Add screenshot config 2021-04-20 20:19:41 +02:00
ffb295d858 Install maim 2021-04-20 20:19:41 +02:00
fb3c3d8c19 Fix screencfg for ares 2021-04-20 20:19:41 +02:00
41abaf2533 zsh: Suppress warnings in "embiggen" 2021-04-20 20:19:41 +02:00
b83ced88a5 zsh: Remove duplicate "embiggen" function 2021-04-20 20:19:41 +02:00
9723753b5b Install pdf packages 2021-04-20 20:19:41 +02:00
d2d2ddace4 gtk: Update font size calculation 2021-04-20 20:19:41 +02:00
dependabot[bot]
eb31b393e9 build(deps): bump cryptography from 3.2.1 to 3.3.2
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2.1 to 3.3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.2.1...3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-08 16:06:49 +00:00
d74d7866ff Merge pull request #6 from hakoerber/dependabot/pip/jinja2-2.11.3
build(deps): bump jinja2 from 2.11.2 to 2.11.3
2021-04-08 18:06:03 +02:00
75fdf52586 Merge pull request #7 from hakoerber/dependabot/pip/pyyaml-5.4
build(deps): bump pyyaml from 5.3.1 to 5.4
2021-04-05 13:35:05 +02:00
dependabot[bot]
bdb0fd00bd build(deps): bump pyyaml from 5.3.1 to 5.4
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 21:39:37 +00:00
dependabot[bot]
2ae40edccc build(deps): bump jinja2 from 2.11.2 to 2.11.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 21:55:59 +00:00
825ff4e770 Add signal autostart 2021-02-01 20:40:14 +01:00
2b9d974659 Add element autostart 2021-02-01 20:40:14 +01:00
2895c33fbc i3: Force steam to workspace 5 2021-01-31 16:08:42 +01:00
5c3cf1b887 Disable restic on private account on tb-hak 2021-01-30 21:28:18 +01:00
a0968ba34a x: Import the environment on startup
This is required to set the DISPLAY variable correctly.
2021-01-30 21:25:28 +01:00
71a0886d46 autostart: Update "Type" of i3 service
"exec" is not available on Ubuntu 18.04, and it does not help to resolve
the ordering problem anyway.
2021-01-30 21:23:52 +01:00
Hannes Körber
83c9d72afe Make gpg ssh support configurable 2021-01-30 21:06:53 +01:00
Hannes Körber
39b45df38e autostart: Remove hardcoded DISPLAY 2021-01-30 21:06:53 +01:00
Hannes Körber
55477c5919 Install pydbus on ubuntu 2021-01-30 21:06:53 +01:00
Hannes Körber
fd2a274668 Add workaround for old ubuntu systemd 2021-01-30 21:06:53 +01:00
Hannes Körber
613f249f64 Remove old screencfg config 2021-01-27 16:45:33 +01:00
Hannes Körber
9ac25a152d i3: Add shortcuts for screenconfigs 2021-01-27 16:45:33 +01:00
Hannes Körber
735568adfa Update screenconfigs 2021-01-27 16:45:33 +01:00
Hannes Körber
5a803a578b screencfg: Support additional --set parameters 2021-01-27 16:45:33 +01:00
Hannes Körber
818ac7ef8c screencfg: Use yaml.safe_load() 2021-01-27 15:50:57 +01:00
Hannes Körber
c22d769ab5 zsh: Do not export TERMBIN, not needed 2021-01-27 15:18:57 +01:00
Hannes Körber
96765dbf76 tmux: Use generic default-terminal 2021-01-27 15:18:41 +01:00
Hannes Körber
6f2e7d20b4 qt: Remove unneeded options 2021-01-27 15:18:32 +01:00
Hannes Körber
b742d63193 ubuntu: Add more theming packages 2021-01-27 15:18:24 +01:00
Hannes Körber
d78ba65063 tb-hak: Switch to alacritty 2021-01-27 15:18:16 +01:00
Hannes Körber
7231b614fa gtk: Use font_size 2021-01-27 15:18:03 +01:00
Hannes Körber
f174a4e558 Make autostart ubuntu-compatible 2021-01-27 15:17:45 +01:00
Hannes Körber
8c18407688 restic: Do backups only once per day 2021-01-27 15:16:32 +01:00
Hannes Körber
a396c0c739 Fix failure during check run 2021-01-27 14:21:58 +01:00
Hannes Körber
d6ecdeb796 Add more packages for ubuntu 2021-01-22 08:43:29 +01:00
420fc3634b git: Use "master" as default branch 2021-01-17 22:10:35 +01:00
4517d64139 mypass: Add functionality to get multiple values 2021-01-17 22:10:26 +01:00
cfa44d0d08 Add tasktrack script 2021-01-17 22:09:54 +01:00
47e8141a20 i3: Add more workspace assignments 2021-01-13 23:57:50 +01:00
8c5ba7be74 Add some one-off scripts 2021-01-13 23:55:58 +01:00
ef2d703f00 Add simple script for markdown to pdf conversion 2021-01-13 23:52:50 +01:00
0a842d081c vim: Disable taskwiki plugin 2021-01-13 23:52:28 +01:00
c4c10af088 portfolio-performance: Update to v0.50.0 2021-01-13 23:52:20 +01:00
be0ac628f7 Install required latex packages for pandoc 2021-01-13 23:51:48 +01:00
3bbace6bd7 firefox: Update profile name 2021-01-13 23:51:35 +01:00
e4aac7dc75 alacritty: Fix clipboard 2021-01-13 23:51:27 +01:00
e559f28aab packages: Install gnome-keyring 2021-01-06 00:35:07 +01:00
d3f1b61206 packages: Add passff-host 2021-01-06 00:34:59 +01:00
cb1bc8d92f i3: Update workspace assignments 2021-01-06 00:34:46 +01:00
7669851bbd Fix output names in ares 2021-01-06 00:34:29 +01:00
602d3e0f45 Use pinentry-qt for gpg 2021-01-06 00:34:16 +01:00
f1f1e8f041 Add gnome-keyring to autostart 2021-01-06 00:20:52 +01:00
806f83e410 Update playerctl to always use spotify where needed 2021-01-01 14:21:42 +01:00
262b4477d2 git: Add URL overwrite for gitea 2020-12-30 22:46:49 +01:00
6c3e9d7469 Include steam and discord in autostart target 2020-12-30 22:41:00 +01:00
610edcc72d Do autostart explicitly on startup 2020-12-30 22:37:09 +01:00
66bb04ee9a Install mpv on arch 2020-12-30 22:36:51 +01:00
0043122f62 Add wrappers for env-based kubectl calls 2020-12-30 22:36:45 +01:00
afdd8fb34c Remove debug tag from user playbook 2020-12-26 13:01:57 +01:00
4e1f071240 Use poppler for zathura on arch 2020-12-26 13:01:34 +01:00
39ef8a418e autostart: Add steam and discord 2020-12-26 13:01:12 +01:00
ab15b22832 Run i3 as a systemd user unit 2020-12-26 12:59:03 +01:00
1d12b99907 py3status: Update bar on presentation mode toggle 2020-12-20 22:02:40 +01:00
5c74a8644b py3status: Update coloring 2020-12-20 22:02:23 +01:00
a0561f2278 i3: Use playerctl instead of raw dbus 2020-12-20 21:52:25 +01:00
465a84f86f Install imagemagick 2020-12-20 21:49:14 +01:00
6345fb55d9 Install MPRIS tooling 2020-12-20 21:48:59 +01:00
a3579df581 Add autostart unit to set DPMS parameters 2020-12-20 21:48:31 +01:00
f182524889 Simplify i3lock script 2020-12-20 21:48:19 +01:00
9a40058566 py3status: Better icons for internet connectivity 2020-12-20 20:54:29 +01:00
d5eec81960 py3status: Add icons for redshift & spotify 2020-12-20 20:54:28 +01:00
ba9654edc3 kubectl: Update v1.20.0 -> v1.20.1 2020-12-20 20:38:00 +01:00
a0a9a34aa9 paru: Fix installation 2020-12-20 20:37:43 +01:00
d84405aa6f Install tk for gitk to work on arch 2020-12-20 20:37:23 +01:00
e5df70463e i3: Clean up config 2020-12-20 20:37:13 +01:00
26097f865b Make screencfg script more verbose 2020-12-20 20:37:07 +01:00
0f36baf30c Use persistent systemd units for autostart 2020-12-20 20:36:27 +01:00
f4fbae6683 portfolio-performance: Update 0.47.0 -> 0.49.4 2020-12-19 16:48:36 +01:00
00fec0f1c1 Create tempdir only if necessary 2020-12-14 16:00:56 +01:00
57e24abfc1 Add screencfgs 2020-12-14 13:53:52 +01:00
36d601f30f Add config for GTK and QT 2020-12-14 13:42:38 +01:00
76197ef7b7 Install linux-zen on arch 2020-12-14 12:12:05 +01:00
fca57baaf3 Remove virtualbox on arch 2020-12-14 12:11:19 +01:00
f377f19637 Resize arch boot partition 2020-12-14 12:11:12 +01:00
f9a1938d8b Add user to "games" group on arch 2020-12-12 13:27:11 +01:00
a27cfd8670 Install emoji font 2020-12-12 13:27:02 +01:00
9983b8336c Set font size in dunst 2020-12-12 13:26:55 +01:00
b654b73920 Install stress 2020-12-12 13:26:42 +01:00
802be27107 Enable yubikey-touch-detector 2020-12-12 13:26:42 +01:00
f99f22e3e6 Enable pcscd service for yubikeys 2020-12-11 20:13:35 +01:00
e8a14fcbd3 Fix install of paru dependency installation 2020-12-11 20:13:35 +01:00
ee60b34277 Install python-dbus for spotify in py3status 2020-12-11 20:13:35 +01:00
0b111b88fe Fix rofi prompts 2020-12-11 20:13:35 +01:00
43efd64ac1 i3status: Use new format of wifi module 2020-12-11 20:13:35 +01:00
2dc1b6387e Fix systemd user unit names in scripts 2020-12-11 20:13:35 +01:00
6ede93b0e9 Install "pv" 2020-12-11 18:49:37 +01:00
8593ca90c6 Set wallpaper immediately on startup 2020-12-11 18:49:31 +01:00
64bf3e9bf4 Install build dependencies for paru 2020-12-11 18:18:15 +01:00
d298ba4282 Install sudo for "become" on arch 2020-12-11 18:04:14 +01:00
6a6aab3a88 Build AUR packages as separate user on arch 2020-12-11 17:53:32 +01:00
ada9eb9475 Update appmenu prompt 2020-12-11 11:06:26 +01:00
54d695df00 i3: Update shutdown menu 2020-12-10 17:34:56 +01:00
ec7671c735 Add config for rofi setting theme 2020-12-10 16:19:47 +01:00
98e8737e81 git: Default to git pull --rebase 2020-12-10 16:04:39 +01:00
3a257f6884 i3: Retire dmenu in favor of rofi 2020-12-10 16:02:57 +01:00
e0439c8f54 tmux: Update status colors 2020-12-10 03:59:07 +01:00
ac1f2a7cdb Fix wrong linking for kubectl 2020-12-10 03:27:43 +01:00
a17969b851 Clean up tmux config 2020-12-10 03:24:46 +01:00
fc02c4f47d Set font size in alacritty 2020-12-10 03:03:50 +01:00
7b5d98e23c Enable neovim python support in arch 2020-12-10 03:01:21 +01:00
2a0c0e44ca Add alacritty config 2020-12-10 02:55:56 +01:00
10b5092531 Use alacritty instead of urxvt 2020-12-10 02:44:30 +01:00
a2ff7db28f i3bar: Update spacing between icons and text 2020-12-10 02:40:38 +01:00
d733b0342a Expand theming for Qt/GTK 2020-12-10 02:40:38 +01:00
415b0a0461 vim: Disable taskwarrior plugin 2020-12-10 02:03:49 +01:00
a8436401b6 Do not report changes on cache cleanup 2020-12-10 02:03:49 +01:00
2234e24d4e Install paru on arch 2020-12-10 02:03:49 +01:00
7a5a70c973 Install base-devel in arch 2020-12-09 23:58:11 +01:00
735b9de79b Add wallpaper config for arch 2020-12-09 23:09:19 +01:00
c41460e4a2 Fix /var/lib/dotfiles permissions after install 2020-12-09 22:35:23 +01:00
c09f660884 Add missing py3status modules for arch 2020-12-09 22:32:18 +01:00
e1ab60d15a i3: Create logdir if it does not exist 2020-12-09 22:29:49 +01:00
88 changed files with 3415 additions and 874 deletions

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "contrib/vim-plug"] [submodule "contrib/vim-plug"]
path = contrib/vim-plug path = contrib/vim-plug
url = https://github.com/junegunn/vim-plug url = https://github.com/junegunn/vim-plug
[submodule "ansible_roles/firefox"]
path = ansible_roles/firefox
url = https://github.com/staticdev/ansible-role-firefox

View File

@@ -3,19 +3,15 @@ requirements = requirements.txt
activate = . $(venv)/bin/activate activate = . $(venv)/bin/activate
pip = pip pip = pip
ansible = venv/bin/ansible-playbook ansible = venv/bin/ansible-playbook
ansible_run = $(activate) && ansible-playbook --inventory localhost, --diff --verbose ./playbook.yml ${ANSIBLE_EXTRA_ARGS} 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: $(ansible) all: | venv $(ansible)
$(ansible_run) $(ansible_run)
.PHONY: dryrun
dryrun: $(ansible)
$(ansible_run) --check
.PHONY: update .PHONY: update
update: $(ansible) update: $(ansible)
$(ansible_run) --tags update_system $(ansible_run) --tags update
.PHONY: reboot .PHONY: reboot
reboot: reboot:

View File

@@ -1,6 +1,4 @@
font_size: 10 font_size: 12
letter_space: 0
terminal_binary: urxvt
gpu: amd gpu: amd
@@ -8,33 +6,55 @@ users:
- name: hannes - name: hannes
vt: 1 vt: 1
firefox_profiles: firefox_profiles:
- name: lu9k8ywl.default default:
extensions:
- ublock-origin
- passff
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
- floccus
manage_css: true manage_css: true
mail: hannes@hkoerber.de mail: hannes@hkoerber.de
git_gpg_sign: false git_gpg_sign: false
gpg_agent: true gpg_agent: true
gpg_keys: gpg_agent_for_ssh: true
master_key: "0xB5C002530C6A2053" gpg_key:
email: hannes@hkoerber.de
id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment: environment:
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
has_yubikey: true
repositories:
- personal_projects
screen: screen:
1: eDP-1 1: DisplayPort-0
2: eDP-1 2: DisplayPort-0
3: eDP-1 3: DisplayPort-0
4: eDP-1 4: DisplayPort-0
5: eDP-1 5: DisplayPort-0
6: eDP-1 6: DisplayPort-0
7: eDP-1 7: DisplayPort-0
8: eDP-1 8: DisplayPort-0
9: eDP-1 9: DisplayPort-0
0: eDP-1 0: DisplayPort-0
screencfgs: []
workspace: workspace:
1: www
9: comm
10: music
environment: environment:
MACHINE_TYPE: "workstation"
MACHINE_HAS_KEEPASSX: "false" MACHINE_HAS_KEEPASSX: "false"
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_STEAM: "true"
MACHINE_HAS_RESTIC_BACKUP: "false" MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_SPOTIFY: "true" MACHINE_HAS_ELEMENT: "true"
MACHINE_HAS_TOUCHPAD: "false" MACHINE_RESOLUTION_X: "2560"
MACHINE_RESOLUTION_Y: "1440"

90
_machines/mars.yml Normal file
View File

@@ -0,0 +1,90 @@
font_size: 12
users:
- name: hannes-work
group: hannes-work
vt: 1
firefox_profiles:
default:
extensions:
- ublock-origin
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
manage_css: true
meet:
extensions:
- ublock-origin
manage_css: false
mail: hannes.koerber@tradebyte.com
git_gpg_sign: false
gpg_agent: false
gpg_agent_for_ssh: false
environment:
MACHINE_HAS_NEXTCLOUD: "false"
MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_HAS_ELEMENT: "false"
MACHINE_HAS_KEEPASSX: "true"
has_yubikey: false
repositories: []
- name: hannes-private
group: hannes-private
vt: 2
firefox_profiles:
default:
extensions:
- ublock-origin
- passff
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
- floccus
manage_css: true
mail: hannes@hkoerber.de
git_gpg_sign: false
gpg_agent: true
gpg_agent_for_ssh: true
gpg_key:
email: hannes@hkoerber.de
id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment:
MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_ELEMENT: "true"
MACHINE_HAS_KEEPASSX: "false"
has_yubikey: true
repositories:
- personal_projects
screen:
1: DP-1-1
2: DP-1-1
3: DP-1-2
4: DP-1-2
5: DP-1-2
6: DP-1-2
7: eDP-1
8: eDP-1
9: eDP-1
0: eDP-1
workspace:
1: www
2: www
3: term-local
4: term-remote
7: comm
8: pass
9: music
10: pim
screencfgs:
- name: three-screens
key: F3
environment:
MACHINE_TYPE: "laptop"
MACHINE_RESOLUTION_X: "1920"
MACHINE_RESOLUTION_Y: "1080"

90
_machines/neptune.yml Normal file
View File

@@ -0,0 +1,90 @@
font_size: 12
users:
- name: hannes-work
group: hannes-work
vt: 1
firefox_profiles:
default:
extensions:
- ublock-origin
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
manage_css: true
meet:
extensions:
- ublock-origin
manage_css: false
mail: hannes.koerber@tradebyte.com
git_gpg_sign: false
gpg_agent: false
gpg_agent_for_ssh: false
environment:
MACHINE_HAS_NEXTCLOUD: "false"
MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_HAS_ELEMENT: "false"
MACHINE_HAS_KEEPASSX: "true"
has_yubikey: false
repositories: []
- name: hannes-private
group: hannes-private
vt: 2
firefox_profiles:
default:
extensions:
- ublock-origin
- passff
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
- floccus
manage_css: true
mail: hannes@hkoerber.de
git_gpg_sign: false
gpg_agent: true
gpg_agent_for_ssh: true
gpg_key:
email: hannes@hkoerber.de
id: "0xB5C002530C6A2053"
fingerprint: "973AE48D71B76735C4712B5BB5C002530C6A2053"
enable_passwordstore: true
environment:
MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_ELEMENT: "true"
MACHINE_HAS_KEEPASSX: "false"
has_yubikey: true
repositories:
- personal_projects
screen:
1: DP-1-1
2: DP-1-1
3: DP-1-2
4: DP-1-2
5: DP-1-2
6: DP-1-2
7: eDP-1
8: eDP-1
9: eDP-1
0: eDP-1
workspace:
1: www
2: www
3: term-local
4: term-remote
7: comm
8: pass
9: music
10: pim
screencfgs:
- name: three-screens
key: F3
environment:
MACHINE_TYPE: "laptop"
MACHINE_RESOLUTION_X: "1920"
MACHINE_RESOLUTION_Y: "1080"

View File

@@ -1,54 +0,0 @@
font_size: 11
letter_space: 0
terminal_binary: urxvt
users:
- name: hannes-work
group: hak
vt: 1
firefox_profiles:
- name: 3wmp9hdb.default-1565075150057
manage_css: true
mail: hannes.koerber@tradebyte.com
git_gpg_sign: false
gpg_agent: false
environment:
MACHINE_HAS_NEXTCLOUD: "false"
- name: hannes-private
group: tpp
vt: 2
mail: hannes@hkoerber.de
git_gpg_sign: false
gpg_agent: true
gpg_keys:
master_key: "0xB5C002530C6A2053"
environment:
MACHINE_HAS_NEXTCLOUD: "true"
screen:
1: DP-1-1
2: DP-1-1
3: DP-1-2
4: DP-1-2
5: DP-1-2
6: DP-1-2
7: eDP-1
8: eDP-1
9: eDP-1
0: eDP-1
workspace:
1: www
2: www
3: term-local
4: term-remote
7: comm
8: pass
9: music
10: pim
environment:
MACHINE_HAS_KEEPASSX: "true"
MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_HAS_SPOTIFY: "true"
MACHINE_HAS_TOUCHPAD: "true"

702
alacritty/alacritty.yml.j2 Normal file
View File

@@ -0,0 +1,702 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
#import:
# - /path/to/alacritty.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
TERM: xterm-256color
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 3
y: 3
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
#decorations: full
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
title: "[terminal]"
# Allow terminal applications to change Alacritty's window title.
dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# GTK theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme. Commonly supported values are `dark`
# and `light`. Set this to `None` to use the default theme variant.
#gtk_theme_variant: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: Inconsolata
# The `style` can be specified to pick a specific face.
style: Regular
# Bold font face
bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
family: Inconsolata
# The `style` can be specified to pick a specific face.
style: Bold
# Italic font face
italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
family: Inconsolata
# The `style` can be specified to pick a specific face.
style: Italic
# Bold italic font face
bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
family: Inconsolata
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
size: {{ machine.font_size }}
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`.
#use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Monokai Dark)
colors:
# Default colors
primary:
background: '#272822'
foreground: '#F8F8F2'
# Normal colors
normal:
black: '#272822'
red: '#F92672'
green: '#A6E22E'
yellow: '#F4BF75'
blue: '#66D9EF'
magenta: '#AE81FF'
cyan: '#A1EFE4'
white: '#F8F8F2'
# Bright colors
bright:
black: '#75715E'
red: '#F92672'
green: '#A6E22E'
yellow: '#F4BF75'
blue: '#66D9EF'
magenta: '#AE81FF'
cyan: '#A1EFE4'
white: '#F9F8F5'
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
# disable the visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#background_opacity: 1.0
selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: true
#cursor:
# Cursor style
#style:
# Cursor shape
#
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
#shape: Block
# Cursor blinking state
#
# Values for `blinking`:
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
#blinking: Off
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
live_config_reload: false
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# WinPTY backend (Windows only)
#
# Alacritty defaults to using the newer ConPTY backend if it is available,
# since it resolves a lot of bugs and is quite a bit faster. If it is not
# available, the WinPTY backend will be used instead.
#
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
# even if the ConPTY backend is available.
#winpty_backend: false
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
#url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a
# URL. The URL is always added to the command as the last parameter.
#
# When set to `launcher: None`, URL launching will be disabled completely.
#
# Default:
# - (macOS) open
# - (Linux/BSD) xdg-open
# - (Windows) explorer
#launcher:
# program: xdg-open
# args: []
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when
# clicking on them. The available modifiers are documented in the key
# binding section.
#modifiers: None
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings)
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Middle, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Open URLs at the cursor location with the launcher configured in
# `url.launcher`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - Linux/BSD exclusive actions:
#
# - CopySelection
# Copy from the selection buffer.
# - PasteSelection
# Paste from the selection buffer.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
#- { key: Space, mods: Shift|Control, action: ToggleViMode }
#- { key: Escape, mode: Vi, action: ClearSelection }
#- { key: I, mode: Vi, action: ScrollToBottom }
#- { key: I, mode: Vi, action: ToggleViMode }
#- { key: C, mods: Control, mode: Vi, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
#- { key: G, mode: Vi, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi, action: Copy }
#- { key: Y, mode: Vi, action: ClearSelection }
#- { key: Copy, mode: Vi, action: ClearSelection }
#- { key: V, mode: Vi, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi, action: Open }
#- { key: K, mode: Vi, action: Up }
#- { key: J, mode: Vi, action: Down }
#- { key: H, mode: Vi, action: Left }
#- { key: L, mode: Vi, action: Right }
#- { key: Up, mode: Vi, action: Up }
#- { key: Down, mode: Vi, action: Down }
#- { key: Left, mode: Vi, action: Left }
#- { key: Right, mode: Vi, action: Right }
#- { key: Key0, mode: Vi, action: First }
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi, action: High }
#- { key: M, mods: Shift, mode: Vi, action: Middle }
#- { key: L, mods: Shift, mode: Vi, action: Low }
#- { key: B, mode: Vi, action: SemanticLeft }
#- { key: W, mode: Vi, action: SemanticRight }
#- { key: E, mode: Vi, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
#- { key: Slash, mode: Vi, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward }
#- { key: N, mode: Vi, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi, action: SearchPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, action: SearchForward }
#- { key: B, mods: Control|Shift, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Plus, mods: Control, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: K, mods: Command, action: ClearHistory }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: SpawnNewInstance }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, action: SearchForward }
#- { key: B, mods: Command, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - None
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false

View File

@@ -1,3 +1,5 @@
[defaults] [defaults]
retry_files_enabled = False retry_files_enabled = False
nocows = 1 nocows = 1
roles_path = ./ansible_roles
library = ./ansible_roles/firefox/library

1
ansible_roles/firefox Submodule

Submodule ansible_roles/firefox added at fe50549acc

View File

@@ -1,161 +0,0 @@
#!/usr/bin/env bash
set -o nounset
# set -x
selective=0
if (( $# > 0 )) ; then
selective=1
services=("${@}")
fi
do_run() {
name="$1"
shift
run=0
if (( $selective )) ; then
for s in "${services[@]}" ; do
if [[ "$s" == "$name" ]] ; then
run=1
fi
done
else
run=1
fi
return $(( ! $run ))
}
get_unit_name() {
name="$1" ; shift
printf 'user:%s' "${name}"
}
run_raw() {
name="$1"
shift
do_run "$name" || return
systemd-run \
--user \
--unit "$(get_unit_name "${name}")" \
--no-block \
--remain-after-exit \
--setenv=DISPLAY=${DISPLAY} \
"${@}"
}
run() {
name="$1"
shift
run_raw "$name" --property=Restart=always "${@}"
}
run_oneshot_multiple() {
name="$1"
shift
cmd=()
# hacky way to start two processes in oneshot mode
for c in "${@}" ; do
cmd+=(--property "ExecStart=/usr/bin/env ${c}")
done
cmd+=(true)
run_oneshot "$name" "${cmd[@]}"
}
run_oneshot() {
name="$1"
shift
run_raw "$name" --service-type=oneshot "${@}"
}
schedule() {
name="$1"; shift
spec="$1"; shift
do_run "$name" || return
systemd-run \
--user \
--unit "$(get_unit_name "${name}")" \
--no-block \
--setenv=DISPLAY=${DISPLAY} \
--on-calendar="${spec}" \
"${@}"
}
# wallpaper config
wallpaper="$LIBDIR/wallpaper/current"
# keyboard settings
keyboard_layout=de
keyboard_variant=nodeadkeys
keyboard_repeat_delay=150
keyboard_repeat_speed=50
run_oneshot acpi bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
run_oneshot xresources xrdb -merge -I${HOME} ~/.Xresources
run_oneshot_multiple keyboard \
"setxkbmap -layout $keyboard_layout -variant $keyboard_variant" \
"xset r rate $keyboard_repeat_delay $keyboard_repeat_speed"
if [[ "${MACHINE_HAS_TOUCHPAD}" == "true" ]] ; then
run_oneshot_multiple touchpad \
"synclient VertEdgeScroll=0" \
"synclient VertTwoFingerScroll=1" \
"synclient MaxSpeed=2.2" \
"synclient AccelFactor=0.08" \
"synclient TapButton1=1" \
"synclient CoastingSpeed=0" \
"synclient PalmDetect=1" \
"synclient PalmMinWidth=20" \
"synclient PalmMinZ=180"
fi
run gpg-agent gpg-agent --homedir "$HOME/.gnupg" --no-detach --daemon
# run gnome-keyring_user gnome-keyring-daemon --start --components pkcs11,secrets --foreground
run kwallet kwalletd5
# a service called dunst already exists and conflicts
run dunst dunst -config ~/.config/dunstrc
# disabled due to firefox flicker
# run compton compton --backend glx --vsync opengl --no-dock-shadow --no-dnd-shadow
run_oneshot wallpaper --property=ExecStartPre="/bin/sleep 1" feh --bg-scale "${wallpaper}"
run blueman blueman-applet
run nm-applet nm-applet
run pasystray pasystray
# redshift unit already exists
run redshift redshift-gtk -c ~/.config/redshift.conf
if [[ "${MACHINE_HAS_KEEPASSX}" == "true" ]] ; then
run keepassx keepassx --keyfile ~/.secret/main.key ~/.secret/main.kdbx
fi
if [[ "${MACHINE_HAS_SPOTIFY}" == "true" ]] ; then
run spotify spotify
fi
if [[ "${MACHINE_HAS_NEXTCLOUD}" == "true" ]] ; then
run nextcloud nextcloud --background
fi
if [[ "${MACHINE_HAS_RESTIC_BACKUP}" == "true" ]] ; then
[[ -x ~/bin/restic-backup ]] && schedule restic-backup "Mon..Fri 12:00:00" --on-calendar "Mon..Fri 09:00:00" --on-calendar "Mon..Fri 16:00:00" ~/bin/restic-backup
fi
run firefox firefox -P default

View File

@@ -0,0 +1,28 @@
[Unit]
BindsTo=windowmanager.target
After=windowmanager.target
Wants=blueman.service
Wants=dpms.service
Wants=dunst.service
Wants=element.service
{% for profile in (user.firefox_profiles|default({})).keys() %}
Wants=firefox@{{ profile }}.service
{% endfor %}
Wants=gpg-agent.service
Wants=gnome-keyring.service
Wants=keepassx.service
Wants=keyboard.service
Wants=laptop-lid.service
Wants=nextcloud.service
Wants=nm-applet.service
Wants=pasystray.service
Wants=redshift.service
Wants=restic.timer
Wants=screencfg.service
Wants=spotify.service
Wants=steam.service
Wants=touchpad.service
Wants=xresources.service
Wants=yubikey-touch-detector.service

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env blueman-applet
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,10 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env xset s off
ExecStart=/usr/bin/env xset dpms 0 0 300
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env dunst -config %h/.config/dunstrc
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,11 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
After=i3.service
ConditionPathExists=%h/.var/run/features/element
[Service]
ExecStart=/usr/bin/env element-desktop
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env gnome-keyring-daemon --start --foreground --components secrets
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,10 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%h/.var/run/features/gpg_agent
[Service]
Type=forking
ExecStart=/usr/bin/env gpg-agent --homedir %h/.gnupg --no-detach --daemon
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,6 @@
[Service]
Type=simple
ExecStart=/usr/bin/env i3 --config %h/.i3/config
PassEnvironment=DISPLAY
Restart=no

View File

@@ -0,0 +1,9 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%h/.var/run/features/keepassx
[Service]
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,10 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env setxkbmap -layout de -variant nodeadkeys
ExecStart=/usr/bin/env xset r rate 150 50
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,10 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%h/.var/run/features/machine_is_laptop
[Service]
Type=oneshot
ExecStart=/usr/bin/env bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,14 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
After=gnome-keyring.service
ConditionPathExists=%h/.var/run/features/nextcloud
[Service]
ExecStart=/usr/bin/env nextcloud --background
PassEnvironment=DISPLAY
Restart=always
MemoryHigh=20%
MemoryMax=30%

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env nm-applet
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env pasystray
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,8 @@
[Unit]
ConditionPathExists=%h/.var/run/features/restic_backup
[Service]
Type=oneshot
ExecStart=%h/bin/restic-backup
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,6 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Timer]
OnCalendar=Mon..Fri 12:00:00

View File

@@ -0,0 +1,13 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
Type=oneshot
# systemd.service(5):
# > The command to execute may contain spaces, but control characters are not
# > allowed.
ExecStart=/usr/bin/env screencfg "%h/.screencfg/%H/default.yml"
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env spotify
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,11 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
After=i3.service
ConditionPathExists=%h/.var/run/features/steam
[Service]
ExecStart=/usr/bin/env steam
PassEnvironment=DISPLAY
Restart=always

View File

@@ -0,0 +1,18 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%h/.var/run/features/machine_is_laptop
[Service]
Type=oneshot
ExecStart=/usr/bin/env synclient VertEdgeScroll=0
ExecStart=/usr/bin/env synclient VertTwoFingerScroll=1
ExecStart=/usr/bin/env synclient MaxSpeed=2.2
ExecStart=/usr/bin/env synclient AccelFactor=0.08
ExecStart=/usr/bin/env synclient TapButton1=1
ExecStart=/usr/bin/env synclient CoastingSpeed=0
ExecStart=/usr/bin/env synclient PalmDetect=1
ExecStart=/usr/bin/env synclient PalmMinWidth=20
ExecStart=/usr/bin/env synclient PalmMinZ=1
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,3 @@
[Unit]
Requires=i3.service
After=i3.service

View File

@@ -0,0 +1,9 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env xrdb -merge -I%h %h/.Xresources
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -0,0 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
PassEnvironment=DISPLAY
Restart=always

9
bin/check Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -o errexit
cd ~/projects/personal/time-tracking/
source venv/bin/activate
source ~/.attendance_env
./call.py "${@}"

View File

@@ -11,12 +11,12 @@ log() {
case "$1" in case "$1" in
enable) enable)
log "Enabling dunst" log "Enabling dunst"
systemctl --user --no-block kill --signal SIGUSR2 dunst_user systemctl --user --no-block kill --signal SIGUSR2 dunst
;; ;;
disable) disable)
log "Disabling dunst" log "Disabling dunst"
systemctl --user --no-block kill --signal SIGUSR1 dunst_user systemctl --user --no-block kill --signal SIGUSR1 dunst
;; ;;
*) *)
>&2 printf 'Unknown command\n' >&2 printf 'Unknown command\n'

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
rclone \
--checksum \
--delete-excluded \
--exclude /.cache/ \
--exclude /.vagrant.d/ \
--exclude /.minikube/ \
--exclude /Downloads/ \
--exclude /downloads/ \
--exclude /tmp/ \
--verbose \
--stats 60s \
sync \
$HOME \
gdrive:backup

53
bin/markdown-to-pdf Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
set -o nounset
usage() {
cat <<EOF >&2
$0 <input file> <output file>
EOF
}
if (( $# != 2 )) ; then
usage
exit 1
fi
markdown_extensions=(
blank_before_header
space_in_atx_header
blank_before_blockquote
yaml_metadata_block
backtick_code_blocks
fancy_lists
native_divs
fenced_divs
task_lists
pipe_tables
)
function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/$d}"; }
pandoc \
--from markdown+"$(join_by "+" "${markdown_extensions[@]}")"\
--to pdf \
--verbose \
--email-obfuscation=none \
--columns=2000 \
--fail-if-warnings \
--standalone \
--variable tables=true \
--variable euro=yes \
--variable colorlinks=yes \
--variable linestretch=1.3 \
--variable papersize=a4 \
--variable date=$(date --iso-8601=date) \
--variable fontsize=12pt \
--variable fontfamily=libertine \
--variable familydefault=sfdefault \
--variable documentclass=scrartcl \
--variable fontfamilyoptions= \
--variable lof= \
--variable lot= \
-i "${1}" \
--output "${2}" \

View File

@@ -4,7 +4,7 @@ import sys
import subprocess import subprocess
import yaml import yaml
PASS = 'pass' PASS = '/usr/bin/pass'
def run(args): def run(args):
return(subprocess.run( return(subprocess.run(
@@ -43,7 +43,7 @@ def cmd_get(*args):
print(get_stdout(['pass', 'show', args[0]]).split(b'\n')[0].decode()) print(get_stdout(['pass', 'show', args[0]]).split(b'\n')[0].decode())
return 0 return 0
if len(args) != 2: if len(args) < 2:
print("what do you want to get?") print("what do you want to get?")
return 1 return 1
@@ -62,7 +62,8 @@ def cmd_get(*args):
print("invalid YAML data, not a dict") print("invalid YAML data, not a dict")
return 2 return 2
keydata = extract_from_dict(data, args[1]) for element in args[1:]:
keydata = extract_from_dict(data, element)
if isinstance(keydata, list) or isinstance(keydata, dict): if isinstance(keydata, list) or isinstance(keydata, dict):
print(yaml.safe_dump(keydata, default_flow_style=False).strip()) print(yaml.safe_dump(keydata, default_flow_style=False).strip())
else: else:

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
nice --adjustment 19 \
ionice --class 3 \
restic -r rclone:restic:restic --password-file=$HOME/restic_password backup --exclude-file=$HOME/restic_exclude.lst $HOME

View File

@@ -31,7 +31,7 @@ args = parser.parse_args()
config_path = args.config config_path = args.config
try: try:
config = yaml.load(open(config_path)) config = yaml.safe_load(open(config_path))
except FileNotFoundError: except FileNotFoundError:
fail("File {0} not found".format(config_path)) fail("File {0} not found".format(config_path))
@@ -54,6 +54,8 @@ for output in config['outputs']:
# cmd.append('--auto') # cmd.append('--auto')
for k, v in output['opts'].items(): for k, v in output['opts'].items():
cmd.extend(['--{}'.format(k), str(v)]) cmd.extend(['--{}'.format(k), str(v)])
for k,v in output.get('set', {}).items():
cmd.extend(['--set', k, v])
run(cmd) run(cmd)
run(['i3-msg', 'restart']) run(['i3-msg', 'restart'])

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
~/code/helper-scripts/sysop-share-screen.sh pi@monitor-sysop-${1:-middle}-${2:-top} 1

View File

@@ -1,44 +0,0 @@
#!/usr/bin/env python3
import datetime
import sys
USAGE="""Usage: {program} PATH_TO_FILE""".format(program=sys.argv[0])
def die(message, code=1):
print(message)
sys.exit(code)
def die_usage(code=1):
die(USAGE, code)
def read_date_from_file(path):
text = open(path).readline().strip()
try:
time = datetime.datetime.strptime(text, '%Y-%m-%d')
except ValueError as e:
die(e)
return time
def main(argv):
if len(argv) < 2:
die_usage()
last = read_date_from_file(argv[1])
now = datetime.datetime.now()
diff = now - last
days = diff.days
#hours = diff.seconds // (60 * 60)
if days == 1:
msg = "1 day"
else:
msg = "{days} days".format(days=days)
#msg += " "
#if hours == 1:
# msg += "1 hour "
#else:
# msg += "{hours} hours ".format(hours=hours)
print(msg)
main(sys.argv)

19
detect-missing-packages.py Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python3
import yaml
from pprint import pprint
package_file = "./packages.yml"
apps = yaml.safe_load(open(package_file, 'r'))
missing_config = {}
for appname, appconfig in apps['packages']['list'].items():
for distro, packagelist in appconfig.items():
if len(packagelist) == 0:
if distro not in missing_config.keys():
missing_config[distro] = []
missing_config[distro].append(appname)
print(yaml.dump(missing_config))

View File

@@ -3,9 +3,10 @@ empty_directories:
- name: .gnupg - name: .gnupg
mode: '0700' mode: '0700'
- name: .config/nvim - name: .config/nvim
- name: .config/rofi
- name: .config/gtk-3.0
- name: .config/qt5ct
dotfiles: dotfiles:
- from: autostart/autostart.sh
to: .autostart.sh
- from: git/gitconfig - from: git/gitconfig
to: .gitconfig to: .gitconfig
template: true template: true
@@ -13,6 +14,7 @@ dotfiles:
to: .gnupg/dirmngr.conf to: .gnupg/dirmngr.conf
- from: gnupg/gpg-agent.conf - from: gnupg/gpg-agent.conf
to: .gnupg/gpg-agent.conf to: .gnupg/gpg-agent.conf
template: true
- from: gnupg/gpg.conf - from: gnupg/gpg.conf
to: .gnupg/gpg.conf to: .gnupg/gpg.conf
template: true template: true
@@ -45,9 +47,27 @@ dotfiles:
to: .zshrc.d to: .zshrc.d
- from: dunst/dunstrc - from: dunst/dunstrc
to: .config/dunstrc to: .config/dunstrc
template: true
- from: redshift/redshift.conf - from: redshift/redshift.conf
to: .config/redshift.conf to: .config/redshift.conf
- from: vscode/settings.json - from: vscode/settings.json
to: .config/Code/User/settings.json to: .config/Code/User/settings.json
- from: vscode/keybindings.json - from: vscode/keybindings.json
to: .config/Code/User/keybindings.json to: .config/Code/User/keybindings.json
- from: alacritty/alacritty.yml
to: .config/alacritty.yml
template: true
- from: rofi/config
to: .config/rofi/config
- from: gtk/gtk-3.0.ini
to: .config/gtk-3.0/settings.ini
template: true
- from: gtk/gtkrc-2.0
to: .gtkrc-2.0
template: true
- from: qt/qt5ct.conf
to: .config/qt5ct/qt5ct.conf
- from: screencfg
to: .screencfg
- from: scripts
to: scripts

View File

@@ -29,7 +29,7 @@
# the top and down respectively. # the top and down respectively.
# The width can be negative. In this case the actual width is the # The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option. # screen width minus the width defined in within the geometry option.
geometry = "300x10-20+20" geometry = "300x10-20-40"
# Show how many messages are currently hidden (because of geometry). # Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes indicate_hidden = yes
@@ -84,7 +84,7 @@
### Text ### ### Text ###
font = pango:Inconsolata 9 font = DejaVu Sans {{ machine.font_size }}
# The spacing between lines. If the height is smaller than the # The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height. # font height, it will get raised to the font height.

View File

@@ -3,7 +3,7 @@
email = {{ user.mail }} email = {{ user.mail }}
useConfigOnly = true useConfigOnly = true
{% if user.git_gpg_sign|bool %} {% if user.git_gpg_sign|bool %}
signingkey = {{ user.gpg_keys.master_key }} signingkey = {{ user.gpg_key.id }}
{% endif %} {% endif %}
[github] [github]
user = hakoerber user = hakoerber
@@ -111,3 +111,12 @@
autoSetupMerge = true autoSetupMerge = true
[clean] [clean]
requireForce = true requireForce = true
[pull]
rebase = true
ff = only
[url "ssh://git@code.hkoerber.de:2222/"]
insteadOf = https://code.hkoerber.de/
[init]
defaultBranch = master

View File

@@ -4,6 +4,8 @@ default-cache-ttl-ssh 60480000
max-cache-ttl 34560000 max-cache-ttl 34560000
max-cache-ttl-ssh 34560000 max-cache-ttl-ssh 34560000
{% if user.gpg_agent_for_ssh %}
enable-ssh-support enable-ssh-support
{% endif %}
pinentry-program /usr/bin/pinentry-curses pinentry-program /usr/bin/pinentry-qt

View File

@@ -0,0 +1,109 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF52F2UBEADVm8w92aR5UoDq94jcCh5hEpbjIWrrmyBb3p7Z4x9loASIDNly
6SrHjpFONw7EdCNzT2zQCCCoKezKfzALuU3xQ3Vl5fhtp3Ij/HGonSEFhz4ibhUC
MsbCsUEU7yG/lzmz0dtk9UIWfVKDe8yhLCVxi+dUi2Lat58daQjO9OGjRP+Z5mMi
ZtGzmV2UQHWmMipKlxx9yDpX5l1i2qduNXfC2ki+uBudzNNaZtwk9t690UXa6DHz
xxnUJqewWG3zyFmhBrixOBF5Pdc+Uy79HOLfifZ+SRSpSKf7Dp7SiUE7XL0slWOD
xxRRZPW5u6heSgFnVCLjtupLUSUCccNnvTKrKB1iOEjkpko7Q7FVMe5bTQOrO1de
cr2PpGC3GeR6K1n0PYAwd49HgVZjCUqXzbz4Zeh9KRuM62geNTZjJxuuP7dbJP86
p23+7uiODwVhdzvEP/ElYlwEGLGFFurbnqZ3DwFggdrQ6cOkSjQblt6xzxxlROo4
HoyupyNz4I5yWqN+k4wk2+1A8TsSwKh1PAHG7C2LLZsKn4pSsdYgoaQaYsod89kZ
mA1Sr4IEe9rhG6TnofxHqHegzifPM0XPmYlwVccAF+lb+CrvWbSBHHA5FVE/PCBe
Xc4GYWghnobhK8kfgFZhr8BrBFFH+sAw8CYNbgg7O90HK7jnK79BlgU31QARAQAB
tCNIYW5uZXMgS8O2cmJlciA8aGFubmVzQGhrb2VyYmVyLmRlPokCTAQTAQoANhYh
BJc65I1xt2c1xHErW7XAAlMMaiBTBQJedhdlAhsBBAsJCAcEFQoJCAUWAgMBAAIe
AQIXgAAKCRC1wAJTDGogUyIxEACZXR+fN+bb6PYW821k8oXO/MvNiiqtWC9CuLjP
y1/eu/ZJUmeOca/8HsJsp0hOAJ7oUn3MBiW7gCVZ/2hQ+ywCtcDWp2PElutCiAyg
QgN1IEg9RAcx+7RmHC0SEafhnyT4ogi7hJ9SK3kPnf5Ryli6qNFAWb3dtfSENYLK
dqtzMi9+CvcsNKKMN+yhubVrQi5MHlqu7L4bdE4BW5bzsbbhLaPfmc/JYFkImF5v
dXnOBA9gx2bVREoTw/GPioed9hpPu1ZWZC5we+WD4eEGrQD/LG/XyGUh6wQwsC7P
aMXOydok7DHzUrCdvZ372Giv71cNV1++e6G+PdEqVo2FCp04Syzug5GwRbSAZ9B3
1tqYV6L5SZh0TIjHNtuWTPq9dzpqVJJSxZdwvlgsv7Ni6GHYUrgTShza/+vXE1UE
2MCoLCK0ZrdeMd8m7VMom3WIiV+N28MsKVCoYDLd0LMOrmhDDap16SGJYs/dB4lo
a931k7ejOG68G2ViLJmRapkzEWH3TujYNyh4O7S6LuHwNvG6lyAyn9UTVSAaPT+t
BV4zfd4UfKhYcKSm+aQuJ5RrZ+2l8YU87daeE2JXy1/z9I0C/YqbT8yHMqUi4Fzy
VhfTAPm2lCLPomFmoS8fp2oNDt3s7AOQH2zOsimhA6pMTek/sKtywjRQ0TdXH2OA
p2B10rkCDQRedheFARAAl4cEamPYTwineGIBGubqhznKQhUJhm1P3AbwOfzYloxg
3wvq1njY0+1UY8HtV7EZ7xd1PpUgRxcA8paj2ootMwHM2TRxXad/EgpegfWNANQV
YnDQj8Zqabrf3Orue93pLeRir38kOzX1qcOz72G6HDJWSQZLqF6LWJ9GehDpf9VB
/K/8nXdEes2nLdffkR2blH5ltcM0kMak0tI3+5SnQCs1MmFWzSq+BFVYI5fT8hBf
MCskiypF05E0Np7t0C5dQmToPPv5w6flUIJn3h7BfUYAi9uOdUfAykI57hXUWUlV
gli5IJfDTYt/Y849vh3FH2qn0syQ425a8RqH5WLohH0qJ+A3nuOp6JfKGEFOiYxp
9Y5tn6zEfqGC+D/xWnGGgfc6IMQVGYbWvqHRqMQquV1bD3rd7dDOE3QdkBvxpcVv
1EeKfA36wRtlFyKgdHE0QiVD9VeCtGW1diFD3hEK+FqVdaxX45800gPjFIuzKOkv
zoVzYxrUCSACs+6QyyXP8I1zMX9SXRvEg02MmpohwmEhSgotOMcjbWNyVFNfCAaS
bCt9PyaWsz+qe2gGLAiYo2vvBij543vBgATSbFjhoM683gzo73AOYhaauULsy3Kq
yfolj6TwGyEg7wvMO6YLttKCahjyz5isiAcf4fSNqWG0zSnBf6n7HXdtTjjsfx8A
EQEAAYkEbAQYAQoAIBYhBJc65I1xt2c1xHErW7XAAlMMaiBTBQJedheFAhsCAkAJ
ELXAAlMMaiBTwXQgBBkBCgAdFiEEyitwWoxynRUrXLoQzSinzDExgBcFAl52F4UA
CgkQzSinzDExgBeCDw//WMa8qm/tBpr4BskpctySvIwiOf35o+cMAYvego94NkrY
wuASAn3/2QsaZvZnYdJfCrzchCA30QZxRWAvkHIJ/zXZ1ayugsnEypvhw23012Xr
KKMXyd6iuZdmbE1Umj6R1/LbdNjddqglR9AmKaOYaDzjpPuuirDbllRGh/7lluZq
q8BmPvFe6Cl8FIijx03RfCbYSvQQRH10IBeJ+z+eE7z7FRspf4kJ6vXAbbSlKoRR
+PcA+Yc7meW+dvMnRpczGDvDbl522Mw2pxV3p4aN8TSMwSWztD4koXo4KCklFPh5
M4R4HbZFEZj4i8BU+cbsQscJ4jHqrCK/qPSRx103ikVqwOElZkYqKthnrQ7rxO7S
0CZOKzlK56Vl9LbnYE0nTHqZOxf9k9Z1ue9aVCRXWcQhCUVm9CLUegZz4DJtK9vl
ntdYTKPRmMCUw407rhkEFA3bQc9l56GP5ARc6NN9C0fbz2PgIryuLP4BvR/BIV4L
qLBgGfztN3KjHYI2RWAw3OcaxU7UhmXbCFvy6j/PVJckHNheqaIm/+wyDt+/rXf0
3zc9YiEHrvGmmX+6VYlv8iE4sp2ye4EF0XSGm23/gKmvkF5jVuaB4OJeHYIQfOVP
nnmsDan2NZ2znE5UmaqgxvxAuQh+XVjKlSUfeff+9XCscQvzuNBC39V+S+cJLoNm
LA//Xd2Ic6Y9o44TaN1mDx031oYZjcmHq1YbwQbYnQj/uZZQHM4b62qMCCkdfsnU
KgeIJU78BxAj2vCgWI025K7un7Sh9q3cZdafOgcNz8YaXV9Nm0f6fLFsdTWbEvQ0
Y1cHJlh6WKDV2lVtdgoEMSN73U3hohJhsldRengydb4/Cf8pZRJgatyXN+b7Hsg5
h9LOAZRF4Om3A84QH7oYfOfeiwqGXzFE+lLqsPhwNUVnRJd98fjxYKdKz/3hNT5c
Pq/0/C+ivpAI3Kk1tecafhb0YSoFUEhZlnl/SSuTALvFdJGjpopbTL0M3YCcgh9v
tXb8Dcq7BEphWSeWP4Torbq17pLSlG65bgoZXoABYWCPSZiQCKDNXa2wqC3it5J9
wURL9AOCsJCvqh798WLlNHaz9hnh76UF3idDI5SgJGEOAPStv3EGX/HhjOzUQPD+
ixlXM63vmhCHxV9pnIURpBFhDUS/hs7apVm8pKzSv7PRQ5iu9RDbWUAWdyMlWPW9
TglATGSMFpxGYTJiC+pHH24FCm6wR8D8LYnKkqxzd+nqFljvfEmQ70rIyUA1I3/6
kCxGf7yKxTr2anV7tOFkNcCuj/ZSkb8CC6BCVk1HeE6h/hks78PdlLJr5zrSPxvP
U1iRM6NebRd4W990XCPw6ZHDm0CngSNU7s+7peB0M+pEaYO5Ag0EXnYXoQEQANxF
tmQz1jowITJ60eY/q7fWVv/w1CTT/ynAqPPgKw/MtGVBe8BWUJKufnxbNgn6ZamX
PU/Uq4x8QKMgbuqvaInHM3MvIqg0xoQ8qz4VBnc0Q0w0+G78UMcjzzAKJBDp1Qfy
zTvfPBD65fL+l2kFIyy9409uhzLnsvADE0saNmslfkVxyp8u+IYRVOjLpbKqJfrq
VDFTe3sktGSjlyWGHFKCx+xDGiJaAr/Qj0W/XH382nnC8dOhs96frQxz+cnwr4Uw
sH1jNfY5zrXcqjxekoNhgrYBflAkHyyiVp8HRepPWFxMnXtT2Z4bdtzIJVSOwko0
j91MItL5KyHt5pOS3sJM5wCwno3Tg8zgzbD3AZJoWSbBSKip6e8CQ0uvFcoGcpya
IYJ38k7+yUihGfGCcPbKxdyFsHHxdIb0oVZAr9D2f9EsCzUvga4pH3yeMVKv0KWG
2n4zLOJiZ4mvchBJjzBwuy2UCJS6yH+7EmAlkxZGEVcXUN5X+LksmRfr8kSMwjWj
BlJyOCyKU4Jw/AFFarJlQ+5VieI9ISotXMrIS2VvqDexnxJo1vRzMvaNxK8uwaR7
eT9h/oI1vEEkrh6aqsIZlj7Owf2TI+ve4JGJ1G+keP/1Ko1kNA+X4Trg3FAy0PR7
Eg2iBpjxGyEOVe2K/QGnDpMSO6ISot4UgRDK+29fABEBAAGJAjYEGAEKACAWIQSX
OuSNcbdnNcRxK1u1wAJTDGogUwUCXnYXoQIbDAAKCRC1wAJTDGogU/aMEACrQCrW
Skyx2waPZk9PBoG1z+CypabL+NwSoPzNdsQcPPB3FlByJSm48aqamXJUH7srCkr/
aT9GoPktdjstDoloLJ1gwvRiI0ccmwFBrkUU9wwn8mm/x+drktOOniUQA0qT/jvO
VNYgbfUVmfht6rTfVYlpGK1MxsTgEGvhFw/2PK6tibBnPW9d+3UFVWVELtq6r72H
l/ndkMOV2tnfBaEpRl94KHn7By0rjDUVQIOxFr73G4rWzU3h3OLHPXDPLa7zM9xF
Wn9f72L6UJ9MLbR43RCyrAfBFaF064BUwYpg//oaxAsbEl9FTmWV+IwywpufVRMu
+hujYyIsMdIUvEohyUXwSsDDLgCJspWkzCfPBaL0vBDQ3l8LshKoa/uFQ20tWhzH
D63XjRIAG2q/9e3E/HBBjpRoudsNJKSjbH2YH30+Uzpgc11hh2sgYRIPKWSUN3rN
/lOBF56YSoFCf35D41VVGmWPcm3Yz7hsSKNSEdH9FL2m8a2sIVOuzup00PlrQLiq
IrVZBHXAWk4FgqSLQLnxAX3X3Ot1OiBnqaIJZ1Q+hmRCbtOXuq964okyWs6l8FPS
Qg2ZEOEjc6q4uvdgV8duF8bX8t6mpwMxF0FvVRULzWKmki6P3fvpfel8Qj1my2mv
veIpzfWOcpxWhH+qvchT3gLmu/Hp8TJ+CF4VsrkCDQRedhezARAAsTrVcc970S+0
lGVTvPfUVHIPQYg7mXz1H7Hfb9wBzsDb0lbCzm6qtEIMGo5kzC/Z0Wc1+5HO0Zhb
V2ecqTJMhCfadeK2FymCoS6hDOD2s9JVGoEIctLHWIo7WsjbDOZblN8pOmuBfz5G
p6awxhBLSTzCwsKQzg08JRO0x7xbSVy52HhbRdgySp1HD+hPTFhmDNc2Ha5n+N6c
VoNmFxY6MixJDsuk1Y46sM/rSmuvuGEahVjcl3BFqiNmS6h0c2U77vuOoLJ0fvB3
C6aL94o/zK9I2EieL6jBs9cnyp67CmVKdCIb5T2Gxo3XC9e8WGpntlK6D0vAM1ln
oMqnhBYeeKpgqxVcP7sBK3FnFCV9yhIo63OPA2GVAStPb5xRXFyGEf3HxVqUxoZ6
pcKfxAGgXkd86+oUupS/l5bjCIxx5ME/3g92MnRMAAY2ycASaeT3WEeDP20h7jqA
h+nf1N+jqZMMHpMmClrxKMcT0iSFgstQKSC0GZlrnLSBXPEkH0l30YnzxAwZy/YT
c819NG3g2JkunDyD9EyKmvX3S9QHjuvE5O6Ou39nAhNdUEx+xSPSY4bkPzOHTvI1
MO5JrRginUXjSLmGFN8WQeMHRR7P+VMUTgsBGZ7/t7lgIB24HNeFy1rpzfT/ZrDs
WCxz1SSv13HYR71kpkHTauGo68vx/pEAEQEAAYkCNgQYAQoAIBYhBJc65I1xt2c1
xHErW7XAAlMMaiBTBQJedhezAhsgAAoJELXAAlMMaiBTxnUQAM2TtUXzmWLG1tKD
mkYeOCPoFTIwp9b8QKIPwWGtijoJEmjrvJcCd+EUnqP1iZBl2Qee5iCeiFUoNPx3
M93zpDLwjHX7r9jLbWaRkyCTX0fsq/p9zDpUM5BbGyZEZwmZ3nW5YYRIlJNkQuyV
bGpIfI+DGMLn5KFq2pVOwyYWLmJ74Lnv/vJYgkNxg70wvjiE7RYEoY0WrDP13QQJ
aaXdmcHkteov76ElM09wOKPdCFP9AIlmUgRYKu0jb4upQosjpfR7sCf6QtCHCDOC
zwzvLk3VgrBKkcLKwFEhYx0LYBmgPjQ5CYvnaXBXyQsn+xUwqQs3OhcTD7/fnEYu
4zkdkNTUtaBNxbqbV6V5Ti0odFQXHHrJ/ugPRHIgBdqXLiVQI4pxKNJhtr6HMWb0
zjde4Mho/IuOJLYEpHDVUj00RLUCsh1IkgdbRTEaHaeUzpFCf/zGnds6RIrEPBJm
tubuWXFFVG3d2LkUYkDAWGLE/IQLkeZPpnKCiTNyNvou5E/6BDeZGfnZA8fYAyGR
2h6aOZkt/4XL7Ot1bgbhNbEABwqSrsRXVFfJ85j+p+2D/iUi/wqyCBA0wDq9omog
rtNwEHwgQ9/++N3bX0KZKY5S7LXaHWWkXRuNDV2Zx2Vb4PpGmOjlZxKvyLtKgwwz
imtrGD9EhItdmZ8PBdC2kAx3vWEM
=553W
-----END PGP PUBLIC KEY BLOCK-----

317
grm/personal_projects.toml Normal file
View File

@@ -0,0 +1,317 @@
[[trees]]
root = "~/projects"
[[trees.repos]]
name = "misc/rbackupd"
[[trees.repos.remotes]]
name = "github"
url = "git@github.com:hakoerber/rbackupd.git"
type = "ssh"
[[trees.repos]]
name = "misc/cobbler-kickstart"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/cobbler-kickstart.git"
type = "ssh"
[[trees.repos]]
name = "misc/postfix-grok-patterns"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/postfix-grok-patterns.git"
type = "ssh"
[[trees.repos.remotes]]
name = "upstream"
url = "https://github.com/whyscream/postfix-grok-patterns.git"
type = "https"
[[trees.repos]]
name = "misc/syncrepo"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/syncrepo.git"
type = "ssh"
[[trees.repos]]
name = "misc/pkgbuilds"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/pkgbuilds.git"
type = "ssh"
[[trees.repos]]
name = "misc/openvpn-helper"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/openvpn-helper.git"
type = "ssh"
[[trees.repos]]
name = "misc/wifiqr"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/wifi-qr.git"
type = "ssh"
[[trees.repos]]
name = "misc/checkconn"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/checkconn.git"
type = "ssh"
[[trees.repos]]
name = "misc/xftwidth"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/xftwidth.git"
type = "ssh"
[[trees.repos.remotes]]
name = "upstream"
url = "https://github.com/vixus0/xftwidth"
type = "https"
[[trees.repos]]
name = "x-hidecursor"
remotes = []
[[trees.repos]]
name = "git-repo-manager"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/git-repo-manager.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/git-repo-manager.git"
type = "ssh"
[[trees.repos]]
name = "talks"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/talks.git"
type = "ssh"
[[trees.repos]]
name = "container/openresty-oidc"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/container/openresty-oidc.git"
type = "ssh"
[[trees.repos]]
name = "container/acimaker"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/acimaker.git"
type = "ssh"
[[trees.repos.remotes]]
name = "private"
url = "git@code.sys.haktec.de:container/acimaker.git"
type = "ssh"
[[trees.repos]]
name = "container/drone-kaniko"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/container/drone-kaniko.git"
type = "ssh"
[[trees.repos.remotes]]
name = "upstream"
url = "https://github.com/banzaicloud/drone-kaniko"
type = "https"
[[trees.repos]]
name = "container/roundcube"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/container/roundcube.git"
type = "ssh"
[[trees.repos]]
name = "container/mycloud-homer"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/container/mycloud-homer.git"
type = "ssh"
[[trees.repos]]
name = "projects/misc/cobbler-kickstart"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/cobbler-kickstart.git"
type = "ssh"
[[trees.repos]]
name = "finance-auto-import"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/finance-auto-import.git"
type = "ssh"
[[trees.repos]]
name = "guitar_practice"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com/hakoerber/guitar-practice.git"
type = "ssh"
[[trees.repos]]
name = "picture-cleaner"
remotes = []
[[trees.repos]]
name = "mycloud"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/mycloud.git"
type = "ssh"
[[trees.repos]]
name = "resume"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/resume.git"
type = "ssh"
[[trees.repos]]
name = "lea-michael-hochzeit"
remotes = []
[[trees.repos]]
name = "builddoc"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/builddoc.git"
type = "ssh"
[[trees.repos]]
name = "blog"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/blog.hkoerber.de.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/blog.git"
type = "ssh"
[[trees.repos]]
name = "fizzbuzz"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/fizzbuzz.git"
type = "ssh"
[[trees.repos]]
name = "ggj/2018/the-lost-son"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com:niklas-heer/the-lost-son.git"
type = "ssh"
[[trees.repos]]
name = "ggj/2019-claim-your-world"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@github.com:theintroverts/claim-your-world.git"
type = "ssh"
[[trees.repos]]
name = "prometheus-restic-backblaze"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/prometheus-restic-backblaze.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/container/prometheus-restic-backblaze.git"
type = "ssh"
[[trees.repos]]
name = "dotfiles"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/dotfiles.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/dotfiles.git"
type = "ssh"
[[trees.repos]]
name = "packager"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/packager.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/packager.git"
type = "ssh"
[[trees.repos]]
name = "time-tracking"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/time-tracking.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/time-tracking.git"
type = "ssh"
[[trees.repos]]
name = "aws-glacier-backup"
[[trees.repos.remotes]]
name = "github"
url = "ssh://git@github.com/hakoerber/aws-glacier-backup.git"
type = "ssh"
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hakoerber/aws-glacier-backup.git"
type = "ssh"

15
gtk/gtk-3.0.ini.j2 Normal file
View File

@@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze-dark
gtk-font-name=DejaVu Sans {{ machine.font_size|int - 2 }}
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

17
gtk/gtkrc-2.0.j2 Normal file
View File

@@ -0,0 +1,17 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze-dark"
gtk-font-name="DejaVu Sans {{ machine.font_size| int - 2 }}"
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"

View File

@@ -17,8 +17,8 @@
set $mod Mod4 set $mod Mod4
# The default terminal # The default terminal
set $terminal "{{ machine.terminal_binary }} -title terminal" set $terminal "alacritty --config-file ~/.config/alacritty.yml"
set $calc "{{ machine.terminal_binary }} -title calc -e $SHELL -i -c calc" set $calc "alacritty --config-file ~/.config/alacritty.yml -e $SHELL -i -c calc"
set $scriptdir ~/.i3/scripts set $scriptdir ~/.i3/scripts
@@ -77,8 +77,8 @@
set $focus_parent q set $focus_parent q
set $focus_child a set $focus_child a
set $floating_toggle Shift+space set $floating_toggle Shift+p
set $focus_mode_toggle space set $focus_mode_toggle p
set $prev_on_output u set $prev_on_output u
set $next_on_output i set $next_on_output i
@@ -93,6 +93,8 @@
set $kill Shift+Q set $kill Shift+Q
set $screenshot o
################################################################################ ################################################################################
### WORKSPACE ASSIGNMENTS ###################################################### ### WORKSPACE ASSIGNMENTS ######################################################
@@ -109,9 +111,20 @@ workspace $workspace8 output {{ machine.screen.8 }}
workspace $workspace9 output {{ machine.screen.9 }} workspace $workspace9 output {{ machine.screen.9 }}
workspace $workspace10 output {{ machine.screen.0 }} workspace $workspace10 output {{ machine.screen.0 }}
assign [class="^Keepassx$"] $workspace8 assign [class="^Keepassx$"] $workspace8
# See https://github.com/i3/i3/issues/2060
for_window [class="^Spotify$"] move to workspace $workspace9
assign [class="^Spotify$"] $workspace9 assign [class="^Spotify$"] $workspace9
assign [class="^Google-chrome$"] $workspace7 assign [class="^Google-chrome$"] $workspace7
assign [class="^Chromium$"] $workspace7
assign [class="^Steam"] $workspace5
for_window [class="^Steam$"] move to workspace $workspace5
assign [class="^dota2$"] $workspace10
assign [class="^Wine$"] $workspace10
################################################################################ ################################################################################
### KEYBINDINGS ################################################################ ### KEYBINDINGS ################################################################
@@ -201,15 +214,28 @@ assign [class="^Google-chrome$"] $workspace7
bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu
bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/all.yml ; exec --no-startup-id ~/.autostart/30_keyboard.sh bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/default.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F3 exec --no-startup-id screencfg ~/.screencfg/laptop.yml ; exec --no-startup-id ~/.autostart/30_keyboard.sh {% for screencfg in machine.screencfgs -%}
bindsym $mod+{{ screencfg.key }} exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/{{ screencfg.name }}.yml ; exec systemctl --user restart keyboard.service
{% endfor -%}
bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend
bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu
bindsym $mod+$screenshot exec --no-startup-id sh -c 'maim | xclip -selection clipboard -t image/png'
bindsym $mod+Shift+$screenshot exec --no-startup-id sh -c 'maim --select | xclip -selection clipboard -t image/png'
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
bindsym $mod+Shift+$scratchpad move scratchpad # bindsym $mod+$pim_toggle \
bindsym $mod+$scratchpad scratchpad show # 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 \ bindsym $mod+$pim_toggle \
unmark _destination; \ unmark _destination; \
@@ -325,22 +351,10 @@ bindsym XF86AudioPrev exec $scriptdir/spotify-control previous
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 8 ; exec --no-startup-id $scriptdir/update-status bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 8 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 8 ; exec --no-startup-id $scriptdir/update-status bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 8 ; exec --no-startup-id $scriptdir/update-status
bindsym $mod+o exec --no-startup-id xautorandr ; exec --no-startup-id kill -SIGUSR2 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)'"
bindsym $mod+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)
bindsym $mod+m exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic bindsym $mod+m exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
bindsym $mod+space exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
##############################################################################
# exec --no-startup-id autostart
###############################################################################
### BARS ####################################################################### ### BARS #######################################################################
################################################################################ ################################################################################
# #

View File

@@ -19,18 +19,23 @@ general {
} }
order += spotify
{% if user.has_yubikey %}
order += "yubikey"
{% endif %}
order += "volume_status output" order += "volume_status output"
order += "volume_status input" order += "volume_status input"
order += spotify
order += "wifi" order += "wifi"
order += "external_script presentation_mode" order += "external_script presentation_mode"
order += "systemd redshift"
order += "systemd spotify"
order += online_status order += online_status
order += "battery_level all" order += "battery_level all"
order += "clock" order += "clock"
battery_level all { battery_level all {
battery_id = "all" battery_id = "all"
format = " {icon} {percent}% {time_remaining} " format = " {icon} {percent}% "
measurement_mode = "sys" measurement_mode = "sys"
charging_character = "" charging_character = ""
blocks = "" blocks = ""
@@ -41,6 +46,27 @@ battery_level all {
threshold_full = 95 threshold_full = 95
} }
systemd redshift {
unit = "redshift.service"
user = true
format = "  "
on_click 1 = "exec $HOME/.i3/scripts/toggle-app redshift"
color_bad = '#F4Bf75'
color_degraded = '#F4Bf75'
}
systemd spotify {
unit = "spotify.service"
user = true
format = "  "
color_bad = '#F4Bf75'
color_degraded = '#F4Bf75'
}
yubikey {
format = '[  YubiKey[\?if=is_gpg ][\?if=is_u2f ] ]'
}
clock { clock {
format = ["{DE}", "{NZ}", "{Cuba}", "{MX}", "{CZ}", "{NL}", "{VN}"] format = ["{DE}", "{NZ}", "{Cuba}", "{MX}", "{CZ}", "{NL}", "{VN}"]
format_time = "  {name} \[KW %V\] %a %d.%m.%Y %H:%M:%S " format_time = "  {name} \[KW %V\] %a %d.%m.%Y %H:%M:%S "
@@ -49,8 +75,8 @@ clock {
wifi { wifi {
bitrate_bad = 0 bitrate_bad = 0
bitrate_degraded = 0 bitrate_degraded = 0
format_down = "  down " format = " {signal_percent} {ssid} |  down "
format_up = "  {signal_percent} {ssid} " down_color = "good"
} }
spotify { spotify {
@@ -72,6 +98,8 @@ external_script presentation_mode {
} }
online_status { online_status {
icon_on = ""
icon_off = ""
format = " {icon} " format = " {icon} "
} }
@@ -82,7 +110,6 @@ volume_status output {
thresholds = [] thresholds = []
command = "pactl" command = "pactl"
color_muted = '#FFFFFF' color_muted = '#FFFFFF'
on_click 1 = "exec $HOME/.i3/scripts/pa-volume mute-toggle"
} }
volume_status input { volume_status input {
@@ -93,5 +120,4 @@ volume_status input {
command = "pactl" command = "pactl"
color_muted = '#FFFFFF' color_muted = '#FFFFFF'
is_input = True is_input = True
on_click 1 = "exec $HOME/.i3/scripts/pa-volume mute-toggle-mic"
} }

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
dmenu_run -fn 'Inconsolata:size=10' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000001' rofi -show combi -combi-modi run -display-combi "run"

View File

@@ -3,7 +3,7 @@
### From http://www.archlinux.org/index.php/i3 ### From http://www.archlinux.org/index.php/i3
_logfile="$LOGDIR/i3/i3exit.log" _logfile="$LOGDIR/i3/i3exit.log"
LOCKSCREEN="$LIBDIR/wallpaper/lockscreen" LOCKSCREEN="$LIBDIR/lockscreen"
_fallback_color="000000" _fallback_color="000000"
@@ -19,29 +19,34 @@ lock()
{ {
set -x set -x
playing=0 playing=0
# if dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep -q Playing ; then if [[ "$(playerctl -p spotify status)" == "Playing" ]] ; then
# playing=1 playing=1
# fi fi
# echo $playing if (( $playing )) ; then
# (( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause playerctl -p spotify pause
fi
if [[ -f "$LOCKSCREEN" ]] ; then if [[ -f "$LOCKSCREEN" ]] ; then
resized_lockscreen=$(mktemp)
convert "${LOCKSCREEN}" -resize "${MACHINE_RESOLUTION_X}x${MACHINE_RESOLUTION_Y}" "${resized_lockscreen}"
i3lock --nofork --show-failed-attempts --ignore-empty-password \ i3lock --nofork --show-failed-attempts --ignore-empty-password \
--image "$LOCKSCREEN" --image "${resized_lockscreen}"
rm "${resized_lockscreen}"
else else
i3lock --nofork --show-failed-attempts --ignore-empty-password \ i3lock --nofork --show-failed-attempts --ignore-empty-password \
--color "$_fallback_color" --color "$_fallback_color"
fi fi
# (( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play if (( $playing )) ; then
playerctl -p spotify play
fi
} }
screen_off() { screen_off() {
:
xset dpms force off xset dpms force off
} }
reset_screen() { reset_screen() {
xset -dpms systemctl --user restart dpms.service
xset s off
} }
lock_and_screen_off() { lock_and_screen_off() {
@@ -49,16 +54,11 @@ lock_and_screen_off() {
_pid=$! _pid=$!
dunstctl disable dunstctl disable
screen_off screen_off
xset dpms 0 0 5
wait $_pid wait $_pid
dunstctl enable dunstctl enable
reset_screen reset_screen
} }
disable_lid_switch() {
grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup
}
signal="$1" signal="$1"
log "[I] Received signal \"$signal\"." log "[I] Received signal \"$signal\"."
@@ -74,13 +74,11 @@ case "$signal" in
suspend) suspend)
log "[I] Suspending." log "[I] Suspending."
lock & lock &
disable_lid_switch
sleep 0.1 sleep 0.1
systemctl suspend systemctl suspend
;; ;;
hibernate) hibernate)
log "[I] Hibernating." log "[I] Hibernating."
disable_lid_switch
sudo systemctl hibernate sudo systemctl hibernate
;; ;;
reboot) reboot)

View File

@@ -10,14 +10,21 @@ is_on() {
switch_on() { switch_on() {
touch "${_status_file}" touch "${_status_file}"
dunstctl disable & dunstctl disable &
systemctl --user --no-block stop redshift_user systemctl --user --no-block stop redshift.service
systemctl --user --no-block stop spotify systemctl --user --no-block stop spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode"
~/.i3/scripts/bar-update "systemd redshift"
~/.i3/scripts/bar-update "systemd spotify"
} }
switch_off() { switch_off() {
rm -f "${_status_file}" rm -f "${_status_file}"
dunstctl enable & dunstctl enable &
"$_autostart" redshift_user spotify systemctl --user --no-block start redshift.service
systemctl --user --no-block start spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode"
~/.i3/scripts/bar-update "systemd redshift"
~/.i3/scripts/bar-update "systemd spotify"
} }

View File

@@ -14,6 +14,6 @@ output=$(
for option in "${options[@]}"; do for option in "${options[@]}"; do
echo "($i) $option" echo "($i) $option"
(( i++ )) (( i++ ))
done | dmenu -fn 'Inconsolata:size=10' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000') done | rofi -dmenu -p "action" -no-custom)
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }" [[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"

View File

@@ -2,13 +2,13 @@
case "$1" in case "$1" in
toggle) toggle)
cmd="PlayPause" cmd="play-pause"
;; ;;
next) next)
cmd="Next" cmd="next"
;; ;;
previous) previous)
cmd="Previous" cmd="previous"
;; ;;
*) *)
echo "wrong argument $1" echo "wrong argument $1"
@@ -16,5 +16,5 @@ previous)
;; ;;
esac esac
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."${cmd}" playerctl -p spotify "${cmd}"
~/.i3/scripts/bar-update spotify ~/.i3/scripts/bar-update spotify

17
i3/scripts/toggle-app Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
app="${1:?app missing}"
unitname="${app}.service"
running() {
systemctl --user --quiet status "${unitname}" >/dev/null
}
if running ; then
systemctl --user stop "${unitname}"
else
systemctl --user start "${unitname}"
fi
py3-cmd refresh "systemd $app"

View File

@@ -11,6 +11,8 @@ set -o nounset
DOTDIR="/var/lib/dotfiles" DOTDIR="/var/lib/dotfiles"
_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" _SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
[[ -e './.git' ]] && git submodule update --init
if [[ "$(readlink "${_SCRIPT_DIR}")" != "${DOTDIR}" ]] && [[ "${_SCRIPT_DIR}" != "${DOTDIR}" ]] ; then if [[ "$(readlink "${_SCRIPT_DIR}")" != "${DOTDIR}" ]] && [[ "${_SCRIPT_DIR}" != "${DOTDIR}" ]] ; then
if [[ -e "${DOTDIR}" ]] ; then if [[ -e "${DOTDIR}" ]] ; then
2>&1 printf "${DOTDIR} already exists. This seems unsafe.\n" 2>&1 printf "${DOTDIR} already exists. This seems unsafe.\n"
@@ -45,11 +47,14 @@ sudowrap() {
fi fi
} }
cache_updated=0
_install() { _install() {
_package="$1" ; shift _package="$1" ; shift
if [[ $NAME == "Fedora" ]] ; then if [[ $NAME == "Ubuntu" ]] ; then
sudowrap dnf install --assumeyes "${_package}" if ! (( cache_updated )) ; then
elif [[ $NAME == "Ubuntu" ]] ; then apt-get update
cache_updated=1
fi
sudowrap apt-get install --assume-yes "${_package}" sudowrap apt-get install --assume-yes "${_package}"
elif [[ $NAME == "Arch Linux" ]] ; then elif [[ $NAME == "Arch Linux" ]] ; then
sudowrap pacman -S --noconfirm "${_package}" sudowrap pacman -S --noconfirm "${_package}"
@@ -63,6 +68,7 @@ _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
@@ -86,3 +92,7 @@ if ! python3 -c 'import venv' 2>/dev/null ; then
fi fi
cd "$DOTDIR" && make cd "$DOTDIR" && make
# fix permissions of the directory
sudowrap chgrp -R dotfiles "${DOTDIR}"
sudowrap chmod g+wX "${DOTDIR}"

View File

@@ -29,7 +29,7 @@ sed -e 's/\s*\([^#]*\).*/\1/' << EOF | sfdisk ${DEVICE}
device: ${DEVICE} device: ${DEVICE}
${DEVICE}1 : name=uefi , size=512M , type=uefi ${DEVICE}1 : name=uefi , size=512M , type=uefi
${DEVICE}2 : name=boot , size=200M , type=linux ${DEVICE}2 : name=boot , size=512M , type=linux
${DEVICE}3 : name=cryptpart , type=linux ${DEVICE}3 : name=cryptpart , type=linux
EOF EOF
@@ -61,7 +61,7 @@ mount ${DEVICE}2 /mnt/boot
mkswap /dev/vgbase/swap mkswap /dev/vgbase/swap
swapon /dev/vgbase/swap swapon /dev/vgbase/swap
pacstrap /mnt base linux linux-firmware networkmanager amd-ucode lvm2 grub efibootmgr pacstrap /mnt base linux-zen linux-firmware networkmanager amd-ucode lvm2 grub efibootmgr
genfstab -U /mnt >> /mnt/etc/fstab genfstab -U /mnt >> /mnt/etc/fstab

View File

@@ -1,54 +1,32 @@
packages: packages:
list: list:
build-essentials: build-essentials:
fedora:
- autoconf
- automake
- gcc-c++
- gcc
- ctags
- cmake
- libtool
- elfutils-libelf-devel
- maven
ubuntu: ubuntu:
- build-essential - build-essential
- exuberant-ctags - exuberant-ctags
- cmake
archlinux: archlinux:
- gcc - gcc
- ctags - ctags
- cmake - cmake
- maven - maven
golang: - base-devel
fedora: ["golang", "glibc-static"]
ubuntu: ["golang-go"]
archlinux: ["go"]
make: make:
fedora: ["make"]
ubuntu: ["make"] ubuntu: ["make"]
archlinux: ["make"] archlinux: ["make"]
gdb: gdb:
fedora: ["gdb"]
ubuntu: ["gdb"] ubuntu: ["gdb"]
archlinux: ["gdb"] archlinux: ["gdb"]
strace: strace:
fedora: ["strace"]
ubuntu: ["strace"] ubuntu: ["strace"]
archlinux: ["strace"] archlinux: ["strace"]
sudo: sudo:
fedora: ["sudo"]
ubuntu: ["sudo"] ubuntu: ["sudo"]
archlinux: ["sudo"] archlinux: ["sudo"]
apt: apt:
fedora: []
ubuntu: ["apt-file"] ubuntu: ["apt-file"]
archlinux: [] archlinux: [""]
xorg: xorg:
fedora:
- '@base-x'
- xorg-x11-drv-synaptics-legacy
- xorg-x11-drv-libinput
- libinput
ubuntu: [] ubuntu: []
archlinux: archlinux:
- xorg-server - xorg-server
@@ -60,404 +38,369 @@ packages:
- xorg-xset - xorg-xset
- xorg-xinit - xorg-xinit
dmenu: dmenu:
fedora: ["dmenu"]
ubuntu: ["dmenu"] ubuntu: ["dmenu"]
archlinux: ["dmenu"] archlinux: ["dmenu"]
ansible: ansible:
fedora: ["ansible"]
ubuntu: ["ansible"] ubuntu: ["ansible"]
archlinux: ["ansible"] archlinux: ["ansible"]
xdotool: xdotool:
fedora: ["xdotool"]
ubuntu: ["xdotool"] ubuntu: ["xdotool"]
archlinux: ["xdotool"] archlinux: ["xdotool"]
arandr: arandr:
fedora: ["arandr"]
ubuntu: ["arandr"] ubuntu: ["arandr"]
archlinux: ["arandr"] archlinux: ["arandr"]
borgbackup: borgbackup:
fedora: ["borgbackup"]
ubuntu: ["borgbackup"] ubuntu: ["borgbackup"]
archlinux: ["borgbackup"] archlinux: ["borgbackup"]
docker: docker:
fedora: ["docker"] ubuntu: ["docker.io", "containerd", "docker-compose"]
ubuntu: ["docker.io"]
archlinux: ["docker", "docker-compose"] archlinux: ["docker", "docker-compose"]
font-awesome: font-awesome:
fedora: ["fontawesome-fonts", "fontawesome-fonts-web"]
ubuntu: ["fonts-font-awesome"] ubuntu: ["fonts-font-awesome"]
archlinux: ["ttf-font-awesome"] archlinux: ["ttf-font-awesome"]
font-inconsolata: font-inconsolata:
fedora: ["levien-inconsolata-fonts"]
ubuntu: ["fonts-inconsolata"] ubuntu: ["fonts-inconsolata"]
archlinux: ["ttf-inconsolata"] archlinux: ["ttf-inconsolata"]
font-dejavu: font-dejavu:
fedora: [] ubuntu: ["fonts-dejavu"]
ubuntu: []
archlinux: ["ttf-dejavu"] archlinux: ["ttf-dejavu"]
font-libertine: font-libertine:
fedora: [] ubuntu: ["fonts-linuxlibertine"]
ubuntu: []
archlinux: ["ttf-linux-libertine"] archlinux: ["ttf-linux-libertine"]
font-emoji:
ubuntu: []
archlinux: ["noto-fonts-emoji"]
git: git:
fedora: ["git", "gitk"]
ubuntu: ["git", "git-extras", "gitk", "git-email"] ubuntu: ["git", "git-extras", "gitk", "git-email"]
archlinux: ["git"] # tk required for gitk
archlinux: ["git", "tk"]
htop: htop:
fedora: ["htop"]
ubuntu: ["htop"] ubuntu: ["htop"]
archlinux: ["htop"] archlinux: ["htop"]
feh: feh:
fedora: ["feh"]
ubuntu: ["feh"] ubuntu: ["feh"]
archlinux: ["feh"] archlinux: ["feh"]
i3: i3:
fedora: ["i3"]
ubuntu: ["i3"] ubuntu: ["i3"]
archlinux: ["i3-wm"] archlinux: ["i3-wm"]
i3lock: i3lock:
fedora: ["i3lock"]
ubuntu: ["i3lock"] ubuntu: ["i3lock"]
archlinux: ["i3lock"] archlinux: ["i3lock"]
pluma: pluma:
fedora: ["pluma"]
ubuntu: ["pluma"] ubuntu: ["pluma"]
archlinux: ["pluma"] archlinux: ["pluma"]
vim:
fedora: ["vim-enhanced"]
ubuntu: ["vim"]
archlinux: ["gvim"]
neovim: neovim:
fedora: ["neovim", "python3-neovim"]
ubuntu: ["neovim"] ubuntu: ["neovim"]
archlinux: ["neovim"] archlinux: ["neovim", "python-pynvim"]
network-manager-applet: network-manager-applet:
fedora: ["network-manager-applet"]
ubuntu: [] ubuntu: []
archlinux: ["network-manager-applet"] archlinux: ["network-manager-applet"]
pasystray: pasystray:
fedora: ["pasystray"]
ubuntu: ["pasystray"] ubuntu: ["pasystray"]
archlinux: ["pasystray"] archlinux: ["pasystray"]
redshift: redshift:
fedora: ["redshift-gtk"]
ubuntu: ["redshift-gtk"] ubuntu: ["redshift-gtk"]
archlinux: ["redshift"] archlinux: ["redshift"]
pavucontrol: pavucontrol:
fedora: ["pavucontrol"]
ubuntu: ["pavucontrol"] ubuntu: ["pavucontrol"]
archlinux: ["pavucontrol-qt"] archlinux: ["pavucontrol-qt"]
pinentry-qt: pinentry-qt:
fedora: ["pinentry", "pinentry-curses", "pinentry-qt"]
ubuntu: ["pinentry-curses", "pinentry-qt"] ubuntu: ["pinentry-curses", "pinentry-qt"]
archlinux: ["pinentry"] archlinux: ["pinentry"]
pinta: pinta:
fedora: ["pinta"]
ubuntu: ["pinta"] ubuntu: ["pinta"]
archlinux: ["pinta"] archlinux: ["pinta"]
py3status: py3status:
fedora: ["py3status", "python3-pytz", "python3-tzlocal"] ubuntu: ["py3status", "python3-arrow", "python3-tzlocal", "python3-pydbus"]
ubuntu: ["py3status", "python3-arrow", "python3-tzlocal"] archlinux: ["py3status", "python-pytz", "python-tzlocal", "python-dbus", "python-pydbus"]
archlinux: ["py3status"]
pass: pass:
fedora: ["pass"]
ubuntu: ["pass"] ubuntu: ["pass"]
archlinux: ["pass"] archlinux: ["pass", "passff-host"]
keepassx: keepassx:
fedora: ["keepassx"]
ubuntu: ["keepassx"] ubuntu: ["keepassx"]
archlinux: [] archlinux: []
urxvt: urxvt:
fedora: ["rxvt-unicode-256color"]
ubuntu: ["rxvt-unicode-256color"] ubuntu: ["rxvt-unicode-256color"]
archlinux: ["rxvt-unicode"] archlinux: ["rxvt-unicode"]
alacritty:
ubuntu: []
archlinux: ["alacritty"]
tmux: tmux:
fedora: ["tmux"]
ubuntu: ["tmux"] ubuntu: ["tmux"]
archlinux: ["tmux"] archlinux: ["tmux"]
screen: screen:
fedora: ["screen"]
ubuntu: ["screen"] ubuntu: ["screen"]
archlinux: ["screen"] archlinux: ["screen"]
zsh: zsh:
fedora: ["zsh", "zsh-syntax-highlighting"]
ubuntu: ["zsh", "zsh-syntax-highlighting"] ubuntu: ["zsh", "zsh-syntax-highlighting"]
archlinux: ["zsh", "zsh-syntax-highlighting", "zsh-autosuggestions", "zsh-completions"] archlinux: ["zsh", "zsh-syntax-highlighting", "zsh-autosuggestions", "zsh-completions"]
zathura: zathura:
fedora: ["zathura-pdf-mupdf"]
ubuntu: ["zathura", "zathura-pdf-poppler"] ubuntu: ["zathura", "zathura-pdf-poppler"]
archlinux: ["zathura", "zathura-pdf-mupdf"] archlinux: ["zathura", "zathura-pdf-poppler"]
pdf:
ubuntu: ["ghostscript", "enscript"]
archlinux: ["ghostscript", "enscript"]
pandoc: pandoc:
fedora: ["pandoc"] ubuntu:
ubuntu: ["pandoc"] - pandoc
archlinux: ["pandoc"] - texlive
- python3-sphinxcontrib.svg2pdfconverter # for html to pdf conversions
- texlive-latex-extra
archlinux: ["pandoc", "texlive-core", "texlive-fontsextra", "texlive-latexextra"]
libvirt: libvirt:
fedora: ["virt-manager", "libvirt-client"] ubuntu: ["virt-manager", "libvirt-daemon"]
ubuntu: ["virt-manager", "libvirt-bin"] archlinux: ["virt-manager", "libvirt", "dnsmasq", "ebtables", "dmidecode"]
archlinux: ["virt-manager", "libvirt"]
firefox: firefox:
fedora: ["firefox"]
ubuntu: ["firefox"] ubuntu: ["firefox"]
archlinux: ["firefox"] archlinux: ["firefox"]
ranger: ranger:
fedora: ["ranger"]
ubuntu: ["ranger"] ubuntu: ["ranger"]
archlinux: ["ranger"] archlinux: ["ranger"]
thunar: thunar:
fedora: ["thunar"]
ubuntu: ["thunar"] ubuntu: ["thunar"]
archlinux: ["thunar"] archlinux: ["thunar"]
unclutter: unclutter:
fedora: ["unclutter"]
ubuntu: ["unclutter"] ubuntu: ["unclutter"]
archlinux: ["unclutter"] archlinux: ["unclutter"]
chromium:
fedora: ["chromium"]
ubuntu: ["chromium-browser"]
archlinux: ["chromium"]
libreoffice: libreoffice:
fedora: ["libreoffice", "libreoffice-langpack-de", "libreoffice-langpack-en"]
ubuntu: ["libreoffice"] ubuntu: ["libreoffice"]
archlinux: ["libreoffice-fresh", "libreoffice-fresh-de"] archlinux: ["libreoffice-fresh", "libreoffice-fresh-de"]
oxygen: qt-theming:
fedora: ["breeze-cursor-theme", "breeze-icon-theme", "breeze-gtk"] ubuntu: ["breeze-cursor-theme", "breeze-icon-theme", "breeze", "qt5ct"]
ubuntu: ["breeze-cursor-theme", "breeze-icon-theme", "breeze", "gtk3-engines-breeze"] archlinux: ["breeze", "breeze-icons", "breeze-grub", "qt5ct"]
archlinux: ["breeze", "breeze-icons", "breeze-gtk", "breeze-grub"] gtk-theming:
ubuntu: ["gtk3-engines-breeze", "lxappearance"]
archlinux: ["breeze-gtk", "lxappearance"]
xcompmgr: xcompmgr:
fedora: ["xcompmgr"]
ubuntu: ["xcompmgr"] ubuntu: ["xcompmgr"]
archlinux: ["xcompmgr"] archlinux: ["xcompmgr"]
python: python:
fedora: ["python", "python3-devel"]
ubuntu: ["python3", "python3-pip", "python3-venv", "virtualenv", "pylint3"] ubuntu: ["python3", "python3-pip", "python3-venv", "virtualenv", "pylint3"]
archlinux: ["python3"] archlinux: ["python3"]
python-modules:
ubuntu: []
archlinux:
- python-ruamel-yaml
- python-gitpython
- python-semver
xbacklight: xbacklight:
fedora: ["xbacklight"]
ubuntu: ["xbacklight"] ubuntu: ["xbacklight"]
archlinux: ["xorg-xbacklight"] archlinux: ["xorg-xbacklight"]
wireshark: wireshark:
fedora: ["wireshark"]
ubuntu: ["wireshark", "wireshark-qt"] ubuntu: ["wireshark", "wireshark-qt"]
archlinux: ["wireshark-cli", "wireshark-qt"] archlinux: ["wireshark-cli", "wireshark-qt"]
dia: dia:
fedora: ["dia"]
ubuntu: ["dia"] ubuntu: ["dia"]
archlinux: ["dia"] archlinux: ["dia"]
shutter:
fedora: ["shutter"]
ubuntu: ["shutter"]
archlinux: []
nmap: nmap:
fedora: ["nmap"]
ubuntu: ["nmap"] ubuntu: ["nmap"]
archlinux: ["nmap"] archlinux: ["nmap"]
openvpn: openvpn:
fedora: ["openvpn"]
ubuntu: ["openvpn"] ubuntu: ["openvpn"]
archlinux: ["openvpn"] archlinux: ["openvpn"]
curl: curl:
fedora: ["curl"]
ubuntu: ["curl"] ubuntu: ["curl"]
archlinux: ["curl"] archlinux: ["curl"]
wget: wget:
fedora: ["wget"]
ubuntu: ["wget"] ubuntu: ["wget"]
archlinux: ["wget"] archlinux: ["wget"]
tree: tree:
fedora: ["tree"]
ubuntu: ["tree"] ubuntu: ["tree"]
archlinux: ["tree"] archlinux: ["tree"]
which: which:
fedora: ["which"]
ubuntu: [] ubuntu: []
archlinux: ["which"] archlinux: ["which"]
zip: zip:
fedora: ["zip"]
ubuntu: ["zip", "unzip"] ubuntu: ["zip", "unzip"]
archlinux: ["zip", "unzip"] archlinux: ["zip", "unzip"]
traceroute: traceroute:
fedora: ["traceroute"]
ubuntu: ["traceroute"] ubuntu: ["traceroute"]
archlinux: ["traceroute"] archlinux: ["traceroute"]
tcpdump: tcpdump:
fedora: ["tcpdump"]
ubuntu: ["tcpdump"] ubuntu: ["tcpdump"]
archlinux: ["tcpdump"] archlinux: ["tcpdump"]
tar: tar:
fedora: ["tar"]
ubuntu: ["tar"] ubuntu: ["tar"]
archlinux: ["tar"] archlinux: ["tar"]
rsync: rsync:
fedora: ["rsync"]
ubuntu: ["rsync"] ubuntu: ["rsync"]
archlinux: ["rsync"] archlinux: ["rsync"]
net-tools: net-tools:
fedora: ["net-tools"]
ubuntu: ["net-tools"] ubuntu: ["net-tools"]
archlinux: ["net-tools"] archlinux: ["net-tools"]
ntfs: ntfs:
fedora: ["ntfs-3g", "ntfsprogs"]
ubuntu: ["ntfs-3g"] ubuntu: ["ntfs-3g"]
archlinux: ["ntfs-3g"] archlinux: ["ntfs-3g"]
lsof: lsof:
fedora: ["lsof"]
ubuntu: ["lsof"] ubuntu: ["lsof"]
archlinux: ["lsof"] archlinux: ["lsof"]
iptables: iptables:
fedora: ["iptables"]
ubuntu: ["iptables"] ubuntu: ["iptables"]
archlinux: ["iptables"] archlinux: ["iptables-nft"]
pwgen: pwgen:
fedora: ["pwgen"]
ubuntu: ["pwgen"] ubuntu: ["pwgen"]
archlinux: ["pwgen"] archlinux: ["pwgen"]
gpg: gpg:
fedora: ["gnupg2", "paperkey", "yubikey-manager"] ubuntu: ["gnupg2", "pcscd", "scdaemon"]
ubuntu: ["gnupg2"] archlinux: ["gnupg", "paperkey", "yubikey-manager", "yubikey-touch-detector"]
archlinux: ["gnupg", "paperkey", "yubikey-manager"]
networkmanager: networkmanager:
fedora: ["NetworkManager", "NetworkManager-wifi"] ubuntu: ["network-manager", "network-manager-openvpn", "network-manager-openconnect", "network-manager-openconnect-gnome"]
ubuntu: ["network-manager", "network-manager-openvpn", "network-manager-openconnect"]
archlinux: ["networkmanager"] archlinux: ["networkmanager"]
pulseaudio: pulseaudio:
fedora: ["pulseaudio", "pulseaudio-utils"]
ubuntu: ["pulseaudio", "pulseaudio-utils"] ubuntu: ["pulseaudio", "pulseaudio-utils"]
archlinux: ["pulseaudio", "pulseaudio-alsa"] archlinux: ["pulseaudio", "pulseaudio-alsa", "lib32-libpulse"]
iw: iw:
fedora: ["iw"]
ubuntu: ["iw"] ubuntu: ["iw"]
archlinux: ["iw"] archlinux: ["iw"]
cowsay: cowsay:
fedora: ["cowsay"]
ubuntu: ["cowsay"] ubuntu: ["cowsay"]
archlinux: ["cowsay"] archlinux: ["cowsay"]
ruby: ruby:
fedora: ["ruby", "ruby-devel", "rubygem-bundler"]
ubuntu: ["ruby", "ruby-dev", "ruby-bundler"] ubuntu: ["ruby", "ruby-dev", "ruby-bundler"]
archlinux: ["ruby"] archlinux: ["ruby"]
lxc: lxc:
fedora: ["lxc"]
ubuntu: ["lxc"] ubuntu: ["lxc"]
archlinux: ["lxc"] archlinux: ["lxc"]
acpi: acpi:
fedora: ["acpi"]
ubuntu: ["acpid"] ubuntu: ["acpid"]
archlinux: ["acpi", "acpid"] archlinux: ["acpi", "acpid"]
npm: npm:
fedora: ["npm"]
ubuntu: ["npm"] ubuntu: ["npm"]
archlinux: ["npm"] archlinux: ["npm"]
xdg: xdg:
fedora: ["xdg-utils"]
ubuntu: ["xdg-utils"] ubuntu: ["xdg-utils"]
archlinux: ["xdg-utils"] archlinux: ["xdg-utils"]
docs:
fedora: ["man-pages"]
ubuntu: ["manpages"]
archlinux: ["man-pages"]
compton: compton:
fedora: ["compton"]
ubuntu: ["compton"] ubuntu: ["compton"]
archlinux: [] archlinux: []
dunst: dunst:
fedora: ["dunst"]
ubuntu: ["dunst"] ubuntu: ["dunst"]
archlinux: ["dunst"] archlinux: ["dunst"]
cloc: cloc:
fedora: ["cloc"]
ubuntu: ["cloc"] ubuntu: ["cloc"]
archlinux: ["cloc"] archlinux: ["cloc"]
bluetooth: bluetooth:
fedora: []
ubuntu: ["blueman"] ubuntu: ["blueman"]
archlinux: ["bluez", "bluez-tools", "blueman"] archlinux: ["bluez", "bluez-tools", "blueman"]
autorandr: autorandr:
fedora: []
ubuntu: ["autorandr"] ubuntu: ["autorandr"]
archlinux: ["autorandr"] archlinux: ["autorandr"]
bwm-ng: bwm-ng:
fedora: []
ubuntu: ["bwm-ng"] ubuntu: ["bwm-ng"]
archlinux: ["bwm-ng"] archlinux: ["bwm-ng"]
virtualbox: virtualbox:
fedora: []
ubuntu: ["virtualbox"] ubuntu: ["virtualbox"]
archlinux: ["virtualbox", "virtualbox-host-modules-arch"] archlinux: ["virtualbox"]
ssh: ssh:
fedora: [] ubuntu: ["ssh"]
ubuntu: []
archlinux: ["openssh"] archlinux: ["openssh"]
sshfs: sshfs:
fedora: []
ubuntu: ["sshfs"] ubuntu: ["sshfs"]
archlinux: ["sshfs"] archlinux: ["sshfs"]
expect: expect:
fedora: []
ubuntu: ["expect"] ubuntu: ["expect"]
archlinux: ["expect"] archlinux: ["expect"]
inotify: inotify:
fedora: []
ubuntu: ["inotify-tools"] ubuntu: ["inotify-tools"]
archlinux: ["inotify-tools"] archlinux: ["inotify-tools"]
rclone: rclone:
fedora: ["rclone"]
ubuntu: ["rclone"] ubuntu: ["rclone"]
archlinux: ["rclone"] archlinux: ["rclone"]
dnf: dnf:
fedora: ["python3-dnf"]
ubuntu: [] ubuntu: []
archlinux: [] archlinux: []
rust: rustup:
fedora: [] ubuntu: []
ubuntu: ["rustc", "cargo"] archlinux: ["rustup"]
archlinux: ["rust"]
musescore: musescore:
fedora: [] ubuntu: ["musescore3"]
ubuntu: ["musescore"]
archlinux: ["musescore"] archlinux: ["musescore"]
sipcalc: sipcalc:
fedora: []
ubuntu: ["sipcalc"] ubuntu: ["sipcalc"]
archlinux: ["sipcalc"] archlinux: ["sipcalc"]
rofi: rofi:
fedora: []
ubuntu: ["rofi"] ubuntu: ["rofi"]
archlinux: ["rofi"] archlinux: ["rofi"]
anki:
fedora: ["anki"]
ubuntu: ["anki"]
archlinux: ["anki"]
imv: imv:
fedora: [] ubuntu: ["imv"]
ubuntu: []
archlinux: ["imv"] archlinux: ["imv"]
pacman: pacman:
fedora: []
ubuntu: [] ubuntu: []
archlinux: ["pacman", "pacman-contrib"] archlinux: ["pacman", "pacman-contrib"]
steam: steam:
fedora: []
ubuntu: [] ubuntu: []
archlinux: ["steam"] archlinux: ["steam"]
man: man:
fedora: [] ubuntu: ["man-db", "manpages"]
ubuntu: []
archlinux: ["man-db", "man-pages"] archlinux: ["man-db", "man-pages"]
discord:
fedora: []
ubuntu: []
archlinux: ["discord"]
nextcloud: nextcloud:
fedora: [] ubuntu: ["nextcloud-desktop"]
ubuntu: []
archlinux: ["nextcloud-client"] archlinux: ["nextcloud-client"]
kwallet: kwallet:
fedora: []
ubuntu: [] ubuntu: []
archlinux: ["kwallet", "kwalletmanager"] archlinux: ["kwallet", "kwalletmanager"]
pv:
ubuntu: ["pv"]
archlinux: ["pv"]
stress:
ubuntu: ["stress"]
archlinux: ["stress"]
mpris:
ubuntu: ["playerctl"]
archlinux: ["playerctl"]
imagemagick:
ubuntu: ["imagemagick"]
archlinux: ["imagemagick"]
mpv:
ubuntu: ["mpv"]
archlinux: ["mpv"]
gnome-keyring:
ubuntu: ["gnome-keyring"]
archlinux: ["gnome-keyring"]
element:
ubuntu: []
archlinux: ["element-desktop"]
maim:
ubuntu: ["maim"]
archlinux: ["maim"]
mkinitcpio:
ubuntu: []
archlinux: ["mkinitcpio"]
terraform:
ubuntu: []
archlinux: ["terraform"]
synclient:
ubuntu: ["xserver-xorg-input-synaptics"]
archlinux: ["xf86-input-synaptics"]
ncdu:
ubuntu: ["ncdu"]
archlinux: ["ncdu"]
font-utils:
ubuntu: ["woff-tools", "woff2"]
archinux: ["woff2"]
remove: remove:
mousepad: mousepad:
fedora: ["mousepad"]
ubuntu: ["mousepad"] ubuntu: ["mousepad"]
archlinux: ["mousepad"] archlinux: ["mousepad"]
chrome:
ubuntu: ["google-chrome-stable"]
archlinux: []
snap:
ubuntu: ["snapd"]
archlinux: []
golang:
ubuntu: ["golang-go"]
archlinux: ["go"]
signal:
ubuntu: []
archlinux: ["signal-desktop"]
vim:
ubuntu: ["vim"]
archlinux: ["gvim"]
discord:
ubuntu: []
archlinux: ["discord"]
rust:
ubuntu: ["rustc", "cargo"]
archlinux: ["rust"]

View File

@@ -10,59 +10,45 @@
tags: tags:
- always - always
- name: read variables
include_vars:
file: variables.yml
tags:
- always
- set_fact: - set_fact:
distro: "{{ ansible_distribution|lower }}" distro: "{{ ansible_distribution|lower }}"
tags: tags:
- always - always
- name: Check for valid distro - name: check for valid distro
assert: assert:
that: distro in ('fedora', 'ubuntu', 'archlinux') that: distro in ('ubuntu', 'archlinux')
- block: - block:
- block: - block:
- name: Update apt cache - name: update apt cache
apt: apt:
update_cache: true update_cache: true
become: true become: true
changed_when: false changed_when: false
- name: Upgrade system - name: upgrade system
apt: apt:
upgrade: dist upgrade: dist
become: true become: true
- name: Remove unused packages - name: remove unused packages
apt: apt:
autoremove: true autoremove: true
become: true become: true
- name: Clean apt cache - name: clean apt cache
apt: apt:
autoclean: true autoclean: true
become: true become: true
when: distro == 'ubuntu' when: distro == 'ubuntu'
- block:
- name: Update dnf cache
dnf:
update_cache: true
become: true
- name: Upgrade system
dnf:
name: '*'
state: latest
update_cache: false
become: true
- name: Remove unused packages
dnf:
autoremove: true
update_cache: false
become: true
when: distro == 'fedora'
- block: - block:
- name: enable multilib repository - name: enable multilib repository
blockinfile: blockinfile:
@@ -70,9 +56,19 @@
block: | block: |
[multilib] [multilib]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
marker: "# {mark} ANSIBLE MANAGED multilib"
become: true become: true
- name: Upgrade system - name: enable parallel download
blockinfile:
path: /etc/pacman.conf
insertafter: '\[options\]'
block: |
ParallelDownloads = 5
marker: "# {mark} ANSIBLE MANAGED parallel_download"
become: true
- name: upgrade system
pacman: pacman:
upgrade: true upgrade: true
update_cache: true update_cache: true
@@ -82,36 +78,118 @@
- name: install pacman-contrib for paccache - name: install pacman-contrib for paccache
package: package:
name: pacman-contrib name: pacman-contrib
state: installed state: present
become: true become: true
- name: Clean cache - name: clean cache
command: paccache -rk2 -ruk0 command: paccache -rk2 -ruk0
become: true become: true
changed_when: false
when: distro == 'archlinux' when: distro == 'archlinux'
tags: [update_system] tags: [update]
- name: install selinux specials on fedora - block:
dnf: - name: install sudo
state: installed package:
state: present
name: sudo
- name: install dependencies for paru
package:
state: present
name: name:
- python3-libselinux - base-devel
- policycoreutils-python-utils - git
- cargo
- asp
- bat
become: true become: true
when: distro == 'fedora'
- name: create build user on arch
user:
name: makepkg
home: /var/lib/makepkg
create_home: true
shell: /bin/bash
system: true
become: true
- name: create paru user on arch
user:
name: paru
home: /var/lib/paru
create_home: true
shell: /bin/bash
system: true
become: true
- name: configure passwordless sudo for paru user
copy:
owner: root
group: root
mode: "0600"
dest: /etc/sudoers.d/paru
content: |
paru ALL=(ALL) NOPASSWD: /usr/bin/pacman
become: true
- name: check if paru is already installed
shell: |
set -o errexit
if pacman -Qi paru >/dev/null 2>&1; then
exit 100
fi
exit 0
args:
executable: /bin/bash
changed_when: false
check_mode: false
failed_when: result.rc not in (0, 100)
register: result
- name: build paru on arch
shell: |
set -o errexit
mkdir -p /tmp/paru-build
cd /tmp/paru-build
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru.tar.gz
tar xvf paru.tar.gz
cd paru
makepkg
args:
executable: /bin/bash
become: true # do not build as root!
become_user: makepkg
when: result.rc != 100
- name: install paru
shell: |
set -o errexit
pacman --noconfirm -U /tmp/paru-build/paru/paru-*.pkg.tar.zst
rm -rf /tmp/paru-build
args:
executable: /bin/bash
become: true
when: result.rc != 100
when: distro == 'archlinux'
- block: - block:
- name: load package list - name: load package list
include_vars: include_vars:
file: packages.yml file: packages.yml
- name: enable neovim ppa - name: force-update iptables to iptables-nft on arch
apt_repository: shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
repo: 'ppa:neovim-ppa/stable' changed_when: false
update_cache: true
become: true become: true
when: distro == 'ubuntu' when: distro == 'archlinux'
- set_fact: - set_fact:
defined_packages: "{{ packages|json_query('keys(list)') }}" defined_packages: "{{ packages|json_query('keys(list)') }}"
@@ -136,7 +214,7 @@
- name: install packages - name: install packages
package: package:
name: "{{ packages|json_query(query) }}" name: "{{ packages|json_query(query) }}"
state: installed state: present
become: true become: true
vars: vars:
query: "{{ 'list.*.%s[]'|format(distro) }}" query: "{{ 'list.*.%s[]'|format(distro) }}"
@@ -174,7 +252,7 @@
- name: install lz4 - name: install lz4
package: package:
name: lz4 name: lz4
state: installed state: present
become: true become: true
- name: use lz4 for mkinitcpio compression - name: use lz4 for mkinitcpio compression
@@ -187,11 +265,6 @@
- rebuild initrd - rebuild initrd
when: distro == 'archlinux' when: distro == 'archlinux'
- set_fact:
disable_services:
- sshd
when: distro == 'fedora'
- set_fact: - set_fact:
disable_services: disable_services:
- ssh - ssh
@@ -211,16 +284,6 @@
become: true become: true
when: manage_services|default(true)|bool when: manage_services|default(true)|bool
- set_fact:
enable_services:
- NetworkManager
# does not work with fedora 31 due to the switch to cgroups v2:
# https://github.com/docker/cli/issues/2104
# https://bugzilla.redhat.com/show_bug.cgi?id=1746355#c1
# - docker
- libvirtd
when: distro == 'fedora'
- set_fact: - set_fact:
enable_services: enable_services:
- NetworkManager - NetworkManager
@@ -234,6 +297,7 @@
- docker - docker
- libvirtd - libvirtd
- systemd-timesyncd - systemd-timesyncd
- pcscd
when: distro == 'archlinux' when: distro == 'archlinux'
- name: enable services - name: enable services
@@ -304,7 +368,7 @@
- lib32-libva-mesa-driver - lib32-libva-mesa-driver
- mesa-vdpau - mesa-vdpau
- lib32-mesa-vdpau - lib32-mesa-vdpau
state: installed state: present
become: true become: true
- name: set AMDGPU options - name: set AMDGPU options
@@ -326,6 +390,304 @@
- distro == 'archlinux' - distro == 'archlinux'
- machine.gpu is defined and machine.gpu == 'amd' - machine.gpu is defined and machine.gpu == 'amd'
- block:
- name: create rust build user
user:
name: rust_build
home: /var/lib/rust_build
create_home: true
shell: /bin/bash
system: true
become: true
- name: install rustup on ubuntu
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
args:
creates: /var/lib/rust_build/.cargo/bin/rustup
become: true
become_user: rust_build
when: distro == 'ubuntu'
- name: add rustup stable toolchain
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_user: rust_build
changed_when: false
- name: add rustup nightly toolchain
shell: . ~/.cargo/env && rustup toolchain install nightly
become: true
become_user: rust_build
changed_when: false
- name: update rustup nightly toolchain
shell: . ~/.cargo/env && rustup update nightly
become: true
become_user: rust_build
changed_when: false
- name: build rust crates from crates.io
shell: |
set -o errexit
. ~/.cargo/env
rustup run {{ item.toolchain|default('stable') }} cargo install --version {{ item.version }} {{ item.crate }}
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
args:
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
become: true # do not build as root!
become_user: rust_build
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'crates.io'
- name: build rust crates from git
shell: |
set -o errexit
. ~/.cargo/env
rustup run {{ item.toolchain|default('stable') }} cargo install --git {{ item.url }} --branch {{ item.branch }}
args:
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}
become: true # do not build as root!
become_user: rust_build
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'git'
- name: create target directory
file:
state: directory
path: /usr/local/lib/binaries/
owner: root
group: root
mode: '0775'
become: true
- name: move binaries for crates.io
shell: |
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }} /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
ln -s /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
args:
creates: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
become: true
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'crates.io'
- name: move binaries for git
shell: |
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /usr/local/lib/binaries/{{ item.binary }}
ln -s /usr/local/lib/binaries/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}
args:
creates: /usr/local/lib/binaries/{{ item.binary }}
become: true
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'git'
- name: link binaries for crates.io
file:
src: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
dest: /usr/local/bin/{{ item.binary }}
owner: root
group: root
state: link
force: true
become: true
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'crates.io'
- name: link binaries for git
file:
src: /usr/local/lib/binaries/{{ item.binary }}
dest: /usr/local/bin/{{ item.binary }}
owner: root
group: root
state: link
force: true
become: true
loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'git'
tags:
- rust_binaries
- block:
- name: stat go target directory
stat:
path: /usr/local/go-v{{ go_version }}
register: go_target_stat
- block:
- name: create temporary directory for go download
tempfile:
state: directory
register: go_download
- name: download go
get_url:
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
- name: unpack go
unarchive:
src: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
owner: root
group: root
mode: '0755'
dest: "{{ go_download.path }}"
remote_src: true
become: true
- name: install new go version
command: mv "{{ go_download.path }}/go/" /usr/local/go-v{{ go_version }}
become: true
- name: clean up go download directory
file:
path: "{{ go_download.path }}"
state: absent
when: not go_target_stat.stat.exists
- name: link to the current go version
file:
src: /usr/local/go-v{{ go_version }}
dest: /usr/local/go
owner: root
group: root
state: link
force: true
become: true
- name: add go directory to PATH and set GOROOT
copy:
dest: /etc/profile.d/go.sh
content: |
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
owner: root
group: root
mode: '0644'
become: true
tags: [go]
- block:
- name: install alacritty build dependencies
package:
state: present
# https://github.com/alacritty/alacritty/blob/master/INSTALL.md#debianubuntu
name:
- cmake
- pkg-config
- libfreetype6-dev
- libfontconfig1-dev
- libxcb-xfixes0-dev
- libxkbcommon-dev
- python3
become: true
- name: stat alacritty binary
stat:
path: /usr/local/bin/alacritty
register: alacritty_binary
- name: create temporary directory for alacritty build
tempfile:
state: directory
register: alacritty_build_tempdir
when: not alacritty_binary.stat.exists
- name: build alacritty
command: cargo install alacritty --root ./out
args:
chdir: "{{ alacritty_build_tempdir.path }}"
when: not alacritty_binary.stat.exists
- name: install alacritty
command: mv "{{ alacritty_build_tempdir.path }}/out/bin/alacritty" /usr/local/bin/alacritty
become: true
when: not alacritty_binary.stat.exists
- name: clean up build directory
file:
path: "{{ alacritty_build_tempdir.path }}"
state: absent
when: not alacritty_binary.stat.exists
when: distro == 'ubuntu'
tags: [alacritty]
- block:
- name: stat yubikey-touch-detector binary
stat:
path: /usr/local/bin/yubikey-touch-detector
register: yubikey_touch_detector_binary
- name: create temporary directory for yubikey-touch-detector build
tempfile:
state: directory
register: yubikey_touch_detector_build_tempdir
when: not yubikey_touch_detector_binary.stat.exists
- 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'
args:
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
when: not yubikey_touch_detector_binary.stat.exists
- name: install yubikey-touch-detector
command: >
mv
"{{ yubikey_touch_detector_build_tempdir.path }}/bin/yubikey-touch-detector"
/usr/local/bin/yubikey-touch-detector
become: true
when: not yubikey_touch_detector_binary.stat.exists
- name: clean up build directory
file:
path: "{{ yubikey_touch_detector_build_tempdir.path }}"
state: absent
when: not yubikey_touch_detector_binary.stat.exists
when: distro == 'ubuntu'
tags: [yubikey-touch-detector]
- block:
- block:
- name: add spotify apt key
apt_key:
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
id: "D1742AD60D811D58"
become: true
- name: add spotify repository
apt_repository:
repo: "deb http://repository.spotify.com stable non-free"
filename: spotify
become: true
- name: install spotify
apt:
name: spotify-client
update_cache: true
become: true
when: distro == 'ubuntu'
- block:
- name: install spotify from AUR via paru
shell: |
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
become: true
become_user: paru
args:
creates: /usr/bin/spotify
when: distro == 'archlinux'
tags: [spotify]
- name: create dotfiles group - name: create dotfiles group
group: group:
@@ -334,11 +696,22 @@
become: true become: true
become_user: root 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 - name: create dotfiles directory
file: file:
state: directory state: directory
path: /var/lib/dotfiles path: /var/lib/dotfiles
owner: nobody owner: dotfiles
group: dotfiles group: dotfiles
mode: '0775' # group needs write access! mode: '0775' # group needs write access!
become: true become: true
@@ -355,6 +728,7 @@
become: true become: true
become_user: "{{ user.name }}" become_user: "{{ user.name }}"
with_items: "{{ users }}" with_items: "{{ users }}"
no_log: True # less spam
loop_control: loop_control:
loop_var: user loop_var: user
tags: tags:
@@ -364,3 +738,8 @@
- name: rebuild initrd - name: rebuild initrd
command: mkinitcpio -P command: mkinitcpio -P
become: true become: true
register: mkinitcpio_cmd
failed_when: >
mkinitcpio_cmd.rc != 0
and
not (mkinitcpio_cmd.rc == 1 and "file not found: `fsck.overlay'" in mkinitcpio_cmd.stderr)

20
qt/qt5ct.conf Normal file
View File

@@ -0,0 +1,20 @@
[Appearance]
custom_palette=false
icon_theme=breeze
standard_dialogs=default
style=Fusion
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3

View File

@@ -1,13 +1,12 @@
ansible==2.10.4 ansible==4.6.0
ansible-base==2.10.3 ansible-core==2.11.5
cffi==1.14.4 cffi==1.14.6
cryptography==3.2.1 cryptography==35.0.0
ipaddress==1.0.23 Jinja2==3.0.1
Jinja2==2.11.2
jmespath==0.10.0 jmespath==0.10.0
MarkupSafe==1.1.1 MarkupSafe==2.0.1
packaging==20.7 packaging==21.0
pycparser==2.20 pycparser==2.20
pyparsing==2.4.7 pyparsing==2.4.7
PyYAML==5.3.1 PyYAML==5.4.1
six==1.15.0 resolvelib==0.5.4

1
rofi/config Normal file
View File

@@ -0,0 +1 @@
rofi.theme: /usr/share/rofi/themes/gruvbox-dark-soft.rasi

View File

@@ -0,0 +1,8 @@
reset: true
outputs:
- name: DisplayPort-0
opts:
mode: 2560x1440
rate: "144.00"
set:
TearFree: "on"

View File

@@ -0,0 +1,14 @@
reset: false
outputs:
- name: eDP-1
primary: True
opts:
mode: 1920x1080
scale: 1x1
pos: "0x0" # beware of hex
- name: DP-1-1
disable: true
- name: DP-1-2
disable: true
- name: DP-1-3
disable: true

View File

@@ -0,0 +1,18 @@
reset: true
outputs:
- name: eDP-1
opts:
mode: 1920x1080
scale: 0.7x0.7
pos: "0x0" # beware of hex
- name: DP-3
primary: True
opts:
mode: 1920x1080
right-of: eDP-1
reset: true
- name: DP-4
opts:
mode: 1920x1080
right-of: DP-3
reset: true

View File

@@ -0,0 +1,14 @@
reset: false
outputs:
- name: eDP-1
primary: True
opts:
mode: 1920x1080
scale: 1x1
pos: "0x0" # beware of hex
- name: DP-1-1
disable: true
- name: DP-1-2
disable: true
- name: DP-1-3
disable: true

View File

@@ -0,0 +1,18 @@
reset: true
outputs:
- name: eDP-1
opts:
mode: 1920x1080
scale: 0.7x0.7
pos: "0x0" # beware of hex
- name: DP-3
primary: True
opts:
mode: 1920x1080
right-of: eDP-1
reset: true
- name: DP-4
opts:
mode: 1920x1080
right-of: DP-3
reset: true

12
scripts/fix-aoe2.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
cd $(mktemp -d)
wget "https://aka.ms/vs/16/release/vc_redist.x64.exe"
cabextract vc_redist.x64.exe
cabextract a10
rm /var/games/steamapps/compatdata/813780/pfx/drive_c/windows/system32/ucrtbase.dll
cp ucrtbase.dll -t /var/games/steamapps/compatdata/813780/pfx/drive_c/windows/system32

105
scripts/install-gothic.sh Executable file
View File

@@ -0,0 +1,105 @@
#!/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
STEAMAPPS=/var/games/steamapps/
read -p "Make sure that gothic was installed via Steam and started once! <Enter> to continue, <CTRL+C> to abort "
set -o nounset
set -o xtrace
set -o errexit
downloaddir=~/download/gothic
mkdir -p "${downloaddir}"
cd "${downloaddir}"
curl -C - -L -o gothic_patch_108k.exe "https://www.worldofgothic.de/download.php?id=15"
curl -C - -L -o gothic1_playerkit-1.08k.exe "https://www.worldofgothic.de/download.php?id=61"
curl -C - -L -o Definitive_Edition_1_4_5.exe "https://www.worldofgothic.de/download.php?id=1586"
# superseded by union
curl -C - -L -O https://github.com/GothicFixTeam/GothicFix/releases/download/v1.8/G1Classic-SystemPack-1.8.exe
# curl -C - -L -O https://github.com/GothicFixTeam/GothicFix/releases/download/v1.8/Gothic1_PlayerKit-2.8.exe
curl -C - -L -o Ninja-2.5.09.exe "https://www.worldofgothic.de/download.php?id=1626"
# curl -C - -L -o Union_1.0j_22.02.2021.exe "https://www.worldofgothic.de/download.php?id=1625"
curl -C - -L -o G1CP-1.0.0.exe "https://www.worldofgothic.de/download.php?id=1636"
#curl -C - -L -o Spine_1.29.0.exe "https://www.worldofgothic.de/download.php?id=1417"
curl -C - -L -o Gothic1-GD3D11-17.7-dev16.zip https://github.com/Kirides/GD3D11/releases/download/v17.7-dev16/Gothic1-GD3D11-17.7-dev16.zip
curl -C - -L -o RiisisGothic1TextureMixV1.1.zip "https://www.worldofgothic.de/download.php?id=1458"
read -p 'During installation, use "Z:\var\games\steamapps\common\Gothic\" as the install directory! <Enter> to continue, <CTRL+C> to abort '
export WINEPREFIX="${STEAMAPPS}/compatdata/65540/pfx/"
#winetricks dxvk
winetricks directmusic
#read -p "In winecfg, go to Libraries tab, in 'existing overrides' search for 'dsound', select it and press remove button "
#winecfg
# wine "${downloaddir}"/gothic_patch_108k.exe
# wine "${downloaddir}"/gothic1_playerkit-1.08k.exe
# wine "${downloaddir}"/Gothic1_PlayerKit-2.8.exe
wine "${downloaddir}"/G1Classic-SystemPack-1.8.exe
wine "${downloaddir}"/Ninja-2.5.09.exe
# cmd="${WINEPREFIX}/dosdevices/c:/windows/syswow64/cmd.exe"
# cmdtarget="$(readlink "${cmd}")"
# rm "${WINEPREFIX}/dosdevices/c:/windows/syswow64/cmd.exe"
# winetricks cmd # for union install
# wine "${downloaddir}"/Union_1.0j_22.02.2021.exe
# ln -sf "$cmdtarget" "$cmd"
wine "${downloaddir}"/G1CP-1.0.0.exe
wine "${downloaddir}"/Definitive_Edition_1_4_5.exe
unzip -u "${downloaddir}"/Gothic1-GD3D11-17.7-dev16.zip -d "${STEAMAPPS}/common/Gothic/system"
unzip -u "${downloaddir}"/RiisisGothic1TextureMixV1.1.zip -d "${STEAMAPPS}/common/Gothic/Data"
read -p "Now run the game once and exit! <Enter> to continue, <CTRL+C> to abort "
cd /var/games/steamapps/common/Gothic
sed -i 's/^playLogoVideos=.*$/playLogoVideos=0\r/' system/Gothic.ini
sed -i 's/^sightValue=.*$/sightValue=14\r/' system/Gothic.ini
sed -i 's/^modelDetail=.*$/modelDetail=1\r/' system/Gothic.ini
sed -i 's/^subTitles=.*$/subTitles=1\r/' system/Gothic.ini
sed -i 's/^animatedWindows=.*$/animatedWindows=0\r/' system/Gothic.ini
sed -i 's/^bloodDetail=.*$/bloodDetail=2\r/' system/Gothic.ini
sed -i 's/^zVidResFullscreenX=.*$/zVidResFullscreenX=2560\r/' system/Gothic.ini
sed -i 's/^zVidResFullscreenY=.*$/zVidResFullscreenY=1440\r/' system/Gothic.ini
sed -i 's/^zDetailTexturesEnabled=.*$/zDetailTexturesEnabled=1\r/' system/Gothic.ini
sed -i 's/^zSubdivSurfacesEnabled=.*$/zSubdivSurfacesEnabled=1\r/' system/Gothic.ini
sed -i 's/^SimpleWindow=.*$/SimpleWindow=0\r/' system/SystemPack.ini
sed -i 's/^Gothic2_Control=.*$/Gothic2_Control=1\r/' system/SystemPack.ini
sed -i 's/^USInternationalKeyboardLayout=.*$/USInternationalKeyboardLayout=0\r/' system/SystemPack.ini
sed -i 's/^FPS_Limit=.*$/FPS_Limit=144\r/' system/SystemPack.ini
sed -i 's/^VerticalFOV=.*$/VerticalFOV=85\r/' system/SystemPack.ini
sed -i 's/^OutDoorPortalDistanceMultiplier=.*$/OutDoorPortalDistanceMultiplier=3\r/' system/SystemPack.ini
sed -i 's/^InDoorPortalDistanceMultiplier=.*$/InDoorPortalDistanceMultiplier=3\r/' system/SystemPack.ini
sed -i 's/^WoodPortalDistanceMultiplier=.*$/WoodPortalDistanceMultiplier=3\r/' system/SystemPack.ini
sed -i 's/^DrawDistanceMultiplier=.*$/DrawDistanceMultiplier=3\r/' system/SystemPack.ini
sed -i 's/^keyDelayRate=.*$/keyDelayRate=50\r/' system/SystemPack.ini
sed -i 's/^keyDelayFirst=.*$/keyDelayFirst=150\r/' system/SystemPack.ini
sed -i 's/^HideFocus=.*$/HideFocus=0\r/' system/SystemPack.ini
sed -i 's/^Scale=.*$/Scale=1.9\r/' system/SystemPack.ini

183
scripts/install-gothic2.sh Executable file
View File

@@ -0,0 +1,183 @@
#!/usr/bin/env bash
set -o nounset
set -o xtrace
set -o errexit
BASEDIR=/var/games/gothic2
export GAMEDATA=${BASEDIR}/data/
export ARCHIVE=${BASEDIR}/gothic2.data.tar.zstd
export WINEPREFIX=${BASEDIR}/wineprefix
export WINEARCH=win64
export WINEVERSION=6.3
DOWNLOADDIR=~/download/gothic2
mkdir -p "${WINEPREFIX}"
if [[ "$(wine --version)" != "wine-${WINEVERSION}" ]] ; then
printf '%s\n' "Wine version ${WINEVERSION} required" >&2
exit 1
fi
archive() {
origin="$1"
if [[ -e "${ARCHIVE}" ]] ; then
return
fi
tar -cv --zstd -p -f "${ARCHIVE}" -C "$1" .
}
extract() {
if [[ -e "${GAMEDATA}" ]] ; then
return
fi
mkdir -p "${GAMEDATA}"
tar x --zstd -f "${ARCHIVE}" -C "${GAMEDATA}"
}
start() {
# For the DX11 renderer, PWD has to be the folder containing the "GD3D11" folder
cd "${GAMEDATA}/system/"
# There is a bug in the DX11 renderer that leads to the mouse cursor always
# being visible
#
# See https://bugs.winehq.org/show_bug.cgi?id=48483
#
# Workaround is to disable the cursor completely during gameplay
# if command -v unclutter >/dev/null ; then
# unclutter --timeout 0 --jitter 100000 --ignore-scrolling &
# pid=$!
# trap "kill $pid" EXIT
# else
# echo "WARNING: Unclutter not installed, cannot disable mouse cursor"
# fi
wine ./Gothic2.exe
}
ini() {
cd "${GAMEDATA}"
set_ini() {
local file="$1"
local key="$2"
local value="$3"
if ! grep -q "^${key}=" "${file}" ; then
echo "Key ${key} not fmund in ${file}"
exit 1
fi
sed -i "s/^${key}=.*$/${key}=${value}\r/" "${file}"
}
set_ini system/Gothic.ini sightValue 14
set_ini system/Gothic.ini modelDetail 1
set_ini system/Gothic.ini animatedWindows 0
set_ini system/Gothic.ini playLogoVideos 0
set_ini system/Gothic.ini useGothic1Controls 1
set_ini system/Gothic.ini keyDelayRate 50
set_ini system/Gothic.ini keyDelayFirst 150
set_ini system/Gothic.ini subTitles 1
set_ini system/Gothic.ini invMaxColumns 8
set_ini system/Gothic.ini invMaxRows 0
set_ini system/Gothic.ini useQuickSaveKeys 1
set_ini system/Gothic.ini zVidResFullscreenX 2560
set_ini system/Gothic.ini zVidResFullscreenY 1440
set_ini system/Gothic.ini zVidResFullscreenBPP 32
set_ini system/Gothic.ini zRainWindScale 0.1
set_ini system/Gothic.ini zMouseRotationScale 15.0
set_ini system/Gothic.ini zSmoothMouse 0
set_ini system/SystemPack.ini VerticalFOV 85.0
set_ini system/SystemPack.ini DrawDistanceMultiplier 3
set_ini system/SystemPack.ini OutDoorPortalDistanceMultiplier 3
set_ini system/SystemPack.ini InDoorPortalDistanceMultiplier 3
}
case $1 in
install)
extract
mkdir -p "${DOWNLOADDIR}"
cd "${DOWNLOADDIR}"
curl -C - -L -o g2addon-2_6.exe "https://www.worldofgothic.de/download.php?id=173"
curl -C - -L -o gothic2_fix-2.6.0.0-rev2.exe "https://www.worldofgothic.de/download.php?id=833"
curl -C - -L -o gothic2_playerkit-2.6f.exe "https://www.worldofgothic.de/download.php?id=518"
curl -C - -L -o G2NoTR-SystemPack-1.8.exe "https://www.worldofgothic.de/download.php?id=1525"
curl -C - -L -o LHiver204_DE_22-06-20.exe "https://www.worldofgothic.de/download.php?id=1580"
curl -C - -L -o LaaHack.zip "https://www.worldofgothic.de/download.php?id=1457"
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 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
laatmp=$(mktemp -d)
unzip -o LaaHack.zip -d "${laatmp}"
# winetricks -q dxvk
winetricks -q directmusic
if command -v setup_dxvk >/dev/null ; then
setup_dxvk install
else
echo "WARNING: Using dxvk via winetricks, untested"
winetricks dxvk
fi
read -p 'During installation, use "Z:\var\games\gothic2\data" as the install directory! <Enter> to continue, <CTRL+C> to abort '
wine "${DOWNLOADDIR}"/g2addon-2_6.exe
wine "${DOWNLOADDIR}"/gothic2_fix-2.6.0.0-rev2.exe
wine "${DOWNLOADDIR}"/gothic2_playerkit-2.6f.exe
wine "${DOWNLOADDIR}"/G2NoTR-SystemPack-1.8.exe
wine "${DOWNLOADDIR}"/LHiver204_DE_22-06-20.exe
wine "${DOWNLOADDIR}"/Ninja-2.7.12.exe
cd "${GAMEDATA}"
unzip -o "${DOWNLOADDIR}"/Gothic2-GD3D11-v17.7-dev20.zip -d ./system/
cp "${DOWNLOADDIR}"/Quickloot.vdf ./Data
t="./system/GD3D11/Textures/replacements/Normalmaps_xxx"
mkdir -p "${t}"
unzip -o "${DOWNLOADDIR}"/Normalmaps_LHiver.zip -d "${t}"
unset t
read -p "For the LAA Hack, select only ${GAMEDATA}/system/Gothic2.exe [<Enter> to continue] "
wine "${laatmp}"/LaaHack.exe
rm -rf "${laatmp}"
# Required to create all ini files
read -p "Now run the game once and exit! [<Enter> to continue] "
ini
ln Data/ModVDF/LHE204_DE.mod Data/LHE204_DE.mod
;;
ini)
ini
;;
start)
export WINEDLLOVERRIDES="ddraw=n,b;dsound=b,n;d3dcompiler_47=n,b"
start
;;
archive)
archive "$2"
;;
exec)
"${@}"
;;
esac

View File

@@ -4,7 +4,8 @@ set -o nounset
set -o errexit set -o errexit
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
tmpdir=/tmp/dotfiles
trap "rm -rf ${tmpdir}" EXIT
git archive --format tar --output "${tmpdir}/dotfiles.tar" HEAD git archive --format tar --output "${tmpdir}/dotfiles.tar" HEAD
@@ -17,24 +18,71 @@ git submodule foreach 'bash -x -c "
gzip -k -f -v "${tmpdir}/dotfiles.tar" gzip -k -f -v "${tmpdir}/dotfiles.tar"
exit 1 test_ares() {
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
fi
docker pull docker.io/library/archlinux:base docker pull docker.io/library/archlinux:base
docker run -ti --rm -v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro --hostname ares docker.io/library/archlinux:base sh -c '" docker run \
-ti \
--rm \
-v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro \
--mount type=tmpfs,destination=/var/cache/pacman/pkg/ \
"${dockeropts[@]}" \
--hostname ares \
docker.io/library/archlinux:base \
sh -c '
set -o errexit set -o errexit
pacman -Syu --noconfirm python3 # Uncomment CacheDir and append the host pacman cache as cachedir
# At worst, the cache directory will be ignored if it does not exist
# Pacman will always prefer the first cache directory, so newly downloaded
# packages will stay in the container
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
pacman -Syu --noconfirm linux python3
mkdir /var/cache/pacman/pkg_host/
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
read -p "Done, [return] to continue "
' '
}
docker pull docker.io/library/ubuntu:18.04 test_neptune() {
docker run -ti --rm -v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro --hostname tb-hak docker.io/library/ubuntu:18.04 sh -c ' docker pull docker.io/library/ubuntu:20.04
docker run -ti --rm -v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro --hostname neptune docker.io/library/ubuntu:20.04 sh -c '
set -o errexit set -o errexit
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
' '
}
test_mars() {
docker pull docker.io/library/ubuntu:20.04
docker run -ti --rm -v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro --hostname mars docker.io/library/ubuntu:20.04 sh -c '
set -o errexit
cd $(mktemp -d)
tar xf /tmp/dotfiles.tar.gz -C .
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
'
}
case "${1:-all}" in
ares)
test_ares
;;
neptune)
test_neptune
;;
mars)
test_mars
;;
all)
test_ares
test_neptune
test_mars
;;
esac

View File

@@ -1,14 +1,5 @@
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-save-interval '5'
set -g default-command "${SHELL}" set -g default-command "${SHELL}"
set -g default-terminal "rxvt-unicode" set -g default-terminal "xterm-256color"
set -g @continuum-restore 'on'
set -g set-titles on set -g set-titles on
set -g set-titles-string '#S' set -g set-titles-string '#S'
@@ -48,18 +39,8 @@ set -g status-position bottom
set -g status-justify left set -g status-justify left
set-option -g status-bg '#222222' set-option -g status-bg '#272822'
set-option -g status-fg white set-option -g status-fg white
set-option -g status-attr default
set-window-option -g window-status-fg '#FFFFFF'
set-window-option -g window-status-current-fg '#000000'
set-window-option -g window-status-bg '#75715e'
set-window-option -g window-status-current-bg '#f92672'
set-window-option -g window-status-attr none
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-format ' #I: #W #F ' set-window-option -g window-status-format ' #I: #W #F '
set-window-option -g window-status-current-format ' #I: #W #F ' set-window-option -g window-status-current-format ' #I: #W #F '
@@ -72,18 +53,13 @@ set-window-option -g automatic-rename-format '#{pane_current_command}'
set-window-option -g window-status-separator ' ' set-window-option -g window-status-separator ' '
set -g message-bg '#272822'
set -g message-fg white
set -g message-attr default
set -g pane-border-fg '#f8f8f2'
set -g pane-active-border-fg '#f92672'
set -g status-left " #[bg=#A6E22E,fg=#000000] #{session_name} #[bg=#272822] " set -g status-left " #[bg=#A6E22E,fg=#000000] #{session_name} #[bg=#272822] "
# set -g status-right "#[bg=#A6E22E,fg=#000000] #{host} #[bg=#272822] " set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=#272822] "
set -g status-right "coninuum status: #{continuum_status}"
set -g status-left-length 100 set -g status-left-length 100
set -g status-style "bg=#272822,fg=#FFFFFF"
set -g message-style "bg=#CCCCCC,fg=#555555"
# vertical = | in this case # vertical = | in this case
unbind % unbind %
unbind '"' unbind '"'
@@ -106,5 +82,3 @@ 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 bind P paste-buffer
run '~/.tmux/plugins/tpm/tpm'

380
user.yml
View File

@@ -20,23 +20,11 @@
- sudo - sudo
- dip - dip
- plugdev - plugdev
- lpadmin
- sambashare
- docker - docker
- libvirt - libvirt
when: distro == 'ubuntu' when: distro == 'ubuntu'
tags: [always] tags: [always]
- set_fact:
user_groups:
- libvirt
- wheel
- vboxusers
- wireshark
- docker
when: distro == 'fedora'
tags: [always]
- set_fact: - set_fact:
user_groups: user_groups:
- libvirt - libvirt
@@ -45,6 +33,8 @@
- wireshark - wireshark
- docker - docker
- sudonopw - sudonopw
- games
- kvm
when: distro == 'archlinux' when: distro == 'archlinux'
tags: [always] tags: [always]
@@ -66,6 +56,30 @@
become: true become: true
become_user: root become_user: root
- name: create systemd directory
file:
state: directory
path: "{{ item }}"
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
loop:
- "/home/{{ user.name }}/.config/"
- "/home/{{ user.name }}/.config/systemd/"
- "/home/{{ user.name }}/.config/systemd/user/"
# No way to use the `systemd` module here, as it needs a logind
# session. So we have to handle the symlinks for masking ourselves.
- name: disable and mask systemd user units
file:
state: link
dest: "/home/{{ user.name }}/.config/systemd/user/{{ item }}"
src: "/dev/null"
with_items:
- gpg-agent.socket
- gpg-agent-browser.socket
- gpg-agent-ssh.socket
- gpg-agent-extra.socket
- name: create directory for getty autologin - name: create directory for getty autologin
file: file:
state: directory state: directory
@@ -204,6 +218,7 @@
state: directory state: directory
path: "{{ item }}" path: "{{ item }}"
with_items: with_items:
- ~/tmp
- ~/.var/lib - ~/.var/lib
- ~/.var/log - ~/.var/log
- ~/.var/run - ~/.var/run
@@ -241,10 +256,6 @@
owner: "{{ user.name }}" owner: "{{ user.name }}"
group: "{{ user_group_name }}" group: "{{ user_group_name }}"
with_items: with_items:
- name: terraform
optpath: terraform
- name: kubectl
optpath: kubectl
- name: hugo - name: hugo
optpath: hugo optpath: hugo
- name: drone - name: drone
@@ -262,6 +273,7 @@
tags: tags:
- dotfiles - dotfiles
- block:
- name: create intermediate directories for vim-plug - name: create intermediate directories for vim-plug
file: file:
path: "{{ item }}" path: "{{ item }}"
@@ -275,7 +287,6 @@
- ~/.vim/ - ~/.vim/
- ~/.vim/autoload - ~/.vim/autoload
- block:
- name: install vim-plug - name: install vim-plug
copy: copy:
src: contrib/vim-plug/plug.vim src: contrib/vim-plug/plug.vim
@@ -291,34 +302,161 @@
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: /usr/bin/nvim -f -E -s -c "source ~/.vimrc" +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_plugins_stdout register: vim_plugin_install
check_mode: false changed_when: vim_plugin_install.stderr != ""
changed_when: vim_plugins_stdout.stdout_lines|length != 0
- name: install 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 +GoInstallBinaries +qall'
changed_when: false
- name: update vim plugins
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
changed_when: vim_plugin_update.stderr != ""
tags: [update]
- 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'
changed_when: false
tags: [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 - 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: | shell: |
cd ~/.local/share/nvim/plugged/YouCompleteMe/ cd ~/.local/share/nvim/plugged/YouCompleteMe
python3 ./install.py # --go-completer python3 ./install.py --force-sudo
args: args:
creates: ~/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so executable: /bin/bash
when: vim_plugins_stdout.stdout_lines|length != 0 or true 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]
- block: - block:
- name: firefox - create chrome directory - name: install rustup on ubuntu
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
args:
creates: ~/.cargo/bin/rustup
when: distro == 'ubuntu'
tags: [rust]
- block:
- name: create firefox directories
firefox_profile:
name: "{{ item.key }}"
loop: "{{ user.firefox_profiles | dict2items }}"
register: firefox_profile_names
- set_fact:
firefox_preferences:
browser.aboutConfig.showWarning: false
browser.download.useDownloadDir: false
extensions.pocket.enabled: false
toolkit.legacyUserProfileCustomizations.stylesheets: true
browser.contentblocking.category: "strict"
browser.newtabpage.enabled: false
browser.shell.checkDefaultBrowser: false
browser.startup.homepage: "about:blank"
privacy.trackingprotection.enabled: true
privacy.trackingprotection.socialtracking.enabled: true
general.smoothScroll: false
# Restore last session on startup
# https://support.mozilla.org/de/questions/1235263
browser.startup.page: 3
browser.sessionstore.resume_from_crash: true
# "Play DRM-controlled content"
media.eme.enabled: true
# "Recommend (extensions|features) as you browse"
browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons: false
browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features: false
# "Ask to save logins and passwords for websites"
signon.rememberSignons: false
# "Allow Firefox to make personalized extension recommendations"
browser.discovery.enabled: false
# "Allow Firefox to install and run studies"
app.shield.optoutstudies.enabled: false
- include_role:
name: firefox
vars:
firefox_profiles: "{{ {item.key: item.value} | combine({item.key: {'preferences': firefox_preferences}}, recursive=True) }}"
loop: "{{ user.firefox_profiles | dict2items }}"
- name: firefox - create target directory for passff
file: file:
path: ~/.mozilla/firefox/{{ item.name }}/chrome/ path: ~/.mozilla/native-messaging-hosts
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
state: directory state: directory
mode: '0755' mode: '0755'
with_items: "{{ user.firefox_profiles }}"
when: user.firefox_profiles is defined - name: firefox - get passff host application
tags: get_url:
- firefox url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
dest: ~/.mozilla/native-messaging-hosts/{{ item.name }}
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
mode: "{{ item.mode }}"
loop:
- name: passff.json
mode: '0644'
- name: passff.py
mode: '0755'
- name: firefox - configure path to passff
lineinfile:
path: ~/.mozilla/native-messaging-hosts/passff.json
search_string: '"path": "PLACEHOLDER"'
line: " \"path\": \"/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py\","
- name: firefox - create chrome directory
file:
path: "{{ item.profile_path }}/chrome/"
state: directory
mode: '0755'
with_items: "{{ firefox_profile_names.results }}"
- name: firefox - configure firefox custom css - name: firefox - configure firefox custom css
copy: copy:
dest: ~/.mozilla/firefox/{{ item.name }}/chrome/userChrome.css dest: "{{ item.profile_path }}/chrome/userChrome.css"
content: | content: |
#TabsToolbar { #TabsToolbar {
visibility: collapse !important; visibility: collapse !important;
@@ -332,27 +470,23 @@
#sidebar { #sidebar {
width: 400px !important; width: 400px !important;
} }
when: item.manage_css when: user.firefox_profiles[item.profile_name].manage_css is sameas True
with_items: "{{ user.firefox_profiles | default([]) }}" with_items: "{{ firefox_profile_names.results }}"
tags: tags:
- firefox - firefox
- block: - block:
- name: set portfolio performance version
set_fact:
portfolio_performace_version: "0.47.0"
- name: look of current installation - name: look of current installation
stat: stat:
path: /home/{{ user.name }}/.opt/portfolio-performance-{{ portfolio_performace_version }} path: /home/{{ user.name }}/.opt/portfolio-performance-{{ portfolio_performace_version }}
register: stat_portfolio_performance_installation register: stat_portfolio_performance_installation
- block:
- name: create temporary directory - name: create temporary directory
tempfile: tempfile:
state: directory state: directory
register: tempdir register: tempdir
- block:
- name: download portfolio performance - name: download portfolio performance
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
@@ -381,7 +515,14 @@
checksum: true checksum: true
delete: true delete: true
when: not stat_portfolio_performance_installation.stat.exists - name: clean up temp directory
file:
path: "{{ tempdir.path }}"
state: absent
when:
- not stat_portfolio_performance_installation.stat.exists
- not ansible_check_mode
- name: link portfolio performance - name: link portfolio performance
file: file:
@@ -396,10 +537,6 @@
- portfolio-performance - portfolio-performance
- block: - block:
- name: set kubectl version
set_fact:
kubectl_version: v1.20.0
- name: get current stable version - name: get current stable version
uri: uri:
url: https://storage.googleapis.com/kubernetes-release/release/stable.txt url: https://storage.googleapis.com/kubernetes-release/release/stable.txt
@@ -414,10 +551,10 @@
kubectl_outdated: "{{ kubectl_version != kubectl_stable_version }}" kubectl_outdated: "{{ kubectl_version != kubectl_stable_version }}"
- name: warn if not on stable version - name: warn if not on stable version
debug: fail:
msg: "installing kubectl {{ kubectl_version }}, stable version would be {{ kubectl_stable_version }}" msg: "installing kubectl {{ kubectl_version }}, stable version would be {{ kubectl_stable_version }}"
changed_when: kubectl_outdated is sameas true
when: kubectl_outdated is sameas true when: kubectl_outdated is sameas true
ignore_errors: True
- name: get kubectl - name: get kubectl
get_url: get_url:
@@ -427,6 +564,11 @@
group: "{{ user_group_name }}" group: "{{ user_group_name }}"
mode: '0755' mode: '0755'
- name: make kubectl executable
file:
path: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
mode: '0755'
- name: link kubectl - name: link kubectl
file: file:
src: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }} src: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
@@ -435,3 +577,149 @@
tags: tags:
- kubectl - kubectl
- block:
- name: stat current terraform binary
stat:
path: "/home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}"
register: terraform_binary
- name: create temporary download directory for terraform
tempfile:
state: directory
register: terraform_download_dir
when: not terraform_binary.stat.exists
- name: get terraform
get_url:
url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
dest: "{{ terraform_download_dir.path }}/terraform.zip"
when: not terraform_binary.stat.exists
- name: unpack terraform zip
unarchive:
src: "{{ terraform_download_dir.path }}/terraform.zip"
dest: "{{ terraform_download_dir.path }}/"
remote_src: true
when: not terraform_binary.stat.exists
- name: install terraform
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
when: not terraform_binary.stat.exists
- name: clean up download directory
file:
path: "{{ terraform_download_dir.path }}"
state: absent
when: not terraform_binary.stat.exists
- name: link terraform
file:
src: /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
dest: /home/{{ user.name }}/.optbin/terraform
state: link
- name: get terraform version info
command: /home/{{ user.name }}/.optbin/terraform version -json
register: terraform_version_output
check_mode: false
changed_when: false
- name: parse terraform version output
set_fact:
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
changed_when: false
- name: warn if terraform is outdated
fail:
msg: "current terraform v{{ terraform_version }} is out of date"
when: terraform_outdated is sameas true
ignore_errors: True
tags:
- terraform
- name: handle autostart units
block:
- name: create systemd user directory
file:
state: directory
path: ~/{{ item }}
loop:
- .config/
- .config/systemd/
- .config/systemd/user/
- name: link autostart service files
file:
state: link
force: true
follow: false
path: "/home/{{ user.name }}/.config/systemd/user/{{ item | basename }}"
src: "{{ item }}"
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
with_fileglob: /var/lib/dotfiles/autostart/services/*
- name: get state of autostart.target
stat:
path: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
register: autostart_target_stat
- name: remove invalid autostart.target
file:
path: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
state: absent
when:
- autostart_target_stat.stat.exists
- not autostart_target_stat.stat.isreg
- name: deploy autostart.target
template:
src: ./autostart/autostart.target.j2
dest: "/home/{{ user.name }}/.config/systemd/user/autostart.target"
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
force: true
follow: false
tags:
- autostart
- block:
- name: import gpg key
command: gpg --import ./gpgkeys/{{ user.gpg_key.email }}.gpg.asc
register: gpg_import_output
changed_when: not ("unchanged" in gpg_import_output.stderr)
- name: trust gpg key
shell: "gpg --import-ownertrust <<< {{ user.gpg_key.fingerprint }}:6"
args:
executable: /bin/bash # required for <<<
register: gpg_trust_output
changed_when: gpg_trust_output.stderr_lines|length > 0
when: user.gpg_key is defined
tags: [gpg]
- block:
- name: add passwordstore init script
copy:
dest: /home/{{ user.name }}/.optbin/pass
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
mode: '0755'
content: |
#!/usr/bin/env bash
if [[ ! -e ~/.password-store ]] ; then
printf '%s\n' 'This is the first time running pass, initializting repository ...'
git clone ssh://git@code.hkoerber.de:2222/hannes/passwordstore.git ~/.password-store
printf '%s\n' 'Done'
fi
exec mypass "${@}"
when: user.enable_passwordstore|default(false) is sameas true
tags: [passwordstore]

28
variables.yml Normal file
View File

@@ -0,0 +1,28 @@
terraform_version: 1.0.2
kubectl_version: v1.22.3
go_version: "1.17.1"
portfolio_performace_version: "0.55.0"
cargo_crate_list:
- crate: just
binary: just
version: 0.10.2
- crate: ripgrep
binary: rg
version: 13.0.0
- crate: fd-find
binary: fd
version: 8.2.1
- crate: bat
binary: bat
version: 0.18.3
- crate: exa
binary: exa
version: 0.10.1
- crate: watchexec-cli
binary: watchexec
version: 1.17.1
- url: https://github.com/hakoerber/git-repo-manager
binary: grm
branch: master
source: git
toolchain: nightly

View File

@@ -13,7 +13,8 @@ Plug 'majutsushi/tagbar'
" Plug 'nblock/vim-dokuwiki' " Plug 'nblock/vim-dokuwiki'
Plug 'reedes/vim-pencil' Plug 'reedes/vim-pencil'
Plug 'saltstack/salt-vim' Plug 'saltstack/salt-vim'
Plug 'sickill/vim-monokai' "Plug 'sickill/vim-monokai'
Plug 'patstockwell/vim-monokai-tasty'
" Plug 'sjl/gundo.vim' " Plug 'sjl/gundo.vim'
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
@@ -41,23 +42,36 @@ Plug 'scrooloose/nerdtree'
"Plugin 'wellle/targets.vim' "Plugin 'wellle/targets.vim'
"Plugin 'wincent/Command-T' "Plugin 'wincent/Command-T'
Plug 'vimwiki/vimwiki' Plug 'vimwiki/vimwiki'
Plug 'blindFS/vim-taskwarrior' "Plug 'blindFS/vim-taskwarrior'
Plug 'tbabej/taskwiki' " Plug 'tbabej/taskwiki'
Plug 'rodjek/vim-puppet' Plug 'rodjek/vim-puppet'
Plug 'suan/vim-instant-markdown' Plug 'suan/vim-instant-markdown'
"Plug 'marshallward/vim-restructuredtext' "Plug 'marshallward/vim-restructuredtext'
"Plug 'vim-syntastic/syntastic' "Plug 'vim-syntastic/syntastic'
Plug 'ElmCast/elm-vim' "Plug 'ElmCast/elm-vim'
Plug 'avh4/elm-format' "Plug 'avh4/elm-format'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'fatih/vim-go'
Plug 'hashivim/vim-terraform' Plug 'hashivim/vim-terraform'
Plug 'editorconfig/editorconfig-vim'
Plug 'leafgarland/typescript-vim' Plug 'leafgarland/typescript-vim'
Plug 'prettier/vim-prettier', { Plug 'prettier/vim-prettier', { 'do': 'npm install' }
\ 'do': 'yarn install',
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] } 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
@@ -207,6 +221,11 @@ nnoremap <leader>d :diffupdate<CR>
nmap <F9> :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR> nmap <F9> :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
nmap <leader>w :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>
@@ -219,13 +238,13 @@ nnoremap Q <nop>
" === plugin setup === " === plugin setup ===
" == colorscheme == " == colorscheme ==
set background=light " set background=light
let g:solarized_termcolors=16 " let g:solarized_termcolors=16
let g:solarized_termtrans=1 " let g:solarized_termtrans=1
let g:solarized_contrast="normal" " let g:solarized_contrast="normal"
let g:solarized_visibility="normal" " let g:solarized_visibility="normal"
syntax enable syntax enable
silent! colorscheme monokai silent! colorscheme vim-monokai-tasty
" == tagbar == " == tagbar ==
nnoremap <F10> :TagbarToggle<CR> nnoremap <F10> :TagbarToggle<CR>
@@ -301,6 +320,7 @@ 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
set completeopt-=preview set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0 let g:ycm_add_preview_to_completeopt = 0
@@ -328,3 +348,10 @@ if v:version >= 700
au BufLeave * let b:winview = winsaveview() au BufLeave * let b:winview = winsaveview()
au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif
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>

View File

@@ -34,7 +34,7 @@
"explorer.incrementalNaming": "smart", "explorer.incrementalNaming": "smart",
"search.smartCase": true, "search.smartCase": true,
"extensions.ignoreRecommendations": true, "extensions.ignoreRecommendations": true,
"terminal.external.linuxExec": "urxvt", "terminal.external.linuxExec": "alacritty",
"problems.showCurrentInStatus": true, "problems.showCurrentInStatus": true,
"problems.decorations.enabled": false, "problems.decorations.enabled": false,
"update.mode": "none", "update.mode": "none",

View File

@@ -1,74 +1 @@
Xcursor.theme: Vanilla-DMZ Xcursor.theme: Vanilla-DMZ
URxvt.scrollBar: false
URxvt.font: xft:Inconsolata:size={{ machine.font_size }}
URxvt.letterSpace: {{ machine.letter_space }}
URxvt.perl-ext-common: default,matcher,selection-to-clipboard,resize-font,selection-to-clipboard
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
URxvt.saveLines: 10000
URxvt.keysym.C-udiaeresis: perl:matcher:last
URxvt.keysym.C-adiaeresis: perl:matcher:list
URxvt.matcher.rend.0: Uline Bold fg5
URxvt.internalBorder: 3
URxvt.externalBorder: 0
URxvt.cursorBlink: true
URxvt.title: term
URxvt.jumpScroll: true
URxvt.skipScroll: true
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0
URxvt.secondaryWheel: 1
URxvt.keysym.C-Up: font-size:increase
URxvt.keysym.C-Down: font-size:decrease
URxvt.keysym.C-S-Up: font-size:incglobal
URxvt.keysym.C-S-Down: font-size:decglobal
URxvt.keysym.C-equal: font-size:reset
URxvt.keysym.C-slash: font-size:show
URxvt.fading: 15
! special
*.foreground: #f8f8f2
*.background: #272822
*.cursorColor: #f8f8f2
! black
*.color0: #272822
*.color8: #75715e
! red
*.color1: #f92672
*.color9: #f92672
! green
*.color2: #a6e22e
*.color10: #a6e22e
! yellow
*.color3: #f4bf75
*.color11: #f4bf75
! blue
*.color4: #66d9ef
*.color12: #66d9ef
! magenta
*.color5: #ae81ff
*.color13: #ae81ff
! cyan
*.color6: #a1efe4
*.color14: #a1efe4
! white
*.color7: #f8f8f2
*.color15: #f9f8f5

View File

@@ -2,6 +2,8 @@
export LOGFILE="$LOGDIR/xinitrc.log" export LOGFILE="$LOGDIR/xinitrc.log"
mkdir -p "${LOGDIR}/i3"
log() { log() {
echo "[$(date +%FT%T)] $*" >> "$LOGFILE" echo "[$(date +%FT%T)] $*" >> "$LOGFILE"
} }
@@ -18,14 +20,16 @@ fi
start_wm() { start_wm() {
log "starting i3" log "starting i3"
exec i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log" systemctl --user import-environment
systemctl --user start windowmanager.target
sleep 1
systemctl --user start autostart.target
sleep inf
# exec systemd-run --user --unit i3_user --pty --setenv=DISPLAY=${DISPLAY} i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log" # exec systemd-run --user --unit i3_user --pty --setenv=DISPLAY=${DISPLAY} i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log"
} }
autostart() { autostart() {
autostart="$HOME/.autostart.sh" log "Starting systemd user target \"autostart.target\""
log "Executing autostart file \"$autostart\""
"$autostart" >>"${LOGFILE}" 2>&1
} }
exec >> "$LOGFILE" 2>&1 exec >> "$LOGFILE" 2>&1

View File

@@ -1,19 +1,14 @@
_path=("$HOME/bin" source /etc/profile
"$HOME/.optbin"
"/usr/local/sbin" _path=(
"/usr/local/bin" "$HOME/bin"
"/usr/sbin" "$HOME/.optbin"
"/usr/bin" "$HOME/.cargo/bin"
"/sbin" )
"/bin"
"/usr/bin/core_perl"
"/usr/games")
PATH=""
for part in ${_path[@]} ; do for part in ${_path[@]} ; do
PATH="$PATH:${part}" PATH="$PATH:${part}"
done done
PATH="${PATH#:}"
export PATH export PATH
export EDITOR="nvim" export EDITOR="nvim"
@@ -38,13 +33,13 @@ export LC_COLLATE=C
export DOTFILES=~/dotfiles export DOTFILES=~/dotfiles
export GOPATH=~/dev/go export GOPATH=~/.go
export GOROOT=/usr/lib/go
export PATH=$PATH:$(go env GOPATH)/bin export PATH=$PATH:$(go env GOPATH)/bin
export ACPI_LID_NAME=LID export ACPI_LID_NAME=LID
export QT_QPA_PLATFORMTHEME=qt5ct
umask 0022 umask 0022
{% set env = machine.environment | combine(user.environment) %} {% set env = machine.environment | combine(user.environment) %}
@@ -52,6 +47,25 @@ umask 0022
export {{ k }}="{{ v }}" export {{ k }}="{{ v }}"
{% endfor %} {% endfor %}
export FEATURE_DIR="${RUNDIR}/features/"
rm -rf "${FEATURE_DIR}"/
mkdir -p "${FEATURE_DIR}"
[[ $MACHINE_HAS_NEXTCLOUD == "true" ]] && touch "${FEATURE_DIR}"/nextcloud
[[ $MACHINE_HAS_KEEPASSX == "true" ]] && touch "${FEATURE_DIR}"/keepassx
[[ $MACHINE_HAS_STEAM == "true" ]] && touch "${FEATURE_DIR}"/steam
[[ $MACHINE_HAS_RESTIC_BACKUP == "true" ]] && touch "${FEATURE_DIR}"/restic_backup
[[ $MACHINE_HAS_ELEMENT == "true" ]] && touch "${FEATURE_DIR}"/element
[[ $MACHINE_TYPE == "laptop" ]] && touch "${FEATURE_DIR}"/machine_is_laptop
{% if user.gpg_agent %}
touch "${FEATURE_DIR}"/gpg_agent
{% endif %}
# Make all environment variables also usable in the systemd user instancee
systemctl --user import-environment
# exec startx breaks some logind fuckery, without exec it works # exec startx breaks some logind fuckery, without exec it works
if [[ -z $DISPLAY ]] ; then if [[ -z $DISPLAY ]] ; then
if (( $XDG_VTNR == {{ user.vt }} )) ; then if (( $XDG_VTNR == {{ user.vt }} )) ; then

View File

@@ -1,8 +1,9 @@
alias vim="nvim" alias vim="nvim"
### COMMON OPERATIONS ### BETTER COMMANDS
alias ll='ls -AlFh' alias ls="exa --oneline --icons --group-directories-first"
alias la='ls -A' alias ll='ls --all --long --classify --group --modified --time-style=long-iso --git'
alias la='ls --all'
alias spm="sudo pacman" alias spm="sudo pacman"
@@ -31,8 +32,6 @@ alias tmux="tmux -2"
alias chmod="chmod -c" alias chmod="chmod -c"
alias chown="chown -c" alias chown="chown -c"
alias ls="ls --group-directories-first --classify --color=auto"
alias diff="diff --color=auto" alias diff="diff --color=auto"
alias grep='grep --color=auto' alias grep='grep --color=auto'
@@ -68,13 +67,11 @@ alias twa="task add"
alias twd="task done" alias twd="task done"
alias inbox="task add +inbox" alias inbox="task add +inbox"
alias yaml2json="python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)'" alias yaml2json="python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)'"
alias json2yaml="python -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'
alias pass=mypass
alias issh="ssh -o StrictHostKeyChecking=false -o UserKnownHostsFile=/dev/null" alias issh="ssh -o StrictHostKeyChecking=false -o UserKnownHostsFile=/dev/null"
alias gfix='git commit --amend --no-edit' alias gfix='git commit --amend --no-edit'
alias gfixa='git commit --amend --no-edit --all ' alias gfixa='git commit --amend --no-edit --all '
@@ -89,6 +86,11 @@ alias sysu="systemctl --user"
alias gpg=gpg2 alias gpg=gpg2
alias alacritty="alacritty --config-file $HOME/.config/alacritty.yml"
alias d=docker
alias dc=docker-compose
gitmaster() { gitmaster() {
git stash push -m gitmaster-$(date -uIseconds) -u || return 1 git stash push -m gitmaster-$(date -uIseconds) -u || return 1
_branch=$(git rev-parse --abbrev-ref HEAD) _branch=$(git rev-parse --abbrev-ref HEAD)
@@ -241,10 +243,6 @@ man() {
man "$@" man "$@"
} }
embiggen() {
enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - | ps2pdf - | zathura -
}
resolvecd() { resolvecd() {
cd "$(readlink -f $(pwd))" cd "$(readlink -f $(pwd))"
} }

View File

@@ -141,7 +141,7 @@ man() {
} }
embiggen() { embiggen() {
enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - | ps2pdf - | zathura - enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - 2>/dev/null | ps2pdf - | zathura -
} }
resolvecd() { resolvecd() {
@@ -208,9 +208,9 @@ tmp() {
} }
kubectl_pod() { kubectl_pod() {
kubectl get -n "${1}" pods --field-selector=status.phase=Running --selector=${2} -o jsonpath='{.items[*].metadata.name}' kubectl-env mycloud get -n "${1}" pods --field-selector=status.phase=Running --selector=${2} -o jsonpath='{.items[*].metadata.name}'
} }
kubectl_deployment() { kubectl_deployment() {
kubectl 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}'
} }

View File

@@ -18,3 +18,7 @@ if [[ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] ; the
elif [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] ; then elif [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] ; then
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 distro == 'ubuntu' %}
alias imv=imv-x11
{% endif %}