From 6be02320353a06667a8f847f627d9dce6d2d618c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 14 Apr 2019 11:54:29 +0200 Subject: [PATCH] Update --- Makefile | 2 +- autostart/20_gpg_agent.sh | 4 ++++ autostart/20_screen.sh | 11 +++++++++++ autostart/50_nextcloud.sh | 4 ++++ dotfiles.yml | 1 + gnupg/gpg-agent.conf | 4 ++-- i3/i3status.conf.j2 | 2 +- packages.yml | 3 +++ playbook.yml | 6 ++++-- requirements.txt | 2 +- vim/vimrc | 4 ++++ x/Xresources.j2 | 7 ++++++- zsh/zshrc.d/20_aliases.sh | 2 ++ zsh/zshrc.d/40_functions.sh | 4 ++++ 14 files changed, 48 insertions(+), 8 deletions(-) create mode 100755 autostart/20_gpg_agent.sh create mode 100755 autostart/20_screen.sh create mode 100755 autostart/50_nextcloud.sh diff --git a/Makefile b/Makefile index 36f9a38..59f604e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ clean: $(ansible): venv venv: - command -v virtualenv || sudo dnf install -y python2-virtualenv || sudo apt-get -y install virtualenv + command -v virtualenv || sudo dnf install -y python3-virtualenv || sudo apt-get -y install virtualenv virtualenv --no-site-packages --python=python2 $(venv) $(activate) && $(pip) install -r $(requirements) diff --git a/autostart/20_gpg_agent.sh b/autostart/20_gpg_agent.sh new file mode 100755 index 0000000..566215b --- /dev/null +++ b/autostart/20_gpg_agent.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +printf '%s' "starting gpg-agent" +systemd-run -r --user --setenv=DISPLAY=${DISPLAY} gpg-agent --homedir "$HOME/.gnupg" --no-detach --daemon diff --git a/autostart/20_screen.sh b/autostart/20_screen.sh new file mode 100755 index 0000000..25b0297 --- /dev/null +++ b/autostart/20_screen.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +printf '%s\n' "start compton" +systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} compton --backend glx --vsync opengl & + +printf '%s\n' "disable screen blanking" +xset -dpms & +xset s off & + +printf '%s\n' "disable wakeup when lid switched" +grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup diff --git a/autostart/50_nextcloud.sh b/autostart/50_nextcloud.sh new file mode 100755 index 0000000..5c71154 --- /dev/null +++ b/autostart/50_nextcloud.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +printf '%s' "starting nextcloud" +systemd-run --user --setenv=DISPLAY=${DISPLAY} nextcloud diff --git a/dotfiles.yml b/dotfiles.yml index c759ea8..e92cba5 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -1,5 +1,6 @@ empty_directories: - .i3 + - .gnupg dotfiles: - from: autostart.sh to: .autostart.sh diff --git a/gnupg/gpg-agent.conf b/gnupg/gpg-agent.conf index fe234c9..a1fa69b 100644 --- a/gnupg/gpg-agent.conf +++ b/gnupg/gpg-agent.conf @@ -1,5 +1,5 @@ -default-cache-ttl 86400 -default-cache-ttl-ssh 86400 +default-cache-ttl 60480000 +default-cache-ttl-ssh 60480000 max-cache-ttl 34560000 max-cache-ttl-ssh 34560000 diff --git a/i3/i3status.conf.j2 b/i3/i3status.conf.j2 index 873bc5a..3e93158 100644 --- a/i3/i3status.conf.j2 +++ b/i3/i3status.conf.j2 @@ -40,7 +40,7 @@ battery_level all { } clock { - format = ["{Europe/Berlin}", "{NZ}", "{Cuba}" ] + format = ["{DE}", "{NZ}", "{Cuba}", "{MX}" ] format_time = "  {name} \[KW %V\] %a %d.%m.%Y %H:%M:%S " } diff --git a/packages.yml b/packages.yml index 93a4a28..6a0e561 100644 --- a/packages.yml +++ b/packages.yml @@ -292,3 +292,6 @@ packages: rclone: fedora: ["rclone"] ubuntu: ["rclone"] + dnf: + fedora: ["python3-dnf"] + ubuntu: [] diff --git a/playbook.yml b/playbook.yml index c63a68f..90443de 100644 --- a/playbook.yml +++ b/playbook.yml @@ -33,9 +33,11 @@ become: true - name: install selinux specials on fedora - package: + dnf: state: installed - name: libselinux-python + name: + - python2-libselinux + - policycoreutils-python become: true when: distro == 'fedora' diff --git a/requirements.txt b/requirements.txt index 5f54cfc..affb167 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ansible==2.6.3 +ansible==2.7.5 asn1crypto==0.24.0 bcrypt==3.1.4 cffi==1.11.5 diff --git a/vim/vimrc b/vim/vimrc index 160a722..fb6bbc5 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -306,3 +306,7 @@ let g:terraform_align = 1 if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif endif + +let g:ycm_server_python_interpreter = "python2" + +au FileType html setl shiftwidth=2 diff --git a/x/Xresources.j2 b/x/Xresources.j2 index cd42b39..a7221f9 100644 --- a/x/Xresources.j2 +++ b/x/Xresources.j2 @@ -5,11 +5,16 @@ URxvt.scrollBar: false URxvt.font: xft:Inconsolata:size={{ machine.font_size }} URxvt.letterSpace: {{ machine.letter_space }} -URxvt.perl-ext: default,matcher,selection-to-clipboard,font-size,resize-font +URxvt.perl-ext-common: default,matcher,selection-to-clipboard,resize-font,selection-to-clipboard URxvt.url-launcher: /usr/bin/xdg-open URxvt.matcher.button: 1 URxvt.saveLines: 10000 +URxvt.keysym.C-udiaeresis: perl:matcher:last +URxvt.keysym.C-adiaeresis: perl:matcher:list + +URxvt.matcher.rend.0: Uline Bold fg5 + URxvt.internalBorder: 3 URxvt.externalBorder: 0 diff --git a/zsh/zshrc.d/20_aliases.sh b/zsh/zshrc.d/20_aliases.sh index 8c811dc..a4b39eb 100644 --- a/zsh/zshrc.d/20_aliases.sh +++ b/zsh/zshrc.d/20_aliases.sh @@ -85,6 +85,8 @@ alias newpw="pwgen --secure 25 1" alias sys="systemctl" alias sysu="systemctl --user" +alias gpg=gpg2 + gitmaster() { git stash push -m gitmaster-$(date -uIseconds) -u || return 1 _branch=$(git rev-parse --abbrev-ref HEAD) diff --git a/zsh/zshrc.d/40_functions.sh b/zsh/zshrc.d/40_functions.sh index b5bab14..6b43e93 100644 --- a/zsh/zshrc.d/40_functions.sh +++ b/zsh/zshrc.d/40_functions.sh @@ -202,3 +202,7 @@ prefix() { file=$1 mv $file ${prefix}${file} } + +tmp() { + cd "$(mktemp -d)" +}