Compare commits

..

391 Commits

Author SHA1 Message Date
f0bccad851 Install discord 2023-05-30 20:27:04 +02:00
42e296b30d Update grm config 2023-05-30 20:26:40 +02:00
80d4f7052c Add helix configuration 2023-05-30 20:24:08 +02:00
9db32a19be Install restic 2022-12-17 01:19:03 +01:00
f65091e8ba i3status-rust: Forget about reverse_levels
See https://github.com/greshake/i3status-rust/pull/1680
2022-12-17 01:18:38 +01:00
0ccde8d66f i3status-rust: Handle unavailable spotify properly 2022-12-16 23:35:49 +01:00
cd90bb119e i3status-rust: Make icon padding machine dependent 2022-12-16 20:55:03 +01:00
5705328277 i3status-rust: Add separator before tray icons 2022-12-16 20:35:34 +01:00
188b93668c i3status-rust: Add mute/unmute on click 2022-12-16 20:26:48 +01:00
40ca67ebbb i3status-rust: Fix padding 2022-12-16 20:26:33 +01:00
4e787f8fa5 Remove py3status config from dotfiles list 2022-12-16 19:50:06 +01:00
5c7ea6ecd8 Do not resume spotify after unlock 2022-12-16 19:45:58 +01:00
8aeb9d9f27 Clean up i3 scripts 2022-12-16 19:45:58 +01:00
2e8708a616 Remove py3status configuration 2022-12-16 19:45:58 +01:00
af26991d95 i3status-rust: Make it compatible with master/0.30 2022-12-16 19:45:58 +01:00
c063610421 i3status-rust: Install my fork from github 2022-12-16 19:44:58 +01:00
2096b3234f Make playbook more check-mode safe 2022-12-16 19:44:58 +01:00
e2ae922a85 Split font sizes into different "kinds"(?) 2022-12-16 19:44:58 +01:00
2e09c7354a rust: Allow specifying which package to build for git crates 2022-12-16 19:44:58 +01:00
8479767fcc packages: Update nodejs packages 2022-12-16 19:44:58 +01:00
bb9739755a rust_binaries: Fix error on old ansible versions 2022-12-16 19:44:58 +01:00
b6b2cecd38 Remove debug output 2022-12-16 19:44:58 +01:00
1091f42490 rust_binaries: Fix check mode 2022-12-16 19:44:58 +01:00
b7d2489f6d Add service and script to manage "mousespam" 2022-12-16 19:44:58 +01:00
62bb6d6d40 vim: Update writing plugin config 2022-12-16 19:44:58 +01:00
d8fc5aa9c3 i3status-rust: Add weather command 2022-12-16 19:43:59 +01:00
9670eb8445 i3status-rust: Make ping more robust 2022-12-16 19:43:51 +01:00
3ff8990a35 redshift: Reset color temperature on startup 2022-12-15 23:12:38 +01:00
5792877f25 First test of i3status-rust 2022-12-15 22:31:50 +01:00
1e5719c94c Fix alacritty font size 2022-12-15 22:30:47 +01:00
ca58ee0c61 Drop watchexec 2022-12-15 21:57:11 +01:00
0d703b7cad Fix rebuilding & linking for rust tools 2022-12-15 21:57:07 +01:00
5662e68a16 Move spotify to workspace 10 2022-12-15 21:56:52 +01:00
6db59607eb i3: Fix bar background color 2022-12-15 19:45:04 +01:00
7040170468 Update orgy 2022-12-15 19:43:32 +01:00
40c2b659c7 go: Fix error in check mode 2022-12-15 19:43:25 +01:00
9ae91e724d Update gothic install script 2022-12-15 13:34:02 +01:00
974a659216 Configure regular paccache cleanup in arch 2022-12-15 13:34:02 +01:00
9ed7db6327 vscode: Hide activity bar 2022-09-05 15:19:52 +02:00
38b3285d49 theme: Switch to non-dark breeze 2022-09-05 15:19:52 +02:00
9e4931f37e Add vscodium and integrate with neovim 2022-09-05 15:19:52 +02:00
f6fae531d6 i3: Make active output more destinctive in i3bar 2022-09-05 15:19:52 +02:00
7f507ec4c3 vim: Suppress startup messages 2022-07-05 22:27:10 +02:00
4073ac5930 tmux: Rearrange config options 2022-07-05 22:27:10 +02:00
a7d23f06c4 Start ssh agent for some users 2022-07-05 22:27:10 +02:00
e5d23adcab i3: Make urgentcy colors consistent 2022-07-05 22:27:10 +02:00
db329973ec alacritty: Make black actually black
Otherwise, "black" output is just invisible. Mainly visible with ansible
DEBUG output, which is "dark gray", which is "1;30", which is black,
which was until now the same as the background color.
2022-07-05 22:27:10 +02:00
e2395d12cf Add proper script to toggle workspace window 2022-07-05 22:27:10 +02:00
40ef2ad2fd i3: Make active workspace background consistent 2022-07-05 22:27:10 +02:00
c0a2e34fd5 i3: Use nice icons for workspaces 2022-07-05 22:27:10 +02:00
ecdbedf4b2 alacritty: Fix font size 2022-07-02 18:38:58 +02:00
fff382e5fa tmux: Disable bottom bar again 2022-07-02 16:01:49 +02:00
3371d03421 Fix fixing of /var/lib/dotfiles permissions 2022-07-02 15:56:34 +02:00
1f27aee39c Remove redundant fixing of DOTDIR 2022-07-02 15:52:41 +02:00
5dd7cfc6af Make install.sh runnable as non-root 2022-07-02 15:52:41 +02:00
2b62592bdf Manage /var/lib/dotfiles as soon as possible 2022-07-02 15:52:41 +02:00
c66d39fa5a alacritty: Use "alacritty" as TERM 2022-07-02 12:50:07 +02:00
99d14f5f6b tmux: Remove leftover setting 2022-07-02 12:38:43 +02:00
cc1ebcfd86 vim: Remove YouCompleteMe
It's just too much hassle with all the compiling and random errors after
updates.
2022-07-02 12:38:09 +02:00
8205d867a0 vim: Remove all that pseudo-IDE stuff 2022-07-02 12:38:09 +02:00
971ce13043 tmux: Remove unused keybinds 2022-07-02 12:38:09 +02:00
f9355f7b9c tmux: Do not use abbreviated keybinds 2022-07-02 12:38:09 +02:00
f384a8a1b6 tmux: Split settings and keybinds 2022-07-02 12:33:15 +02:00
fd3f5c4bd6 tmux: Standardize set-option calls 2022-07-02 12:33:15 +02:00
c54278cc7c tmux: Do not use abbreviated commands 2022-07-02 12:29:30 +02:00
8209b459d8 tmux: Fix error on old (<3.3) versions 2022-07-02 12:19:47 +02:00
86d55197cb Add semver shell helpers 2022-07-02 12:05:12 +02:00
50932f8faa tmux: Fix color code 2022-07-02 11:47:11 +02:00
35da0e349c Fix permission fix for dotfiles directory 2022-07-01 20:14:30 +02:00
97f467f6ec terraform: Allow user-specific versions 2022-07-01 20:14:30 +02:00
ccb10a97d7 passff: Fix idempotency of download 2022-07-01 20:14:30 +02:00
f29d92dad4 Only use old terraform version on neptune 2022-07-01 20:14:30 +02:00
4b6c442d6b Add variable to disable terraform version check 2022-07-01 20:14:30 +02:00
6e894943f9 terraform: v1.1.9 -> v1.1.3 2022-07-01 20:14:30 +02:00
7370df1680 kubectl: v1.23.6 -> v1.24.2 2022-07-01 20:14:30 +02:00
7f352e0910 ansible2.9: Specify force for get_url
The default changed and I assumed it was "false", but it's "true" in
older ansible versions.
2022-07-01 20:14:30 +02:00
a557b35187 Install mdbook 2022-07-01 20:14:30 +02:00
3d0b88031b ansible2.9: Make rust build commands compatible 2022-07-01 20:14:30 +02:00
cd8c5f7cf3 ansible2.9: Make passff config compatible 2022-07-01 20:14:30 +02:00
5531ce1fda Fix installation of yubikey detector on ubuntu 2022-07-01 20:14:30 +02:00
2a58bcadb3 Drop venv completely, use host ansible 2022-07-01 20:14:30 +02:00
f219630319 Properly handle python3-venv on ubuntu 2022-07-01 20:14:30 +02:00
77d9406f2e vim: Remove pinned commit for YCM 2022-07-01 20:14:30 +02:00
a6efc6c43d i3: Draw faint border around inactive headers 2022-06-30 22:28:21 +02:00
4f1ef573e8 i3: Remove border around active window headers 2022-06-30 22:25:52 +02:00
49c95f5be1 tmux: Change activity backgroud 2022-06-30 22:24:45 +02:00
5ffc046537 vim: Change powerline theme 2022-06-30 22:10:17 +02:00
8b4e01b538 vim: Fix colors 2022-06-30 22:05:06 +02:00
d6c0df83f1 vim: Use other monokai 2022-06-30 22:05:00 +02:00
aed9e65c44 Fix colors in tmux 2022-06-30 22:04:43 +02:00
a71942a69e tmux: Add line above status line 2022-06-30 21:44:37 +02:00
891c761e66 Update tmux pane borders 2022-06-30 21:32:29 +02:00
72386b0005 Fix monokai background color 2022-06-30 21:32:29 +02:00
6763f4105f tmux: Fix rightmost status line color 2022-06-30 21:00:55 +02:00
e88b1dd5fa Install jmespath in playbook instead of install script 2022-06-30 20:41:40 +02:00
7b892b7d56 Install kdeconnect 2022-06-30 19:15:13 +02:00
67dc8a99f2 Remove "rustup update", handled by "install" 2022-06-30 06:43:51 +02:00
4b09d22cfc Update colors with monokai 2022-06-30 06:38:05 +02:00
40f4f73efb Change highlight color to more "pastelly" 2022-06-30 06:38:05 +02:00
504e6784da Add recommended curl options to rustup 2022-06-30 06:38:05 +02:00
79a9c7eebd Use host cache before tmpfs cache 2022-06-30 06:38:05 +02:00
4403719e13 Fix failure on existing pacman host cache 2022-06-30 06:38:05 +02:00
24616ec1db Add warning about missing pacman host cache 2022-06-30 06:38:05 +02:00
15d2b54eb7 Do not force-install python3 on arch 2022-06-30 06:38:05 +02:00
3e4d59348b Do not use venv on arch 2022-06-30 06:38:05 +02:00
374c939fdb Fix rust builds on arch 2022-06-30 06:38:05 +02:00
4dfe80d56b Remove packages before installing packages 2022-06-30 06:38:05 +02:00
45c48b39bc gitignore git bundles 2022-06-30 06:38:05 +02:00
0d9076d5ed Fix iptables-nft to iptables on arch 2022-06-30 06:38:05 +02:00
6e4c633b42 Do not install python3-venv 2022-06-30 06:38:05 +02:00
316502744b Add default "all" target 2022-06-30 06:38:05 +02:00
c3c22c5944 Create cache directory before first pacman operation 2022-06-30 06:38:05 +02:00
a5c83fb4ac Drop --force-sudo from youcompleteme 2022-06-30 06:38:05 +02:00
6116088396 watchexec: v1.19.0 -> v1.20.2 2022-06-30 06:38:05 +02:00
fe49d682a9 bat: v0.20.0 -> v0.21.0 2022-06-30 06:38:05 +02:00
26d5535f0d fd: v8.3.1 - v8.4.0 2022-06-30 06:38:05 +02:00
f5456a82fa just: v1.1.2 -> v1.2.0 2022-06-29 17:58:28 +02:00
4060b2f840 Fix package list 2022-06-29 17:58:28 +02:00
032b601561 go: v1.18.1 -> v1.18.3 2022-06-29 17:58:28 +02:00
b3d18f3dd9 firefox: (Try to) disable auto updates 2022-06-29 17:58:28 +02:00
2c2aaf5de8 Update installation of rust binaries 2022-06-29 17:58:28 +02:00
3703fd3d3b Install musl 2022-06-29 17:58:28 +02:00
4c34680a10 neptune: Update output names 2022-06-29 17:58:28 +02:00
478bb17fd1 firefox: Disable camera/micro indicator 2022-06-29 17:58:28 +02:00
f9c640eecb Update neptune screencfgs 2022-06-29 17:58:27 +02:00
8a09cb050c Update path to time tracking repository 2022-06-29 17:58:27 +02:00
84105ba6f6 Update path to restic backup script 2022-06-29 17:58:27 +02:00
3970d71363 Do not do ansible run verbosely 2022-06-29 17:58:27 +02:00
06674d7b99 yaml2json: Support multiple yaml documents 2022-06-29 17:58:27 +02:00
d62b8ca11d Add passwordstore extraction tool 2022-06-29 17:58:27 +02:00
5db5a4fe2a Fix permissions of dotfiles directory 2022-06-29 17:58:27 +02:00
c9ee90f889 Update spotify apt key 2022-06-29 17:58:27 +02:00
f2aafc1ba7 Update dunstctl for ubuntu compatibility 2022-06-29 17:58:27 +02:00
add0adb9a0 Add kdeconnect 2022-06-29 17:58:27 +02:00
7661621c00 dunst: Update dunstctl for comatibility with upstream script 2022-06-29 17:58:27 +02:00
0228edc5c7 firefox: Add separate media profile for ares 2022-06-29 17:58:27 +02:00
edf62e7622 firefox: Add profile option with bigger fonts 2022-06-29 17:58:27 +02:00
7fd54e39ca vim: Add rust setup 2022-06-29 17:58:27 +02:00
a49ea2ee2b vim: Add rust integration 2022-06-29 17:58:27 +02:00
f0b732ce79 fd-find: v8.2.2 -> v8.3.1 2022-06-29 17:58:27 +02:00
1c06d9ca2e watchexec: v1.17.1 -> v1.19.0 2022-06-29 17:58:27 +02:00
3e336eac2c bat: v0.18.3 -> v0.20.0 2022-06-29 17:58:27 +02:00
8ef941ccd3 fd-find: v8.2.1 -> v8.3.2 2022-06-29 17:58:27 +02:00
1532f95ea4 just: v0.12.2 -> v1.1.2 2022-06-29 17:58:27 +02:00
e29138ba9b portfolio: v0.55.0 -> v0.57.2 2022-06-29 17:58:27 +02:00
374fd85af6 go: v1.17.1 -> v1.18.1 2022-06-29 17:58:27 +02:00
fa05b32485 kubectl: v1.22.3 -> v1.23.6 2022-06-29 17:58:27 +02:00
489b80d136 terraform: v1.0.2 -> v1.1.9 2022-06-29 17:58:27 +02:00
fafca0e743 Remove never tag, update Make target for system update 2022-06-29 17:58:27 +02:00
290bcbe172 Split user and system updates 2022-06-29 17:58:27 +02:00
6b0db2f804 git: Add dotfiles repo as safe path 2022-06-29 17:58:27 +02:00
1a31586fbe vim: Fix YCM version to known-good commit 2022-06-29 17:58:27 +02:00
d00cf5b11c grm: Use develop branch 2022-06-29 17:58:27 +02:00
7671b3e48e Update firefox configuration 2022-06-29 17:58:27 +02:00
5462ab0790 Rename "all" target to "config" 2022-06-29 17:58:27 +02:00
f6715dedc6 Do not update during normal make run 2022-06-29 17:58:27 +02:00
0030cc2ca9 packages: Add jq 2022-06-29 17:58:27 +02:00
5d116becfb packages: Add black 2022-06-29 17:58:27 +02:00
01ebaea6c2 nato: Add german spelling 2022-06-29 17:58:27 +02:00
916d67d22f repos: Fix a few URLs 2022-06-29 17:58:27 +02:00
329f2a6e2c yubikey: Restart touch detector when gpg restarts 2022-06-29 17:58:27 +02:00
8307a4d4ca Update spotify key 2022-06-29 17:58:27 +02:00
040e5d09e5 Fix yubikey touch detector build cleanup 2022-06-29 17:58:27 +02:00
1bc03cffcc Fix alacritty build 2022-06-29 17:58:26 +02:00
465a413ae9 Fix ordering of elements in PATH 2022-06-29 17:58:26 +02:00
83d7386b25 Purge packages on ubuntu 2022-06-29 17:58:26 +02:00
eb07b67107 Update personal repo configuration 2022-06-29 17:58:26 +02:00
1c6fe13112 vim: Add TOML config 2022-06-29 17:58:26 +02:00
1ae605a52a Add personal repository configuration 2022-06-29 17:58:26 +02:00
05618cf533 Add GRM 2022-06-29 17:58:26 +02:00
c1c9d7bbad Add function to build crates directly from git 2022-06-29 17:58:26 +02:00
08efa386fc Always use rustup instead of rust 2022-06-29 17:58:26 +02:00
7016c97f9d Fix package list 2022-06-29 17:58:26 +02:00
ecde49ce4a Update packages for ubuntu 2022-06-29 17:58:26 +02:00
3bc6db63cb Fix duplicated changed_when 2022-06-29 17:58:26 +02:00
20eee74860 Make inlcude_ tasks less spammy 2022-06-29 17:58:26 +02:00
42c55c6f53 Update kubectl to v1.22.3 2022-06-29 17:58:26 +02:00
583a2c856b Improve idempotency 2022-06-29 17:58:26 +02:00
00536c6260 Read variables from separate file 2022-06-29 17:58:26 +02:00
ff9d2b547f Fix building rust crates via separate user 2022-06-29 17:58:26 +02:00
b4fdaae8c5 Add ~/.cargo/bin to PATH 2022-06-29 17:58:26 +02:00
92a78cf2f4 Install rustup on ubuntu 2022-06-29 17:58:26 +02:00
355443acc6 Cooler exa options! 2022-06-29 17:58:26 +02:00
3b24d2bac4 Fix laptop lid service 2022-06-29 17:58:26 +02:00
8d6dc18bb0 Always restart services 2022-06-29 17:58:26 +02:00
cef0463e89 Remove discord 2022-06-29 17:58:26 +02:00
d9b1a4ca5d Do not keep binaries inside rust_build user home 2022-06-29 17:58:26 +02:00
4039174e45 Use rustup properly to build rust binaries 2022-06-29 17:58:26 +02:00
0759483348 Add some fancy rust cmdline programs 2022-06-29 17:58:26 +02:00
a6dd7e0c21 Fix font size for machines without scaling 2022-06-29 17:58:26 +02:00
98bdcb1b2c Configure i3 workspaces on ares 2022-06-29 17:58:26 +02:00
351fe1bb9a Remove old urxvt config 2022-06-29 17:58:26 +02:00
3cf20a7306 Add dmideocde, required by libvirt on arch 2022-06-29 17:58:26 +02:00
06c5871ed4 Standardize capitalization of ansible task names 2022-06-29 17:58:26 +02:00
c781636516 Set GOROOT correctly 2022-06-29 17:58:26 +02:00
22f0586995 Fix some arch-specific "becomes" 2022-06-29 17:58:26 +02:00
f4f2f47ee2 Remove vim in favour of nvim 2022-06-29 17:58:26 +02:00
86d417264a Remove signal 2022-06-29 17:58:26 +02:00
e9647aca00 vim: Add shortcut to close buffer without closing window 2022-06-29 17:58:26 +02:00
8067e31901 firefox: Install floccus 2022-06-29 17:58:26 +02:00
77c637524f Add ansible firefox role version 2022-06-29 17:58:25 +02:00
d1fe361df6 i3status: Do not report remaining battery time 2022-06-29 17:58:25 +02:00
09d06ac7e7 Remove unneeded scripts 2022-06-29 17:58:25 +02:00
abb78d6248 Try to standardize font size 2022-06-29 17:58:25 +02:00
74e645dd96 Add imv alias on ubuntu 2022-06-29 17:58:25 +02:00
a2aedcfef3 rofi: Disable Desktop entries 2022-06-29 17:58:25 +02:00
f06f98604f Fix firefox list in autostart.target 2022-06-29 17:58:25 +02:00
d631cdba30 Use better vim monokai color scheme 2022-06-29 17:58:25 +02:00
839c941f9e Unify the "update" target 2022-06-29 17:58:25 +02:00
9bd8b62dc4 Drop dryrun target 2022-06-29 17:58:25 +02:00
339798448a Use dotfiles group for dotfiles user 2022-06-29 17:58:25 +02:00
9d401a8e69 zsh: Add docker aliases 2022-06-29 17:58:25 +02:00
5cc8f0f0ed Update alacritty default title 2022-06-29 17:58:25 +02:00
ebca8ce6e3 Drop terminal variable, always use alacritty 2022-06-29 17:58:25 +02:00
7acb66688b Create a ~/tmp directory 2022-06-29 17:58:25 +02:00
0f6629109a Configure firefox extensions & settings 2022-06-29 17:58:25 +02:00
cb19d91c2b Set python interpreter to python3 2022-06-29 17:58:25 +02:00
a35c8c0dbe Add ansible firefox role 2022-06-29 17:58:25 +02:00
8575e7471b vim: Add vim-svelte 2022-06-29 17:58:25 +02:00
fe82fa28be Use rustup instead of rust on arch 2022-06-29 17:58:25 +02:00
a74410228a Remove discord from autostart 2022-06-29 17:58:25 +02:00
dd615deb94 Add gothic install scripts 2022-06-29 17:58:25 +02:00
4c7515bbf7 pacman: Enable parallel downloads 2022-06-29 17:58:25 +02:00
961632639e pulse: Install libpulse on arch 2022-06-29 17:58:25 +02:00
0dd81432c0 vim: Disable broken plugin elm-format 2022-06-29 17:58:25 +02:00
942eec9a0d Use npm instead of yarn for vim plugin install 2022-06-29 17:58:25 +02:00
e9412abd21 Remove go binary install during vim plugin install 2022-06-29 17:58:25 +02:00
7b80f3d19d Fix nvim plugin install 2022-06-29 17:58:25 +02:00
ddac3190bd Move vim-plug directory creation into correct tagged block 2022-06-29 17:58:25 +02:00
b069d87c93 Fix setting of PATH for yubikey-touch-detector build 2022-06-29 17:58:25 +02:00
0b52b54c7b Remove all wallpaper-related stuff 2022-06-29 17:58:25 +02:00
658bace2c6 Use /etc/profile for PATH 2022-06-29 17:58:25 +02:00
c27be08ab1 Set PATH/GOPATH for go explicitly 2022-06-29 17:58:25 +02:00
009b263e9e Install go before building stuff with it 2022-06-29 17:58:25 +02:00
08bce6511b Add go directory to PATH 2022-06-29 17:58:25 +02:00
509f9914e4 Remove unused path from PATH 2022-06-29 17:58:25 +02:00
09389db745 Install go manually 2022-06-29 17:58:25 +02:00
6a4a410a3c Get rid of snap 2022-06-29 17:58:25 +02:00
465d332b1a Drop "--sync" from nvim plugin commands 2022-06-29 17:58:24 +02:00
284767614a Remove duplicate manpage package definition 2022-06-29 17:58:24 +02:00
dd589f8b21 Update portfolioperformance to v0.55.0 2022-06-29 17:58:24 +02:00
6f4a0b01e9 Use ~/.go as GOPATH 2022-06-29 17:58:24 +02:00
92cc4c31d6 Install spotify via paru on arch 2022-06-29 17:58:24 +02:00
10c96b1862 Add separate paru user for installs 2022-06-29 17:58:24 +02:00
60e9290414 Fix running mkinitcpio in docker 2022-06-29 17:58:24 +02:00
802c149399 Install signal on arch 2022-06-29 17:58:24 +02:00
ba5aa49a0f Update vim plugin installations 2022-06-29 17:58:24 +02:00
f59558f29f Install kernel in ares testing container 2022-06-29 17:58:24 +02:00
d7791b94c1 Install pass wrapper in .optbin 2022-06-29 17:58:24 +02:00
5c38e9a5f7 Add test scripts for mars 2022-06-29 17:58:24 +02:00
c8aa56fe47 Add vim plugin update 2022-06-29 17:58:24 +02:00
9a50d540de Add pass wrapper to check out store 2022-06-29 17:58:24 +02:00
091218a685 Make kubectl executable after download 2022-06-29 17:58:24 +02:00
12fccd6962 alacritty: Fix config 2022-06-29 17:58:24 +02:00
3b52181d23 Fix youcompleteme output file path 2022-06-29 17:58:24 +02:00
1974f3a939 Add new machine "mars" 2022-06-29 17:58:24 +02:00
eaf84748f9 Only use iptables hack on arch 2022-06-29 17:58:24 +02:00
0ce4262e64 bin: Add time tracking entrypoint 2022-06-29 17:58:24 +02:00
a6969ff360 vim: configure go module 2022-06-29 17:58:24 +02:00
414bb0f90b vim: Add autoformat shortcut 2022-06-29 17:58:24 +02:00
a284f02869 vim: Add clipboard commands 2022-06-29 17:58:24 +02:00
80cbaa6cab vim: Add JS/JSX plugins 2022-06-29 17:58:24 +02:00
1e895e3cb6 vim: Add editorconfig plugin 2022-06-29 17:58:24 +02:00
ddb3c496e3 i3: Add pim_toggle with switchback 2022-06-29 17:58:24 +02:00
b2c827a24f Cleanup tempdir AFTER it is no longer used 2022-06-29 17:58:24 +02:00
104259a58b Decommission tb-hak machine 2022-06-29 17:58:24 +02:00
1f664148cc Fix syntax error in temp file cleanup 2022-06-29 17:58:24 +02:00
c6adff587a Remove sambashare group on ubuntu 2022-06-29 17:58:24 +02:00
c75a116b29 Remove lpadmin group on ubuntu 2022-06-29 17:58:24 +02:00
6e8a4ec8c9 testing: Enable selecting of host 2022-06-29 17:58:24 +02:00
625f1c4060 Skip waiting for input during testing 2022-06-29 17:58:24 +02:00
7dfe49b3a3 Create cache directory on arch 2022-06-29 17:58:24 +02:00
30973771f4 Do no install neovim PPA 2022-06-29 17:58:24 +02:00
ec17163206 packages: Remove anki 2022-06-29 17:58:24 +02:00
efba2a92a2 Fix iptables install on arch 2022-06-29 17:58:24 +02:00
f80e24cc28 Update apt package lists during bootstrap 2022-06-29 17:58:24 +02:00
df1edce5c6 Only checkout submodules if in git 2022-06-29 17:58:24 +02:00
f6f7303172 Add testing for neptune 2022-06-29 17:58:23 +02:00
fe193ec37e Update ansible to v4.6.0 2022-06-29 17:58:23 +02:00
a03d9c9cd7 Do initial passwordstore checkout 2022-06-29 17:58:23 +02:00
8011c1827a Add personal gpg key configuration 2022-06-29 17:58:23 +02:00
05a00fad3a Add dedicated dotfiles user 2022-06-29 17:58:23 +02:00
c03c01cd2a zsh: Use python3 for aliases 2022-06-29 17:58:23 +02:00
5839134243 Add new machine "neptune" 2022-06-29 17:58:23 +02:00
e150f1a2b0 Specify alacritty config file explicilty 2022-06-29 17:58:23 +02:00
15367851e3 Fix typo for feature file 2022-06-29 17:58:23 +02:00
26080d353b vim: Remove elm-vim 2022-06-29 17:58:23 +02:00
138a1d2f32 Manage terraform binary 2022-06-29 17:58:23 +02:00
2cbe7dde04 Update warning on outdated kubectl 2022-06-29 17:58:23 +02:00
c3b211d0c5 Update kubectl 2022-06-29 17:58:23 +02:00
44f7cc4152 PP: Remove temporary directory after download 2022-06-29 17:58:23 +02:00
9eb5d1362b YCM: Update compiled *.so path 2022-06-29 17:58:23 +02:00
0c1b622f73 Update gpg-agent service blacklist 2022-06-29 17:58:23 +02:00
385306319a Install signal via third-party repo on ubuntu 2022-06-29 17:58:23 +02:00
7db70452d8 Install spotify via third-party repo on ubuntu 2022-06-29 17:58:23 +02:00
b00b2781be Build yubikey-touch-detector on ubuntu 2022-06-29 17:58:23 +02:00
b1d83a7bdc Build alacritty on ubuntu 2022-06-29 17:58:23 +02:00
084bf82ea9 ansible: Use correct "state" for package module 2022-06-29 17:58:23 +02:00
ef1e07f1f4 gpg: Run agent conditionally 2022-06-29 17:58:23 +02:00
cf3670cefc packages: Add ncdu 2022-06-29 17:58:23 +02:00
5692de9cca packages: Install synaptics packages 2022-06-29 17:58:23 +02:00
c212b302f1 packages: Do not install terraform on ubuntu 2022-06-29 17:58:23 +02:00
381445f0ae packages: Install maim on ubuntu 2022-06-29 17:58:23 +02:00
55b11f3d90 packages: Install playerctl on ubuntu 2022-06-29 17:58:23 +02:00
2b8a9fdcc6 packages: Install stress on ubuntu 2022-06-29 17:58:23 +02:00
9d4bfa624a packages: Install nextcloud on ubuntu 2022-06-29 17:58:23 +02:00
6aeda1eac2 packages: Install man on ubuntu 2022-06-29 17:58:23 +02:00
4cfdbe6e6a packages: Install imv on ubuntu 2022-06-29 17:58:23 +02:00
79b2254f28 packages: Update musescore package name on ubuntu 2022-06-29 17:58:23 +02:00
1590055049 packages: Install ssh on ubuntu 2022-06-29 17:58:23 +02:00
168d986213 packages: Install virtualbox on arch 2022-06-29 17:58:23 +02:00
cb085ae7df packages: Add package required for openconnect on ubuntu 2022-06-29 17:58:23 +02:00
d1f02f0e46 packages: Add required packages for yubikey on ubuntu 2022-06-29 17:58:23 +02:00
c43172e281 packages: Remove shutter 2022-06-29 17:58:23 +02:00
897a37822a packages: Remove chrome & chromium 2022-06-29 17:58:23 +02:00
708a913046 packages: Add libvirt on ubuntu 2022-06-29 17:58:22 +02:00
1d6bb3df9c packages: Add pdf tooling for ubuntu 2022-06-29 17:58:22 +02:00
9160036e1a packages: Add fonts for ubuntu 2022-06-29 17:58:22 +02:00
b574b07b11 packages: Add docker-compose for ubuntu 2022-06-29 17:58:22 +02:00
0a61b619c4 packages: Install cmake on ubuntu 2022-06-29 17:58:22 +02:00
9ac6482127 Bootstrap required venv python module 2022-06-29 17:58:22 +02:00
da373d0a62 Bootstrap submodules 2022-06-29 17:58:22 +02:00
0548ed7da4 py3status: Disable manual click events
The modules already support the click events natively.
2022-06-29 17:58:22 +02:00
312da06756 i3: Remove scratchpad bindings 2022-06-29 17:58:22 +02:00
0bbf5eb080 i3: Move screenshot hotkey 2022-06-29 17:58:22 +02:00
6b363120ce firefox: Enable multiple instances 2022-06-29 17:58:22 +02:00
02e5ac542c alacritty: Set TERM 2022-06-29 17:58:22 +02:00
bc6abb6492 Enable yubikey-touch-detector conditionally 2022-06-29 17:58:22 +02:00
689b00e46c autostart: Template the autostart target unit file 2022-06-29 17:58:22 +02:00
ca70989963 Bootstrap venv via Makefile 2022-06-29 17:58:22 +02:00
5dab967b6c zsh: Remove GO* env variables 2022-06-29 17:58:22 +02:00
a3deaf6546 vim: Fix YCM compilation 2022-06-29 17:58:22 +02:00
a527942356 ansible: Fix systemd user unit masking 2022-06-29 17:58:22 +02:00
0827d7ba35 i3: Move spotify to the very left of i3bar 2022-06-29 17:58:22 +02:00
b65659d631 i3: Add mic toggle mapping 2022-06-29 17:58:22 +02:00
2a8e1354f8 i3: Remap floating toggle 2022-06-29 17:58:22 +02:00
da5245071d git: ff-only on pull 2022-06-29 17:58:22 +02:00
67a7d47a1d dunst: Move window to bottom 2022-06-29 17:58:22 +02:00
1551ef8ce0 alacritty: Enable dynamic titles 2022-06-29 17:58:22 +02:00
3765d22ab8 Merge pull request #5 from hakoerber/dependabot/pip/cryptography-3.3.2
build(deps): bump cryptography from 3.2.1 to 3.3.2
2022-06-29 17:58:21 +02:00
46d6cdf9ba Merge pull request #8 from hakoerber/dependabot/pip/ansible-2.10.7
build(deps): bump ansible from 2.10.4 to 2.10.7
2022-06-29 17:58:21 +02:00
ab1c48aefc 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>
2022-06-29 17:58:21 +02:00
1d1a2e2e55 packages: Add terraform 2022-06-29 17:58:21 +02:00
969fabe77c 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>
2022-06-29 17:58:21 +02:00
ca727cf906 packages: Add some python modules 2022-06-29 17:58:21 +02:00
86257e57da Install mkinitcpio in arch 2022-06-29 17:58:21 +02:00
b4f073bd1d Limit memory usage of nextcloud 2022-06-29 17:58:21 +02:00
2c21846b06 Fix libvirt setup on arch 2022-06-29 17:58:20 +02:00
6ea2fe1cac Optimize pacman caching in docker test script 2022-06-29 17:58:20 +02:00
ce7ed9420a testscript: Clean up tmpdir 2022-06-29 17:58:20 +02:00
ef2e0e4919 Deprecate fedora 2022-06-29 17:58:20 +02:00
59d57ee694 Add script to detect missing packages in list 2022-06-29 17:58:20 +02:00
c61d31a568 zsh: Use yaml.safe_load for yaml2json 2022-06-29 17:58:20 +02:00
b592d4516e Refactor docker testing script 2022-06-29 17:58:20 +02:00
6232638023 i3: Remove deprecated wallchanger hotkeys 2022-06-29 17:58:20 +02:00
5f3c8b43db i3: Add screenshot config 2022-06-29 17:58:20 +02:00
1cb92ad7b9 Install maim 2022-06-29 17:58:20 +02:00
f454bae025 Merge pull request #6 from hakoerber/dependabot/pip/jinja2-2.11.3
build(deps): bump jinja2 from 2.11.2 to 2.11.3
2022-06-29 17:58:19 +02:00
3f77ddb377 Fix screencfg for ares 2022-06-29 17:58:19 +02:00
24db348ef8 Merge pull request #7 from hakoerber/dependabot/pip/pyyaml-5.4
build(deps): bump pyyaml from 5.3.1 to 5.4
2022-06-29 17:58:19 +02:00
66485f7219 zsh: Suppress warnings in "embiggen" 2022-06-29 17:58:19 +02:00
3ff4718408 zsh: Remove duplicate "embiggen" function 2022-06-29 17:58:19 +02:00
c381a2c006 Install pdf packages 2022-06-29 17:58:19 +02:00
b6c78e01ff gtk: Update font size calculation 2022-06-29 17:58:19 +02:00
6eb4d5b1d6 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>
2022-06-29 17:58:18 +02:00
ec1205f6fa Add signal autostart 2022-06-29 17:58:18 +02:00
7b57d170bd 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>
2022-06-29 17:58:18 +02:00
90ec23a80a Add element autostart 2022-06-29 17:58:18 +02:00
e6bee6f56b i3: Force steam to workspace 5 2022-06-29 17:58:18 +02:00
f1122edb0e Disable restic on private account on tb-hak 2022-06-29 17:58:18 +02:00
45145efcb8 x: Import the environment on startup
This is required to set the DISPLAY variable correctly.
2022-06-29 17:58:18 +02:00
a24bf7f146 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.
2022-06-29 17:58:18 +02:00
dd93c0a30b Make gpg ssh support configurable 2022-06-29 17:58:18 +02:00
3feee6543c autostart: Remove hardcoded DISPLAY 2022-06-29 17:58:18 +02:00
b33b79d9a7 Install pydbus on ubuntu 2022-06-29 17:58:18 +02:00
956e7abf0d Add workaround for old ubuntu systemd 2022-06-29 17:58:17 +02:00
18833de76b Remove old screencfg config 2022-06-29 17:58:17 +02:00
04d93333bf i3: Add shortcuts for screenconfigs 2022-06-29 17:58:17 +02:00
895a2dae62 Update screenconfigs 2022-06-29 17:58:17 +02:00
aecfaab249 screencfg: Support additional --set parameters 2022-06-29 17:58:17 +02:00
78f50ff693 screencfg: Use yaml.safe_load() 2022-06-29 17:58:17 +02:00
55120fa816 zsh: Do not export TERMBIN, not needed 2022-06-29 17:58:17 +02:00
660ef9ca23 tmux: Use generic default-terminal 2022-06-29 17:58:17 +02:00
b1723520d2 qt: Remove unneeded options 2022-06-29 17:58:17 +02:00
a650a72554 ubuntu: Add more theming packages 2022-06-29 17:58:17 +02:00
7b21921b9d tb-hak: Switch to alacritty 2022-06-29 17:58:17 +02:00
a3c42992c7 gtk: Use font_size 2022-06-29 17:58:17 +02:00
cb97244afa Make autostart ubuntu-compatible 2022-06-29 17:58:17 +02:00
7aea8c0dda restic: Do backups only once per day 2022-06-29 17:58:17 +02:00
f723d64780 Fix failure during check run 2022-06-29 17:58:17 +02:00
55728112ce Add more packages for ubuntu 2022-06-29 17:58:17 +02:00
63 changed files with 1340 additions and 986 deletions

