Compare commits

..

22 Commits

Author SHA1 Message Date
5c3cf1b887 Disable restic on private account on tb-hak 2021-01-30 21:28:18 +01:00
a0968ba34a x: Import the environment on startup
This is required to set the DISPLAY variable correctly.
2021-01-30 21:25:28 +01:00
71a0886d46 autostart: Update "Type" of i3 service
"exec" is not available on Ubuntu 18.04, and it does not help to resolve
the ordering problem anyway.
2021-01-30 21:23:52 +01:00
Hannes Körber
83c9d72afe Make gpg ssh support configurable 2021-01-30 21:06:53 +01:00
Hannes Körber
39b45df38e autostart: Remove hardcoded DISPLAY 2021-01-30 21:06:53 +01:00
Hannes Körber
55477c5919 Install pydbus on ubuntu 2021-01-30 21:06:53 +01:00
Hannes Körber
fd2a274668 Add workaround for old ubuntu systemd 2021-01-30 21:06:53 +01:00
Hannes Körber
613f249f64 Remove old screencfg config 2021-01-27 16:45:33 +01:00
Hannes Körber
9ac25a152d i3: Add shortcuts for screenconfigs 2021-01-27 16:45:33 +01:00
Hannes Körber
735568adfa Update screenconfigs 2021-01-27 16:45:33 +01:00
Hannes Körber
5a803a578b screencfg: Support additional --set parameters 2021-01-27 16:45:33 +01:00
Hannes Körber
818ac7ef8c screencfg: Use yaml.safe_load() 2021-01-27 15:50:57 +01:00
Hannes Körber
c22d769ab5 zsh: Do not export TERMBIN, not needed 2021-01-27 15:18:57 +01:00
Hannes Körber
96765dbf76 tmux: Use generic default-terminal 2021-01-27 15:18:41 +01:00
Hannes Körber
6f2e7d20b4 qt: Remove unneeded options 2021-01-27 15:18:32 +01:00
Hannes Körber
b742d63193 ubuntu: Add more theming packages 2021-01-27 15:18:24 +01:00
Hannes Körber
d78ba65063 tb-hak: Switch to alacritty 2021-01-27 15:18:16 +01:00
Hannes Körber
7231b614fa gtk: Use font_size 2021-01-27 15:18:03 +01:00
Hannes Körber
f174a4e558 Make autostart ubuntu-compatible 2021-01-27 15:17:45 +01:00
Hannes Körber
8c18407688 restic: Do backups only once per day 2021-01-27 15:16:32 +01:00
Hannes Körber
a396c0c739 Fix failure during check run 2021-01-27 14:21:58 +01:00
Hannes Körber
d6ecdeb796 Add more packages for ubuntu 2021-01-22 08:43:29 +01:00
42 changed files with 153 additions and 75 deletions

View File

@@ -13,6 +13,7 @@ users:
mail: hannes@hkoerber.de
git_gpg_sign: false
gpg_agent: true
gpg_agent_for_ssh: true
gpg_keys:
master_key: "0xB5C002530C6A2053"
environment:
@@ -30,6 +31,8 @@ screen:
9: DisplayPort-0
0: DisplayPort-0
screencfgs: []
workspace:
environment:
@@ -39,6 +42,5 @@ environment:
MACHINE_HAS_STEAM: "true"
MACHINE_HAS_DISCORD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
MACHINE_DEFAULT_SCREENPROFILE: "ares"
MACHINE_RESOLUTION_X: "2560"
MACHINE_RESOLUTION_Y: "1440"

View File

