Compare commits

..

224 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
66 changed files with 1705 additions and 1450 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
/*.bundle /venv/

View File

@@ -1,16 +1,17 @@
ansible_run = ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS} venv = ./venv
requirements = requirements.txt
activate = . $(venv)/bin/activate
pip = pip
ansible = venv/bin/ansible-playbook
ansible_run = $(activate) && ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff --verbose ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
.PHONY: all .PHONY: all
all: all: | venv $(ansible)
$(ansible_run) $(ansible_run)
.PHONY: config .PHONY: update
config: update: $(ansible)
$(ansible_run) --skip-tags system-update $(ansible_run) --tags update
.PHONY: system-update
system-update:
$(ansible_run) --tags system-update
.PHONY: reboot .PHONY: reboot
reboot: reboot:
@@ -24,13 +25,27 @@ poweroff:
weekend: | update poweroff weekend: | update poweroff
.PHONY: packages .PHONY: packages
packages: packages: $(ansible)
$(ansible_run) --tags packages $(ansible_run) --tags packages
.PHONY: dotfiles .PHONY: dotfiles
dotfiles: dotfiles: $(ansible)
$(ansible_run) --tags dotfiles $(ansible_run) --tags dotfiles
.PHONY: clean
clean:
rm -rf venv
.PHONY: test .PHONY: test
test: test:
./test-in-docker.sh ./test-in-docker.sh
$(ansible): venv
venv:
python3 -m venv $(venv)
$(activate) && $(pip) install -r $(requirements)
.PHONY: freeze
freeze:
$(activate) && $(pip) freeze > $(requirements)

View File

@@ -1,10 +1,7 @@
font_size_1: 12 font_size: 12
font_size_2: 12
gpu: amd gpu: amd
i3bar_icon_padding: " "
users: users:
- name: hannes - name: hannes
vt: 1 vt: 1
@@ -18,18 +15,8 @@ users:
- i-dont-care-about-cookies - i-dont-care-about-cookies
- floccus - floccus
manage_css: true manage_css: true
media:
extensions:
- ublock-origin
- passff
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
manage_css: true
bigger_font: true
mail: hannes@hkoerber.de mail: hannes@hkoerber.de
git_gpg_sign: false git_gpg_sign: false
ssh_agent: false
gpg_agent: true gpg_agent: true
gpg_agent_for_ssh: true gpg_agent_for_ssh: true
gpg_key: gpg_key:
@@ -39,6 +26,7 @@ users:
enable_passwordstore: true enable_passwordstore: true
environment: environment:
MACHINE_HAS_NEXTCLOUD: "true" MACHINE_HAS_NEXTCLOUD: "true"
has_yubikey: true
repositories: repositories:
- personal_projects - personal_projects
@@ -57,9 +45,9 @@ screen:
screencfgs: [] screencfgs: []
workspace: workspace:
1: "" 1: www
9: "" 9: comm
10: "" 10: music
environment: environment:
MACHINE_TYPE: "workstation" MACHINE_TYPE: "workstation"

View File

@@ -1,7 +1,4 @@
font_size_1: 12 font_size: 12
font_size_2: 9
i3bar_icon_padding: ""
users: users:
- name: hannes-work - name: hannes-work
@@ -21,7 +18,6 @@ users:
manage_css: false manage_css: false
mail: hannes.koerber@tradebyte.com mail: hannes.koerber@tradebyte.com
git_gpg_sign: false git_gpg_sign: false
ssh_agent: true
gpg_agent: false gpg_agent: false
gpg_agent_for_ssh: false gpg_agent_for_ssh: false
environment: environment:
@@ -29,6 +25,7 @@ users:
MACHINE_HAS_RESTIC_BACKUP: "true" MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_HAS_ELEMENT: "false" MACHINE_HAS_ELEMENT: "false"
MACHINE_HAS_KEEPASSX: "true" MACHINE_HAS_KEEPASSX: "true"
has_yubikey: false
repositories: [] repositories: []
- name: hannes-private - name: hannes-private
group: hannes-private group: hannes-private
@@ -45,7 +42,6 @@ users:
manage_css: true manage_css: true
mail: hannes@hkoerber.de mail: hannes@hkoerber.de
git_gpg_sign: false git_gpg_sign: false
ssh_agent: false
gpg_agent: true gpg_agent: true
gpg_agent_for_ssh: true gpg_agent_for_ssh: true
gpg_key: gpg_key:
@@ -75,14 +71,14 @@ screen:
0: eDP-1 0: eDP-1
workspace: workspace:
1: "" 1: www
2: "" 2: www
3: " local" 3: term-local
4: " remote" 4: term-remote
7: "" 7: comm
8: "" 8: pass
9: "" 9: music
10: "" 10: pim
screencfgs: screencfgs:
- name: three-screens - name: three-screens

View File

@@ -1,7 +1,4 @@
font_size_1: 12 font_size: 12
font_size_2: 9
i3bar_icon_padding: ""
users: users:
- name: hannes-work - name: hannes-work
@@ -21,7 +18,6 @@ users:
manage_css: false manage_css: false
mail: hannes.koerber@tradebyte.com mail: hannes.koerber@tradebyte.com
git_gpg_sign: false git_gpg_sign: false
ssh_agent: true
gpg_agent: false gpg_agent: false
gpg_agent_for_ssh: false gpg_agent_for_ssh: false
environment: environment:
@@ -29,11 +25,8 @@ users:
MACHINE_HAS_RESTIC_BACKUP: "true" MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_HAS_ELEMENT: "false" MACHINE_HAS_ELEMENT: "false"
MACHINE_HAS_KEEPASSX: "true" MACHINE_HAS_KEEPASSX: "true"
has_yubikey: false
repositories: [] repositories: []
overrides:
terraform_version: 1.1.3
terraform_check_updates: false
- name: hannes-private - name: hannes-private
group: hannes-private group: hannes-private
vt: 2 vt: 2
@@ -49,7 +42,6 @@ users:
manage_css: true manage_css: true
mail: hannes@hkoerber.de mail: hannes@hkoerber.de
git_gpg_sign: false git_gpg_sign: false
ssh_agent: false
gpg_agent: true gpg_agent: true
gpg_agent_for_ssh: true gpg_agent_for_ssh: true
gpg_key: gpg_key:
@@ -62,30 +54,31 @@ users:
MACHINE_HAS_RESTIC_BACKUP: "false" MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_HAS_ELEMENT: "true" MACHINE_HAS_ELEMENT: "true"
MACHINE_HAS_KEEPASSX: "false" MACHINE_HAS_KEEPASSX: "false"
has_yubikey: true
repositories: repositories:
- personal_projects - personal_projects
screen: screen:
1: DP-3 1: DP-1-1
2: DP-3 2: DP-1-1
3: DP-4 3: DP-1-2
4: DP-4 4: DP-1-2
5: DP-4 5: DP-1-2
6: DP-4 6: DP-1-2
7: eDP-1 7: eDP-1
8: eDP-1 8: eDP-1
9: eDP-1 9: eDP-1
0: eDP-1 0: eDP-1
workspace: workspace:
1: "" 1: www
2: "" 2: www
3: " local" 3: term-local
4: " remote" 4: term-remote
7: "" 7: comm
8: "" 8: pass
9: "" 9: music
10: "" 10: pim
screencfgs: screencfgs:
- name: three-screens - name: three-screens

View File

@@ -1,58 +0,0 @@
live_config_reload = false
[colors.bright]
black = "#75715E"
blue = "#66D9EF"
cyan = "#A1EFE4"
green = "#A6E22E"
magenta = "#AE81FF"
red = "#F92672"
white = "#F9F8F5"
yellow = "#F4BF75"
[colors.normal]
black = "#000000"
blue = "#66D9EF"
cyan = "#A1EFE4"
green = "#A6E22E"
magenta = "#AE81FF"
red = "#F92672"
white = "#F8F8F2"
yellow = "#F4BF75"
[colors.primary]
background = "#272822"
foreground = "#F8F8F2"
[env]
TERM = "alacritty"
[font]
size = {{ machine.font_size_2 }}
[font.bold]
family = "Inconsolata"
style = "Bold"
[font.bold_italic]
family = "Inconsolata"
style = "Bold Italic"
[font.italic]
family = "Inconsolata"
style = "Italic"
[font.normal]
family = "Inconsolata"
style = "Regular"
[selection]
save_to_clipboard = true
[window]
dynamic_title = true
title = "[terminal]"
[window.padding]
x = 3
y = 3

702
alacritty/alacritty.yml.j2 Normal file
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

@@ -5,15 +5,9 @@ After=windowmanager.target
Wants=blueman.service Wants=blueman.service
Wants=dpms.service Wants=dpms.service
Wants=dunst.service Wants=dunst.service
{% for profile, config in (user.firefox_profiles|default({})).items() %} Wants=element.service
{% if config.bigger_font|default(false) is sameas false %} {% for profile in (user.firefox_profiles|default({})).keys() %}
Wants=firefox@{{ profile }}.service Wants=firefox@{{ profile }}.service
{% endif %}
{% endfor %}
{% for profile, config in (user.firefox_profiles|default({})).items() %}
{% if config.bigger_font|default(false) is sameas true %}
Wants=firefox-gtk-override-bigger-font@{{ profile }}.service
{% endif %}
{% endfor %} {% endfor %}
Wants=gpg-agent.service Wants=gpg-agent.service
Wants=gnome-keyring.service Wants=gnome-keyring.service
@@ -31,5 +25,4 @@ Wants=steam.service
Wants=touchpad.service Wants=touchpad.service
Wants=xresources.service Wants=xresources.service
Wants=yubikey-touch-detector.service Wants=yubikey-touch-detector.service
Wants=kdeconnect.service

View File

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

View File

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

View File

@@ -1,9 +0,0 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
PassEnvironment=DISPLAY
Environment=XDG_CONFIG_HOME=%h/.config/gtk-3.0-overrides/bigger-font/
Restart=always

View File

@@ -1,5 +0,0 @@
[Service]
Type=simple
ExecStart=%h/bin/mousespam
RemainAfterExit=True
PassEnvironment=DISPLAY

View File

@@ -3,7 +3,6 @@ BindsTo=autostart.target
After=windowmanager.target After=windowmanager.target
[Service] [Service]
ExecStartPre=/usr/bin/env redshift-gtk -x
ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf
PassEnvironment=DISPLAY PassEnvironment=DISPLAY
Restart=always Restart=always

View File

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

View File

@@ -1,8 +1,6 @@
[Unit] [Unit]
BindsTo=autostart.target BindsTo=autostart.target
PartOf=gpg-agent.service
After=windowmanager.target After=windowmanager.target
After=gpg-agent.service
[Service] [Service]
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify ExecStart=/usr/bin/env yubikey-touch-detector -libnotify

View File

@@ -2,7 +2,7 @@
set -o errexit set -o errexit
cd ~/code/personal/time-tracking/ cd ~/projects/personal/time-tracking/
source venv/bin/activate source venv/bin/activate
source ~/.attendance_env source ~/.attendance_env

View File

@@ -8,13 +8,13 @@ log() {
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile" printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
} }
case "$1 $2" in case "$1" in
"set-paused false") enable)
log "Enabling dunst" log "Enabling dunst"
systemctl --user --no-block kill --signal SIGUSR2 dunst systemctl --user --no-block kill --signal SIGUSR2 dunst
;; ;;
"set-paused true") disable)
log "Disabling dunst" log "Disabling dunst"
systemctl --user --no-block kill --signal SIGUSR1 dunst systemctl --user --no-block kill --signal SIGUSR1 dunst
;; ;;

View File

@@ -1,2 +0,0 @@
#!/usr/bin/env bash
systemctl --no-pager --user status mousespam && systemctl --no-pager --user stop mousespam || systemctl --no-pager --user start mousespam

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
import os.path
hash = { hash = {
'A': 'Alpha', 'A': 'Alpha',
@@ -44,45 +43,6 @@ hash = {
'.': 'Stop', '.': 'Stop',
} }
de = {
'A': 'Anton',
'Ä': 'Ärger',
'B': 'Berta',
'C': 'Cäsar',
'D': 'Dora',
'E': 'Emil',
'F': 'Friedrich',
'G': 'Gustav',
'H': 'Heinrich',
'I': 'Ida',
'J': 'Julius',
'K': 'Kaufmann',
'L': 'Ludwig',
'M': 'Martha',
'N': 'Nordpol',
'O': 'Otto',
'Ö': 'Ökonom',
'P': 'Paula',
'Q': 'Quelle',
'R': 'Richard',
'S': 'Samuel',
'ß': 'Eszett',
'T': 'Theodor',
'U': 'Ulrich',
'Ü': 'Übermut',
'V': 'Viktor',
'W': 'Wilhelm',
'X': 'Xanthippe',
'Y': 'Ypsilon',
'Z': 'Zacharias',
'-': 'Strich',
'.': 'Punkt',
}
if os.path.basename(sys.argv[0]) == 'natode':
hash = de
if len(sys.argv) < 2 or sys.argv[1] == '-': if len(sys.argv) < 2 or sys.argv[1] == '-':
text = [line.strip() for line in sys.stdin.readlines()] text = [line.strip() for line in sys.stdin.readlines()]
else: else:

View File

@@ -1 +0,0 @@
nato

14
bin/pf
View File

@@ -1,14 +0,0 @@
#!/usr/bin/env python3
import sys
import json
import yaml
import subprocess
jqexpression = sys.argv[1]
jqprocess = subprocess.Popen(["jq", "-r", jqexpression], stdin=subprocess.PIPE, text=True)
document = [d for d in yaml.safe_load_all(sys.stdin)][-1]
json.dump(document, jqprocess.stdin)

View File

@@ -5,14 +5,7 @@ empty_directories:
- name: .config/nvim - name: .config/nvim
- name: .config/rofi - name: .config/rofi
- name: .config/gtk-3.0 - name: .config/gtk-3.0
- name: .config/gtk-3.0-overrides
- name: .config/gtk-3.0-overrides/bigger-font/
- name: .config/gtk-3.0-overrides/bigger-font/gtk-3.0
- name: .config/qt5ct - name: .config/qt5ct
- name: .config/i3status-rust
- name: .config/i3status-rust/icons
- name: .config/i3status-rust/themes
- name: .config/helix
dotfiles: dotfiles:
- from: git/gitconfig - from: git/gitconfig
to: .gitconfig to: .gitconfig
@@ -28,13 +21,9 @@ dotfiles:
- from: i3/config - from: i3/config
to: .i3/config to: .i3/config
template: true template: true
- from: i3/i3status-rust/config.toml - from: i3/i3status.conf
to: .config/i3status-rust/config.toml to: .i3/i3status.conf
template: true template: true
- from: i3/i3status-rust/themes/native.toml
to: .config/i3status-rust/themes/native.toml
- from: i3/i3status-rust/icons/awesome.toml
to: .config/i3status-rust/icons/awesome.toml
- from: i3/scripts - from: i3/scripts
to: .i3/scripts to: .i3/scripts
- from: tmux/tmux.conf - from: tmux/tmux.conf
@@ -61,23 +50,18 @@ dotfiles:
template: true template: true
- from: redshift/redshift.conf - from: redshift/redshift.conf
to: .config/redshift.conf to: .config/redshift.conf
- from: vscodium/product.json - from: vscode/settings.json
to: .config/VSCodium/product.json to: .config/Code/User/settings.json
- from: vscodium/settings.json - from: vscode/keybindings.json
to: .config/VSCodium/User/settings.json to: .config/Code/User/keybindings.json
- from: vscodium/keybindings.json - from: alacritty/alacritty.yml
to: .config/VSCodium/User/keybindings.json to: .config/alacritty.yml
- from: alacritty/alacritty.toml
to: .config/alacritty.toml
template: true template: true
- from: rofi/config - from: rofi/config
to: .config/rofi/config to: .config/rofi/config
- from: gtk/gtk-3.0.ini - from: gtk/gtk-3.0.ini
to: .config/gtk-3.0/settings.ini to: .config/gtk-3.0/settings.ini
template: true template: true
- from: gtk/gtk-3.0-bigger-font.ini
to: .config/gtk-3.0-overrides/bigger-font/gtk-3.0/settings.ini
template: true
- from: gtk/gtkrc-2.0 - from: gtk/gtkrc-2.0
to: .gtkrc-2.0 to: .gtkrc-2.0
template: true template: true
@@ -87,5 +71,3 @@ dotfiles:
to: .screencfg to: .screencfg
- from: scripts - from: scripts
to: scripts to: scripts
- from: helix/config.toml
to: .config/helix/config.toml

View File

@@ -64,7 +64,7 @@
frame_width = 2 frame_width = 2
# Defines color of the frame around the notification window. # Defines color of the frame around the notification window.
frame_color = "#ff964f" frame_color = "#e16b40"
# Define a color for the separator. # Define a color for the separator.
# possible values are: # possible values are:
@@ -84,7 +84,7 @@
### Text ### ### Text ###
font = DejaVu Sans {{ machine.font_size_1 }} 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

@@ -120,5 +120,3 @@
[init] [init]
defaultBranch = master defaultBranch = master
[safe]
directory = /var/lib/dotfiles

View File

@@ -1,9 +0,0 @@
provider = "github"
token_command = "pass show github | pf '.personal_access_token.grm.value'"
root = "~/projects/github"
force_ssh = true
worktree = true
[filters]
# owner = true
# groups = ["hi"]

View File

@@ -6,7 +6,7 @@ name = "misc/rbackupd"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "github" name = "github"
url = "ssh://git@github.com/hakoerber/rbackupd.git" url = "git@github.com:hakoerber/rbackupd.git"
type = "ssh" type = "ssh"
[[trees.repos]] [[trees.repos]]
@@ -59,7 +59,7 @@ name = "misc/wifiqr"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "github" name = "github"
url = "ssh://git@github.com/hakoerber/wifiqr.git" url = "ssh://git@github.com/hakoerber/wifi-qr.git"
type = "ssh" type = "ssh"
[[trees.repos]] [[trees.repos]]
@@ -74,7 +74,7 @@ type = "ssh"
name = "misc/xftwidth" name = "misc/xftwidth"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "github" name = "origin"
url = "ssh://git@github.com/hakoerber/xftwidth.git" url = "ssh://git@github.com/hakoerber/xftwidth.git"
type = "ssh" type = "ssh"
@@ -83,9 +83,12 @@ name = "upstream"
url = "https://github.com/vixus0/xftwidth" url = "https://github.com/vixus0/xftwidth"
type = "https" type = "https"
[[trees.repos]]
name = "x-hidecursor"
remotes = []
[[trees.repos]] [[trees.repos]]
name = "git-repo-manager" name = "git-repo-manager"
worktree_setup = true
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "github" name = "github"
@@ -121,6 +124,11 @@ name = "github"
url = "ssh://git@github.com/hakoerber/acimaker.git" url = "ssh://git@github.com/hakoerber/acimaker.git"
type = "ssh" type = "ssh"
[[trees.repos.remotes]]
name = "private"
url = "git@code.sys.haktec.de:container/acimaker.git"
type = "ssh"
[[trees.repos]] [[trees.repos]]
name = "container/drone-kaniko" name = "container/drone-kaniko"
@@ -196,11 +204,7 @@ type = "ssh"
[[trees.repos]] [[trees.repos]]
name = "lea-michael-hochzeit" name = "lea-michael-hochzeit"
remotes = []
[[trees.repos.remotes]]
name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/lea-michi-hochzeit.git"
type = "ssh"
[[trees.repos]] [[trees.repos]]
name = "builddoc" name = "builddoc"
@@ -232,11 +236,11 @@ url = "ssh://git@github.com/hakoerber/fizzbuzz.git"
type = "ssh" type = "ssh"
[[trees.repos]] [[trees.repos]]
name = "ggj/2018-the-lost-son" name = "ggj/2018/the-lost-son"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "origin" name = "origin"
url = "ssh://git@github.com/niklas-heer/the-lost-son.git" url = "ssh://git@github.com:niklas-heer/the-lost-son.git"
type = "ssh" type = "ssh"
[[trees.repos]] [[trees.repos]]
@@ -244,7 +248,7 @@ name = "ggj/2019-claim-your-world"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "origin" name = "origin"
url = "ssh://git@github.com/theintroverts/claim-your-world.git" url = "ssh://git@github.com:theintroverts/claim-your-world.git"
type = "ssh" type = "ssh"
[[trees.repos]] [[trees.repos]]
@@ -309,18 +313,5 @@ type = "ssh"
[[trees.repos.remotes]] [[trees.repos.remotes]]
name = "origin" name = "origin"
url = "ssh://git@code.hkoerber.de:2222/hannes/aws-glacier-backup.git" url = "ssh://git@code.hkoerber.de:2222/hakoerber/aws-glacier-backup.git"
type = "ssh" type = "ssh"
[[trees.repos]]
name = "unclutter-xfixes"
[[trees.repos.remotes]]
name = "github"
url = "git@github.com:hakoerber/unclutter-xfixes.git"
type = "ssh"
[[trees.repos.remotes]]
name = "upstream"
url = "https://github.com/Airblader/unclutter-xfixes"
type = "https"

View File

@@ -1,15 +0,0 @@
[Settings]
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-font-name=DejaVu Sans {{ ((machine.font_size_1|int - 2)|float * 2.0) | round(0, 'floor') | int }}
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

View File

@@ -1,7 +1,7 @@
[Settings] [Settings]
gtk-theme-name=Breeze gtk-theme-name=Breeze
gtk-icon-theme-name=breeze gtk-icon-theme-name=breeze-dark
gtk-font-name=DejaVu Sans {{ machine.font_size_1|int - 2 }} gtk-font-name=DejaVu Sans {{ machine.font_size|int - 2 }}
gtk-cursor-theme-name=breeze_cursors gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=0 gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-style=GTK_TOOLBAR_BOTH

View File

@@ -2,8 +2,8 @@
# Any customization should be done in ~/.gtkrc-2.0.mine instead. # Any customization should be done in ~/.gtkrc-2.0.mine instead.
gtk-theme-name="Breeze" gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze" gtk-icon-theme-name="breeze-dark"
gtk-font-name="DejaVu Sans {{ machine.font_size_1| int - 2 }}" gtk-font-name="DejaVu Sans {{ machine.font_size| int - 2 }}"
gtk-cursor-theme-name="breeze_cursors" gtk-cursor-theme-name="breeze_cursors"
gtk-cursor-theme-size=0 gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-style=GTK_TOOLBAR_BOTH

View File

@@ -1,35 +0,0 @@
theme = "monokai"
[editor]
idle-timeout = 0
completion-trigger-len = 1
[editor.statusline]
left = [
"mode",
"separator",
"file-name",
"file-modification-indicator",
]
right = [
"spinner",
"spacer",
"diagnostics",
"separator",
"selections",
"separator",
"position",
"position-percentage",
"file-type",
]
mode.normal = "N"
mode.insert = "I"
mode.select = "S"
[editor.lsp]
display-inlay-hints = true
[editor.cursor-shape]
insert = "bar"

View File

@@ -17,8 +17,8 @@
set $mod Mod4 set $mod Mod4
# The default terminal # The default terminal
set $terminal "alacritty --config-file ~/.config/alacritty.toml" set $terminal "alacritty --config-file ~/.config/alacritty.yml"
set $calc "alacritty --config-file ~/.config/alacritty.toml -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
@@ -115,8 +115,8 @@ workspace $workspace10 output {{ machine.screen.0 }}
assign [class="^Keepassx$"] $workspace8 assign [class="^Keepassx$"] $workspace8
# See https://github.com/i3/i3/issues/2060 # See https://github.com/i3/i3/issues/2060
for_window [class="^Spotify$"] move to workspace $workspace10 for_window [class="^Spotify$"] move to workspace $workspace9
assign [class="^Spotify$"] $workspace10 assign [class="^Spotify$"] $workspace9
assign [class="^Google-chrome$"] $workspace7 assign [class="^Google-chrome$"] $workspace7
assign [class="^Chromium$"] $workspace7 assign [class="^Chromium$"] $workspace7
@@ -226,7 +226,27 @@ assign [class="^Wine$"] $workspace10
bindsym $mod+Shift+v exec --no-startup-id redshift-toggle bindsym $mod+Shift+v exec --no-startup-id redshift-toggle
bindsym $mod+$pim_toggle exec --no-startup-id ~/.i3/scripts/swap-from-workspace $workspace10 # bindsym $mod+$pim_toggle \
# mark --add _source; \
# focus output eDP-1; \
# mark --add _origin; \
# workspace $workspace10; \
# mark --add _destination; \
# [con_mark="^_destination$"] swap container with mark "_source"; \
# [con_mark="^_source$"] focus; unmark _source; \
# [con_mark="^_origin$"] focus; unmark _origin; \
# [con_mark="^_destination$"] focus; unmark _destination; \
bindsym $mod+$pim_toggle \
unmark _destination; \
mark _source; \
workspace $workspace10; \
mark --add _destination; \
[con_mark="^_destination$"] swap container with mark "_source"; \
[con_mark="^_source$"] focus; \
unmark _source; \
[con_mark="^_destination$"] focus; \
unmark _destination;
################################################################################ ################################################################################
### MODES ###################################################################### ### MODES ######################################################################
@@ -292,17 +312,17 @@ assign [class="^Wine$"] $workspace10
floating_minimum_size 0 x 0 floating_minimum_size 0 x 0
floating_maximum_size 0 x 0 floating_maximum_size 0 x 0
font pango:Inconsolata {{ machine.font_size_1 }} font pango:Inconsolata {{ machine.font_size }}
################################################################################ ################################################################################
### COLOR SETTINGS ############################################################# ### COLOR SETTINGS #############################################################
################################################################################ ################################################################################
# class border backgr. text indicator # class border backgr. text indicator
client.focused #e5b567 #e5b567 #000000 #FF0000 client.focused #E16B40 #E16B40 #000000 #FF0000
client.focused_inactive #272822 #5f676a #ffffff #484e50 client.focused_inactive #333333 #5f676a #ffffff #484e50
client.unfocused #1C1C1C #272822 #cccccc #292d2e client.unfocused #333333 #202020 #cccccc #292d2e
client.urgent #272822 #ff7777 #000000 #900000 client.urgent #2f343a #900000 #ffffff #900000
################################################################################ ################################################################################
### APPLICATION SPECIFIC SETTINGS ############################################## ### APPLICATION SPECIFIC SETTINGS ##############################################
@@ -319,29 +339,31 @@ bindsym $mod+F9 exec --no-startup-id evolution
################################################################################ ################################################################################
bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute '@DEFAULT_SINK@' toggle bindsym XF86AudioMute exec --no-startup-id $scriptdir/pa-volume mute-toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume '@DEFAULT_SINK@' +5% bindsym XF86AudioRaiseVolume exec --no-startup-id $scriptdir/pa-volume set-vol +3
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume '@DEFAULT_SINK@' -5% bindsym XF86AudioLowerVolume exec --no-startup-id $scriptdir/pa-volume set-vol -3
bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause bindsym XF86AudioPlay exec $scriptdir/spotify-control toggle
bindsym XF86AudioNext exec --no-startup-id playerctl -p spotify next bindsym XF86AudioNext exec $scriptdir/spotify-control next
bindsym XF86AudioPrev exec --no-startup-id playerctl -p spotify previous bindsym XF86AudioPrev exec $scriptdir/spotify-control previous
# keys seemingly switched # keys seemingly switched
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+m exec --no-startup-id pactl set-source-mute '@DEFAULT_SOURCE@' toggle bindsym $mod+m exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
bindsym $mod+space exec --no-startup-id pactl set-source-mute '@DEFAULT_SOURCE@' toggle bindsym $mod+space exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic
############################################################################## ##############################################################################
### BARS ####################################################################### ### BARS #######################################################################
################################################################################ ################################################################################
#
bar { bar {
mode dock mode dock
position bottom position bottom
#tray_output HDMI3
tray_output primary tray_output primary
tray_padding 2 tray_padding 2
@@ -353,23 +375,24 @@ bar {
id bar-0 id bar-0
font pango:Inconsolata, FontAwesome {{ machine.font_size_1 }} font pango:Inconsolata, FontAwesome {{ machine.font_size }}
colors { colors {
background #272822 background #272822
statusline #ffffff statusline #ffffff
separator #555555 separator #444444
# separator #e16b40
focused_separator #e5b567 # focused_background #303030
focused_background #272822 # focused_separator #272822
# border bg text focused_workspace #e16b40 #272822 #ffffff
focused_workspace #e5b567 #4f676a #ffffff active_workspace #272822 #5f676a #ffffff
active_workspace #272822 #4f676a #ffffff
inactive_workspace #272822 #272822 #dddddd inactive_workspace #272822 #272822 #dddddd
urgent_workspace #272822 #ff7777 #272822 urgent_workspace #D00000 #D00000 #272822
binding_mode #272822 #e5b567 #272822 binding_mode #272822 #e16b40 #272822
} }
status_command i3status-rs ~/.config/i3status-rust/config.toml i3bar_command i3bar
status_command py3status --standalone --dbus-notify -c ~/.i3/i3status.conf
} }

View File

@@ -1,108 +0,0 @@
icons_format = "{{ machine.i3bar_icon_padding }}{icon}{{ machine.i3bar_icon_padding }}"
[icons]
icons = "awesome"
[icons.overrides]
microphone = ""
volume = ""
[theme]
theme = "native"
[theme.overrides]
warning_fg = "#000000"
warning_bg = "#F4Bf75"
critical_fg = "#000000"
critical_bg = "#F92672"
end_separator = ""
[[block]]
block = "music"
player = "spotify"
separator = " — "
format = " $icon {$combo $prev $play $next|-} "
[[block]]
block = "sound"
driver = "pulseaudio"
max_vol = 100
format = " $icon{ $volume.eng(w:2)|} "
[[block.click]]
button = "left"
cmd = "pactl set-sink-mute '@DEFAULT_SINK@' toggle"
update = true
[[block]]
block = "sound"
driver = "pulseaudio"
device_kind = "source"
format = " $icon "
[block.theme_overrides]
warning_fg = { link = "idle_fg" }
warning_bg = { link = "idle_bg" }
idle_fg = { link = "warning_fg" }
idle_bg = { link = "warning_bg" }
[[block.click]]
button = "left"
cmd = "pactl set-source-mute '@DEFAULT_SOURCE@' toggle"
update = true
[[block]]
block = "net"
format = " $icon{ $signal_strength|}{ $ssid | }"
[[block]]
block = "load"
format = " $icon $1m.eng(w:4) "
warning = 4
critical = 1000
interval = 1
[[block]]
block = "battery"
interval = 10
format = " $percentage $time "
missing_format = ""
if_command = "test -e /sys/class/power_supply/BAT0"
[[block]]
block = "toggle"
format = "  $icon "
command_on = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs"
command_off = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs"
command_state = "[[ $($HOME/.i3/scripts/presentation-mode status) == on ]] && echo active"
[[block]]
block = "toggle"
format = "  $icon "
command_on = "systemctl --user start redshift"
command_off = "systemctl --user stop redshift"
command_state = "[[ $(systemctl --user is-active redshift) == active ]] && echo active"
signal = 0
[[block]]
block = "toggle"
format = "  $icon "
command_on = "systemctl --user start spotify"
command_off = "systemctl --user stop spotify"
command_state = "[[ $(systemctl --user is-active spotify) == active ]] && echo active"
signal = 0
[[block]]
block = "custom"
json = true
command = "ping -n -q -w 2 -c 1 8.8.8.8 >/dev/null 2>/dev/null && printf '{\"text\":\"\",\"state\":\"Info\"}' || printf '{\"text\":\"\",\"state\":\"Critical\"}'"
[[block]]
block = "custom"
command = "curl -s 'https://wttr.in/Stockholm?m&T&format=%c%t' | sed 's/ / /g'"
interval = 1800
[[block]]
block = "time"
interval = 1
format = " $timestamp.datetime(f:'[CW %V] %a %d.%m.%Y %H:%M:%S', l:de_DE) "

View File

@@ -1,94 +0,0 @@
# FontAwesome 4: https://fontawesome.com/v4.7.0/cheatsheet/
backlight_empty = "\U0001f315"
backlight_full = "\U0001f311"
backlight_1 = "\U0001f314"
backlight_2 = "\U0001f314"
backlight_3 = "\U0001f314"
backlight_4 = "\U0001f314"
backlight_5 = "\U0001f313"
backlight_6 = "\U0001f313"
backlight_7 = "\U0001f313"
backlight_8 = "\U0001f313"
backlight_9 = "\U0001f313"
backlight_10 = "\U0001f312"
backlight_11 = "\U0001f312"
backlight_12 = "\U0001f312"
backlight_13 = "\U0001f312"
bat_charging = "\uf1e6" # fa-plug
bat_discharging = "\uf242" # fa-battery-half
bat_10 = "\uf244" # fa-battery-empty
bat_20 = "\uf243" # fa-battery-quarter
bat_30 = "\uf243" # fa-battery-quarter
bat_40 = "\uf243" # fa-battery-quarter
bat_50 = "\uf242" # fa-battery-half
bat_60 = "\uf242" # fa-battery-half
bat_70 = "\uf241" # fa-battery-three-quarters
bat_80 = "\uf241" # fa-battery-three-quarters
bat_90 = "\uf241" # fa-battery-three-quarters
bat_full = "\uf240" # fa-battery-full
bat_not_available = "\uf244" # fa-battery-empty
bell = "\uf0f3" # fa-bell
bell-slash = "\uf1f7" # fa-bell-slash-o
bluetooth = "\uf294" # fa-bluetooth-b
calendar = "\uf073" # fa-calendar
cogs = "\uf085" # fa-cogs
cpu = "\uf0e4" # fa-dashboard
cpu_boost_off = "\uf204" # fa-toggle-off
cpu_boost_on = "\uf205" # fa-toggle-on
disk_drive = "\uf0a0" # fa-hdd-o
docker = "\uf21a" # fa-ship
github = "\uf09b" # fa-github
gpu = "\uf26c" # fa-television
headphones = "\uf025" # fa-headphones
joystick = "\uf11b" # fa-gamepad
keyboard = "\uf11c" # fa-keyboard-o
mail = "\uf0e0" # fa-envelope
memory_mem = "\uf2db" # fa-microchip
memory_swap = "\uf0a0" # fa-hdd-o
mouse = "\uf245" # fa-mouse-pointer
music = "\uf001" # fa-music
music_next = "\uf061" # fa-arrow-right
music_pause = "\uf04c" # fa-pause
music_play = "\uf04b" # fa-play
music_prev = "\uf060" # fa-arrow-left
net_bridge = "\uf0e8" # fa-sitemap
net_down = "\u2b07"
net_loopback = "LO"
net_modem = "\uf095" # fa-phone
net_up = "\u2b06"
net_vpn = "\uf023" # fa-lock
net_wired = "\uf0ac" # fa-globe
net_wireless = "\uf1eb" # fa-wifi
notification = "\uf0a2" # fa-bell-o
phone = "\uf10b" # fa-mobile
phone_disconnected = "\U0001f4f5" # https://unicode-table.com/en/1F4F5/
ping = "\u21ba"
pomodoro = "\U0001f345"
pomodoro_break = "\uf0f4" # fa-coffee
pomodoro_paused = "\uf04c" # fa-pause
pomodoro_started = "\uf04b" # fa-play
pomodoro_stopped = "\uf04d" # fa-stop
resolution = "\uf096" # fa-square-o
tasks = "\uf0ae" # fa-tasks
thermometer = "\uf2c8" # fa-thermometer-3
time = "\uf017" # fa-clock-o
toggle_off = "\uf204" # fa-toggle-off
toggle_on = "\uf205" # fa-toggle-on
unknown = "\uf128" # fa-question
update = "\uf062" # fa-arrow-up
uptime = "\uf017" # fa-clock-o
volume_empty = "\uf026" # fa-volume-off
volume_full = "\uf028" # fa-volume-up
volume_half = "\uf027" # fa-volume-down
volume_muted = "\uf026 \uf00d"
microphone_empty = "\uf130" # fa-microphone
microphone_full = "\uf130" # fa-microphone
microphone_half = "\uf130" # fa-microphone
microphone_muted = "\uf131" # fa-microphone-slash
weather_clouds = "\uf0c2" # fa-cloud
weather_default = "\uf0c2" # fa-cloud
weather_rain = "\uf043" # fa-tint
weather_snow = "\uf2dc" # fa-snowflake-o
weather_sun = "\uf185" # fa-sun-o
weather_thunder = "\uf0e7" # fa-bolt
xrandr = "\uf26c" # fa-television

123
i3/i3status.conf.j2 Normal file
View File

@@ -0,0 +1,123 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
interval = 1
# color = '#FFFFFF'
# color_good = '#00FF00'
# color_bad = '#FF0000'
# color_degraded = '#FFFF00'
color = '#FFFFFF'
color_good = '#FFFFFF'
color_bad = '#F92672'
color_degraded = '#F4Bf75'
}
order += spotify
{% if user.has_yubikey %}
order += "yubikey"
{% endif %}
order += "volume_status output"
order += "volume_status input"
order += "wifi"
order += "external_script presentation_mode"
order += "systemd redshift"
order += "systemd spotify"
order += online_status
order += "battery_level all"
order += "clock"
battery_level all {
battery_id = "all"
format = " {icon} {percent}% "
measurement_mode = "sys"
charging_character = ""
blocks = ""
notification = true
hide_when_full = false
hide_seconds = true
notify_low_level = true
threshold_full = 95
}
systemd redshift {
unit = "redshift.service"
user = true
format = "  "
on_click 1 = "exec $HOME/.i3/scripts/toggle-app redshift"
color_bad = '#F4Bf75'
color_degraded = '#F4Bf75'
}
systemd spotify {
unit = "spotify.service"
user = true
format = "  "
color_bad = '#F4Bf75'
color_degraded = '#F4Bf75'
}
yubikey {
format = '[  YubiKey[\?if=is_gpg ][\?if=is_u2f ] ]'
}
clock {
format = ["{DE}", "{NZ}", "{Cuba}", "{MX}", "{CZ}", "{NL}", "{VN}"]
format_time = "  {name} \[KW %V\] %a %d.%m.%Y %H:%M:%S "
}
wifi {
bitrate_bad = 0
bitrate_degraded = 0
format = "  {signal_percent} {ssid} |  down "
down_color = "good"
}
spotify {
format = "  {title} - {artist} "
format_down = "  off "
format_stopped = "  stopped "
cache_timeout = 1
color_offline = '#FFFFFF'
on_click 1 = "exec $HOME/.i3/scripts/spotify-control toggle"
on_click 3 = "exec $HOME/.i3/scripts/spotify-control next"
}
external_script presentation_mode {
format = " Present: {output} "
script_path = "$HOME/.i3/scripts/presentation-mode status"
strip_output = True
on_click 1 = "exec $HOME/.i3/scripts/presentation-mode toggle"
}
online_status {
icon_on = ""
icon_off = ""
format = " {icon} "
}
volume_status output {
cache_timeout = 10
format = "  {percentage}% "
format_muted = "  mute "
thresholds = []
command = "pactl"
color_muted = '#FFFFFF'
}
volume_status input {
cache_timeout = 10
format = "  active "
format_muted = "  mute "
thresholds = [(0, 'good'), (1, 'bad')]
command = "pactl"
color_muted = '#FFFFFF'
is_input = True
}

9
i3/scripts/bar-update Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
if [[ "$1" ]] ; then
modules="$1"
else
modules=all
fi
py3-cmd refresh "$modules"

View File

@@ -18,7 +18,13 @@ log()
lock() lock()
{ {
set -x set -x
playerctl -p spotify pause playing=0
if [[ "$(playerctl -p spotify status)" == "Playing" ]] ; then
playing=1
fi
if (( $playing )) ; then
playerctl -p spotify pause
fi
if [[ -f "$LOCKSCREEN" ]] ; then if [[ -f "$LOCKSCREEN" ]] ; then
resized_lockscreen=$(mktemp) resized_lockscreen=$(mktemp)
@@ -30,6 +36,9 @@ lock()
i3lock --nofork --show-failed-attempts --ignore-empty-password \ i3lock --nofork --show-failed-attempts --ignore-empty-password \
--color "$_fallback_color" --color "$_fallback_color"
fi fi
if (( $playing )) ; then
playerctl -p spotify play
fi
} }
screen_off() { screen_off() {
@@ -43,11 +52,10 @@ reset_screen() {
lock_and_screen_off() { lock_and_screen_off() {
lock & lock &
_pid=$! _pid=$!
dunst_paused=$(dunstctl is-paused) dunstctl disable
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused true
screen_off screen_off
wait $_pid wait $_pid
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused false dunstctl enable
reset_screen reset_screen
} }

137
i3/scripts/pa-volume Executable file
View File

@@ -0,0 +1,137 @@
#!/bin/bash
# name of the sink. execute pactl list sinks to get a list
SINKNAME="$(pactl info | grep '^Default Sink:' | cut -d ' ' -f 3-)"
# name of the sink. execute pactl list sinks to get a list
SOURCENAME="$(pactl info | grep '^Default Source:' | cut -d ' ' -f 3-)"
#SINKNAME="alsa_output.usb-Logitech_Logitech_Wireless_Headset_88C626354D45-00.analog-stereo"
# this is the worst
SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1))
SOURCE=$(( $(pactl list sources | grep "Name: " | grep -n "${SOURCENAME}"$ | grep -o "^[[:digit:]]*") -1))
getvol() {
echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1)
}
setvol() {
if [[ $1 =~ [+-][0-9]+ ]] ; then
oldvol="$(getvol)"
echo "oldvol $oldvol"
delta="$(echo "$1" | cut -c 2-)"
echo "delta $delta"
if [[ "$(echo "$1" | cut -c 1)" == "+" ]] ; then
echo "+"
newvol=$(( $oldvol + $delta ))
else
echo "-"
newvol=$(( $oldvol - $delta ))
echo $newvol
fi
if [[ $newvol -gt 100 ]]; then
echo "capping at 100 percent"
newvol=100
fi
if [[ $newvol -lt 0 ]]; then
echo "capping at 0 percent"
newvol=0
fi
echo "newvol $newvol"
else
newvol="$1"
fi
pactl set-sink-volume $SINKNAME $(( $newvol * 65536 / 100 ))
}
ismuted() {
muted=$(pactl list sinks | grep "^[[:space:]]*Mute" | head -n $(( $SINK + 1 )) | tail -n 1 | cut -d " " -f 2)
if [[ $muted == "no" ]]; then
echo 0
else
echo 1
fi
}
mute() {
pactl set-sink-mute $SINKNAME 1
}
unmute() {
pactl set-sink-mute $SINKNAME 0
}
mute-toggle() {
pactl set-sink-mute $SINKNAME toggle
}
mute-toggle-mic() {
pactl set-source-mute $SOURCENAME toggle
}
status() {
if [[ $(ismuted) == "1" ]] ; then
echo "mute"
return
fi
echo "$(getvol)%"
}
usage() {
echo "Usage:"
echo
echo "$0 get-vol"
echo "$0 set-vol VOL_PERC"
}
update_status_bar_sink() {
~/.i3/scripts/bar-update "volume_status output"
}
update_status_bar_source() {
~/.i3/scripts/bar-update "volume_status input"
}
case "$1" in
"sink")
echo $SINKNAME
echo $SINK
;;
"get-vol")
echo $(getvol)
;;
"set-vol")
if [[ -z "$2" ]] ; then
usage
else
setvol "$2"
fi
update_status_bar_sink
;;
"mute")
mute
update_status_bar_sink
;;
"unmute")
unmute
update_status_bar_sink
;;
"mute-toggle")
mute-toggle
update_status_bar_sink
;;
"mute-toggle-mic")
mute-toggle-mic
update_status_bar_source
;;
"is-muted")
echo $(ismuted)
;;
"status")
echo $(status)
;;
*)
usage
esac

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
_status_file="${XDG_RUNTIME_DIR}/presentation-mode-on" _status_file="${XDG_RUNTIME_DIR}/presentation-mode-on"
_autostart="$HOME/.autostart.sh"
is_on() { is_on() {
[[ -e "${_status_file}" ]] [[ -e "${_status_file}" ]]
@@ -8,16 +9,22 @@ is_on() {
switch_on() { switch_on() {
touch "${_status_file}" touch "${_status_file}"
dunstctl set-paused true & dunstctl disable &
systemctl --user --no-block stop redshift.service systemctl --user --no-block stop redshift.service
systemctl --user --no-block stop spotify.service systemctl --user --no-block stop spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode"
~/.i3/scripts/bar-update "systemd redshift"
~/.i3/scripts/bar-update "systemd spotify"
} }
switch_off() { switch_off() {
rm -f "${_status_file}" rm -f "${_status_file}"
dunstctl set-paused false & dunstctl enable &
systemctl --user --no-block start redshift.service systemctl --user --no-block start redshift.service
systemctl --user --no-block start spotify.service systemctl --user --no-block start spotify.service
~/.i3/scripts/bar-update "external_script presentation_mode"
~/.i3/scripts/bar-update "systemd redshift"
~/.i3/scripts/bar-update "systemd spotify"
} }
@@ -25,8 +32,10 @@ case "$1" in
status) status)
if is_on ; then if is_on ; then
printf "on\n" printf "on\n"
printf '#F4BF75'
else else
printf "off\n" printf "off\n"
# printf '#F4BF75'
fi fi
;; ;;
toggle) toggle)

20
i3/scripts/spotify-control Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
case "$1" in
toggle)
cmd="play-pause"
;;
next)
cmd="next"
;;
previous)
cmd="previous"
;;
*)
echo "wrong argument $1"
exit 1
;;
esac
playerctl -p spotify "${cmd}"
~/.i3/scripts/bar-update spotify

20
i3/scripts/spotify-current Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object("org.mpris.MediaPlayer2.spotify",
"/org/mpris/MediaPlayer2")
spotify_properties = dbus.Interface(spotify_bus,
"org.freedesktop.DBus.Properties")
metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata")
# The property Metadata behaves like a python dict
# for key, value in metadata.items():
# print(key, value)
# To just print the title
print("{}: {} - [{}]".format(
metadata['xesam:artist'][0],
metadata['xesam:title'],
metadata['xesam:album']
))

View File

@@ -1,59 +0,0 @@
#!/usr/bin/env bash
set -o nounset
set -o errexit
set -o pipefail
set -o xtrace
cmds=()
workspacescratch="${1}"
i3msgworkspaces="$(i3-msg -t get_workspaces)"
output_of_pim=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.name == "'"${workspacescratch}"'")) | .[0].output')
active_workspace_on_target_output=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.output == "'"${output_of_pim}"'" and .visible)) | .[0].name')
focused_workspace_name=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.focused)) | .[0].name')
focused_workspace_output=$(printf '%s' "${i3msgworkspaces}" | jq -r 'map(select(.focused)) | .[0].output')
if [[ "${focused_workspace_name}" == "${workspacescratch}" ]]; then
exit 0
fi
cmds+=('unmark _destination')
cmds+=('mark _source')
if [[ "${active_workspace_on_target_output}" != "${workspacescratch}" ]] && [[ "${output_of_pim}" != "${focused_workspace_output}" ]]; then
need_output_reset=1
else
need_output_reset=0
fi
if ((need_output_reset)); then
cmds+=('workspace "'"${active_workspace_on_target_output}"'"')
cmds+=("mark --add _origin")
fi
cmds+=('workspace "'"${workspacescratch}"'"')
cmds+=('mark --add _destination')
cmds+=('[con_mark="^_destination$"] swap container with mark "_source"')
cmds+=('[con_mark="^_source$"] focus')
cmds+=('unmark _source')
if ((need_output_reset)); then
cmds+=('[con_mark="^_origin$"] focus')
cmds+=('unmark _origin')
fi
cmds+=('[con_mark="^_destination$"] focus')
cmds+=('unmark _destination')
i3msgcmd=""
for cmd in "${cmds[@]}"; do
i3msgcmd="${i3msgcmd}${cmd};"
done
i3-msg "${i3msgcmd}"

17
i3/scripts/toggle-app Executable file
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

@@ -52,7 +52,7 @@ _install() {
_package="$1" ; shift _package="$1" ; shift
if [[ $NAME == "Ubuntu" ]] ; then if [[ $NAME == "Ubuntu" ]] ; then
if ! (( cache_updated )) ; then if ! (( cache_updated )) ; then
sudowrap apt-get update apt-get update
cache_updated=1 cache_updated=1
fi fi
sudowrap apt-get install --assume-yes "${_package}" sudowrap apt-get install --assume-yes "${_package}"
@@ -68,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
@@ -77,13 +78,21 @@ if ! command -v make >/dev/null ; then
printf 'Done\n' printf 'Done\n'
fi fi
if [[ $NAME == "Arch Linux" ]] ; then # Required for compiling modules in venv.
_install "ansible" if ! command -v gcc >/dev/null ; then
printf 'gcc not installed, installing ...\n'
_install "gcc"
printf 'Done\n'
fi fi
if [[ $NAME == "Ubuntu" ]] ; then if ! python3 -c 'import venv' 2>/dev/null ; then
_install "ansible" printf 'Python3 venv module not installed, installing ...\n'
_install "python3-jmespath" _install python3-venv
printf 'Done\n'
fi fi
cd "$DOTDIR" && make cd "$DOTDIR" && make
# fix permissions of the directory
sudowrap chgrp -R dotfiles "${DOTDIR}"
sudowrap chmod g+wX "${DOTDIR}"

View File

@@ -183,9 +183,6 @@ packages:
- python-ruamel-yaml - python-ruamel-yaml
- python-gitpython - python-gitpython
- python-semver - python-semver
black:
ubuntu: ["black"]
archlinux: ["python-black"]
xbacklight: xbacklight:
ubuntu: ["xbacklight"] ubuntu: ["xbacklight"]
archlinux: ["xorg-xbacklight"] archlinux: ["xorg-xbacklight"]
@@ -267,9 +264,9 @@ packages:
acpi: acpi:
ubuntu: ["acpid"] ubuntu: ["acpid"]
archlinux: ["acpi", "acpid"] archlinux: ["acpi", "acpid"]
nodejs: npm:
ubuntu: ["nodejs"] ubuntu: ["npm"]
archlinux: ["nodejs", "npm"] archlinux: ["npm"]
xdg: xdg:
ubuntu: ["xdg-utils"] ubuntu: ["xdg-utils"]
archlinux: ["xdg-utils"] archlinux: ["xdg-utils"]
@@ -380,22 +377,7 @@ packages:
archlinux: ["ncdu"] archlinux: ["ncdu"]
font-utils: font-utils:
ubuntu: ["woff-tools", "woff2"] ubuntu: ["woff-tools", "woff2"]
archlinux: ["woff2"] archinux: ["woff2"]
jq:
ubuntu: ["jq"]
archlinux: ["jq"]
musl:
ubuntu: ["musl", "musl-tools"]
archlinux: ["musl"]
kdeconnect:
ubuntu: ["kdeconnect"]
archlinux: ["kdeconnect"]
restic:
ubuntu: ["restic"]
archlinux: ["restic"]
discord:
ubuntu: []
archlinux: ["discord"]
remove: remove:
mousepad: mousepad:
@@ -416,6 +398,9 @@ packages:
vim: vim:
ubuntu: ["vim"] ubuntu: ["vim"]
archlinux: ["gvim"] archlinux: ["gvim"]
discord:
ubuntu: []
archlinux: ["discord"]
rust: rust:
ubuntu: ["rustc", "cargo"] ubuntu: ["rustc", "cargo"]
archlinux: ["rust"] archlinux: ["rust"]

View File

@@ -49,19 +49,6 @@
become: true become: true
when: distro == 'ubuntu' when: distro == 'ubuntu'
- block:
- name: install ansible requirements
package:
name: "{{ packages[distro] }}"
state: present
become: true
vars:
packages:
archlinux:
- python-jmespath
ubuntu:
- python3-jmespath
- block: - block:
- name: enable multilib repository - name: enable multilib repository
blockinfile: blockinfile:
@@ -94,95 +81,13 @@
state: present state: present
become: true become: true
- block: - name: clean cache
- name: install pacman cache clean service command: paccache -rk2 -ruk0
copy: become: true
dest: /etc/systemd/system/pacman-cache-cleanup.service changed_when: false
owner: root
group: root
mode: '0644'
content: |
[Service]
Type=oneshot
ExecStart=/bin/sh -c '/usr/bin/paccache -rk1 && /usr/bin/paccache -ruk0'
RemainAfterExit=true
become: true
- name: install pacman cache clean timer
copy:
dest: /etc/systemd/system/pacman-cache-cleanup.timer
owner: root
group: root
mode: '0644'
content: |
[Timer]
OnCalendar=daily
become: true
- name: enable pacman cache clean timer
systemd:
name: pacman-cache-cleanup.timer
enabled: true
state: started
daemon_reload: true
become: true
tags: [pacman_cache_cleanup]
when: distro == 'archlinux' when: distro == 'archlinux'
tags: [system-update] tags: [update]
- block:
- name: create dotfiles group
group:
name: dotfiles
state: present
become: true
become_user: root
- name: create dotfiles user
user:
name: dotfiles
group: dotfiles
home: /var/lib/dotfiles
create_home: false
shell: /bin/bash
system: true
become: true
become_user: root
- name: create dotfiles directory
file:
state: directory
path: /var/lib/dotfiles
owner: dotfiles
group: dotfiles
mode: '0775' # group needs write access!
become: true
become_user: root
- name: fix permissions for dotfiles directory
shell: |
cd /var/lib/dotfiles
if [[ -e .git ]] ; then
# There is no sane way to specify the global .gitconfig to use, so we
# actually have to override HOME so git looks into ~/.gitconfig
export HOME="$(mktemp -d)"
set -o pipefail
set -o errexit
git config --global --add safe.directory /var/lib/dotfiles
git ls-tree -z --name-only HEAD | xargs --null chown --changes --recursive dotfiles:dotfiles
git ls-tree -z --name-only HEAD | xargs --null chmod --changes --recursive g+wX
else
chown --changes --recursive dotfiles:dotfiles .
chmod --changes --recursive g+wX .
fi
args:
executable: /bin/bash
register: dotfiles_permission_change
become: true
become_user: root
changed_when: dotfiles_permission_change.stdout_lines|length > 0
tags: [dotfiles-directory]
- block: - block:
- name: install sudo - name: install sudo
@@ -196,6 +101,9 @@
name: name:
- base-devel - base-devel
- git - git
- cargo
- asp
- bat
become: true become: true
- name: create build user on arch - name: create build user on arch
@@ -230,7 +138,7 @@
shell: | shell: |
set -o errexit set -o errexit
if pacman -Qi paru-bin >/dev/null 2>&1; then if pacman -Qi paru >/dev/null 2>&1; then
exit 100 exit 100
fi fi
exit 0 exit 0
@@ -248,9 +156,9 @@
mkdir -p /tmp/paru-build mkdir -p /tmp/paru-build
cd /tmp/paru-build cd /tmp/paru-build
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru-bin.tar.gz curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru.tar.gz
tar xvf paru-bin.tar.gz tar xvf paru.tar.gz
cd paru-bin cd paru
makepkg makepkg
args: args:
executable: /bin/bash executable: /bin/bash
@@ -262,7 +170,7 @@
shell: | shell: |
set -o errexit set -o errexit
pacman --noconfirm -U /tmp/paru-build/paru-bin/paru-bin-*.pkg.tar.zst pacman --noconfirm -U /tmp/paru-build/paru/paru-*.pkg.tar.zst
rm -rf /tmp/paru-build rm -rf /tmp/paru-build
args: args:
executable: /bin/bash executable: /bin/bash
@@ -278,7 +186,7 @@
file: packages.yml file: packages.yml
- name: force-update iptables to iptables-nft on arch - name: force-update iptables to iptables-nft on arch
shell: pacman -Q iptables && yes | pacman -S iptables-nft shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
changed_when: false changed_when: false
become: true become: true
when: distro == 'archlinux' when: distro == 'archlinux'
@@ -303,15 +211,6 @@
assert: assert:
that: "defined_packages_remove|length == distro_packages_remove|length" that: "defined_packages_remove|length == distro_packages_remove|length"
- name: remove packages
package:
name: "{{ packages|json_query(query) }}"
state: absent
become: true
vars:
query: "{{ 'remove.*.%s[]'|format(distro) }}"
when: distro != 'ubuntu'
- name: install packages - name: install packages
package: package:
name: "{{ packages|json_query(query) }}" name: "{{ packages|json_query(query) }}"
@@ -321,14 +220,12 @@
query: "{{ 'list.*.%s[]'|format(distro) }}" query: "{{ 'list.*.%s[]'|format(distro) }}"
- name: remove packages - name: remove packages
apt: package:
name: "{{ packages|json_query(query) }}" name: "{{ packages|json_query(query) }}"
state: absent state: absent
purge: true
become: true become: true
vars: vars:
query: "{{ 'remove.*.%s[]'|format(distro) }}" query: "{{ 'remove.*.%s[]'|format(distro) }}"
when: distro == 'ubuntu'
- name: install machine-specific packages - name: install machine-specific packages
package: package:
@@ -503,18 +400,8 @@
system: true system: true
become: true become: true
- set_fact:
cargo_env: . ~/.cargo/env
when: distro == 'ubuntu'
- set_fact:
# Do NOT just use `"true"`. Due to some YAML fuckery, it will be
# capitalized and the commands will fail.
cargo_env: "/bin/true"
when: distro == 'archlinux'
- name: install rustup on ubuntu - name: install rustup on ubuntu
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
args: args:
creates: /var/lib/rust_build/.cargo/bin/rustup creates: /var/lib/rust_build/.cargo/bin/rustup
become: true become: true
@@ -522,103 +409,54 @@
when: distro == 'ubuntu' when: distro == 'ubuntu'
- name: add rustup stable toolchain - name: add rustup stable toolchain
shell: "{{ cargo_env }} && rustup toolchain install stable && rustup default stable" shell: . ~/.cargo/env && rustup toolchain install stable && rustup default stable
become: true
become_user: rust_build
changed_when: false
- name: update rustup stable toolchain
shell: . ~/.cargo/env && rustup update stable
become: true become: true
become_user: rust_build become_user: rust_build
changed_when: false changed_when: false
- name: add rustup nightly toolchain - name: add rustup nightly toolchain
shell: "{{ cargo_env }} && rustup toolchain install nightly" shell: . ~/.cargo/env && rustup toolchain install nightly
become: true become: true
become_user: rust_build become_user: rust_build
changed_when: false changed_when: false
- name: add rustup additional toolchains - name: update rustup nightly toolchain
shell: "{{ cargo_env }} && rustup toolchain install {{ item }}" shell: . ~/.cargo/env && rustup update nightly
become: true become: true
become_user: rust_build become_user: rust_build
changed_when: false changed_when: false
loop: "{{ cargo_crate_list|selectattr('toolchain', 'defined')|map(attribute='toolchain')|reject('in', ['none', 'stable', 'nightly'])|list }}"
- name: add additional targets
shell: "{{ cargo_env }} && rustup +{{ item.toolchain|default('stable') }} target add {{ item.target }}"
become: true
become_user: rust_build
changed_when: false
when:
- '"target" in item'
loop: "{{ cargo_crate_list }}"
- name: assert that nofeatures is not actually a flag
assert:
that: '"nofeatures" not in item.features|default([])'
msg: Wow, "nofeatures" is actually a feature. Update the playbook!
loop: "{{ cargo_crate_list }}"
- name: assert that only proper sources are defined
assert:
that: item.source|default("crates.io") in ("crates.io", "git")
msg: "Invalid source: {{ item.source|default('x') }}"
loop: "{{ cargo_crate_list }}"
- name: install required packages
package:
state: present
name: "{{ item.required_packages|map(attribute=distro)|list }}"
when: item.required_packages is defined
become: true
loop: "{{ cargo_crate_list }}"
- name: check if binary already exists for crates.io
stat:
path: /usr/local/lib/binaries/{{ binary_id_cratesio }}
register: rust_binary_cratesio
loop: "{{ cargo_crate_list }}"
loop_control:
label: "{{ item.binary }}"
when: item.source|default('crates.io') == 'crates.io'
check_mode: false
- name: check if binary already exists for git
stat:
path: /usr/local/lib/binaries/{{ binary_id_git }}
register: rust_binary_git
loop: "{{ cargo_crate_list }}"
loop_control:
label: "{{ item.binary }}"
when: item.source|default('crates.io') == 'git'
check_mode: false
- name: build rust crates from crates.io - name: build rust crates from crates.io
shell: | shell: |
set -o errexit set -o errexit
{{ cargo_env }} . ~/.cargo/env
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --version {{ item.version }} {{ item.crate }} 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/{{ binary_id_cratesio }} mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
args: args:
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }} creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
become: true # do not build as root! become: true # do not build as root!
become_user: rust_build become_user: rust_build
loop: "{{ cargo_crate_list }}" loop: "{{ cargo_crate_list }}"
when: when: item.source|default('crates.io') == 'crates.io'
- item.source|default('crates.io') == 'crates.io'
- not ((rust_binary_cratesio.results | selectattr("item.binary", "match", item.binary)) | list) [0].stat.exists
- name: build rust crates from git - name: build rust crates from git
shell: | shell: |
set -o errexit set -o errexit
{{ cargo_env }} . ~/.cargo/env
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --git {{ item.url }} --branch {{ item.branch }} {{ item.package|default("") }} rustup run {{ item.toolchain|default('stable') }} cargo install --git {{ item.url }} --branch {{ item.branch }}
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
args: args:
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_git }} creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}
become: true # do not build as root! become: true # do not build as root!
become_user: rust_build become_user: rust_build
loop: "{{ cargo_crate_list }}" loop: "{{ cargo_crate_list }}"
when: when: item.source|default('crates.io') == 'git'
- item.source|default('crates.io') == 'git'
- not ((rust_binary_git.results | selectattr("item.binary", "match", item.binary)) | list)[0].stat.exists
- name: create target directory - name: create target directory
file: file:
@@ -631,29 +469,27 @@
- name: move binaries for crates.io - name: move binaries for crates.io
shell: | shell: |
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }} /usr/local/lib/binaries/{{ binary_id_cratesio }} 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: args:
creates: /usr/local/lib/binaries/{{ binary_id_cratesio }} creates: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
become: true become: true
loop: "{{ cargo_crate_list }}" loop: "{{ cargo_crate_list }}"
when: when: item.source|default('crates.io') == 'crates.io'
- item.source|default('crates.io') == 'crates.io'
- not ((rust_binary_cratesio.results | selectattr("item.binary", "match", item.binary)) | list)[0].stat.exists
- name: move binaries for git - name: move binaries for git
shell: | shell: |
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_git }} /usr/local/lib/binaries/{{ binary_id_git }} 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: args:
creates: /usr/local/lib/binaries/{{ binary_id_git }} creates: /usr/local/lib/binaries/{{ item.binary }}
become: true become: true
loop: "{{ cargo_crate_list }}" loop: "{{ cargo_crate_list }}"
when: when: item.source|default('crates.io') == 'git'
- item.source|default('crates.io') == 'git'
- not ((rust_binary_git.results | selectattr("item.binary", "match", item.binary)) | list)[0].stat.exists
- name: link binaries for crates.io - name: link binaries for crates.io
file: file:
src: /usr/local/lib/binaries/{{ binary_id_cratesio }} src: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
dest: /usr/local/bin/{{ item.binary }} dest: /usr/local/bin/{{ item.binary }}
owner: root owner: root
group: root group: root
@@ -665,7 +501,7 @@
- name: link binaries for git - name: link binaries for git
file: file:
src: /usr/local/lib/binaries/{{ binary_id_git }} src: /usr/local/lib/binaries/{{ item.binary }}
dest: /usr/local/bin/{{ item.binary }} dest: /usr/local/bin/{{ item.binary }}
owner: root owner: root
group: root group: root
@@ -674,57 +510,6 @@
become: true become: true
loop: "{{ cargo_crate_list }}" loop: "{{ cargo_crate_list }}"
when: item.source|default('crates.io') == 'git' when: item.source|default('crates.io') == 'git'
# Important: clean up the symlinks BEFORE the binaries they point to.
# Otherwise, ansible will skip them because `ansible.builtin.fileglob`
# does not match broken symlinks for some reason.
- name: clean up old binaries for creates.io in /var/lib/rust_build
command: rm -- {{ binaries | join (" ") }}
vars:
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_cratesio) | list }}"
changed_when: binaries | length > 0
loop: "{{ cargo_crate_list }}"
become: true
when:
- item.source|default('crates.io') == 'crates.io'
- binaries | length > 0
- name: clean up old binaries for creates.io in /usr/local/lib
command: rm -- {{ binaries | join (" ") }}
vars:
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_cratesio) | list }}"
changed_when: binaries | length > 0
loop: "{{ cargo_crate_list }}"
become: true
when:
- item.source|default('crates.io') == 'crates.io'
- binaries | length > 0
- name: clean up old binaries for git in /var/lib/rust_build
command: rm -- {{ binaries | join (" ") }}
vars:
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_git) | list }}"
changed_when: binaries | length > 0
loop: "{{ cargo_crate_list }}"
become: true
when:
- item.source|default('crates.io') == 'git'
- binaries | length > 0
- name: clean up old binaries for git in /usr/local/lib
command: rm -- {{ binaries | join (" ") }}
vars:
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_git) | list }}"
changed_when: binaries | length > 0
loop: "{{ cargo_crate_list }}"
become: true
when:
- item.source|default('crates.io') == 'git'
- binaries | length > 0
vars:
binary_id_cratesio: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.version }}"
binary_id_git: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.branch }}"
tags: tags:
- rust_binaries - rust_binaries
@@ -744,7 +529,6 @@
get_url: get_url:
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz" dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
force: false
- name: unpack go - name: unpack go
unarchive: unarchive:
@@ -765,7 +549,7 @@
path: "{{ go_download.path }}" path: "{{ go_download.path }}"
state: absent state: absent
when: not go_target_stat.stat.exists and not ansible_check_mode when: not go_target_stat.stat.exists
- name: link to the current go version - name: link to the current go version
file: file:
@@ -781,7 +565,7 @@
copy: copy:
dest: /etc/profile.d/go.sh dest: /etc/profile.d/go.sh
content: | content: |
export PATH=/usr/local/go/bin:$PATH export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go export GOROOT=/usr/local/go
owner: root owner: root
group: root group: root
@@ -814,16 +598,12 @@
tempfile: tempfile:
state: directory state: directory
register: alacritty_build_tempdir register: alacritty_build_tempdir
become: true
become_user: rust_build
when: not alacritty_binary.stat.exists when: not alacritty_binary.stat.exists
- name: build alacritty - name: build alacritty
shell: . ~/.cargo/env && rustup run stable cargo install alacritty --root ./out command: cargo install alacritty --root ./out
args: args:
chdir: "{{ alacritty_build_tempdir.path }}" chdir: "{{ alacritty_build_tempdir.path }}"
become: true
become_user: rust_build
when: not alacritty_binary.stat.exists when: not alacritty_binary.stat.exists
- name: install alacritty - name: install alacritty
@@ -835,8 +615,6 @@
file: file:
path: "{{ alacritty_build_tempdir.path }}" path: "{{ alacritty_build_tempdir.path }}"
state: absent state: absent
become: true
become_user: rust_build
when: not alacritty_binary.stat.exists when: not alacritty_binary.stat.exists
when: distro == 'ubuntu' when: distro == 'ubuntu'
@@ -855,7 +633,7 @@
when: not yubikey_touch_detector_binary.stat.exists when: not yubikey_touch_detector_binary.stat.exists
- name: build yubikey-touch-detector - name: build yubikey-touch-detector
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go install github.com/maximbaz/yubikey-touch-detector@main' 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: args:
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}" chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
when: not yubikey_touch_detector_binary.stat.exists when: not yubikey_touch_detector_binary.stat.exists
@@ -872,7 +650,6 @@
file: file:
path: "{{ yubikey_touch_detector_build_tempdir.path }}" path: "{{ yubikey_touch_detector_build_tempdir.path }}"
state: absent state: absent
become: true
when: not yubikey_touch_detector_binary.stat.exists when: not yubikey_touch_detector_binary.stat.exists
when: distro == 'ubuntu' when: distro == 'ubuntu'
@@ -882,8 +659,8 @@
- block: - block:
- name: add spotify apt key - name: add spotify apt key
apt_key: apt_key:
url: "https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg" url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
id: "5E3C45D7B312C643" id: "D1742AD60D811D58"
become: true become: true
- name: add spotify repository - name: add spotify repository
@@ -902,7 +679,7 @@
- block: - block:
- name: install spotify from AUR via paru - name: install spotify from AUR via paru
shell: | shell: |
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | gpg --import curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
become: true become: true
become_user: paru become_user: paru
@@ -912,6 +689,34 @@
tags: [spotify] tags: [spotify]
- name: create dotfiles group
group:
name: dotfiles
state: present
become: true
become_user: root
- name: create dotfiles user
user:
name: dotfiles
group: dotfiles
home: /var/lib/dotfiles
create_home: false
shell: /bin/bash
system: true
become: true
become_user: root
- name: create dotfiles directory
file:
state: directory
path: /var/lib/dotfiles
owner: dotfiles
group: dotfiles
mode: '0775' # group needs write access!
become: true
become_user: root
- set_fact: - set_fact:
users: "{{ machine.users }}" users: "{{ machine.users }}"
tags: tags:

View File

@@ -55,8 +55,8 @@ adjustment-method=randr
; Keep in mind that longitudes west of Greenwich (e.g. the Americas) ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers. ; are negative numbers.
[manual] [manual]
lat=59.3 lat=49.5
lon=18.1 lon=11
; Configuration of the adjustment-method ; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings. ; type 'redshift -m METHOD:help' to see the settings.

12
requirements.txt Normal file
View File

@@ -0,0 +1,12 @@
ansible==4.6.0
ansible-core==2.11.5
cffi==1.14.6
cryptography==35.0.0
Jinja2==3.0.1
jmespath==0.10.0
MarkupSafe==2.0.1
packaging==21.0
pycparser==2.20
pyparsing==2.4.7
PyYAML==5.4.1
resolvelib==0.5.4

View File

@@ -6,13 +6,9 @@ outputs:
mode: 1920x1080 mode: 1920x1080
scale: 1x1 scale: 1x1
pos: "0x0" # beware of hex pos: "0x0" # beware of hex
- name: DP-1 - name: DP-1-1
disable: true disable: true
- name: DP-2 - name: DP-1-2
disable: true disable: true
- name: DP-3 - name: DP-1-3
disable: true
- name: DP-4
disable: true
- name: DP-5
disable: true disable: true

View File

@@ -1,21 +0,0 @@
reset: true
outputs:
- name: eDP-1
opts:
mode: 1920x1080
scale: 0.7x0.7
# x: 2*1920
# y: 1080-(0.7*1080)
pos: "3840x324" # beware of hex
- name: DP-4
opts:
mode: 1920x1080
pos: "1920x0" # beware of hex
reset: true
- name: DP-3
primary: True
opts:
mode: 1920x1080
left-of: DP-4
pos: "0x0" # beware of hex
reset: true

View File

@@ -1,22 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Steam setting: Proton 4.11-13
#
# * It *must not* have any symlinks for the directmusic dlls like:
# pfx/dosdevices/c:/windows/syswow64/dmusic.dll
set -o nounset set -o nounset
set -o xtrace set -o xtrace
set -o errexit set -o errexit
BASEDIR=/var/games/gothic2
STEAMAPPS=/var/games/steamapps/
BASEDIR="${STEAMAPPS}/common/Gothic II"
export GAMEDATA=${BASEDIR}/data/ export GAMEDATA=${BASEDIR}/data/
export ARCHIVE=${BASEDIR}/gothic2.data.tar.zstd export ARCHIVE=${BASEDIR}/gothic2.data.tar.zstd
export WINEPREFIX="${STEAMAPPS}/compatdata/39510/pfx/" export WINEPREFIX=${BASEDIR}/wineprefix
export WINEARCH=win64 export WINEARCH=win64
export WINEVERSION=6.3 export WINEVERSION=6.3
@@ -25,17 +17,17 @@ DOWNLOADDIR=~/download/gothic2
mkdir -p "${WINEPREFIX}" mkdir -p "${WINEPREFIX}"
# if [[ "$(wine --version)" != "wine-${WINEVERSION}" ]] ; then if [[ "$(wine --version)" != "wine-${WINEVERSION}" ]] ; then
# printf '%s\n' "Wine version ${WINEVERSION} required" >&2 printf '%s\n' "Wine version ${WINEVERSION} required" >&2
# exit 1 exit 1
# fi fi
archive() { archive() {
origin="$1" origin="$1"
if [[ -e "${ARCHIVE}" ]] ; then if [[ -e "${ARCHIVE}" ]] ; then
return return
fi fi
tar -cv --zstd -p -f "${ARCHIVE}" -C "${GAMEDATA}" . tar -cv --zstd -p -f "${ARCHIVE}" -C "$1" .
} }
extract() { extract() {
@@ -126,12 +118,16 @@ case $1 in
curl -C - -L -O "https://github.com/Kirides/GD3D11/releases/download/v17.7-dev20/Gothic2-GD3D11-v17.7-dev20.zip" curl -C - -L -O "https://github.com/Kirides/GD3D11/releases/download/v17.7-dev20/Gothic2-GD3D11-v17.7-dev20.zip"
curl -C - -L -o Normalmaps_LHiver.zip "https://www.worldofgothic.de/download.php?id=1530" 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/Kirides/ninja-quickloot/releases/download/v1.9.5/Quickloot.vdf
curl -C - -L -O https://github.com/szapp/Ninja/releases/download/v2.7.12/Ninja-2.7.12.exe curl -C - -L -O https://github.com/szapp/Ninja/releases/download/v2.7.12/Ninja-2.7.12.exe
laatmp=$(mktemp -d)
unzip -o LaaHack.zip -d "${laatmp}"
# winetricks -q dxvk # winetricks -q dxvk
winetricks -q directmusic winetricks -q directmusic
if command -v setup_dxvk >/dev/null ; then if command -v setup_dxvk >/dev/null ; then
@@ -141,7 +137,7 @@ case $1 in
winetricks dxvk winetricks dxvk
fi fi
read -p 'During installation, use "${GAMEDATA//\//\\}" as the install directory! <Enter> to continue, <CTRL+C> to abort ' 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}"/g2addon-2_6.exe
wine "${DOWNLOADDIR}"/gothic2_fix-2.6.0.0-rev2.exe wine "${DOWNLOADDIR}"/gothic2_fix-2.6.0.0-rev2.exe
@@ -154,26 +150,13 @@ case $1 in
unzip -o "${DOWNLOADDIR}"/Gothic2-GD3D11-v17.7-dev20.zip -d ./system/ unzip -o "${DOWNLOADDIR}"/Gothic2-GD3D11-v17.7-dev20.zip -d ./system/
ln Data/ModVDF/LHE204_DE.mod Data/LHE204_DE.mod
cp "${DOWNLOADDIR}"/Quickloot.vdf ./Data cp "${DOWNLOADDIR}"/Quickloot.vdf ./Data
t="./system/GD3D11/Textures/replacements/Normalmaps_xxx" t="./system/GD3D11/Textures/replacements/Normalmaps_xxx"
mkdir -p "${t}" mkdir -p "${t}"
set +o errexit
unzip -o "${DOWNLOADDIR}"/Normalmaps_LHiver.zip -d "${t}" unzip -o "${DOWNLOADDIR}"/Normalmaps_LHiver.zip -d "${t}"
zip_exit="$?"
set -o errexit
if (( $zip_exit != 0 )) && (( $zip_exit != 2 )) ; then
echo zip failed
exit 1
fi
unset t unset t
laatmp=$(mktemp -d)
unzip -o "${DOWNLOADDIR}"/LaaHack.zip -d "${laatmp}"
read -p "For the LAA Hack, select only ${GAMEDATA}/system/Gothic2.exe [<Enter> to continue] " read -p "For the LAA Hack, select only ${GAMEDATA}/system/Gothic2.exe [<Enter> to continue] "
wine "${laatmp}"/LaaHack.exe wine "${laatmp}"/LaaHack.exe
rm -rf "${laatmp}" rm -rf "${laatmp}"
@@ -182,6 +165,7 @@ case $1 in
read -p "Now run the game once and exit! [<Enter> to continue] " read -p "Now run the game once and exit! [<Enter> to continue] "
ini ini
ln Data/ModVDF/LHE204_DE.mod Data/LHE204_DE.mod
;; ;;
ini) ini)
ini ini

View File

@@ -21,8 +21,6 @@ gzip -k -f -v "${tmpdir}/dotfiles.tar"
test_ares() { test_ares() {
if [[ -d "/var/cache/pacman/pkg/" ]] ; then if [[ -d "/var/cache/pacman/pkg/" ]] ; then
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/") dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
else
echo "Warning: /var/cache/pacman/pkg/ does not exist. Create it to speed up multiple runs" >&2
fi fi
docker pull docker.io/library/archlinux:base docker pull docker.io/library/archlinux:base
docker run \ docker run \
@@ -40,10 +38,10 @@ test_ares() {
# At worst, the cache directory will be ignored if it does not exist # At worst, the cache directory will be ignored if it does not exist
# Pacman will always prefer the first cache directory, so newly downloaded # Pacman will always prefer the first cache directory, so newly downloaded
# packages will stay in the container # packages will stay in the container
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
mkdir -p /var/cache/pacman/pkg_host/ pacman -Syu --noconfirm linux python3
pacman -Syu --noconfirm linux 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

View File

@@ -1,76 +1,68 @@
set-option -g default-command "${SHELL}" set -g default-command "${SHELL}"
# This *has* to be set to something with `screen-`, do not set this bindly set -g default-terminal "xterm-256color"
# to $TERM, e.g. "alacritty"!
set-option -g default-terminal "screen-256color"
set-option -g set-titles on set -g set-titles on
set-option -g set-titles-string '#S' set -g set-titles-string '#S'
set-option -g automatic-rename setw -g automatic-rename
set-option -g escape-time 0 set -g prefix C-a
set-option -g aggressive-resize on unbind C-b
bind C-a send-prefix
set-option -g mouse on unbind C-j
set-option -g mode-keys vi set -s escape-time 0
set-window-option -g aggressive-resize on
set -g mouse on
set -g mode-keys vi
set-option -g renumber-windows on set-option -g renumber-windows on
set-option -g history-limit 50000 bind-key k confirm kill-window
bind-key K confirm kill-server
set-option -g base-index 1 bind h select-pane -L
set-option -g pane-base-index 1 bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-option -g status-position bottom set -g bell-action any
set-option -g status-justify left
# https://wiki.archlinux.org/title/tmux#256_colors set -g history-limit 50000
set-option -g -a terminal-overrides ",alacritty:Tc"
set-option -g pane-border-status off set -g base-index 1
set-option -g pane-border-format '' set-window-option -g pane-base-index 1
set-option -g -q pane-border-lines double;
set-option -g -q pane-border-indicators colour;
set-option -g pane-border-style "fg=#555555" set -g status-position bottom
set-option -g pane-active-border-style "fg=#e5b567" set -g status-justify left
set-option -g status-style bg=default
set-option -g window-status-format ' #I: #W #F ' set-option -g status-bg '#272822'
set-option -g window-status-current-format ' #I: #W #F ' set-option -g status-fg white
set-option -g window-status-current-style "bg=#e5b567,fg=black"
set-option -g monitor-activity on set-window-option -g window-status-format ' #I: #W #F '
set-option -g visual-activity off set-window-option -g window-status-current-format ' #I: #W #F '
set-option -g window-status-activity-style "bg=#ff7777,fg=black"
set-option -g monitor-bell on
set-option -g bell-action any
set-option -g automatic-rename on set-window-option -g monitor-activity on
set-option -g automatic-rename-format '#{pane_current_command}' set -g visual-activity on
set-option -g window-status-separator ' ' set-window-option -g automatic-rename on
set-window-option -g automatic-rename-format '#{pane_current_command}'
set-option -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] " set-window-option -g window-status-separator ' '
set-option -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
set-option -g status-left-length 100
set-option -g message-style "bg=#CCCCCC,fg=#555555" set -g status-left " #[bg=#A6E22E,fg=#000000] #{session_name} #[bg=#272822] "
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=#272822] "
set -g status-left-length 100
# Use C-a as the prefix set -g status-style "bg=#272822,fg=#FFFFFF"
set-option -g prefix C-a set -g message-style "bg=#CCCCCC,fg=#555555"
unbind-key C-b
bind-key C-a send-prefix
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# vertical = | in this case # vertical = | in this case
unbind-key % unbind %
unbind-key '"' unbind '"'
bind-key s split-window -v -c "#{pane_current_path}" bind-key s split-window -v -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}" bind-key v split-window -h -c "#{pane_current_path}"
@@ -83,4 +75,10 @@ bind-key -n S-down new-window
bind-key -n S-left prev bind-key -n S-left prev
bind-key -n S-right next bind-key -n S-right next
bind-key -n C-F1 command-prompt "split-window -h 'exec man %%'"
bind-key -n C-F2 split-window -h "exec htop"
bind-key -n C-F3 set-option status
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced" bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
bind P paste-buffer

153
user.yml
View File

@@ -302,6 +302,20 @@
src: ~/.vim/autoload/plug.vim src: ~/.vim/autoload/plug.vim
force: true force: true
- name: get ycm version before update
shell: |
if ! [[ -d ~/.local/share/nvim/plugged/YouCompleteMe ]] ; then
exit 200
fi
cd ~/.local/share/nvim/plugged/YouCompleteMe
git rev-parse HEAD
args:
executable: /bin/bash
register: ycm_before_update
changed_when: false
failed_when: ycm_before_update.rc not in (0, 200)
tags: [update]
- name: install vim plugins - name: install vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
register: vim_plugin_install register: vim_plugin_install
@@ -315,12 +329,39 @@
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
register: vim_plugin_update register: vim_plugin_update
changed_when: vim_plugin_update.stderr != "" changed_when: vim_plugin_update.stderr != ""
tags: [user-update] tags: [update]
- name: update go binaries for vim - name: update go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false changed_when: false
tags: [user-update] 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
# --force-sudo is required, as the script refuses to run in a sudo
# environment (i.e. if the SUDO_USER env variable is set). But of course,
# ansible uses that to assume the other user. It's fine.
shell: |
cd ~/.local/share/nvim/plugged/YouCompleteMe
python3 ./install.py --force-sudo
args:
executable: /bin/bash
register: ycm_compile_output
failed_when: ycm_compile_output.rc not in (0, 200)
when: >
(ycm_before_update.rc == 200)
or
(ycm_before_update.stdout != ycm_after_update.stdout)
tags: [update]
tags: [vim-plugins] tags: [vim-plugins]
- block: - block:
@@ -341,6 +382,7 @@
- set_fact: - set_fact:
firefox_preferences: firefox_preferences:
browser.aboutConfig.showWarning: false browser.aboutConfig.showWarning: false
browser.download.useDownloadDir: false
extensions.pocket.enabled: false extensions.pocket.enabled: false
toolkit.legacyUserProfileCustomizations.stylesheets: true toolkit.legacyUserProfileCustomizations.stylesheets: true
browser.contentblocking.category: "strict" browser.contentblocking.category: "strict"
@@ -372,28 +414,11 @@
# "Allow Firefox to install and run studies" # "Allow Firefox to install and run studies"
app.shield.optoutstudies.enabled: false app.shield.optoutstudies.enabled: false
# "Check spelling as you type"
layout.spellcheckDefault: 0
# Ask for download directory
browser.download.useDownloadDir: false
# (Try to) disable automatic update, as firefox is pulling a Windows
app.update.auto: false
app.update.service.enabled: false
# remove this camera / microphone overlay when in calls or similar
privacy.webrtc.legacyGlobalIndicator: false
# use distro updates instead
app.update.auto: false
- include_role: - include_role:
name: firefox name: firefox
vars: vars:
firefox_profiles: "{{ {item.key: item.value} | combine({item.key: {'preferences': firefox_preferences}}, recursive=True) }}" firefox_profiles: "{{ {item.key: item.value} | combine({item.key: {'preferences': firefox_preferences}}, recursive=True) }}"
loop: "{{ user.firefox_profiles | dict2items }}" loop: "{{ user.firefox_profiles | dict2items }}"
when: not ansible_check_mode
- name: firefox - create target directory for passff - name: firefox - create target directory for passff
file: file:
@@ -403,14 +428,6 @@
state: directory state: directory
mode: '0755' mode: '0755'
- name: check if host application file already exists
stat:
path: ~/.mozilla/native-messaging-hosts/{{ item.name }}
register: passff_file
loop:
- name: passff.json
- name: passff.py
- name: firefox - get passff host application - name: firefox - get passff host application
get_url: get_url:
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }} url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
@@ -418,8 +435,6 @@
owner: "{{ user.name }}" owner: "{{ user.name }}"
group: "{{ user_group_name }}" group: "{{ user_group_name }}"
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
force: false
when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists
loop: loop:
- name: passff.json - name: passff.json
mode: '0644' mode: '0644'
@@ -429,10 +444,8 @@
- name: firefox - configure path to passff - name: firefox - configure path to passff
lineinfile: lineinfile:
path: ~/.mozilla/native-messaging-hosts/passff.json path: ~/.mozilla/native-messaging-hosts/passff.json
regexp: '"path": ".*"' search_string: '"path": "PLACEHOLDER"'
line: " \"path\": \"{{ path }}\"," line: " \"path\": \"/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py\","
vars:
path: "/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py"
- name: firefox - create chrome directory - name: firefox - create chrome directory
file: file:
@@ -440,7 +453,6 @@
state: directory state: directory
mode: '0755' mode: '0755'
with_items: "{{ firefox_profile_names.results }}" with_items: "{{ firefox_profile_names.results }}"
when: not ansible_check_mode
- name: firefox - configure firefox custom css - name: firefox - configure firefox custom css
copy: copy:
@@ -458,9 +470,7 @@
#sidebar { #sidebar {
width: 400px !important; width: 400px !important;
} }
when: when: user.firefox_profiles[item.profile_name].manage_css is sameas True
- not ansible_check_mode
- user.firefox_profiles[item.profile_name].manage_css is sameas True
with_items: "{{ firefox_profile_names.results }}" with_items: "{{ firefox_profile_names.results }}"
tags: tags:
- firefox - firefox
@@ -481,7 +491,6 @@
get_url: get_url:
url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz
dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz" dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz"
force: false
- name: create destination directory - name: create destination directory
file: file:
@@ -554,100 +563,78 @@
owner: "{{ user.name }}" owner: "{{ user.name }}"
group: "{{ user_group_name }}" group: "{{ user_group_name }}"
mode: '0755' mode: '0755'
force: false
- name: make kubectl executable - name: make kubectl executable
file: file:
path: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }} path: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
mode: '0755' mode: '0755'
when: not ansible_check_mode
- name: link kubectl - name: link kubectl
file: file:
src: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }} src: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
dest: /home/{{ user.name }}/.optbin/kubectl dest: /home/{{ user.name }}/.optbin/kubectl
state: link state: link
when: not ansible_check_mode
tags: tags:
- kubectl - kubectl
- block: - block:
- set_fact:
tf_version: "{{ user.overrides.terraform_version|default(terraform_version) }}"
tf_check_updates: "{{ user.overrides.terraform_check_updates|default(terraform_check_updates)|default(true) }}"
- name: stat current terraform binary - name: stat current terraform binary
stat: stat:
path: "/home/{{ user.name }}/.opt/terraform-v{{ tf_version }}" path: "/home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}"
register: terraform_binary register: terraform_binary
check_mode: false
- name: create temporary download directory for terraform - name: create temporary download directory for terraform
tempfile: tempfile:
state: directory state: directory
register: terraform_download_dir register: terraform_download_dir
when: when: not terraform_binary.stat.exists
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: get terraform - name: get terraform
get_url: get_url:
url: "https://releases.hashicorp.com/terraform/{{ tf_version }}/terraform_{{ tf_version }}_linux_amd64.zip" url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
dest: "{{ terraform_download_dir.path }}/terraform.zip" dest: "{{ terraform_download_dir.path }}/terraform.zip"
force: false when: not terraform_binary.stat.exists
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: unpack terraform zip - name: unpack terraform zip
unarchive: unarchive:
src: "{{ terraform_download_dir.path }}/terraform.zip" src: "{{ terraform_download_dir.path }}/terraform.zip"
dest: "{{ terraform_download_dir.path }}/" dest: "{{ terraform_download_dir.path }}/"
remote_src: true remote_src: true
when: when: not terraform_binary.stat.exists
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: install terraform - name: install terraform
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ tf_version }} command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
when: when: not terraform_binary.stat.exists
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: clean up download directory - name: clean up download directory
file: file:
path: "{{ terraform_download_dir.path }}" path: "{{ terraform_download_dir.path }}"
state: absent state: absent
when: when: not terraform_binary.stat.exists
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: link terraform - name: link terraform
file: file:
src: /home/{{ user.name }}/.opt/terraform-v{{ tf_version }} src: /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
dest: /home/{{ user.name }}/.optbin/terraform dest: /home/{{ user.name }}/.optbin/terraform
state: link state: link
when: not ansible_check_mode
- block: - name: get terraform version info
- name: get terraform version info command: /home/{{ user.name }}/.optbin/terraform version -json
command: /home/{{ user.name }}/.optbin/terraform version -json register: terraform_version_output
register: terraform_version_output check_mode: false
check_mode: false changed_when: false
changed_when: false
- name: parse terraform version output - name: parse terraform version output
set_fact: set_fact:
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}" terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
changed_when: false changed_when: false
- name: warn if terraform is outdated - name: warn if terraform is outdated
fail: fail:
msg: "current terraform v{{ tf_version }} is out of date" msg: "current terraform v{{ terraform_version }} is out of date"
when: terraform_outdated is sameas true when: terraform_outdated is sameas true
ignore_errors: True ignore_errors: True
when: tf_check_updates
tags: tags:
- terraform - terraform

View File

@@ -1,41 +1,28 @@
terraform_version: 1.3.6 terraform_version: 1.0.2
kubectl_version: v1.26.0 kubectl_version: v1.22.3
go_version: "1.19.4" go_version: "1.17.1"
portfolio_performace_version: "0.57.2" portfolio_performace_version: "0.55.0"
cargo_crate_list: cargo_crate_list:
- crate: just - crate: just
binary: just binary: just
version: 1.9.0 version: 0.10.2
- crate: ripgrep - crate: ripgrep
binary: rg binary: rg
version: 13.0.0 version: 13.0.0
features:
- pcre2
required_packages:
- ubuntu: libpcre2-dev
archlinux: pcre2
- crate: fd-find - crate: fd-find
binary: fd binary: fd
version: 8.6.0 version: 8.2.1
- crate: bat - crate: bat
binary: bat binary: bat
version: 0.22.1 version: 0.18.3
- crate: exa - crate: exa
binary: exa binary: exa
version: 0.10.1 version: 0.10.1
- crate: mdbook - crate: watchexec-cli
binary: mdbook binary: watchexec
version: 0.4.24 version: 1.17.1
- url: https://github.com/hakoerber/git-repo-manager - url: https://github.com/hakoerber/git-repo-manager
binary: grm binary: grm
branch: develop
source: git
toolchain: nightly
features:
- static-build
target: x86_64-unknown-linux-musl
- url: https://github.com/greshake/i3status-rust
binary: i3status-rs
branch: master branch: master
source: git source: git
package: i3status-rs toolchain: nightly

317
vim/vimrc
View File

@@ -4,42 +4,74 @@ call plug#begin('~/.local/share/nvim/plugged')
" === plugins === " === plugins ===
function! Cond(Cond, ...) "Plug 'vim-airline/vim-airline'
let opts = get(a:000, 0, {}) "Plug 'vim-airline/vim-airline-themes'
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] }) Plug 'itchyny/lightline.vim'
endfunction Plug 'godlygeek/tabular'
Plug 'lepture/vim-jinja'
Plug 'majutsushi/tagbar'
" Plug 'nblock/vim-dokuwiki'
Plug 'reedes/vim-pencil'
Plug 'saltstack/salt-vim'
"Plug 'sickill/vim-monokai'
Plug 'patstockwell/vim-monokai-tasty'
" Plug 'sjl/gundo.vim'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
" Plug 'tpope/vim-speeddating'
" Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" Plug 'sheerun/vim-polyglot'
" Plug 'freitass/todo.txt-vim'
Plug 'Valloric/YouCompleteMe'
Plug 'nathanaelkane/vim-indent-guides'
" editing plugins "Plugin 'Lokaltog/vim-easymotion'
Plug 'godlygeek/tabular', Cond(!exists('g:vscode')) "Plugin 'PeterRincker/vim-argumentative'
Plug 'nathanaelkane/vim-indent-guides', Cond(!exists('g:vscode')) "Plugin 'flazz/vim-colorschemes'
Plug 'tpope/vim-commentary', Cond(!exists('g:vscode')) "Plugin 'jmcantrell/vim-virtualenv'
Plug 'airblade/vim-gitgutter', Cond(!exists('g:vscode')) "Plugin 'kien/ctrlp.vim'
"Plugin 'klen/python-mode'
"Plugin 'mbbill/undotree'
Plug 'scrooloose/nerdtree'
"Plugin 'sjl/gundo.vim'
"Plugin 'terryma/vim-expand-region'
"Plugin 'terryma/vim-multiple-cursors'
"Plugin 'wellle/targets.vim'
"Plugin 'wincent/Command-T'
Plug 'vimwiki/vimwiki'
"Plug 'blindFS/vim-taskwarrior'
" Plug 'tbabej/taskwiki'
Plug 'rodjek/vim-puppet'
Plug 'suan/vim-instant-markdown'
"Plug 'marshallward/vim-restructuredtext'
"Plug 'vim-syntastic/syntastic'
"Plug 'ElmCast/elm-vim'
"Plug 'avh4/elm-format'
" ui Plug 'fatih/vim-go'
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode')) Plug 'hashivim/vim-terraform'
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
" lang integrations Plug 'editorconfig/editorconfig-vim'
Plug 'lepture/vim-jinja', Cond(!exists('g:vscode'))
Plug 'fatih/vim-go', Cond(!exists('g:vscode'))
Plug 'hashivim/vim-terraform', Cond(!exists('g:vscode'))
Plug 'editorconfig/editorconfig-vim', Cond(!exists('g:vscode'))
Plug 'rust-lang/rust.vim', Cond(!exists('g:vscode'))
Plug 'rodjek/vim-puppet', Cond(!exists('g:vscode'))
" helpers Plug 'leafgarland/typescript-vim'
"" distraction free writing
Plug 'junegunn/limelight.vim', Cond(!exists('g:vscode'))
Plug 'junegunn/goyo.vim', Cond(!exists('g:vscode'))
Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
"" markdown Plug 'prettier/vim-prettier', { 'do': 'npm install' }
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
Plug 'dense-analysis/ale', Cond(!exists('g:vscode')) Plug 'yuezk/vim-js'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'}) 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
@@ -73,7 +105,7 @@ set noerrorbells
set noshowmode set noshowmode
set numberwidth=2 set numberwidth=2
set relativenumber set relativenumber
set shortmess=rtiF set shortmess=rti
set ruler set ruler
set scrolloff=7 set scrolloff=7
set title set title
@@ -102,7 +134,7 @@ set nowritebackup
" == swap == " == swap ==
set swapfile set swapfile
set updatecount=200 set updatecount=200
set updatetime=300 set updatetime=10000
" == undo == " == undo ==
set undolevels=1000 set undolevels=1000
@@ -142,14 +174,10 @@ set linebreak
set wrap set wrap
set wrapscan set wrapscan
" == to use guicolors in terminal ==
set termguicolors
" === keybinds === " === keybinds ===
set pastetoggle=<F11> set pastetoggle=<F11>
set signcolumn=yes
let maplocalleader = "ö" let maplocalleader = "ö"
let mapleader = "\<Space>" let mapleader = "\<Space>"
" map <leader>w: w!<cr> " map <leader>w: w!<cr>
@@ -170,57 +198,83 @@ map Y y$
map j gj map j gj
map k gk map k gk
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nmap <C-n> :bnext<CR>
nmap <C-p> :bprev<CR>
map N Nzz map N Nzz
map n nzz map n nzz
inoremap jj <ESC> inoremap jj <ESC>
nnoremap <leader>v <C-w>v<C-w>l
nnoremap <leader>m :InstantMarkdownPreview<CR>
nnoremap <leader>u :GundoToggle<CR>
nnoremap <leader>d :diffupdate<CR>
nmap <F9> :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:Limelight!!<CR>
nmap <leader>c :%w !xclip -selection clipboard<CR>
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
nmap <leader>f :Autoformat<CR>
" no more ex mode " no more ex mode
nnoremap Q <nop> nnoremap Q <nop>
" Use // in visual mode to search for selection " === autocommands ===
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
if exists('g:vscode') "" autosave views when closing and restoring when opening again.
xmap gc <Plug>VSCodeCommentary "autocmd BufWinLeave *.* mkview
nmap gc <Plug>VSCodeCommentary "autocmd BufWinEnter *.* silent loadview
omap gc <Plug>VSCodeCommentary
nmap gcc <Plug>VSCodeCommentaryLine
else
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nmap <C-n> :bnext<CR> " === plugin setup ===
nmap <C-p> :bprev<CR>
nnoremap <leader>m :InstantMarkdownPreview<CR> " == colorscheme ==
" set background=light
" let g:solarized_termcolors=16
" let g:solarized_termtrans=1
" let g:solarized_contrast="normal"
" let g:solarized_visibility="normal"
syntax enable
silent! colorscheme vim-monokai-tasty
nnoremap <leader>u :GundoToggle<CR> " == tagbar ==
nnoremap <leader>d :diffupdate<CR> nnoremap <F10> :TagbarToggle<CR>
let g:tagbar_map_jump = "i"
let g:tagbar_left = 0
let g:tagbar_vertical = 0
let g:tagbar_width = 50
let g:tagbar_autoclose = 1
let g:tagbar_autofocus = 1
let g:tagbar_sort = 0 " 1: sort by name, 0: sort by position
let g:tagbar_compact = 1
let g:tagbar_indent = 2
let g:tagbar_show_linenumbers = 0
let g:tagbar_foldlevel = 99 " unfold all
nmap <F9> :Goyo<CR>:TogglePencil<CR> " == airline ==
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:set colorcolumn=<CR> "let g:airline_right_sep = ''
"let g:airline_left_sep = ''
"let g:airline#extensions#disable_rtp_load = 1
"let g:airline_extensions = ['whitespace']
"let g:airline_theme='powerlineish'
"let g:airline_powerline_fonts = 1
"let g:airline_section_x = airline#section#create(['%{tagbar#currenttag("%s", "", "f")}','' , ' %{PencilMode()}', ' [', 'filetype', ']'])
"let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',}
"let g:airline#extensions#whitespace#enabled = 1
"let g:airline#extensions#whitespace#symbol = ''
"let g:airline#extensions#whitespace#checks = ['trailing']
nmap <leader>c :%w !xclip -selection clipboard<CR> let g:lightline = {
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR> \ 'colorscheme': 'powerline',
nmap <leader>f :Autoformat<CR>
nnoremap <leader>v <C-w>v<C-w>l
syntax enable
silent! colorscheme monokai
highlight Comment guifg=#64d86b
highlight SpecialComment guifg=#64d86b
highlight Todo guibg=#a9ebad
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': { \ 'active': {
\ 'left': [ [ 'mode', 'paste' ], \ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ], \ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
@@ -238,83 +292,66 @@ else
\ }, \ },
\ } \ }
function! LightLineFilename()
return fnamemodify(expand('%F'), ":~:h")
endfunction
function! LightLineFilename() " == pencil ==
return fnamemodify(expand('%F'), ":~:h") let g:pencil#textwidth = 80
endfunction let g:pencil#autoformat = 1
let g:pencil#cursorwrap = 1
let g:pencil#wrapModeDefault = 'soft'
let g:pencil#cursorwrap = 0
" == pencil == " == goyo ==
let g:pencil#textwidth = 80 let g:goyo_width = 100
let g:pencil#autoformat = 1 let g:goyo_height = "90%"
let g:pencil#wrapModeDefault = 'hard' let g:goyo_linenr = 0
let g:pencil#map#suspend_af = 'K'
" == goyo == " == limelight ==
let g:goyo_width = 100 let g:limelight_default_coefficient = 0.5
let g:goyo_height = "90%"
let g:goyo_linenr = 0
autocmd! User GoyoEnter Limelight " === functions ===
autocmd! User GoyoLeave Limelight! function! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//e
exe "normal `z"
endfunction
autocmd BufWritePre * :call DeleteTrailingWS()
" == limelight == autocmd FileType yaml set shiftwidth=2
let g:limelight_default_coefficient = 0.5 autocmd FileType toml set shiftwidth=2
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
let g:ale_linters = {'rust': ['rust-analyzer']} set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
" === functions === let g:instant_markdown_autostart = 0
function! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//e
exe "normal `z"
endfunction
autocmd BufWritePre * :call DeleteTrailingWS()
autocmd FileType yaml set shiftwidth=2 let g:terraform_align = 1
autocmd FileType toml set shiftwidth=2 let g:terraform_fmt_on_save=1
autocmd FileType html setl shiftwidth=2
let g:instant_markdown_autostart = 0 if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
let g:terraform_align = 1
let g:terraform_fmt_on_save=1
let g:rustfmt_autosave = 1
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice.
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" https://stackoverflow.com/a/8585343
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
endif endif
let g:ycm_server_python_interpreter = "python3"
au FileType html setl shiftwidth=2
" Use // in visual mode to search for selection
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
if v:version >= 700
au BufLeave * let b:winview = winsaveview()
au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif
endif
" https://github.com/golang/tools/blob/master/gopls/doc/vim.md
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
" https://stackoverflow.com/a/8585343
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>

7
vscode/keybindings.json Normal file
View File

@@ -0,0 +1,7 @@
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+3",
"command": "workbench.action.terminal.focus"
}
]

View File

@@ -1,73 +1,60 @@
{ {
"ansible.dockerImage": "", "workbench.colorTheme": "Visual Studio Light",
"editor.accessibilitySupport": "off", "vim.neovimPath": "/usr/bin/nvim",
"editor.cursorSurroundingLines": 7,
"editor.fontFamily": "'Droid Sans Mono'",
"editor.formatOnSave": true,
"editor.lineNumbers": "off",
"editor.minimap.showSlider": "always",
"editor.renderWhitespace": "none",
"explorer.confirmDelete": false, "explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false, "window.zoomLevel": 0,
"explorer.incrementalNaming": "smart", "terraform.telemetry.enabled": false,
"extensions.ignoreRecommendations": true, "editor.formatOnSave": true,
"vim.gdefault": true,
"vim.visualstar": true,
"vim.enableNeovim": true,
"git.detectSubmodulesLimit": 50,
"files.autoSave": "onFocusChange",
"editor.fontFamily": "'Inconsolata','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.accessibilitySupport": "off",
"editor.lineNumbers": "relative",
"editor.mouseWheelZoom": true,
"editor.renderWhitespace": "none",
"editor.cursorSurroundingLines": 7,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.minimap.size": "fill",
"files.eol": "\n", "files.eol": "\n",
"files.hotExit": "off", "files.hotExit": "off",
"files.trimFinalNewlines": true, "files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"git.detectSubmodulesLimit": 50, "workbench.enableExperiments": false,
"problems.decorations.enabled": false, "workbench.startupEditor": "newUntitledFile",
"problems.showCurrentInStatus": true, "workbench.activityBar.visible": false,
"rust-client.autoStartRls": false, "workbench.iconTheme": "material-icon-theme",
"rust-client.disableRustup": true, "workbench.tree.indent": 12,
"window.menuBarVisibility": "toggle",
"window.title": "${rootName}${separator}${dirty}${activeEditorShort}${separator}VSCode",
"explorer.confirmDragAndDrop": false,
"explorer.incrementalNaming": "smart",
"search.smartCase": true, "search.smartCase": true,
"extensions.ignoreRecommendations": true,
"terminal.external.linuxExec": "alacritty",
"problems.showCurrentInStatus": true,
"problems.decorations.enabled": false,
"update.mode": "none",
"telemetry.enableCrashReporter": false, "telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false, "telemetry.enableTelemetry": false,
"terminal.external.linuxExec": "", "ansible.dockerImage": "",
"terminal.integrated.mouseWheelScrollSensitivity": 3,
"terraform.telemetry.enabled": false,
"update.mode": "none",
"vim.cursorStylePerMode.insert": "line",
"vim.cursorStylePerMode.normal": "block", "vim.cursorStylePerMode.normal": "block",
"vim.cursorStylePerMode.insert": "line",
"vim.cursorStylePerMode.replace": "underline", "vim.cursorStylePerMode.replace": "underline",
"vim.easymotion": true, "vim.easymotion": true,
"vim.enableNeovim": true,
"vim.gdefault": true,
"vim.hlsearch": true, "vim.hlsearch": true,
"vim.leader": "<space>", "vim.leader": "<space>",
"vim.neovimPath": "/usr/bin/nvim",
"vim.vimrc.enable": true,
"vim.visualstar": true,
"editor.wordWrap": "off",
"vscode-neovim.neovimExecutablePaths.linux": "/usr/bin/nvim",
"window.menuBarVisibility": "toggle",
"window.title": "[code] ${rootName}${separator}${dirty}${activeEditorShort}${separator}VSCode",
"workbench.colorCustomizations": { "workbench.colorCustomizations": {
"statusBar.background": "#005f5f", "statusBar.background": "#005f5f",
"statusBar.noFolderBackground": "#005f5f", "statusBar.noFolderBackground": "#005f5f",
"statusBar.debuggingBackground": "#005f5f" "statusBar.debuggingBackground": "#005f5f"
}, },
"workbench.enableExperiments": false, "vim.vimrc.enable": true,
"workbench.iconTheme": "Monokai Classic Icons", "editor.fontSize": 15,
"workbench.startupEditor": "newUntitledFile", "rust-client.disableRustup": true,
"workbench.tree.indent": 14, "rust-client.autoStartRls": false,
"security.workspace.trust.enabled": false, "terminal.integrated.mouseWheelScrollSensitivity": 3
"scm.inputFontSize": 12, }
"debug.console.fontSize": 12,
"terminal.integrated.fontSize": 12,
"files.autoSave": "onFocusChange",
"editor.fontWeight": "normal",
"editor.cursorStyle": "block",
"editor.minimap.renderCharacters": false,
"editor.minimap.size": "fit",
"workbench.colorTheme": "Monokai Classic",
"workbench.tree.renderIndentGuides": "always",
"breadcrumbs.icons": false,
"window.titleSeparator": " — ",
"explorer.excludeGitIgnore": true,
"puppet.editorService.formatOnType.enable": true,
"puppet.installType": "agent",
"puppet.installDirectory": "/usr/bin/puppet",
"window.zoomLevel": 0.1,
"workbench.activityBar.visible": false
}

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -o nounset
set -o pipefail
set -o errexit
codium --install-extension ms-vscode.cpptools
codium --install-extension ms-python.python
codium --install-extension rust-lang.rust-analyzer
codium --install-extension asvetliakov.vscode-neovim
codium --install-extension monokai.theme-monokai-pro-vscode
codium --install-extension yzhang.markdown-all-in-one
codium --install-extension puppet.puppet-vscode

View File

@@ -1,26 +0,0 @@
[
// {
// "key": "ctrl+3",
// "command": "workbench.action.terminal.focus"
// },
{
"key": "ctrl+alt+b",
"command": "workbench.action.toggleActivityBarVisibility"
},
{
"key": "ctrl+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"command": "vscode-neovim.compositeEscape1",
"key": "j",
"when": "neovim.mode == insert && editorTextFocus",
"args": "j"
},
{
"command": "vscode-neovim.compositeEscape2",
"key": "k",
"when": "neovim.mode == insert && editorTextFocus",
"args": "k"
}
]

View File

@@ -1,9 +0,0 @@
{
"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items",
"controlUrl": "",
"recommendationsUrl": ""
}
}

View File

@@ -7,12 +7,12 @@ _path=(
) )
for part in ${_path[@]} ; do for part in ${_path[@]} ; do
PATH="${part}:$PATH" PATH="$PATH:${part}"
done done
export PATH export PATH
export EDITOR="hx" export EDITOR="nvim"
export VISUAL="hx" export VISUAL="nvim"
export BROWSER="firefox" export BROWSER="firefox"
export PAGER="less" export PAGER="less"

View File

@@ -67,7 +67,7 @@ alias twa="task add"
alias twd="task done" alias twd="task done"
alias inbox="task add +inbox" alias inbox="task add +inbox"
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump([d for d in yaml.safe_load_all(sys.stdin)][-1], 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="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'" alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
alias currentbranch='git rev-parse --abbrev-ref HEAD' alias currentbranch='git rev-parse --abbrev-ref HEAD'
@@ -86,14 +86,11 @@ alias sysu="systemctl --user"
alias gpg=gpg2 alias gpg=gpg2
alias alacritty="alacritty --config-file $HOME/.config/alacritty.toml" alias alacritty="alacritty --config-file $HOME/.config/alacritty.yml"
alias d=docker alias d=docker
alias dc=docker-compose alias dc=docker-compose
alias hx=helix
alias h=helix
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)

View File

@@ -183,12 +183,12 @@ sb() {
} }
journal() { journal() {
journaldir=~/sync/journal/ journaldir=~/journal/
file="$journaldir/$(date +%Y-%m-%d).md" file=~/journal/$(date +%Y-%m-%d).md
if [[ ! -e $file ]] ; then if [[ ! -e $file ]] ; then
cp $journaldir/template.md $file || return cp $journaldir/template.md $file || return
fi fi
$EDITOR $file vim +Goyo +PencilSoft $file
} }
syncfolder() { syncfolder() {
@@ -214,33 +214,3 @@ kubectl_pod() {
kubectl_deployment() { kubectl_deployment() {
kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}' kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}'
} }
# The semver_ checks are inspired by
# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
semver_lte() {
v1="${1}"
v2="${2}"
printf '%s\n%s' "${v1}" "${v2}" | sort --version-sort --check=silent
}
semver_lt() {
v1="${1}"
v2="${2}"
semver_lte "${v1}" "${v2}" && [[ ! "${v1}" == "${v2}" ]]
}
semver_gte() {
v1="${1}"
v2="${2}"
! semver_lt "${v1}" "${v2}"
}
semver_gt() {
v1="${1}"
v2="${2}"
! semver_lte "${v1}" "${v2}"
}

View File

@@ -19,15 +19,6 @@ elif [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlightin
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi fi
{% if user.ssh_agent %}
if ! pgrep -u "$USER" ssh-agent > /dev/null ; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
{% endif %}
{% if distro == 'ubuntu' %} {% if distro == 'ubuntu' %}
alias imv=imv-x11 alias imv=imv-x11
{% endif %} {% endif %}