2
.gitignore vendored
View File

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

View File

@@ -1,17 +1,16 @@
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}
ansible_run = ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
.PHONY: all
all: | venv $(ansible)
all:
$(ansible_run)
.PHONY: update
update: $(ansible)
$(ansible_run) --tags update
.PHONY: config
config:
$(ansible_run) --skip-tags system-update
.PHONY: system-update
system-update:
$(ansible_run) --tags system-update
.PHONY: reboot
reboot:
@@ -25,27 +24,13 @@ poweroff:
weekend: | update poweroff
.PHONY: packages
packages: $(ansible)
packages:
$(ansible_run) --tags packages
.PHONY: dotfiles
dotfiles: $(ansible)
dotfiles:
$(ansible_run) --tags dotfiles
.PHONY: clean
clean:
rm -rf venv
.PHONY: test
test:
./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,7 +1,10 @@
font_size: 12
font_size_1: 12
font_size_2: 12
gpu: amd
i3bar_icon_padding: " "
users:
- name: hannes
vt: 1
@@ -15,8 +18,18 @@ users:
- i-dont-care-about-cookies
- floccus
manage_css: true
media:
extensions:
- ublock-origin
- passff
- privacy-badger17
- tree-style-tab
- i-dont-care-about-cookies
manage_css: true
bigger_font: true
mail: hannes@hkoerber.de
git_gpg_sign: false
ssh_agent: false
gpg_agent: true
gpg_agent_for_ssh: true
gpg_key:
@@ -26,7 +39,6 @@ users:
enable_passwordstore: true
environment:
MACHINE_HAS_NEXTCLOUD: "true"
has_yubikey: true
repositories:
- personal_projects
@@ -45,9 +57,9 @@ screen:
screencfgs: []
workspace:
1: www
9: comm
10: music
1: ""
9: ""
10: ""
environment:
MACHINE_TYPE: "workstation"

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ env:
# 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
TERM: alacritty
window:
# Window dimensions (changes require restart)
@@ -150,7 +150,7 @@ font:
style: Bold Italic
# Point size
size: {{ machine.font_size }}
size: {{ machine.font_size_2 }}
# 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
@@ -184,7 +184,7 @@ colors:
# Normal colors
normal:
black: '#272822'
black: '#000000'
red: '#F92672'
green: '#A6E22E'
yellow: '#F4BF75'