@@ -1,6 +1,6 @@
font_size: 11
letter_space: 0
terminal_binary: urxvt
terminal_binary: alacritty
users:
- name: hannes-work
@@ -12,18 +12,22 @@ users:
mail: hannes.koerber@tradebyte.com
git_gpg_sign: false
gpg_agent: false
gpg_agent_for_ssh: false
environment:
MACHINE_HAS_NEXTCLOUD: "false"
MACHINE_HAS_RESTIC_BACKUP: "true"
- name: hannes-private
group: tpp
vt: 2
mail: hannes@hkoerber.de
git_gpg_sign: false
gpg_agent: true
gpg_agent_for_ssh: true
gpg_keys:
master_key: "0xB5C002530C6A2053"
environment:
MACHINE_HAS_NEXTCLOUD: "true"
MACHINE_HAS_RESTIC_BACKUP: "false"
screen:
1: DP-1-1
@@ -47,9 +51,12 @@ workspace:
9: music
10: pim
screencfgs:
- name: three-screens
key: F3
environment:
MACHINE_TYPE: "laptop"
MACHINE_HAS_KEEPASSX: "true"
MACHINE_HAS_RESTIC_BACKUP: "true"
MACHINE_RESOLUTION_X: "1920"
MACHINE_RESOLUTION_Y: "1080"

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/blueman-applet
ExecStart=/usr/bin/env blueman-applet
PassEnvironment=DISPLAY

View File

@@ -2,7 +2,8 @@
BindsTo=autostart.target
After=windowmanager.target
ConditionEnvironment=MACHINE_HAS_DISCORD=true
ConditionPathExists=%h/.var/run/features/discord
[Service]
ExecStart=/usr/bin/discord
ExecStart=/usr/bin/env discord
PassEnvironment=DISPLAY

View File

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

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/dunst -config %h/.config/dunstrc
ExecStart=/usr/bin/env dunst -config %h/.config/dunstrc
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/firefox --setDefaultBrowser -P default
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P default
PassEnvironment=DISPLAY

View File

@@ -4,3 +4,4 @@ After=windowmanager.target
[Service]
ExecStart=/usr/bin/env gnome-keyring-daemon --start --foreground --components secrets
PassEnvironment=DISPLAY

View File

@@ -4,4 +4,5 @@ After=windowmanager.target
[Service]
Type=forking
ExecStart=/usr/bin/gpg-agent --homedir %h/.gnupg --no-detach --daemon
ExecStart=/usr/bin/env gpg-agent --homedir %h/.gnupg --no-detach --daemon
PassEnvironment=DISPLAY

View File

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

View File

@@ -1,7 +1,8 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionEnvironment=MACHINE_HAS_KEEPASSX=true
ConditionPathExists=%h/.var/run/features/keepassx
[Service]
ExecStart=/usr/bin/keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
PassEnvironment=DISPLAY

View File

@@ -4,6 +4,7 @@ After=windowmanager.target
[Service]
Type=oneshot
ExecStart=/usr/bin/setxkbmap -layout de -variant nodeadkeys
ExecStart=/usr/bin/xset r rate 150 50
ExecStart=/usr/bin/env setxkbmap -layout de -variant nodeadkeys
ExecStart=/usr/bin/env xset r rate 150 50
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

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

View File

@@ -3,7 +3,8 @@ BindsTo=autostart.target
After=windowmanager.target
After=gnome-keyring.service
ConditionEnvironment=MACHINE_HAS_NEXTCLOUD=true
ConditionPathExists=%h/.var/run/features/nextcloud
[Service]
ExecStart=/usr/bin/nextcloud --background
ExecStart=/usr/bin/env nextcloud --background
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/nm-applet
ExecStart=/usr/bin/env nm-applet
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/pasystray
ExecStart=/usr/bin/env pasystray
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/redshift-gtk -c %h/.config/redshift.conf
ExecStart=/usr/bin/env redshift-gtk -c %h/.config/redshift.conf
PassEnvironment=DISPLAY

View File

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

View File

@@ -3,6 +3,4 @@ BindsTo=autostart.target
After=windowmanager.target
[Timer]
OnCalendar=Mon..Fri 09:00:00
OnCalendar=Mon..Fri 12:00:00
OnCalendar=Mon..Fri 16:00:00

View File

