Compare commits
50 Commits
bb8b4d1b71
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 227b97479c | |||
| 6322f56ac2 | |||
| 96dcc37947 | |||
| 007a100b40 | |||
| c21801707f | |||
| b8c59ec3e3 | |||
| 7db5362770 | |||
| d89c6ea0ce | |||
| 21788882d3 | |||
| ce0bf90370 | |||
| 7ebb2c63c1 | |||
| caa3a7bede | |||
| 9055522e85 | |||
| a90cfbea83 | |||
| 793a9cd47f | |||
| 3405eb0918 | |||
| e225b14e7e | |||
| cdfe3d03e7 | |||
| e59f636af6 | |||
| 57bf30107c | |||
| ac1522920d | |||
| 8de9b29147 | |||
| 15a350869d | |||
| c624a91839 | |||
| 50b71eeb9f | |||
| f00b3ba481 | |||
| c54fbaf36f | |||
| c216210f37 | |||
| b806b475b5 | |||
| 6ebc8280d6 | |||
| 1f19452d9d | |||
| f47d26f4dd | |||
| 966760bff5 | |||
| a6f9893fac | |||
| 71469bab93 | |||
| 0e56890ee4 | |||
| 15de59d8cc | |||
| 90c92e2159 | |||
| c6d23aa138 | |||
| bc0a99c883 | |||
| 6577f26cd1 | |||
| 2787b90948 | |||
| fcf7d99318 | |||
| 1a758dd8d8 | |||
| 0adb685741 | |||
| a918636dd4 | |||
| c5c697eefd | |||
| a049d72379 | |||
| 44a1c5e6e3 | |||
| 55ab0d203b |
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
|||||||
[submodule "ansible_roles/firefox"]
|
|
||||||
path = ansible_roles/firefox
|
|
||||||
url = https://github.com/staticdev/ansible-role-firefox
|
|
||||||
[submodule "pkgbuilds/spotify"]
|
[submodule "pkgbuilds/spotify"]
|
||||||
path = pkgbuilds/spotify
|
path = pkgbuilds/spotify
|
||||||
url = https://aur.archlinux.org/spotify.git
|
url = https://aur.archlinux.org/spotify.git
|
||||||
@@ -10,9 +7,6 @@
|
|||||||
[submodule "pkgbuilds/portfolio-performance-bin"]
|
[submodule "pkgbuilds/portfolio-performance-bin"]
|
||||||
path = pkgbuilds/portfolio-performance-bin
|
path = pkgbuilds/portfolio-performance-bin
|
||||||
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
||||||
[submodule "pkgbuilds/vim-plug"]
|
|
||||||
path = pkgbuilds/vim-plug
|
|
||||||
url = https://aur.archlinux.org/vim-plug.git
|
|
||||||
[submodule "pkgbuilds/terraform-ls-bin"]
|
[submodule "pkgbuilds/terraform-ls-bin"]
|
||||||
path = pkgbuilds/terraform-ls-bin
|
path = pkgbuilds/terraform-ls-bin
|
||||||
url = https://aur.archlinux.org/terraform-ls-bin.git
|
url = https://aur.archlinux.org/terraform-ls-bin.git
|
||||||
@@ -61,3 +55,6 @@
|
|||||||
[submodule "pkgbuilds/claude-code"]
|
[submodule "pkgbuilds/claude-code"]
|
||||||
path = pkgbuilds/claude-code
|
path = pkgbuilds/claude-code
|
||||||
url = https://aur.archlinux.org/claude-code.git
|
url = https://aur.archlinux.org/claude-code.git
|
||||||
|
[submodule "pkgbuilds/aws-session-manager-plugin"]
|
||||||
|
path = pkgbuilds/aws-session-manager-plugin
|
||||||
|
url = https://aur.archlinux.org/aws-session-manager-plugin.git
|
||||||
|
|||||||
@@ -12,20 +12,10 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
manage_css: true
|
manage_css: true
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
ssh_agent: false
|
ssh_agent: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
@@ -21,7 +20,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
# Prevent failures when not battery present
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
for battery in /sys/class/power_supply/*/capacity ; do
|
for battery in /sys/class/power_supply/*/capacity ; do
|
||||||
capacity="$(< "$battery")"
|
capacity="$(< "$battery")"
|
||||||
if (( "${capacity}" < 40 )) ; then
|
if (( "${capacity}" < 40 )) ; then
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
# Make sure that keys are up to date, otherwise sig checks may fail
|
# Make sure that keys are up to date, otherwise sig checks may fail
|
||||||
pacman --sync --noprogressbar --noconfirm --refresh --needed archlinux-keyring
|
pacman --sync --noprogressbar --noconfirm --refresh --needed archlinux-keyring
|
||||||
|
|
||||||
pacman --sync --noprogressbar --noconfirm --sysupgrade
|
pacman --noprogressbar --noconfirm --sysupgrade
|
||||||
|
|
||||||
- name: Install pacman autoupdate service
|
- name: Install pacman autoupdate service
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -186,7 +189,7 @@
|
|||||||
|
|
||||||
restic \
|
restic \
|
||||||
--cache-dir=/var/cache/restic/ \
|
--cache-dir=/var/cache/restic/ \
|
||||||
--repo="b2:${BUCKET_NAME}:backup" \
|
--repo="b2:${BUCKET_NAME}:hera" \
|
||||||
--password-file=/etc/restic/repopassword \
|
--password-file=/etc/restic/repopassword \
|
||||||
--verbose \
|
--verbose \
|
||||||
"${@}"
|
"${@}"
|
||||||
@@ -219,7 +222,7 @@
|
|||||||
|
|
||||||
run forget restic-cmd \
|
run forget restic-cmd \
|
||||||
forget \
|
forget \
|
||||||
--prune
|
--prune \
|
||||||
--keep-daily 30 \
|
--keep-daily 30 \
|
||||||
--keep-monthly 12 \
|
--keep-monthly 12 \
|
||||||
--keep-yearly 3
|
--keep-yearly 3
|
||||||
|
|||||||
@@ -18,6 +18,14 @@ additional_packages:
|
|||||||
- sddm
|
- sddm
|
||||||
- sddm-kcm
|
- sddm-kcm
|
||||||
- thunderbird
|
- thunderbird
|
||||||
|
# kde archive manager
|
||||||
|
- ark
|
||||||
|
# kde image viewer
|
||||||
|
- gwenview
|
||||||
|
# german language packs
|
||||||
|
- hunspell-de
|
||||||
|
- thunderbird-i18n-de
|
||||||
|
- firefox-i18n-de
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: hannes
|
- name: hannes
|
||||||
@@ -27,7 +35,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
@@ -36,7 +43,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ users:
|
|||||||
default:
|
default:
|
||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
@@ -34,7 +33,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
retry_files_enabled = False
|
retry_files_enabled = False
|
||||||
nocows = 1
|
nocows = 1
|
||||||
roles_path = ./ansible_roles
|
roles_path = ./ansible_roles
|
||||||
library = ./ansible_roles/firefox/library
|
interpreter_python = "auto_silent"
|
||||||
|
|||||||
Submodule ansible_roles/firefox deleted from 2151dce632
4
applications/firefox.desktop
Normal file
4
applications/firefox.desktop
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Firefox
|
||||||
|
Exec=firefox-default --new-tab %u
|
||||||
@@ -31,3 +31,4 @@ Wants=yubikey-touch-detector.service
|
|||||||
Wants=kdeconnect.service
|
Wants=kdeconnect.service
|
||||||
Wants=color-theme-dark.service
|
Wants=color-theme-dark.service
|
||||||
Wants=workstation-mgr.service
|
Wants=workstation-mgr.service
|
||||||
|
Wants=screencfg.service
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
|
ExecStart=/usr/bin/env firefox --profile %h/.mozilla/firefox/profile-%i
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
Environment=XDG_CONFIG_HOME=%h/.config/gtk-3.0-overrides/bigger-font/
|
Environment=XDG_CONFIG_HOME=%h/.config/gtk-3.0-overrides/bigger-font/
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
|
ExecStart=/usr/bin/env firefox --profile %h/.mozilla/firefox/profile-%i
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
8
autostart/services/screencfg.service
Normal file
8
autostart/services/screencfg.service
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
BindsTo=autostart.target
|
||||||
|
After=windowmanager.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/screencfg watch --best
|
||||||
|
Restart=always
|
||||||
3
bin/firefox-default
Executable file
3
bin/firefox-default
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
exec /usr/bin/firefox --profile "$HOME/.mozilla/firefox/profile-default" "${@}"
|
||||||
@@ -3,4 +3,4 @@ rustc-wrapper = "sccache"
|
|||||||
|
|
||||||
[target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
linker = "/usr/bin/clang"
|
linker = "/usr/bin/clang"
|
||||||
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
rustflags = ["-Clink-arg=--ld-path=/usr/bin/wild"]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
empty_directories:
|
empty_directories:
|
||||||
- name: .config/nvim
|
|
||||||
- name: .config/rofi
|
- name: .config/rofi
|
||||||
- name: .config/gtk-3.0
|
- name: .config/gtk-3.0
|
||||||
- name: .config/gtk-3.0-overrides
|
- name: .config/gtk-3.0-overrides
|
||||||
@@ -47,8 +46,6 @@ dotfiles:
|
|||||||
dir: true
|
dir: true
|
||||||
- from: tmux/tmux.conf
|
- from: tmux/tmux.conf
|
||||||
to: .config/tmux/tmux.conf
|
to: .config/tmux/tmux.conf
|
||||||
- from: vim/vimrc
|
|
||||||
to: .config/nvim/init.vim
|
|
||||||
- from: x/Xresources
|
- from: x/Xresources
|
||||||
to: .config/Xresources
|
to: .config/Xresources
|
||||||
- from: x/xinitrc
|
- from: x/xinitrc
|
||||||
@@ -102,9 +99,13 @@ dotfiles:
|
|||||||
to: .config/screencfg.toml
|
to: .config/screencfg.toml
|
||||||
- from: cargo/config.toml
|
- from: cargo/config.toml
|
||||||
to: .local/state/cargo/config.toml
|
to: .local/state/cargo/config.toml
|
||||||
|
- from: applications
|
||||||
|
to: .local/share/applications
|
||||||
|
dir: true
|
||||||
dotfiles_remove:
|
dotfiles_remove:
|
||||||
- .gitconfig
|
- .gitconfig
|
||||||
- .vimrc
|
- .vimrc
|
||||||
|
- .config/nvim/init.vim
|
||||||
- .tmux.conf
|
- .tmux.conf
|
||||||
- .i3
|
- .i3
|
||||||
- .gtkrc-2.0
|
- .gtkrc-2.0
|
||||||
|
|||||||
@@ -118,6 +118,13 @@
|
|||||||
[url "ssh://git@code.hkoerber.de:2222/"]
|
[url "ssh://git@code.hkoerber.de:2222/"]
|
||||||
insteadOf = https://code.hkoerber.de/
|
insteadOf = https://code.hkoerber.de/
|
||||||
|
|
||||||
|
# https://stackoverflow.com/a/71971739
|
||||||
|
[url "https://github.com/"]
|
||||||
|
insteadOf = "git@github.com:"
|
||||||
|
[url "git@github.com:"]
|
||||||
|
pushInsteadOf = "https://github.com/"
|
||||||
|
pushInsteadOf = "git@github.com:"
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
[safe]
|
[safe]
|
||||||
|
|||||||
@@ -100,12 +100,6 @@ block = "custom"
|
|||||||
json = true
|
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\"}'"
|
command = "ping -n -q -w 2 -c 1 8.8.8.8 >/dev/null 2>/dev/null && printf '{\"text\":\"\",\"state\":\"Info\"}' || printf '{\"text\":\"\",\"state\":\"Critical\"}'"
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "custom"
|
|
||||||
command = "workstation-client weather get"
|
|
||||||
# caching is handled by the workstation daemon
|
|
||||||
interval = 60
|
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "time"
|
block = "time"
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
sudo bash -c "pacman -Sy --needed archlinux-keyring && pacman -Syu"
|
sudo bash -c "pacman -Sy --needed --noconfirm archlinux-keyring && pacman -Su"
|
||||||
|
|
||||||
./update-aur-pkgs.sh
|
./update-aur-pkgs.sh
|
||||||
|
|
||||||
|
|||||||
10
packages.yml
10
packages.yml
@@ -77,7 +77,7 @@ font-libertine:
|
|||||||
- libertinus-font
|
- libertinus-font
|
||||||
font-awesome:
|
font-awesome:
|
||||||
archlinux:
|
archlinux:
|
||||||
- ttf-font-awesome
|
- woff2-font-awesome
|
||||||
font-noto:
|
font-noto:
|
||||||
archlinux:
|
archlinux:
|
||||||
- noto-fonts
|
- noto-fonts
|
||||||
@@ -318,8 +318,6 @@ fzf:
|
|||||||
archlinux: ["fzf"]
|
archlinux: ["fzf"]
|
||||||
chromium:
|
chromium:
|
||||||
archlinux: ["chromium"]
|
archlinux: ["chromium"]
|
||||||
signal:
|
|
||||||
archlinux: ["signal-desktop"]
|
|
||||||
go:
|
go:
|
||||||
archlinux: ["go", "gopls", "delve"]
|
archlinux: ["go", "gopls", "delve"]
|
||||||
helix:
|
helix:
|
||||||
@@ -327,7 +325,7 @@ helix:
|
|||||||
keepassxc:
|
keepassxc:
|
||||||
archlinux: ["keepassxc"]
|
archlinux: ["keepassxc"]
|
||||||
awscli:
|
awscli:
|
||||||
archlinux: ["aws-cli"]
|
archlinux: ["aws-cli-v2"]
|
||||||
mariadb-client:
|
mariadb-client:
|
||||||
archlinux: ["mariadb-clients"]
|
archlinux: ["mariadb-clients"]
|
||||||
php:
|
php:
|
||||||
@@ -376,6 +374,7 @@ json:
|
|||||||
markdown:
|
markdown:
|
||||||
archlinux:
|
archlinux:
|
||||||
- marksman
|
- marksman
|
||||||
|
- mdformat
|
||||||
lldb:
|
lldb:
|
||||||
archlinux:
|
archlinux:
|
||||||
- lldb
|
- lldb
|
||||||
@@ -447,6 +446,9 @@ mold:
|
|||||||
archlinux:
|
archlinux:
|
||||||
- clang
|
- clang
|
||||||
- mold
|
- mold
|
||||||
|
wild:
|
||||||
|
archlinux:
|
||||||
|
- wild
|
||||||
arch-packaging:
|
arch-packaging:
|
||||||
archlinux:
|
archlinux:
|
||||||
- namcap
|
- namcap
|
||||||
|
|||||||
1
pkgbuilds/aws-session-manager-plugin
Submodule
1
pkgbuilds/aws-session-manager-plugin
Submodule
Submodule pkgbuilds/aws-session-manager-plugin added at 0cbed9957e
Submodule pkgbuilds/backblaze-b2 updated: 9a5140accc...4c534177ec
Submodule pkgbuilds/claude-code updated: 71aff8b2a6...8e4e33f722
Submodule pkgbuilds/nodejs-intelephense updated: 2c2b183dcb...9468a298eb
Submodule pkgbuilds/portfolio-performance-bin updated: cd85b87ff4...808cf0a09b
Submodule pkgbuilds/protontricks updated: 8761ad0627...33daade611
Submodule pkgbuilds/python-class-registry updated: 417c264c2b...d19d0362dc
Submodule pkgbuilds/python-rst2ansi updated: 871a4d42f3...cf8bafbc3b
Submodule pkgbuilds/python-vdf updated: ae84d0e68b...03356b9232
Submodule pkgbuilds/screencfg-git updated: 3c6b0cffed...a74270fcdd
Submodule pkgbuilds/slack-desktop updated: 56f15fd4c5...a4174ae183
Submodule pkgbuilds/spotify updated: 1bd184d3a4...1af6bd5437
Submodule pkgbuilds/terraform-ls-bin updated: 18b7bba251...4750fa243b
Submodule pkgbuilds/vim-plug deleted from 6f641d45c8
215
playbook.yml
215
playbook.yml
@@ -6,13 +6,13 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Read machine-specific variables
|
- name: Read machine-specific variables
|
||||||
ansible.builtin.include_vars:
|
ansible.builtin.include_vars:
|
||||||
file: _machines/{{ ansible_hostname }}.yml
|
file: _machines/{{ ansible_facts['hostname'] }}.yml
|
||||||
name: machine
|
name: machine
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
distro: "{{ ansible_distribution | lower }}"
|
distro: "{{ ansible_facts['distribution'] | lower }}"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
@@ -208,13 +208,29 @@
|
|||||||
changed_when: unconfigured_packages_cmd.rc == 123
|
changed_when: unconfigured_packages_cmd.rc == 123
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Enable reflector timer
|
- name: reflector
|
||||||
ansible.builtin.systemd:
|
block:
|
||||||
name: reflector.timer
|
- name: Configure reflector
|
||||||
enabled: true
|
ansible.builtin.copy:
|
||||||
state: started
|
dest: /etc/xdg/reflector/reflector.conf
|
||||||
daemon_reload: true
|
owner: root
|
||||||
become: true
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
content: |
|
||||||
|
--save /etc/pacman.d/mirrorlist
|
||||||
|
--protocol https
|
||||||
|
--country Germany
|
||||||
|
--latest 5
|
||||||
|
--sort age
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Enable reflector timer
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: reflector.timer
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
|
daemon_reload: true
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: aur
|
- name: aur
|
||||||
tags:
|
tags:
|
||||||
@@ -245,10 +261,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source ./env
|
source ./env
|
||||||
echo lel
|
echo lel
|
||||||
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | gpg --import -
|
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_5384CE82BA52C83A.gpg | gpg --import -
|
||||||
|
|
||||||
- name: nodejs-intelephense
|
- name: nodejs-intelephense
|
||||||
- name: vim-plug
|
|
||||||
- name: terraform-ls-bin
|
- name: terraform-ls-bin
|
||||||
- name: grm-git
|
- name: grm-git
|
||||||
- name: screencfg-git
|
- name: screencfg-git
|
||||||
@@ -434,13 +449,14 @@
|
|||||||
|
|
||||||
source ./PKGBUILD
|
source ./PKGBUILD
|
||||||
|
|
||||||
for arch in "${arch[@]}" ; do
|
for a in "${arch[@]}" ; do
|
||||||
if [[ "${arch}" == "any" ]] ; then
|
if [[ "${a}" == "any" ]] ; then
|
||||||
arch="any"
|
arch="any"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [[ "${arch}" == "x86_64" ]] ; then
|
if [[ "${a}" == "x86_64" ]] ; then
|
||||||
arch="x86_64"
|
arch="x86_64"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -843,6 +859,175 @@
|
|||||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"
|
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Firefox
|
||||||
|
tags:
|
||||||
|
- firefox
|
||||||
|
block:
|
||||||
|
- name: create firefox directories
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: "{{ item }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0775"
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
loop:
|
||||||
|
- /etc/firefox
|
||||||
|
- /etc/firefox/policies
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
firefox_policy:
|
||||||
|
policies:
|
||||||
|
AutofillAddressEnabled: false
|
||||||
|
AutofillCreditCardEnabled: false
|
||||||
|
DefaultDownloadDirectory: "${home}/download"
|
||||||
|
DisableFeedbackCommands: true
|
||||||
|
DisableFirefoxAccounts: true
|
||||||
|
DisableFirefoxStudies: true
|
||||||
|
DisableForgetButton: true
|
||||||
|
DisableMasterPasswordCreation: true
|
||||||
|
DisableProfileImport: true
|
||||||
|
DisableProfileRefresh: true
|
||||||
|
DisableSafeMode: true
|
||||||
|
DisableSetDesktopBackground: true
|
||||||
|
DisableTelemetry: true
|
||||||
|
DisplayBookmarksToolbar: "always"
|
||||||
|
DisplayMenuBar: "default-off"
|
||||||
|
DontCheckDefaultBrowser: true
|
||||||
|
EnableTrackingProtection:
|
||||||
|
Value: true
|
||||||
|
Locked: false
|
||||||
|
Category: "strict"
|
||||||
|
BaselineExceptions: true
|
||||||
|
ConvenienceExceptions: false
|
||||||
|
ExtensionSettings:
|
||||||
|
"*":
|
||||||
|
allowed_types:
|
||||||
|
- extension
|
||||||
|
"jid1-KKzOGWgsW3Ao4Q@jetpack": # I don't care about cookies
|
||||||
|
installation_mode: "normal_installed"
|
||||||
|
install_url: "https://addons.mozilla.org/firefox/downloads/file/4202634/i_dont_care_about_cookies.xpi"
|
||||||
|
default_area: "menupanel"
|
||||||
|
private_browsing: true
|
||||||
|
updates_disabled: false
|
||||||
|
"uBlock0@raymondhill.net": # Ublock origin
|
||||||
|
installation_mode: "normal_installed"
|
||||||
|
install_url: "https://addons.mozilla.org/firefox/downloads/file/4598854/ublock_origin-1.67.0.xpi"
|
||||||
|
default_area: "navbar"
|
||||||
|
private_browsing: true
|
||||||
|
updates_disabled: false
|
||||||
|
"treestyletab@piro.sakura.ne.jp": # I don't care about cookies
|
||||||
|
installation_mode: "normal_installed"
|
||||||
|
install_url: "https://addons.mozilla.org/firefox/downloads/file/4602712/tree_style_tab-4.2.7.xpi"
|
||||||
|
default_area: "navbar"
|
||||||
|
private_browsing: true
|
||||||
|
updates_disabled: false
|
||||||
|
"{9063c2e9-e07c-4c2c-9646-cfe7ca8d0498}": # Old Reddit redirect
|
||||||
|
installation_mode: "normal_installed"
|
||||||
|
install_url: "https://addons.mozilla.org/firefox/downloads/file/4526031/old_reddit_redirect-2.0.9.xpi"
|
||||||
|
default_area: "menupanel"
|
||||||
|
private_browsing: true
|
||||||
|
updates_disabled: false
|
||||||
|
FirefoxHome:
|
||||||
|
Search: false
|
||||||
|
TopSites: false
|
||||||
|
SponsoredTopSites: false
|
||||||
|
Highlights: false
|
||||||
|
Pocket: false
|
||||||
|
Stories: false
|
||||||
|
SponsoredPocket: false
|
||||||
|
SponsoredStories: false
|
||||||
|
Snippets: false
|
||||||
|
Locked: true
|
||||||
|
GenerativeAI:
|
||||||
|
Enabled: false
|
||||||
|
Chatbot: false
|
||||||
|
LinkPreviews: false
|
||||||
|
TabGroups: false
|
||||||
|
Homepage:
|
||||||
|
URL: "about:newtab"
|
||||||
|
StartPage: "previous-session"
|
||||||
|
MicrosoftEntraSSO: false
|
||||||
|
NewTabPage: false
|
||||||
|
NoDefaultBookmarks: true
|
||||||
|
OfferToSaveLogins: false
|
||||||
|
OverrideFirstRunPage: ""
|
||||||
|
PasswordManagerEnabled: false
|
||||||
|
Preferences:
|
||||||
|
"browser.translations.automaticallyPopup":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
"browser.aboutConfig.showWarning":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
"general.smoothScroll":
|
||||||
|
Value: true
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
# "Play DRM-controlled content"
|
||||||
|
"media.eme.enabled":
|
||||||
|
Value: true
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
# Restore last session on startup
|
||||||
|
# https://support.mozilla.org/de/questions/1235263
|
||||||
|
"browser.startup.page":
|
||||||
|
Value: 3
|
||||||
|
Status: "default"
|
||||||
|
Type: "number"
|
||||||
|
# reload the tabs properly when restoring
|
||||||
|
"browser.sessionstore.restore_on_demand":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
# "Check spelling as you type"
|
||||||
|
"layout.spellcheckDefault":
|
||||||
|
Value: 0
|
||||||
|
Status: "default"
|
||||||
|
Type: "number"
|
||||||
|
# remove ad tracking garbage
|
||||||
|
"dom.private-attribution.submission.enabled":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
# (Try to) disable automatic update, as firefox is pulling a Windows
|
||||||
|
"app.update.auto":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
"app.update.service.enabled":
|
||||||
|
Value: false
|
||||||
|
Status: "default"
|
||||||
|
Type: "boolean"
|
||||||
|
PromptForDownloadLocation: false
|
||||||
|
RequestedLocales:
|
||||||
|
- en-US
|
||||||
|
- de
|
||||||
|
SearchSuggestEnabled: false
|
||||||
|
ShowHomeButton: false
|
||||||
|
SkipTermsOfUse: true
|
||||||
|
UserMessaging:
|
||||||
|
ExtensionRecommendations: false
|
||||||
|
FeatureRecommendations: false
|
||||||
|
UrlbarInterventions: false
|
||||||
|
SkipOnboarding: true
|
||||||
|
MoreFromMozilla: false
|
||||||
|
FirefoxLabs: false
|
||||||
|
VisualSearchEnabled: false
|
||||||
|
|
||||||
|
- name: Firefox global policies
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "/etc/firefox/policies/policies.json"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
content: "{{ firefox_policy | to_nice_json }}"
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
users: "{{ machine.users }}"
|
users: "{{ machine.users }}"
|
||||||
tags:
|
tags:
|
||||||
@@ -865,7 +1050,7 @@
|
|||||||
- include_tasks: "{{ item }}"
|
- include_tasks: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- "_machines/{{ ansible_hostname }}-tasks.yml"
|
- "_machines/{{ ansible_facts['hostname'] }}-tasks.yml"
|
||||||
skip: true
|
skip: true
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|||||||
@@ -62,12 +62,29 @@ readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \
|
|||||||
printf '%s\0' "${package}"
|
printf '%s\0' "${package}"
|
||||||
done)
|
done)
|
||||||
|
|
||||||
|
packages_removed=0
|
||||||
|
|
||||||
if (( "${#packages_to_remove[@]}" > 0 )) ; then
|
if (( "${#packages_to_remove[@]}" > 0 )) ; then
|
||||||
echo "found the following explicitly installed packages that are not configured:"
|
echo "found the following explicitly installed packages that are not configured:"
|
||||||
for pkg in "${packages_to_remove[@]}" ; do
|
for pkg in "${packages_to_remove[@]}" ; do
|
||||||
echo "${pkg}"
|
echo "${pkg}"
|
||||||
done
|
done
|
||||||
sudo pacman -Rcns "${packages_to_remove[@]}" "${@}" || exit $?
|
sudo pacman -Rcns "${packages_to_remove[@]}" "${@}" || exit $?
|
||||||
|
packages_removed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
readarray -t orphans < <(pacman -Qdtq)
|
||||||
|
|
||||||
|
if (( "${#orphans[@]}" > 0 )) ; then
|
||||||
|
echo "found the following orphaned packages:"
|
||||||
|
for pkg in "${orphans[@]}" ; do
|
||||||
|
echo "${pkg}"
|
||||||
|
done
|
||||||
|
sudo pacman -Rcns "${orphans[@]}" "${@}" || exit $?
|
||||||
|
packages_removed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( packages_removed)) ; then
|
||||||
exit 123
|
exit 123
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
156
user.yml
156
user.yml
@@ -270,117 +270,83 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user.name }}"
|
group: "{{ user.name }}"
|
||||||
|
|
||||||
- name: Vim
|
|
||||||
tags:
|
|
||||||
- user:vim
|
|
||||||
block:
|
|
||||||
- name: Install vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugInstall +qall
|
|
||||||
register: vim_plugin_install
|
|
||||||
changed_when: vim_plugin_install.stderr != ""
|
|
||||||
|
|
||||||
- name: Update vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugUpdate +qall
|
|
||||||
register: vim_plugin_update
|
|
||||||
changed_when: vim_plugin_update.stderr != ""
|
|
||||||
|
|
||||||
- name: Firefox
|
- name: Firefox
|
||||||
tags:
|
tags:
|
||||||
- user:firefox
|
- user:firefox
|
||||||
block:
|
block:
|
||||||
- name: Create firefox directories
|
- name: Create firefox base directories
|
||||||
firefox_profile:
|
|
||||||
name: "{{ item.key }}"
|
|
||||||
loop: "{{ user.firefox_profiles | dict2items }}"
|
|
||||||
check_mode: false
|
|
||||||
register: firefox_profile_names
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
firefox_preferences:
|
|
||||||
browser.aboutConfig.showWarning: false
|
|
||||||
extensions.pocket.enabled: false
|
|
||||||
toolkit.legacyUserProfileCustomizations.stylesheets: true
|
|
||||||
browser.contentblocking.category: "strict"
|
|
||||||
browser.newtabpage.enabled: false
|
|
||||||
browser.startup.homepage: "about:blank"
|
|
||||||
privacy.trackingprotection.enabled: true
|
|
||||||
privacy.trackingprotection.socialtracking.enabled: true
|
|
||||||
general.smoothScroll: true
|
|
||||||
|
|
||||||
# Restore last session on startup
|
|
||||||
# https://support.mozilla.org/de/questions/1235263
|
|
||||||
browser.startup.page: 3
|
|
||||||
# reload the tabs properly when restoring
|
|
||||||
browser.sessionstore.restore_on_demand: false
|
|
||||||
|
|
||||||
# "Play DRM-controlled content"
|
|
||||||
media.eme.enabled: true
|
|
||||||
|
|
||||||
# "Recommend (extensions|features) as you browse"
|
|
||||||
browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons: false
|
|
||||||
browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features: false
|
|
||||||
|
|
||||||
# "Ask to save logins and passwords for websites"
|
|
||||||
signon.rememberSignons: false
|
|
||||||
|
|
||||||
# "Allow Firefox to make personalized extension recommendations"
|
|
||||||
browser.discovery.enabled: false
|
|
||||||
|
|
||||||
# "Allow Firefox to install and run studies"
|
|
||||||
app.shield.optoutstudies.enabled: false
|
|
||||||
|
|
||||||
# "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
|
|
||||||
|
|
||||||
# remove ad tracking garbage
|
|
||||||
dom.private-attribution.submission.enabled: false
|
|
||||||
|
|
||||||
- ansible.builtin.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 chrome directory
|
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.profile_path }}/chrome/"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
with_items: "{{ firefox_profile_names.results }}"
|
loop:
|
||||||
when: not ansible_check_mode
|
- "~/.mozilla/"
|
||||||
loop_control:
|
- "~/.mozilla/firefox/"
|
||||||
label: "{{ item.profile_path }}"
|
|
||||||
|
|
||||||
- name: Firefox - configure firefox custom css
|
- name: Create firefox profile directories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "~/.mozilla/firefox/profile-{{ item.key }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
loop: "{{ user.firefox_profiles | dict2items }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.key }}"
|
||||||
|
|
||||||
|
- name: Create chrome directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "~/.mozilla/firefox/profile-{{ item.key }}/chrome/"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
loop: "{{ user.firefox_profiles | dict2items }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.key }}"
|
||||||
|
|
||||||
|
- name: Configure firefox custom css
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ item.profile_path }}/chrome/userChrome.css"
|
dest: "~/.mozilla/firefox/profile-{{ item.key }}/chrome/userChrome.css"
|
||||||
|
# from https://www.kvakil.me/posts/2023-09-12-my-tree-style-tab-configuration.html
|
||||||
content: |
|
content: |
|
||||||
#TabsToolbar {
|
// Hide the title bar.
|
||||||
visibility: collapse !important;
|
|
||||||
}
|
|
||||||
#titlebar {
|
#titlebar {
|
||||||
|
appearance: none !important;
|
||||||
|
height: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#titlebar > #toolbar-menubar {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hide regular tab toolbar.
|
||||||
|
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
||||||
visibility: collapse !important;
|
visibility: collapse !important;
|
||||||
}
|
}
|
||||||
#sidebar-header {
|
|
||||||
visibility: collapse !important;
|
// Hide the side toolbar noise.
|
||||||
|
#TabsToolbar {
|
||||||
|
min-width: 0 !important;
|
||||||
|
min-height: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#TabsToolbar > .titlebar-buttonbox-container {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
when:
|
when:
|
||||||
- not ansible_check_mode
|
- item.value.manage_css is sameas True
|
||||||
- user.firefox_profiles[item.profile_name].manage_css is sameas True
|
loop: "{{ user.firefox_profiles | dict2items }}"
|
||||||
with_items: "{{ firefox_profile_names.results }}"
|
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.profile_path }}"
|
label: "{{ item.key }}"
|
||||||
|
|
||||||
- name: Handle user units
|
- name: Handle user units
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
318
vim/vimrc
318
vim/vimrc
@@ -1,318 +0,0 @@
|
|||||||
set nocompatible
|
|
||||||
filetype off
|
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
|
||||||
|
|
||||||
" === plugins ===
|
|
||||||
|
|
||||||
function! Cond(Cond, ...)
|
|
||||||
let opts = get(a:000, 0, {})
|
|
||||||
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" 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'))
|
|
||||||
|
|
||||||
" ui
|
|
||||||
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" 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'))
|
|
||||||
|
|
||||||
" 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'))
|
|
||||||
|
|
||||||
"" markdown
|
|
||||||
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'dense-analysis/ale', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
|
||||||
|
|
||||||
|
|
||||||
call plug#end()
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
" == formatting ==
|
|
||||||
set tabstop=4
|
|
||||||
set smarttab
|
|
||||||
set softtabstop=4
|
|
||||||
set shiftround
|
|
||||||
set shiftwidth=4
|
|
||||||
set autoindent
|
|
||||||
set expandtab
|
|
||||||
set smartindent
|
|
||||||
set formatoptions=tcqjron
|
|
||||||
"set formatoptions=
|
|
||||||
|
|
||||||
" == ui ==
|
|
||||||
set cursorline
|
|
||||||
set showcmd
|
|
||||||
set number
|
|
||||||
set wildmode=list:longest
|
|
||||||
set lazyredraw
|
|
||||||
set wildmenu
|
|
||||||
set noshowmatch
|
|
||||||
set colorcolumn=80
|
|
||||||
set laststatus=2
|
|
||||||
set matchtime=5
|
|
||||||
set mouse=a
|
|
||||||
set mousehide
|
|
||||||
set noerrorbells
|
|
||||||
set noshowmode
|
|
||||||
set numberwidth=2
|
|
||||||
set relativenumber
|
|
||||||
set shortmess=rtiF
|
|
||||||
set ruler
|
|
||||||
set scrolloff=7
|
|
||||||
set title
|
|
||||||
set titlestring=""
|
|
||||||
set ttyfast
|
|
||||||
|
|
||||||
" == searching ==
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set gdefault
|
|
||||||
set ignorecase
|
|
||||||
set magic
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" == folding ==
|
|
||||||
set foldenable
|
|
||||||
set foldmethod=indent
|
|
||||||
set foldnestmax=2
|
|
||||||
set foldlevelstart=2
|
|
||||||
|
|
||||||
" == backups ==
|
|
||||||
set nobackup
|
|
||||||
set backupcopy=no
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" == swap ==
|
|
||||||
set swapfile
|
|
||||||
set updatecount=200
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
" == undo ==
|
|
||||||
set undolevels=1000
|
|
||||||
set undoreload=10000
|
|
||||||
set undodir=~/.vim/undo
|
|
||||||
set undofile
|
|
||||||
|
|
||||||
" == environment / directories ==
|
|
||||||
set autochdir
|
|
||||||
set directory=/var/tmp,/tmp
|
|
||||||
set viewdir=~/.vim/view
|
|
||||||
|
|
||||||
" == misc ==
|
|
||||||
set autoread
|
|
||||||
set confirm
|
|
||||||
set encoding=utf-8
|
|
||||||
set history=1000
|
|
||||||
set modeline
|
|
||||||
set modelines=5
|
|
||||||
set notildeop
|
|
||||||
set wildignore=*.swp,*.bak,*.pyc,*~,*.o
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" == editing ==
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
" set esckeys
|
|
||||||
set matchpairs=(:),{:},[:],<:>
|
|
||||||
set notimeout
|
|
||||||
set ttimeout
|
|
||||||
set timeoutlen=1000
|
|
||||||
set ttimeoutlen=0
|
|
||||||
set virtualedit=block
|
|
||||||
set whichwrap=b,s
|
|
||||||
|
|
||||||
" == line breaking ==
|
|
||||||
set linebreak
|
|
||||||
set wrap
|
|
||||||
set wrapscan
|
|
||||||
|
|
||||||
" == to use guicolors in terminal ==
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
" === keybinds ===
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
let maplocalleader = "ö"
|
|
||||||
let mapleader = "\<Space>"
|
|
||||||
" map <leader>w: w!<cr>
|
|
||||||
|
|
||||||
" nnoremap <leader>w :w<CR>
|
|
||||||
nmap <leader><leader> za
|
|
||||||
map , :
|
|
||||||
|
|
||||||
vnoremap <silent> y y`]
|
|
||||||
vnoremap <silent> p p`]
|
|
||||||
nnoremap <silent> p p`]
|
|
||||||
|
|
||||||
nnoremap <leader>, :nohlsearch<CR>
|
|
||||||
|
|
||||||
noremap gV `[v`]
|
|
||||||
|
|
||||||
map Y y$
|
|
||||||
map j gj
|
|
||||||
map k gk
|
|
||||||
|
|
||||||
|
|
||||||
map N Nzz
|
|
||||||
map n nzz
|
|
||||||
|
|
||||||
inoremap jj <ESC>
|
|
||||||
|
|
||||||
" no more ex mode
|
|
||||||
nnoremap Q <nop>
|
|
||||||
|
|
||||||
" 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 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
|
|
||||||
|
|
||||||
nmap <C-n> :bnext<CR>
|
|
||||||
nmap <C-p> :bprev<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>m :InstantMarkdownPreview<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>u :GundoToggle<CR>
|
|
||||||
nnoremap <leader>d :diffupdate<CR>
|
|
||||||
|
|
||||||
nmap <F9> :Goyo<CR>:TogglePencil<CR>
|
|
||||||
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:set colorcolumn=<CR>
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
highlight Comment guifg=#64d86b
|
|
||||||
highlight SpecialComment guifg=#64d86b
|
|
||||||
highlight Todo guibg=#a9ebad
|
|
||||||
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'wombat',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
|
||||||
\ 'right': [ [ 'gitbranch' ],
|
|
||||||
\ [ 'lineinfo' ],
|
|
||||||
\ [ 'percent' ],
|
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ],
|
|
||||||
\ [ 'directory' ] ],
|
|
||||||
\ },
|
|
||||||
\ 'component_function': {
|
|
||||||
\ 'gitbranch': 'fugitive#head',
|
|
||||||
\ 'directory': 'LightLineFilename',
|
|
||||||
\ },
|
|
||||||
\ 'component': {
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
|
||||||
function! LightLineFilename()
|
|
||||||
return fnamemodify(expand('%F'), ":~:h")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" == pencil ==
|
|
||||||
let g:pencil#textwidth = 80
|
|
||||||
let g:pencil#autoformat = 1
|
|
||||||
let g:pencil#wrapModeDefault = 'hard'
|
|
||||||
let g:pencil#map#suspend_af = 'K'
|
|
||||||
|
|
||||||
" == goyo ==
|
|
||||||
let g:goyo_width = 100
|
|
||||||
let g:goyo_height = "90%"
|
|
||||||
let g:goyo_linenr = 0
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter Limelight
|
|
||||||
autocmd! User GoyoLeave Limelight!
|
|
||||||
|
|
||||||
" == limelight ==
|
|
||||||
let g:limelight_default_coefficient = 0.5
|
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['rust-analyzer']}
|
|
||||||
|
|
||||||
" === functions ===
|
|
||||||
function! DeleteTrailingWS()
|
|
||||||
exe "normal mz"
|
|
||||||
%s/\s\+$//e
|
|
||||||
exe "normal `z"
|
|
||||||
endfunction
|
|
||||||
autocmd BufWritePre * :call DeleteTrailingWS()
|
|
||||||
|
|
||||||
autocmd FileType yaml set shiftwidth=2
|
|
||||||
autocmd FileType toml set shiftwidth=2
|
|
||||||
autocmd FileType html setl shiftwidth=2
|
|
||||||
|
|
||||||
let g:instant_markdown_autostart = 0
|
|
||||||
|
|
||||||
let g:terraform_align = 1
|
|
||||||
let g:terraform_fmt_on_save=1
|
|
||||||
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
||||||
\ CheckBackspace() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
||||||
|
|
||||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
|
||||||
" <C-g>u breaks current undo, please make your own choice.
|
|
||||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
||||||
|
|
||||||
function! CheckBackspace() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Use <c-space> to trigger completion.
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
" https://stackoverflow.com/a/8585343
|
|
||||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
|
||||||
|
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
|
||||||
nmap <silent> gy <Plug>(coc-type-definition)
|
|
||||||
nmap <silent> gi <Plug>(coc-implementation)
|
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
|
||||||
endif
|
|
||||||
@@ -8,7 +8,7 @@ export PATH="${HOME}/bin:${PATH}"
|
|||||||
|
|
||||||
export EDITOR="helix"
|
export EDITOR="helix"
|
||||||
export VISUAL="helix"
|
export VISUAL="helix"
|
||||||
export BROWSER="firefox"
|
export BROWSER="firefox-default"
|
||||||
|
|
||||||
export PAGER="less"
|
export PAGER="less"
|
||||||
export LESS="FRX"
|
export LESS="FRX"
|
||||||
|
|||||||
@@ -333,12 +333,7 @@ embiggen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
journal() {
|
journal() {
|
||||||
journaldir=~/sync/journal/
|
$EDITOR ~/sync/journal/"$(date +%Y-%m-%d).md"
|
||||||
file="$journaldir/$(date +%Y-%m-%d).md"
|
|
||||||
if [[ ! -e $file ]] ; then
|
|
||||||
cp $journaldir/template.md $file || return
|
|
||||||
fi
|
|
||||||
$EDITOR $file
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix() {
|
prefix() {
|
||||||
|
|||||||
Reference in New Issue
Block a user