From be9c472b7c61cf60d30736f12a8690531be353c8 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 20 Jul 2022 23:43:04 -0400 Subject: [PATCH] ENH use templates for conky config --- .chezmoi.yaml.tmpl | 1 + .chezmoiignore | 4 + VirtualBox.xml => .symlinks/VirtualBox.xml | 0 .symlinks/conky-configs/conky-laptop.yml | 114 ++++++++++++++++++ .symlinks/conky-configs/conky-workstation.yml | 114 ++++++++++++++++++ .../VirtualBox/symlink_VirtualBox.xml.tmpl | 2 +- dot_config/symlink_conky.yml.tmpl | 1 + 7 files changed, 235 insertions(+), 1 deletion(-) rename VirtualBox.xml => .symlinks/VirtualBox.xml (100%) create mode 100644 .symlinks/conky-configs/conky-laptop.yml create mode 100644 .symlinks/conky-configs/conky-workstation.yml create mode 100644 dot_config/symlink_conky.yml.tmpl diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index 4d973d5..e6a33cb 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -22,6 +22,7 @@ data: xsane: {{ and $desktop (promptBool "xsane" false) }} f5vpn: {{ and $desktop (promptBool "f5vpn" false) }} seafile: {{ and $desktop (promptBool "seafile" false) }} + conky_alias: {{ and $desktop (promptString "conky" "null") }} development: {{- /* emacs implies that most development options are true */}} diff --git a/.chezmoiignore b/.chezmoiignore index 9e03d0c..383327b 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -12,5 +12,9 @@ .local {{- end }} +{{- if not .features.conky_alias }} +.config/conky.yml +{{- end }} + # this is linked; allow VirtualBox to configure by itself VirtualBox.xml diff --git a/VirtualBox.xml b/.symlinks/VirtualBox.xml similarity index 100% rename from VirtualBox.xml rename to .symlinks/VirtualBox.xml diff --git a/.symlinks/conky-configs/conky-laptop.yml b/.symlinks/conky-configs/conky-laptop.yml new file mode 100644 index 0000000..9a612e0 --- /dev/null +++ b/.symlinks/conky-configs/conky-laptop.yml @@ -0,0 +1,114 @@ +bootstrap: + update_interval: 1 + dimensions: [1920, 1080] +modules: + filesystem: + show_smart: true + fs_paths: + - {path: /, name: root} + - {path: /boot, name: boot} + - {path: /home, name: home} + - {path: /mnt/data, name: data} + - {path: /mnt/dcache, name: dcache} + - {path: /tmp, name: tmpfs} + graphics: + dev_power: /sys/bus/pci/devices/0000:01:00.0/power/control + show_temp: true + show_clock: true + show_gpu_util: true + show_mem_util: true + show_vid_util: true + memory: + show_stats: true + show_swap: true + show_plot: true + table_rows: 5 + power: + battery: BAT0 + rapl_specs: + - {name: PKG0, address: intel-rapl:0} + - {name: DRAM, address: intel-rapl:0:2} + processor: + core_rows: 1 + core_padding: 0 + show_stats: true + show_plot: true + table_rows: 5 + readwrite: + devices: [sda, nvme0n1] + +layout: + anchor: [12, 11] + panels: + - columns: + - {blocks: [system, 19, graphics, 16, processor], width: 436} + margins: [20, 10] + - 10 + - columns: + - {blocks: [readwrite], width: 436} + - 20 + - {blocks: [network], width: 436} + margins: [20, 10] + - 10 + - columns: + - {blocks: [pacman, 24, filesystem, 23, power, 19, memory], width: 436} + margins: [20, 10] + +theme: + font: + family: Neuropolitical + sizes: + normal: 13 + plot_label: 8 + table: 11 + header: 15 + geometry: + plot: + seconds: 90 + ticks: [9, 4] + table: + name_chars: 8 + padding: [6, 15] + header_padding: 20 + row_spacing: 13 + header: + underline_offset: 26 + padding: 19 + patterns: + header: 0xefefef + panel: + bg: {color: 0x121212, alpha: 0.7} + text: + active: 0xbfe1ff + inactive: 0xc8c8c8 + critical: 0xff8282 + border: 0x888888 + plot: + grid: 0x666666 + outline: 0x777777 + data: + border: + gradient: + - {stop: 0, color: 0x003f7c} + - {stop: 1, color: 0x1e90ff} + fill: + gradient_alpha: + - {stop: 0.2, color: 0x316ece, alpha: 0.5} + - {stop: 1, color: 0x8cc7ff, alpha: 1.0} + indicator: + bg: + gradient: + - {stop: 0, color: 0x565656} + - {stop: 0.5, color: 0xbfbfbf} + - {stop: 1, color: 0x565656} + fg: + active: + gradient: + - {stop: 0, color: 0x316BA6} + - {stop: 0.5, color: 0x99CEFF} + - {stop: 1, color: 0x316BA6} + critical: + gradient: + - {stop: 0, color: 0xFF3333} + - {stop: 0.5, color: 0xFFB8B8} + - {stop: 1, color: 0xFF3333} diff --git a/.symlinks/conky-configs/conky-workstation.yml b/.symlinks/conky-configs/conky-workstation.yml new file mode 100644 index 0000000..9a612e0 --- /dev/null +++ b/.symlinks/conky-configs/conky-workstation.yml @@ -0,0 +1,114 @@ +bootstrap: + update_interval: 1 + dimensions: [1920, 1080] +modules: + filesystem: + show_smart: true + fs_paths: + - {path: /, name: root} + - {path: /boot, name: boot} + - {path: /home, name: home} + - {path: /mnt/data, name: data} + - {path: /mnt/dcache, name: dcache} + - {path: /tmp, name: tmpfs} + graphics: + dev_power: /sys/bus/pci/devices/0000:01:00.0/power/control + show_temp: true + show_clock: true + show_gpu_util: true + show_mem_util: true + show_vid_util: true + memory: + show_stats: true + show_swap: true + show_plot: true + table_rows: 5 + power: + battery: BAT0 + rapl_specs: + - {name: PKG0, address: intel-rapl:0} + - {name: DRAM, address: intel-rapl:0:2} + processor: + core_rows: 1 + core_padding: 0 + show_stats: true + show_plot: true + table_rows: 5 + readwrite: + devices: [sda, nvme0n1] + +layout: + anchor: [12, 11] + panels: + - columns: + - {blocks: [system, 19, graphics, 16, processor], width: 436} + margins: [20, 10] + - 10 + - columns: + - {blocks: [readwrite], width: 436} + - 20 + - {blocks: [network], width: 436} + margins: [20, 10] + - 10 + - columns: + - {blocks: [pacman, 24, filesystem, 23, power, 19, memory], width: 436} + margins: [20, 10] + +theme: + font: + family: Neuropolitical + sizes: + normal: 13 + plot_label: 8 + table: 11 + header: 15 + geometry: + plot: + seconds: 90 + ticks: [9, 4] + table: + name_chars: 8 + padding: [6, 15] + header_padding: 20 + row_spacing: 13 + header: + underline_offset: 26 + padding: 19 + patterns: + header: 0xefefef + panel: + bg: {color: 0x121212, alpha: 0.7} + text: + active: 0xbfe1ff + inactive: 0xc8c8c8 + critical: 0xff8282 + border: 0x888888 + plot: + grid: 0x666666 + outline: 0x777777 + data: + border: + gradient: + - {stop: 0, color: 0x003f7c} + - {stop: 1, color: 0x1e90ff} + fill: + gradient_alpha: + - {stop: 0.2, color: 0x316ece, alpha: 0.5} + - {stop: 1, color: 0x8cc7ff, alpha: 1.0} + indicator: + bg: + gradient: + - {stop: 0, color: 0x565656} + - {stop: 0.5, color: 0xbfbfbf} + - {stop: 1, color: 0x565656} + fg: + active: + gradient: + - {stop: 0, color: 0x316BA6} + - {stop: 0.5, color: 0x99CEFF} + - {stop: 1, color: 0x316BA6} + critical: + gradient: + - {stop: 0, color: 0xFF3333} + - {stop: 0.5, color: 0xFFB8B8} + - {stop: 1, color: 0xFF3333} diff --git a/dot_config/VirtualBox/symlink_VirtualBox.xml.tmpl b/dot_config/VirtualBox/symlink_VirtualBox.xml.tmpl index a956ff2..58a6ce8 100644 --- a/dot_config/VirtualBox/symlink_VirtualBox.xml.tmpl +++ b/dot_config/VirtualBox/symlink_VirtualBox.xml.tmpl @@ -1 +1 @@ -{{ .chezmoi.sourceDir }}/VirtualBox.xml \ No newline at end of file +{{ .chezmoi.sourceDir }}/.symlinks/VirtualBox.xml \ No newline at end of file diff --git a/dot_config/symlink_conky.yml.tmpl b/dot_config/symlink_conky.yml.tmpl new file mode 100644 index 0000000..5a94269 --- /dev/null +++ b/dot_config/symlink_conky.yml.tmpl @@ -0,0 +1 @@ +{{ .chezmoi.sourceDir }}/.symlinks/conky-configs/conky-{{ .features.conky_alias }}.yml \ No newline at end of file