@@ -1,7 +1,6 @@
[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionEnvironment=MACHINE_DEFAULT_SCREENPROFILE
[Service]
Type=oneshot
@@ -9,5 +8,6 @@ Type=oneshot
# > The command to execute may contain spaces, but control characters are not
# > allowed.
ExecStart=bash -c '%h/.screencfg/${MACHINE_DEFAULT_SCREENPROFILE}.sh'
ExecStart=/usr/bin/env screencfg "%h/.screencfg/%H/default.yml"
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/spotify
ExecStart=/usr/bin/env spotify
PassEnvironment=DISPLAY

View File

@@ -3,7 +3,8 @@ BindsTo=autostart.target
After=windowmanager.target
After=i3.service
ConditionEnvironment=MACHINE_HAS_STEAM=true
ConditionPathExists=%h/.var/run/features/steam
[Service]
ExecStart=/usr/bin/steam
ExecStart=/usr/bin/env steam
PassEnvironment=DISPLAY

View File

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

View File

@@ -1,4 +1,5 @@
[Service]
Type=oneshot
ExecStart=/usr/bin/setrandom --recursive --onlylarge --mode=stretch /usr/share/wallpapers
ExecStart=/usr/bin/env setrandom --recursive --onlylarge --mode=stretch /usr/share/wallpapers
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -4,5 +4,6 @@ After=windowmanager.target
[Service]
Type=oneshot
ExecStart=/usr/bin/xrdb -merge -I%h %h/.Xresources
ExecStart=/usr/bin/env xrdb -merge -I%h %h/.Xresources
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -3,4 +3,5 @@ BindsTo=autostart.target
After=windowmanager.target
[Service]
ExecStart=/usr/bin/yubikey-touch-detector -libnotify
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
PassEnvironment=DISPLAY

View File

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

View File

@@ -14,6 +14,7 @@ dotfiles:
to: .gnupg/dirmngr.conf
- from: gnupg/gpg-agent.conf
to: .gnupg/gpg-agent.conf
template: true
- from: gnupg/gpg.conf
to: .gnupg/gpg.conf
template: true
@@ -60,8 +61,10 @@ dotfiles:
to: .config/rofi/config
- from: gtk/gtk-3.0.ini
to: .config/gtk-3.0/settings.ini
template: true
- from: gtk/gtkrc-2.0
to: .gtkrc-2.0
template: true
- from: qt/qt5ct.conf
to: .config/qt5ct/qt5ct.conf
- from: screencfg

View File

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

View File

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

View File

@@ -1,10 +1,9 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/hannes/.gtkrc-2.0.mine"
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze-dark"
gtk-font-name="Cantarell 11"
gtk-font-name="DejaVu Sans {{ machine.font_size|int - 1 }}"
gtk-cursor-theme-name="breeze_cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH

View File

@@ -212,8 +212,10 @@ assign [class="^Wine$"] $workspace10
bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu
bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/all.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F3 exec --no-startup-id screencfg ~/.screencfg/laptop.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/default.yml ; exec systemctl --user restart keyboard.service
{% for screencfg in machine.screencfgs -%}
bindsym $mod+{{ screencfg.key }} exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/{{ screencfg.name }}.yml ; exec systemctl --user restart keyboard.service
{% endfor -%}
bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend
bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu

View File

@@ -163,7 +163,7 @@ packages:
archlinux: ["pinta"]
py3status:
fedora: ["py3status", "python3-pytz", "python3-tzlocal"]
ubuntu: ["py3status", "python3-arrow", "python3-tzlocal"]
ubuntu: ["py3status", "python3-arrow", "python3-tzlocal", "python3-pydbus"]
archlinux: ["py3status", "python-pytz", "python-tzlocal", "python-dbus", "python-pydbus"]
pass:
fedora: ["pass"]
@@ -231,11 +231,11 @@ packages:
archlinux: ["libreoffice-fresh", "libreoffice-fresh-de"]
qt-theming:
fedora: ["breeze-cursor-theme", "breeze-icon-theme"]
ubuntu: ["breeze-cursor-theme", "breeze-icon-theme", "breeze"]
ubuntu: ["breeze-cursor-theme", "breeze-icon-theme", "breeze", "qt5ct"]
archlinux: ["breeze", "breeze-icons", "breeze-grub", "qt5ct"]
gtk-theming:
fedora: ["breeze-gtk"]
ubuntu: ["gtk3-engines-breeze"]
ubuntu: ["gtk3-engines-breeze", "lxappearance"]
archlinux: ["breeze-gtk", "lxappearance"]
xcompmgr:
fedora: ["xcompmgr"]
@@ -487,19 +487,19 @@ packages:
archlinux: ["stress"]
mpris:
fedora: []
ubuntu: []
ubuntu: ["stress"]
archlinux: ["playerctl"]
imagemagick:
fedora: []
ubuntu: []
ubuntu: ["imagemagick"]
archlinux: ["imagemagick"]
mpv:
fedora: []
ubuntu: []
ubuntu: ["mpv"]
archlinux: ["mpv"]
gnome-keyring:
fedora: []
ubuntu: []
ubuntu: ["gnome-keyring"]
archlinux: ["gnome-keyring"]
remove:

View File

@@ -1,14 +1,9 @@
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=breeze
standard_dialogs=default
style=Fusion
[Fonts]
fixed=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
@@ -23,6 +18,3 @@ stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x16\0\0\t\xff\0\0\x5\x88\0\0\0\0\0\0\0\x16\0\0\t\xff\0\0\x5\x88\0\0\0\0\0\0\0\0\n\0\0\0\0\0\0\0\0\x16\0\0\t\xff\0\0\x5\x88)

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
set -o xtrace
xrandr --output DisplayPort-0 --mode 2560x1440 --primary --rate 144.00 --set TearFree on

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
set -g default-command "${SHELL}"
set -g default-terminal "${TERMBIN}"
set -g default-terminal "xterm-256color"
set -g set-titles on
set -g set-titles-string '#S'