View File

@@ -6,8 +6,15 @@ Wants=blueman.service
Wants=dpms.service
Wants=dunst.service
Wants=element.service
{% for profile in (user.firefox_profiles|default({})).keys() %}
{% for profile, config in (user.firefox_profiles|default({})).items() %}
{% if config.bigger_font|default(false) is sameas false %}
Wants=firefox@{{ profile }}.service
{% 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 %}
Wants=gpg-agent.service
Wants=gnome-keyring.service
@@ -25,4 +32,5 @@ Wants=steam.service
Wants=touchpad.service
Wants=xresources.service
Wants=yubikey-touch-detector.service
Wants=kdeconnect.service

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
bin/mousespam-toggle Executable file
View File

@@ -0,0 +1,2 @@
#!/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,6 +1,7 @@
#!/usr/bin/env python3
import sys
import os.path
hash = {
'A': 'Alpha',
@@ -43,6 +44,45 @@ hash = {
'.': '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] == '-':
text = [line.strip() for line in sys.stdin.readlines()]
else:

1
bin/natode Symbolic link
View File

@@ -0,0 +1 @@
nato

14
bin/pf Executable file
View File

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

View File

@@ -5,7 +5,14 @@ empty_directories:
- name: .config/nvim
- name: .config/rofi
- 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/i3status-rust
- name: .config/i3status-rust/icons
- name: .config/i3status-rust/themes
- name: .config/helix
dotfiles:
- from: git/gitconfig
to: .gitconfig
@@ -21,9 +28,13 @@ dotfiles:
- from: i3/config
to: .i3/config
template: true
- from: i3/i3status.conf
to: .i3/i3status.conf
- from: i3/i3status-rust/config.toml
to: .config/i3status-rust/config.toml
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
to: .i3/scripts
- from: tmux/tmux.conf
@@ -50,10 +61,12 @@ dotfiles:
template: true
- from: redshift/redshift.conf
to: .config/redshift.conf
- from: vscode/settings.json
to: .config/Code/User/settings.json
- from: vscode/keybindings.json
to: .config/Code/User/keybindings.json
- from: vscodium/product.json
to: .config/VSCodium/product.json
- from: vscodium/settings.json
to: .config/VSCodium/User/settings.json
- from: vscodium/keybindings.json
to: .config/VSCodium/User/keybindings.json
- from: alacritty/alacritty.yml
to: .config/alacritty.yml
template: true
@@ -62,6 +75,9 @@ dotfiles:
- from: gtk/gtk-3.0.ini
to: .config/gtk-3.0/settings.ini
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
to: .gtkrc-2.0
template: true
@@ -71,3 +87,5 @@ dotfiles:
to: .screencfg
- from: scripts
to: scripts
- from: helix/config.toml
to: .config/helix/config.toml

View File

@@ -64,7 +64,7 @@
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#e16b40"
frame_color = "#ff964f"
# Define a color for the separator.
# possible values are:
@@ -84,7 +84,7 @@
### Text ###
font = DejaVu Sans {{ machine.font_size }}
font = DejaVu Sans {{ machine.font_size_1 }}
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.

View File

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

9
grm/github.toml Normal file
View File

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

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

View File

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

35
helix/config.toml Normal file
View File

@@ -0,0 +1,35 @@
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

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

View File

@@ -0,0 +1,107 @@
icons_format = "{{ machine.i3bar_icon_padding }}{icon}{{ machine.i3bar_icon_padding }}"
[icons]
icons = "awesome"
[icons.overrides]
[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(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(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/Ansbach?m&T&format=%c%t' | sed 's/ / /g'"
interval = 1800
[[block]]
block = "time"
interval = 1
locale = "de_DE"
format = " [CW %V] %a %d.%m.%Y %H:%M:%S "

View File

@@ -0,0 +1,94 @@
# 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

View File

View File

@@ -1,123 +0,0 @@
# 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
}

View File

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

View File

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

View File

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

View File

@@ -1,20 +0,0 @@
#!/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

View File

@@ -1,20 +0,0 @@
#!/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']
))

59
i3/scripts/swap-from-workspace Executable file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -21,6 +21,8 @@ gzip -k -f -v "${tmpdir}/dotfiles.tar"
test_ares() {
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
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
docker pull docker.io/library/archlinux:base
docker run \
@@ -38,10 +40,10 @@ test_ares() {
# At worst, the cache directory will be ignored if it does not exist
# Pacman will always prefer the first cache directory, so newly downloaded
# packages will stay in the container
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf
pacman -Syu --noconfirm linux python3
mkdir /var/cache/pacman/pkg_host/
mkdir -p /var/cache/pacman/pkg_host/
pacman -Syu --noconfirm linux
cd $(mktemp -d)
tar xf /tmp/dotfiles.tar.gz -C .
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh

View File

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

153
user.yml
View File

@@ -302,20 +302,6 @@
src: ~/.vim/autoload/plug.vim
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
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
@@ -329,39 +315,12 @@
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
register: vim_plugin_update
changed_when: vim_plugin_update.stderr != ""
tags: [update]
tags: [user-update]
- name: update go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false
tags: [update]
- name: get ycm version after update
shell: |
cd ~/.local/share/nvim/plugged/YouCompleteMe
git rev-parse HEAD
args:
executable: /bin/bash
register: ycm_after_update
changed_when: false
tags: [update]
- name: compile youcompleteme
# --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: [user-update]
tags: [vim-plugins]
- block:
@@ -382,7 +341,6 @@
- set_fact:
firefox_preferences:
browser.aboutConfig.showWarning: false
browser.download.useDownloadDir: false
extensions.pocket.enabled: false
toolkit.legacyUserProfileCustomizations.stylesheets: true
browser.contentblocking.category: "strict"
@@ -414,11 +372,28 @@
# "Allow Firefox to install and run studies"
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:
name: firefox
vars:
firefox_profiles: "{{ {item.key: item.value} | combine({item.key: {'preferences': firefox_preferences}}, recursive=True) }}"
loop: "{{ user.firefox_profiles | dict2items }}"
when: not ansible_check_mode
- name: firefox - create target directory for passff
file:
@@ -428,6 +403,14 @@
state: directory
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
get_url:
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
@@ -435,6 +418,8 @@
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
mode: "{{ item.mode }}"
force: false
when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists
loop:
- name: passff.json
mode: '0644'
@@ -444,8 +429,10 @@
- name: firefox - configure path to passff
lineinfile:
path: ~/.mozilla/native-messaging-hosts/passff.json
search_string: '"path": "PLACEHOLDER"'
line: " \"path\": \"/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py\","
regexp: '"path": ".*"'
line: " \"path\": \"{{ path }}\","
vars:
path: "/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py"
- name: firefox - create chrome directory
file:
@@ -453,6 +440,7 @@
state: directory
mode: '0755'
with_items: "{{ firefox_profile_names.results }}"
when: not ansible_check_mode
- name: firefox - configure firefox custom css
copy:
@@ -470,7 +458,9 @@
#sidebar {
width: 400px !important;
}
when: user.firefox_profiles[item.profile_name].manage_css is sameas True
when:
- not ansible_check_mode
- user.firefox_profiles[item.profile_name].manage_css is sameas True
with_items: "{{ firefox_profile_names.results }}"
tags:
- firefox
@@ -491,6 +481,7 @@
get_url:
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"
force: false
- name: create destination directory
file:
@@ -563,78 +554,100 @@
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
mode: '0755'
force: false
- name: make kubectl executable
file:
path: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
mode: '0755'
when: not ansible_check_mode
- name: link kubectl
file:
src: /home/{{ user.name }}/.opt/kubectl-{{ kubectl_version }}
dest: /home/{{ user.name }}/.optbin/kubectl
state: link
when: not ansible_check_mode
tags:
- kubectl
- 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
stat:
path: "/home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}"
path: "/home/{{ user.name }}/.opt/terraform-v{{ tf_version }}"
register: terraform_binary
check_mode: false
- name: create temporary download directory for terraform
tempfile:
state: directory
register: terraform_download_dir
when: not terraform_binary.stat.exists
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: get terraform
get_url:
url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
url: "https://releases.hashicorp.com/terraform/{{ tf_version }}/terraform_{{ tf_version }}_linux_amd64.zip"
dest: "{{ terraform_download_dir.path }}/terraform.zip"
when: not terraform_binary.stat.exists
force: false
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: unpack terraform zip
unarchive:
src: "{{ terraform_download_dir.path }}/terraform.zip"
dest: "{{ terraform_download_dir.path }}/"
remote_src: true
when: not terraform_binary.stat.exists
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: install terraform
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
when: not terraform_binary.stat.exists
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: clean up download directory
file:
path: "{{ terraform_download_dir.path }}"
state: absent
when: not terraform_binary.stat.exists
when:
- not ansible_check_mode
- not terraform_binary.stat.exists
- name: link terraform
file:
src: /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
src: /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
dest: /home/{{ user.name }}/.optbin/terraform
state: link
when: not ansible_check_mode
- name: get terraform version info
command: /home/{{ user.name }}/.optbin/terraform version -json
register: terraform_version_output
check_mode: false
changed_when: false
- block:
- name: get terraform version info
command: /home/{{ user.name }}/.optbin/terraform version -json
register: terraform_version_output
check_mode: false
changed_when: false
- name: parse terraform version output
set_fact:
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
changed_when: false
- name: parse terraform version output
set_fact:
terraform_outdated: "{{ (terraform_version_output.stdout | from_json()).terraform_outdated }}"
changed_when: false
- name: warn if terraform is outdated
fail:
msg: "current terraform v{{ terraform_version }} is out of date"
when: terraform_outdated is sameas true
ignore_errors: True
- name: warn if terraform is outdated
fail:
msg: "current terraform v{{ tf_version }} is out of date"
when: terraform_outdated is sameas true
ignore_errors: True
when: tf_check_updates
tags:
- terraform

View File

@@ -1,28 +1,43 @@
terraform_version: 1.0.2
kubectl_version: v1.22.3
go_version: "1.17.1"
portfolio_performace_version: "0.55.0"
terraform_version: 1.3.6
kubectl_version: v1.26.0
go_version: "1.19.4"
portfolio_performace_version: "0.57.2"
cargo_crate_list:
- crate: just
binary: just
version: 0.10.2
version: 1.9.0
- crate: ripgrep
binary: rg
version: 13.0.0
features:
- pcre2
- simd-accel
toolchain: nightly # necessary for SIMD
required_packages:
- ubuntu: libpcre2-dev
archlinux: pcre2
- crate: fd-find
binary: fd
version: 8.2.1
version: 8.6.0
- crate: bat
binary: bat
version: 0.18.3
version: 0.22.1
- crate: exa
binary: exa
version: 0.10.1
- crate: watchexec-cli
binary: watchexec
version: 1.17.1
- crate: mdbook
binary: mdbook
version: 0.4.24
- url: https://github.com/hakoerber/git-repo-manager
binary: grm
branch: master
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
source: git
package: i3status-rs

273
vim/vimrc
View File

@@ -4,74 +4,38 @@ call plug#begin('~/.local/share/nvim/plugged')
" === plugins ===
"Plug 'vim-airline/vim-airline'
"Plug 'vim-airline/vim-airline-themes'
Plug 'itchyny/lightline.vim'
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'
function! Cond(Cond, ...)
let opts = get(a:000, 0, {})
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
endfunction
"Plugin 'Lokaltog/vim-easymotion'
"Plugin 'PeterRincker/vim-argumentative'
"Plugin 'flazz/vim-colorschemes'
"Plugin 'jmcantrell/vim-virtualenv'
"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'
" editing plugins
Plug 'godlygeek/tabular', Cond(!exists('g:vscode'))
Plug 'nathanaelkane/vim-indent-guides', Cond(!exists('g:vscode'))
Plug 'tpope/vim-commentary', Cond(!exists('g:vscode'))
Plug 'airblade/vim-gitgutter', Cond(!exists('g:vscode'))
Plug 'fatih/vim-go'
Plug 'hashivim/vim-terraform'
" ui
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode'))
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
Plug 'editorconfig/editorconfig-vim'
" lang integrations
Plug 'lepture/vim-jinja', Cond(!exists('g:vscode'))
Plug 'fatih/vim-go', Cond(!exists('g:vscode'))
Plug 'hashivim/vim-terraform', Cond(!exists('g:vscode'))
Plug 'editorconfig/editorconfig-vim', Cond(!exists('g:vscode'))
Plug 'rust-lang/rust.vim', Cond(!exists('g:vscode'))
Plug 'rodjek/vim-puppet', Cond(!exists('g:vscode'))
Plug 'leafgarland/typescript-vim'
" helpers
"" distraction free writing
Plug 'junegunn/limelight.vim', Cond(!exists('g:vscode'))
Plug 'junegunn/goyo.vim', Cond(!exists('g:vscode'))
Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
Plug 'prettier/vim-prettier', { 'do': 'npm install' }
"" markdown
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
Plug 'yuezk/vim-js'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'evanleck/vim-svelte', {'branch': 'main'}
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Plug 'Chiel92/vim-autoformat'
Plug 'evanleck/vim-svelte', {'branch': 'main'}
Plug 'cespare/vim-toml', { 'branch': 'main' }
call plug#end()
filetype plugin indent on
@@ -105,7 +69,7 @@ set noerrorbells
set noshowmode
set numberwidth=2
set relativenumber
set shortmess=rti
set shortmess=rtiF
set ruler
set scrolloff=7
set title
@@ -174,6 +138,8 @@ set linebreak
set wrap
set wrapscan
" == to use guicolors in terminal ==
set termguicolors
" === keybinds ===
set pastetoggle=<F11>
@@ -198,83 +164,53 @@ map Y y$
map j gj
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
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
nnoremap Q <nop>
" === autocommands ===
" Use // in visual mode to search for selection
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
"" autosave views when closing and restoring when opening again.
"autocmd BufWinLeave *.* mkview
"autocmd BufWinEnter *.* silent loadview
if exists('g:vscode')
xmap gc <Plug>VSCodeCommentary
nmap gc <Plug>VSCodeCommentary
omap gc <Plug>VSCodeCommentary
nmap gcc <Plug>VSCodeCommentaryLine
else
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" === plugin setup ===
nmap <C-n> :bnext<CR>
nmap <C-p> :bprev<CR>
" == colorscheme ==
" 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>m :InstantMarkdownPreview<CR>
" == tagbar ==
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
nnoremap <leader>u :GundoToggle<CR>
nnoremap <leader>d :diffupdate<CR>
" == airline ==
"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 <F9> :Goyo<CR>:TogglePencil<CR>
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:set colorcolumn=<CR>
let g:lightline = {
\ 'colorscheme': 'powerline',
nmap <leader>c :%w !xclip -selection clipboard<CR>
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
nmap <leader>f :Autoformat<CR>
nnoremap <leader>v <C-w>v<C-w>l
syntax enable
silent! colorscheme monokai
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
@@ -292,66 +228,47 @@ let g:lightline = {
\ },
\ }
function! LightLineFilename()
return fnamemodify(expand('%F'), ":~:h")
endfunction
" == pencil ==
let g:pencil#textwidth = 80
let g:pencil#autoformat = 1
let g:pencil#cursorwrap = 1
let g:pencil#wrapModeDefault = 'soft'
let g:pencil#cursorwrap = 0
function! LightLineFilename()
return fnamemodify(expand('%F'), ":~:h")
endfunction
" == goyo ==
let g:goyo_width = 100
let g:goyo_height = "90%"
let g:goyo_linenr = 0
" == pencil ==
let g:pencil#textwidth = 80
let g:pencil#autoformat = 1
let g:pencil#wrapModeDefault = 'hard'
let g:pencil#map#suspend_af = 'K'
" == limelight ==
let g:limelight_default_coefficient = 0.5
" == goyo ==
let g:goyo_width = 100
let g:goyo_height = "90%"
let g:goyo_linenr = 0
" === functions ===
function! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//e
exe "normal `z"
endfunction
autocmd BufWritePre * :call DeleteTrailingWS()
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
autocmd FileType yaml set shiftwidth=2
autocmd FileType toml set shiftwidth=2
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
" == limelight ==
let g:limelight_default_coefficient = 0.5
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
" === functions ===
function! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//e
exe "normal `z"
endfunction
autocmd BufWritePre * :call DeleteTrailingWS()
let g:instant_markdown_autostart = 0
autocmd FileType yaml set shiftwidth=2
autocmd FileType toml set shiftwidth=2
autocmd FileType html setl shiftwidth=2
let g:terraform_align = 1
let g:terraform_fmt_on_save=1
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
" https://stackoverflow.com/a/8585343
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
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>

View File

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

15
vscodium/install.sh Executable file
View File

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

26
vscodium/keybindings.json Normal file
View File

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

9
vscodium/product.json Normal file
View File

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

View File

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

View File

@@ -7,7 +7,7 @@ _path=(
)
for part in ${_path[@]} ; do
PATH="$PATH:${part}"
PATH="${part}:$PATH"
done
export PATH

View File

@@ -67,7 +67,7 @@ alias twa="task add"
alias twd="task done"
alias inbox="task add +inbox"
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)'"
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump([d for d in yaml.safe_load_all(sys.stdin)][-1], sys.stdout, indent=4)'"
alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
alias currentbranch='git rev-parse --abbrev-ref HEAD'

View File

@@ -214,3 +214,33 @@ kubectl_pod() {
kubectl_deployment() {
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,6 +19,15 @@ elif [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlightin
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
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' %}
alias imv=imv-x11
{% endif %}