View File

@@ -392,7 +392,9 @@
checksum: true
delete: true
when: not stat_portfolio_performance_installation.stat.exists
when:
- not stat_portfolio_performance_installation.stat.exists
- not ansible_check_mode
- name: link portfolio performance
file:

View File

@@ -20,6 +20,7 @@ fi
start_wm() {
log "starting i3"
systemctl --user import-environment
systemctl --user start windowmanager.target
sleep 1
systemctl --user start autostart.target

View File

@@ -19,7 +19,6 @@ export PATH
export EDITOR="nvim"
export VISUAL="nvim"
export BROWSER="firefox"
export TERMBIN="{{ machine.terminal_binary }}"
export PAGER="less"
export LESS="FRX"
@@ -55,6 +54,18 @@ umask 0022
export {{ k }}="{{ v }}"
{% endfor %}
export FEATURE_DIR="${RUNDIR}/features/"
rm -rf "${FEATURE_DIR}"/
mkdir -p "${FEATURE_DIR}"
[[ $MACHINE_HAS_NEXTCLOUD == "true" ]] && touch "${FEATURE_DIR}"/nextcloud
[[ $MACHINE_HAS_KEEPASSX == "true" ]] && touch "${FEATURE_DIR}"/keepassx
[[ $MACHINE_HAS_STEAM == "true" ]] && touch "${FEATURE_DIR}"/steam
[[ $MACHINE_HAS_DISCORD == "true" ]] && touch "${FEATURE_DIR}"/discord
[[ $MACHINE_HAS_RESTIC_BACKUP == "true" ]] && touch "${FEATURE_DIR}"/restic_backup
[[ $MACHINE_TYPE == "laptop" ]] && touch "${FEATURE_DIR}"/matchine_is_laptop
# Make all environment variables also usable in the systemd user instancee
systemctl --user import-environment