diff --git a/.gitignore b/.gitignore index 7ec83c6..8f3b629 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .gitsecret/keys/random_seed !*.secret -homeassistant/SERVICE_ACCOUNT.JSON -vdirsyncer/config +CONFIG/homeassistant/SERVICE_ACCOUNT.JSON +CONFIG/vdirsyncer/config diff --git a/.gitsecret/paths/mapping.cfg b/.gitsecret/paths/mapping.cfg index ad9d13e..1266563 100644 --- a/.gitsecret/paths/mapping.cfg +++ b/.gitsecret/paths/mapping.cfg @@ -1,2 +1,2 @@ -homeassistant/SERVICE_ACCOUNT.JSON:5a3eabcbc53278f7713423b0ea20d0558f6334f8a1f6aed2a2e4cfb2ca9c93ab -vdirsyncer/config:73434db7346e1d070c38c8099c0c8ec99925f4d89ba3e558875fa2a179f41a25 +CONFIG/homeassistant/SERVICE_ACCOUNT.JSON:5a3eabcbc53278f7713423b0ea20d0558f6334f8a1f6aed2a2e4cfb2ca9c93ab +CONFIG/vdirsyncer/config:73434db7346e1d070c38c8099c0c8ec99925f4d89ba3e558875fa2a179f41a25 diff --git a/aerc/accounts.conf b/CONFIG/aerc/accounts.conf similarity index 100% rename from aerc/accounts.conf rename to CONFIG/aerc/accounts.conf diff --git a/aerc/aerc.conf b/CONFIG/aerc/aerc.conf similarity index 100% rename from aerc/aerc.conf rename to CONFIG/aerc/aerc.conf diff --git a/aerc/bakken.henrik@gmail.com.map b/CONFIG/aerc/bakken.henrik@gmail.com.map similarity index 100% rename from aerc/bakken.henrik@gmail.com.map rename to CONFIG/aerc/bakken.henrik@gmail.com.map diff --git a/aerc/binds.conf b/CONFIG/aerc/binds.conf similarity index 100% rename from aerc/binds.conf rename to CONFIG/aerc/binds.conf diff --git a/aerc/henrik@hjarl.com.map b/CONFIG/aerc/henrik@hjarl.com.map similarity index 100% rename from aerc/henrik@hjarl.com.map rename to CONFIG/aerc/henrik@hjarl.com.map diff --git a/aerc/stylesets/catppuccin.frappe b/CONFIG/aerc/stylesets/catppuccin.frappe similarity index 100% rename from aerc/stylesets/catppuccin.frappe rename to CONFIG/aerc/stylesets/catppuccin.frappe diff --git a/aerc/stylesets/catppuccin.latte b/CONFIG/aerc/stylesets/catppuccin.latte similarity index 100% rename from aerc/stylesets/catppuccin.latte rename to CONFIG/aerc/stylesets/catppuccin.latte diff --git a/aerc/stylesets/catppuccin.macchiato b/CONFIG/aerc/stylesets/catppuccin.macchiato similarity index 100% rename from aerc/stylesets/catppuccin.macchiato rename to CONFIG/aerc/stylesets/catppuccin.macchiato diff --git a/aerc/stylesets/catppuccin.mocha b/CONFIG/aerc/stylesets/catppuccin.mocha similarity index 100% rename from aerc/stylesets/catppuccin.mocha rename to CONFIG/aerc/stylesets/catppuccin.mocha diff --git a/aerc/stylesets/gruvbox.conf b/CONFIG/aerc/stylesets/gruvbox.conf similarity index 100% rename from aerc/stylesets/gruvbox.conf rename to CONFIG/aerc/stylesets/gruvbox.conf diff --git a/aerc/stylesets/julianschuler.conf b/CONFIG/aerc/stylesets/julianschuler.conf similarity index 100% rename from aerc/stylesets/julianschuler.conf rename to CONFIG/aerc/stylesets/julianschuler.conf diff --git a/aerc/stylesets/qxx.conf b/CONFIG/aerc/stylesets/qxx.conf similarity index 100% rename from aerc/stylesets/qxx.conf rename to CONFIG/aerc/stylesets/qxx.conf diff --git a/aerc/templates/forward_as_body b/CONFIG/aerc/templates/forward_as_body similarity index 100% rename from aerc/templates/forward_as_body rename to CONFIG/aerc/templates/forward_as_body diff --git a/aerc/templates/new_message b/CONFIG/aerc/templates/new_message similarity index 100% rename from aerc/templates/new_message rename to CONFIG/aerc/templates/new_message diff --git a/aerc/templates/quoted_reply b/CONFIG/aerc/templates/quoted_reply similarity index 100% rename from aerc/templates/quoted_reply rename to CONFIG/aerc/templates/quoted_reply diff --git a/atuin/config.toml b/CONFIG/atuin/config.toml similarity index 99% rename from atuin/config.toml rename to CONFIG/atuin/config.toml index 62753b4..66cf3ea 100644 --- a/atuin/config.toml +++ b/CONFIG/atuin/config.toml @@ -56,7 +56,7 @@ search_mode = "fulltext" ## which filter mode to use when atuin is invoked from a shell up-key binding ## the accepted values are identical to those of "filter_mode" ## leave unspecified to use same mode set in "filter_mode" -# filter_mode_shell_up_key_binding = "global" +filter_mode_shell_up_key_binding = "session" ## which search mode to use when atuin is invoked from a shell up-key binding ## the accepted values are identical to those of "search_mode" diff --git a/discordo/config.toml b/CONFIG/discordo/config.toml similarity index 100% rename from discordo/config.toml rename to CONFIG/discordo/config.toml diff --git a/foot/foot.ini b/CONFIG/foot/foot.ini similarity index 100% rename from foot/foot.ini rename to CONFIG/foot/foot.ini diff --git a/CONFIG/fuzzel/fuzzel.ini b/CONFIG/fuzzel/fuzzel.ini new file mode 100644 index 0000000..f2e4542 --- /dev/null +++ b/CONFIG/fuzzel/fuzzel.ini @@ -0,0 +1,115 @@ +# output= +font=JetBrainsMono-Regular:size=14 +dpi-aware=no +# use-bold=no +prompt="❯ " +# placeholder= +icon-theme=Qogir-dark +# icons-enabled=yes +# fields=filename,name,generic +# password-character=* +# filter-desktop=no +# match-mode=fzf +# sort-result=yes +# match-counter=no +# delayed-filter-ms=300 +# delayed-filter-limit=20000 +# show-actions=no +terminal=footclient -e +# launch-prefix= +# list-executables-in-path=no + +# anchor=center +# x-margin=0 +# y-margin=0 +lines=16 +width=50 +tabs=4 +horizontal-pad=50 +vertical-pad=18 +inner-pad=10 + +image-size-ratio=.25 + +# line-height= +# letter-spacing=0 + +# layer=overlay +exit-on-keyboard-focus-loss=no + +# cache= + +# render-workers= +# match-workers= + +[colors] +background=08052bdd +text=e3e3eaff +prompt=ff7f7fff +# placeholder=ffd966ff +input=ff7f7fff +match=FFE57Fff +selection-match=FFE57Fff +selection=44475add +selection-text=FFFFFFff +# counter=93a1a1ff +border=7f3fbf55 + +[border] +# width=1 +# radius=10 + +[dmenu] +# mode=text # text|index +# exit-immediately-if-empty=no + +[key-bindings] +# cancel=Escape Control+g Control+c Control+bracketleft +# execute=Return KP_Enter Control+y +# execute-or-next=Tab +# execute-input=Shift+Return Shift+KP_Enter +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace Control+h +# delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w +# delete-line-backward=Control+u +# delete-next=Delete KP_Delete Control+d +# delete-next-word=Mod1+d Control+Delete Control+KP_Delete +# delete-line-forward=Control+k +# prev=Up Control+p +# prev-with-wrap=ISO_Left_Tab +# prev-page=Page_Up KP_Page_Up +# next=Down Control+n +# next-with-wrap=none +# next-page=Page_Down KP_Page_Down +# expunge=Shift+Delete +# clipboard-paste=Control+v XF86Paste +# primary-paste=Shift+Insert Shift+KP_Insert + +# custom-N: *dmenu mode only*. Like execute, but with a non-zero +# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3 +# with 12, and so on. + +# custom-1=Mod1+1 +# custom-2=Mod1+2 +# custom-3=Mod1+3 +# custom-4=Mod1+4 +# custom-5=Mod1+5 +# custom-6=Mod1+6 +# custom-7=Mod1+7 +# custom-8=Mod1+8 +# custom-9=Mod1+9 +# custom-10=Mod1+0 +# custom-11=Mod1+exclam +# custom-12=Mod1+at +# custom-13=Mod1+numbersign +# custom-14=Mod1+dollar +# custom-15=Mod1+percent +# custom-16=Mod1+dead_circumflex +# custom-17=Mod1+ampersand +# custom-18=Mod1+asterix +# custom-19=Mod1+parentleft diff --git a/CONFIG/gtk-3.0/settings.ini b/CONFIG/gtk-3.0/settings.ini new file mode 100644 index 0000000..8f78031 --- /dev/null +++ b/CONFIG/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name=Arc-Dark +gtk-icon-theme-name=Qogir-dark +gtk-font-name=Noto Sans 10 +gtk-cursor-theme-name=Qogir-dark +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintmedium +gtk-xft-rgba=rgb diff --git a/CONFIG/gtklock/config.ini b/CONFIG/gtklock/config.ini new file mode 100644 index 0000000..ae7694d --- /dev/null +++ b/CONFIG/gtklock/config.ini @@ -0,0 +1,19 @@ +[main] +gtk-theme=Arc-Dark +time-format=%l:%M %p +start-hidden=1 +modules=userinfo-module;powerbar-module + +[userinfo] +round-image=true +horizontal-layout=false +under-clock=true + +[powerbar] +show-labels=true +linked-buttons=true +reboot-command=systemctl reboot +poweroff-command=systemctl -i poweroff +suspend-command=systemctl suspend +userswitch-command= +logout-command=swaymsg exit diff --git a/CONFIG/gtklock/style.css b/CONFIG/gtklock/style.css new file mode 100644 index 0000000..609800c --- /dev/null +++ b/CONFIG/gtklock/style.css @@ -0,0 +1,46 @@ +* { + border: none; + text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) +} +window { + background-size: cover; + background-repeat: no-repeat; + background-position: center; + background-color: black; +} +#clock-label { + font-family: JetBrainsMono; + font-size: 64.0px; +} +#unlock-button { + background: none; + background-color: rgba(127, 63, 191, 0.4); + border: 2px solid rgba(127, 63, 191, 0.5); + padding: 4px; +} +#unlock-button:hover { + background-color: rgba(127, 63, 191, 0.9); +} +#input-field { + border-radius: 10px; + background-color: rgba(127, 127, 255, 0.1); + border: 2px solid rgba(127, 63, 191, 0.5); + padding-top: 5px; + padding-bottom: 5px; +} +#powerbar-box button { + background: none; + background-color: rgba(127, 63, 191, 0.4); + border: 2px solid rgba(127, 63, 191, 0.5); + border-radius: 10px; + padding: 4px; +} +#powerbar-box button:hover { + background-color: rgba(127, 63, 191, 0.9); +} +#input-label { + font-size: 0px; +} +#window-box infobar { + background-color: transparent; +} diff --git a/gurk/gurk.toml b/CONFIG/gurk/gurk.toml similarity index 100% rename from gurk/gurk.toml rename to CONFIG/gurk/gurk.toml diff --git a/helix/config.toml b/CONFIG/helix/config.toml similarity index 100% rename from helix/config.toml rename to CONFIG/helix/config.toml diff --git a/helix/languages.toml b/CONFIG/helix/languages.toml similarity index 100% rename from helix/languages.toml rename to CONFIG/helix/languages.toml diff --git a/helix/themes/catppuccin_frappe.toml b/CONFIG/helix/themes/catppuccin_frappe.toml similarity index 100% rename from helix/themes/catppuccin_frappe.toml rename to CONFIG/helix/themes/catppuccin_frappe.toml diff --git a/helix/themes/catppuccin_latte.toml b/CONFIG/helix/themes/catppuccin_latte.toml similarity index 100% rename from helix/themes/catppuccin_latte.toml rename to CONFIG/helix/themes/catppuccin_latte.toml diff --git a/helix/themes/catppuccin_macchiato.toml b/CONFIG/helix/themes/catppuccin_macchiato.toml similarity index 100% rename from helix/themes/catppuccin_macchiato.toml rename to CONFIG/helix/themes/catppuccin_macchiato.toml diff --git a/helix/themes/catppuccin_mocha.toml b/CONFIG/helix/themes/catppuccin_mocha.toml similarity index 100% rename from helix/themes/catppuccin_mocha.toml rename to CONFIG/helix/themes/catppuccin_mocha.toml diff --git a/helix/themes/no_italics/catppuccin_frappe.toml b/CONFIG/helix/themes/no_italics/catppuccin_frappe.toml similarity index 100% rename from helix/themes/no_italics/catppuccin_frappe.toml rename to CONFIG/helix/themes/no_italics/catppuccin_frappe.toml diff --git a/helix/themes/no_italics/catppuccin_latte.toml b/CONFIG/helix/themes/no_italics/catppuccin_latte.toml similarity index 100% rename from helix/themes/no_italics/catppuccin_latte.toml rename to CONFIG/helix/themes/no_italics/catppuccin_latte.toml diff --git a/helix/themes/no_italics/catppuccin_macchiato.toml b/CONFIG/helix/themes/no_italics/catppuccin_macchiato.toml similarity index 100% rename from helix/themes/no_italics/catppuccin_macchiato.toml rename to CONFIG/helix/themes/no_italics/catppuccin_macchiato.toml diff --git a/helix/themes/no_italics/catppuccin_mocha.toml b/CONFIG/helix/themes/no_italics/catppuccin_mocha.toml similarity index 100% rename from helix/themes/no_italics/catppuccin_mocha.toml rename to CONFIG/helix/themes/no_italics/catppuccin_mocha.toml diff --git a/CONFIG/homeassistant/SERVICE_ACCOUNT.JSON.secret b/CONFIG/homeassistant/SERVICE_ACCOUNT.JSON.secret new file mode 100644 index 0000000..58d3111 Binary files /dev/null and b/CONFIG/homeassistant/SERVICE_ACCOUNT.JSON.secret differ diff --git a/CONFIG/homeassistant/configuration.yaml b/CONFIG/homeassistant/configuration.yaml new file mode 100644 index 0000000..12b93e9 --- /dev/null +++ b/CONFIG/homeassistant/configuration.yaml @@ -0,0 +1,269 @@ + +# Loads default set of integrations. Do not remove. +default_config: + +# Load frontend themes from the themes folder +frontend: + themes: !include_dir_merge_named themes + +http: + use_x_forwarded_for: true + trusted_proxies: 10.2.0.0/16 + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml + +google_assistant: + project_id: homeassistant-mothership-1123 + service_account: !include SERVICE_ACCOUNT.JSON + report_state: true + +sensor: + - platform: nordpool + region: "NO1" + currency: "NOK" + low_price_cutoff: 0.95 + # - platform: template + # sensors: + # # NORDPOOL PRICES + # nordpool_today_hr_00_01: + # friendly_name: "Today hour 0" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[0] }}" + # nordpool_today_hr_01_02: + # friendly_name: "Today hour 1" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[1] }}" + # nordpool_today_hr_02_03: + # friendly_name: "Today hour 2" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[2] }}" + # nordpool_today_hr_03_04: + # friendly_name: "Today hour 3" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[3] }}" + # nordpool_today_hr_04_05: + # friendly_name: "Today hour 4" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[4] }}" + # nordpool_today_hr_05_06: + # friendly_name: "Today hour 5" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[5] }}" + # nordpool_today_hr_06_07: + # friendly_name: "Today hour 6" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[6] }}" + # nordpool_today_hr_07_08: + # friendly_name: "Today hour 7" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[7] }}" + # nordpool_today_hr_08_09: + # friendly_name: "Today hour 8" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[8] }}" + # nordpool_today_hr_09_10: + # friendly_name: "Today hour 9" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[9] }}" + # nordpool_today_hr_10_11: + # friendly_name: "Today hour 10" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[10] }}" + # nordpool_today_hr_11_12: + # friendly_name: "Today hour 11" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[11] }}" + # nordpool_today_hr_12_13: + # friendly_name: "Today hour 12" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[12] }}" + # nordpool_today_hr_13_14: + # friendly_name: "Today hour 13" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[13] }}" + # nordpool_today_hr_14_15: + # friendly_name: "Today hour 14" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[14] }}" + # nordpool_today_hr_15_16: + # friendly_name: "Today hour 15" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[15] }}" + # nordpool_today_hr_16_17: + # friendly_name: "Today hour 16" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[16] }}" + # nordpool_today_hr_17_18: + # friendly_name: "Today hour 17" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[17] }}" + # nordpool_today_hr_18_19: + # friendly_name: "Today hour 18" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[18] }}" + # nordpool_today_hr_19_20: + # friendly_name: "Today hour 19" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[19] }}" + # nordpool_today_hr_20_21: + # friendly_name: "Today hour 20" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[20] }}" + # nordpool_today_hr_21_22: + # friendly_name: "Today hour 21" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[21] }}" + # nordpool_today_hr_22_23: + # friendly_name: "Today hour 22" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[22] }}" + # nordpool_today_hr_23_24: + # friendly_name: "Today hour 23" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[23] }}" + # nordpool_tomorrow_hr_00_01: + # friendly_name: "Tomorrow hour 0" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[0] }}" + # nordpool_tomorrow_hr_01_02: + # friendly_name: "Tomorrow hour 1" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[1] }}" + # nordpool_tomorrow_hr_02_03: + # friendly_name: "Tomorrow hour 2" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[2] }}" + # nordpool_tomorrow_hr_03_04: + # friendly_name: "Tomorrow hour 3" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[3] }}" + # nordpool_tomorrow_hr_04_05: + # friendly_name: "Tomorrow hour 4" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[4] }}" + # nordpool_tomorrow_hr_05_06: + # friendly_name: "Tomorrow hour 5" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[5] }}" + # nordpool_tomorrow_hr_06_07: + # friendly_name: "Tomorrow hour 6" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[6] }}" + # nordpool_tomorrow_hr_07_08: + # friendly_name: "Tomorrow hour 7" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[7] }}" + # nordpool_tomorrow_hr_08_09: + # friendly_name: "Tomorrow hour 8" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[8] }}" + # nordpool_tomorrow_hr_09_10: + # friendly_name: "Tomorrow hour 9" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[9] }}" + # nordpool_tomorrow_hr_10_11: + # friendly_name: "Tomorrow hour 10" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[10] }}" + # nordpool_tomorrow_hr_11_12: + # friendly_name: "Tomorrow hour 11" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[11] }}" + # nordpool_tomorrow_hr_12_13: + # friendly_name: "Tomorrow hour 12" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[12] }}" + # nordpool_tomorrow_hr_13_14: + # friendly_name: "Tomorrow hour 13" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[13] }}" + # nordpool_tomorrow_hr_14_15: + # friendly_name: "Tomorrow hour 14" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[14] }}" + # nordpool_tomorrow_hr_15_16: + # friendly_name: "Tomorrow hour 15" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[15] }}" + # nordpool_tomorrow_hr_16_17: + # friendly_name: "Tomorrow hour 16" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[16] }}" + # nordpool_tomorrow_hr_17_18: + # friendly_name: "Tomorrow hour 17" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[17] }}" + # nordpool_tomorrow_hr_18_19: + # friendly_name: "Tomorrow hour 18" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[18] }}" + # nordpool_tomorrow_hr_19_20: + # friendly_name: "Tomorrow hour 19" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[19] }}" + # nordpool_tomorrow_hr_20_21: + # friendly_name: "Tomorrow hour 20" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[20] }}" + # nordpool_tomorrow_hr_21_22: + # friendly_name: "Tomorrow hour 21" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[21] }}" + # nordpool_tomorrow_hr_22_23: + # friendly_name: "Tomorrow hour 22" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[22] }}" + # nordpool_tomorrow_hr_23_24: + # friendly_name: "Tomorrow hour 23" + # icon_template: mdi:cash + # unit_of_measurement: "øre" + # value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[23] }}" diff --git a/k9s/plugins.yaml b/CONFIG/k9s/plugins.yaml similarity index 100% rename from k9s/plugins.yaml rename to CONFIG/k9s/plugins.yaml diff --git a/khal/config b/CONFIG/khal/config similarity index 100% rename from khal/config rename to CONFIG/khal/config diff --git a/khard/khard.conf b/CONFIG/khard/khard.conf similarity index 100% rename from khard/khard.conf rename to CONFIG/khard/khard.conf diff --git a/CONFIG/mako/config b/CONFIG/mako/config new file mode 100644 index 0000000..08e9725 --- /dev/null +++ b/CONFIG/mako/config @@ -0,0 +1,27 @@ +font=UbuntuMono 12.5 + +background-color=#404552 +text-color=#e5e9f0 +width=315 +height=200 +padding=10 +margin=10 +progress-color=over #eceff480 +icon-path=/usr/share/icons/Arc-X-D +max-icon-size=70 +layer=overlay +anchor=bottom-center + +border-size=2 +border-radius=15 +border-color=#5294e2 + +default-timeout=0 +ignore-timeout=1 + +[urgency=normal] +border-color=#d08770 + +[urgency=high] +border-color=#bf616a +default-timeout=0 diff --git a/mimeapps.list b/CONFIG/mimeapps.list similarity index 100% rename from mimeapps.list rename to CONFIG/mimeapps.list diff --git a/newsboat/config b/CONFIG/newsboat/config similarity index 100% rename from newsboat/config rename to CONFIG/newsboat/config diff --git a/newsboat/themes/catppuccin.dark b/CONFIG/newsboat/themes/catppuccin.dark similarity index 100% rename from newsboat/themes/catppuccin.dark rename to CONFIG/newsboat/themes/catppuccin.dark diff --git a/newsboat/themes/catppuccin.latte b/CONFIG/newsboat/themes/catppuccin.latte similarity index 100% rename from newsboat/themes/catppuccin.latte rename to CONFIG/newsboat/themes/catppuccin.latte diff --git a/nushell/config.nu b/CONFIG/nushell/config.nu similarity index 100% rename from nushell/config.nu rename to CONFIG/nushell/config.nu diff --git a/nvim/ftplugin/fugitive.lua b/CONFIG/nvim/ftplugin/fugitive.lua similarity index 100% rename from nvim/ftplugin/fugitive.lua rename to CONFIG/nvim/ftplugin/fugitive.lua diff --git a/nvim/ftplugin/javascript.lua b/CONFIG/nvim/ftplugin/javascript.lua similarity index 100% rename from nvim/ftplugin/javascript.lua rename to CONFIG/nvim/ftplugin/javascript.lua diff --git a/nvim/ftplugin/lua.lua b/CONFIG/nvim/ftplugin/lua.lua similarity index 100% rename from nvim/ftplugin/lua.lua rename to CONFIG/nvim/ftplugin/lua.lua diff --git a/nvim/ftplugin/markdown.lua b/CONFIG/nvim/ftplugin/markdown.lua similarity index 100% rename from nvim/ftplugin/markdown.lua rename to CONFIG/nvim/ftplugin/markdown.lua diff --git a/nvim/ftplugin/python.lua b/CONFIG/nvim/ftplugin/python.lua similarity index 100% rename from nvim/ftplugin/python.lua rename to CONFIG/nvim/ftplugin/python.lua diff --git a/nvim/init.lua b/CONFIG/nvim/init.lua similarity index 100% rename from nvim/init.lua rename to CONFIG/nvim/init.lua diff --git a/CONFIG/nwg-drawer/drawer.css b/CONFIG/nwg-drawer/drawer.css new file mode 100644 index 0000000..b388382 --- /dev/null +++ b/CONFIG/nwg-drawer/drawer.css @@ -0,0 +1,38 @@ +window { + background-color: rgba (38, 18, 57, 0.9); + color: #eceff4; + border-radius: 30px +} + +/* search entry */ +entry { + box-shadow: 0 0 6px 5px #2e3440; + background-color: rgba (0, 0, 0, 0.5) +} + +button, image { + background-color: #3b4252; + background: none; + border: none; + margin: 10px +} + +button:hover { + background-color: rgba (127, 63, 191, .4); + box-shadow: 0 0 6px 5px #190C26 +} + +/* in case you wanted to give category buttons a different look */ +#category-button { + margin: 0 0px 0 0px +} + +#pinned-box { + padding-bottom: 1px; + border-bottom: 1px solid gray +} + +#files-box { + padding: 1px; + border: 1px solid gray +} diff --git a/qutebrowser/autoconfig.yml b/CONFIG/qutebrowser/autoconfig.yml similarity index 100% rename from qutebrowser/autoconfig.yml rename to CONFIG/qutebrowser/autoconfig.yml diff --git a/qutebrowser/bookmarks/urls b/CONFIG/qutebrowser/bookmarks/urls similarity index 100% rename from qutebrowser/bookmarks/urls rename to CONFIG/qutebrowser/bookmarks/urls diff --git a/qutebrowser/config.py b/CONFIG/qutebrowser/config.py similarity index 100% rename from qutebrowser/config.py rename to CONFIG/qutebrowser/config.py diff --git a/ranger/rc.conf b/CONFIG/ranger/rc.conf similarity index 100% rename from ranger/rc.conf rename to CONFIG/ranger/rc.conf diff --git a/sioyek/keys_user.config b/CONFIG/sioyek/keys_user.config similarity index 100% rename from sioyek/keys_user.config rename to CONFIG/sioyek/keys_user.config diff --git a/sioyek/prefs_user.config b/CONFIG/sioyek/prefs_user.config similarity index 100% rename from sioyek/prefs_user.config rename to CONFIG/sioyek/prefs_user.config diff --git a/starship.toml b/CONFIG/starship.toml similarity index 100% rename from starship.toml rename to CONFIG/starship.toml diff --git a/CONFIG/sway/config b/CONFIG/sway/config new file mode 100644 index 0000000..0268965 --- /dev/null +++ b/CONFIG/sway/config @@ -0,0 +1,359 @@ +# ------------------------------------------ +# THEME +# ------------------------------------------ +# Apply gtk theming +exec_always ~/.config/sway/scripts/import-gsettings + +# mouse settings: don't refocus, don't move with output +focus_follows_mouse no +mouse_warping none + +# Set inner/outer gaps +smart_gaps on +gaps inner 2 +gaps outer 0 + +# Hide titlebar on windows: +default_border pixel 1 + +# Default Font +font pango:Noto Sans Regular 10 + +# Thin borders: +smart_borders on + +# Title format for windows +for_window [shell="xdg_shell"] title_format "%title (%app_id)" +for_window [shell="x_wayland"] title_format "%class - %title" + +# class border bground text indicator child_border +client.focused #556064 #F9CE5C #000000 #CB4B16 #FDF6E3 +client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 #454948 +client.unfocused #556064 #2F3D44 #1ABC9C #454948 #454948 +client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 #268BD2 +client.placeholder #000000 #0C0C0C #ffffff #000000 #000000 +client.background #2B2C2B + +# Status Bar: +bar { + swaybar_command waybar +} +# ------------------------------------------ +# DEFINITIONS +# ------------------------------------------ +# Logo key. Use Mod1 for Alt. +set $mod Mod4 + +# Add Vim key support +set $left h +set $down j +set $up k +set $right l + +# Set default terminal emulator +set $term footclient + +# Application launcher +set $launcher fuzzel + +# Application menu +set $menu nwg-drawer + +# Power Menu +set $powermenu ~/.config/sway/scripts/power_menu.sh + +# ------------------------------------------ +# BINDINGS +# ------------------------------------------ +# Launch the terminal +bindsym $mod+Return exec $term +bindsym $mod+Shift+Return exec foot +# Kill focused window +bindsym $mod+Shift+q kill +# Lock screen +bindsym $mod+f1 exec gtklock +# Reload the configuration file +bindsym $mod+Shift+c reload + +# menus +bindsym { + # Open the power menu + $mod+Shift+e exec $powermenu + # Start your launcher + $mod+d exec $launcher + # Menu + $mod+Shift+d exec $menu + # Activities + $mod+p exec ~/.config/sway/scripts/window_switcher.sh +} + +# move around +bindsym { + # Change window focus + $mod+Left focus left + $mod+Down focus down + $mod+Up focus up + $mod+Right focus right + # Vim key support + $mod+$left focus left + $mod+$down focus down + $mod+$up focus up + $mod+$right focus right + + # Move the focused window + $mod+Shift+Left move left + $mod+Shift+Down move down + $mod+Shift+Up move up + $mod+Shift+Right move right + # Vim key support + $mod+Shift+$left move left + $mod+Shift+$down move down + $mod+Shift+$up move up + $mod+Shift+$right move right +} + +# layout +bindsym { + # Set how the current window will be split + $mod+s splitv + $mod+v splith + $mod+q split toggle + + # Switch the current container between different layout styles + $mod+w layout stacking + $mod+t layout tabbed + $mod+e layout toggle split + + # Make the current focus fullscreen + $mod+f fullscreen + + # Toggle between tiling and floating mode + $mod+Shift+space floating toggle + $mod+Ctrl+space sticky toggle + + # Swap focus between the tiling area and the floating area + $mod+space focus mode_toggle + + # Move focus to the parent container + $mod+a focus parent + # Move focus to the child container + $mod+Shift+a focus child +} + +# scratchpad +bindsym { + # Move the currently focused window to the scratchpad + $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + $mod+minus scratchpad show +} + +# resize +# Move windows by holding down $mod and left mouse button. +# Resize them with right mouse button + $mod. +# Change "normal" to "inverse" to switch left and right +floating_modifier $mod normal +bindsym { + # Resize with arrow keys + $mod+ctrl+Right resize shrink width 10 px + $mod+ctrl+Up resize grow height 10 px + $mod+ctrl+Down resize shrink height 10 px + $mod+ctrl+Left resize grow width 10 px + # Resize with Vim keys + $mod+ctrl+$right resize shrink width 10 px + $mod+ctrl+$up resize grow height 10 px + $mod+ctrl+$down resize shrink height 10 px + $mod+ctrl+$left resize grow width 10 px +} +# Resize floating windows with mouse scroll +bindsym --whole-window --border { + # Resize vertically + $mod+button4 resize shrink height 5 px or 5 ppt + $mod+button5 resize grow height 5 px or 5 ppt + # Resize horizontally + $mod+Shift+button4 resize shrink width 5 px or 5 ppt + $mod+Shift+button5 resize grow width 5 px or 5 ppt +} + +# media keys +bindsym { + # Volume + XF86AudioRaiseVolume exec pamixer -ui 2 + XF86AudioLowerVolume exec pamixer -ud 2 + XF86AudioMute exec pamixer --toggle-mute + Pause exec pamixer -ui 2 + Print exec pamixer -ud 2 + Scroll_Lock exec pamixer --toggle-mute + + # Player + XF86AudioPlay exec playerctl play-pause + XF86AudioNext exec playerctl next + XF86AudioPrev exec playerctl previous + + # Backlight + XF86MonBrightnessUp exec brightnessctl -c backlight set +5% + XF86MonBrightnessDown exec brightnessctl -c backlight set 5%- +} + +# workspaces +set { + $ws1 number 1 + $ws2 number 2 + $ws3 number 3 + $ws4 number 4 + $ws5 number 5 + $ws6 number 6 + $ws7 number 7 + $ws8 number 8 + $ws9 number 9 + $ws10 number 10 +} +include $HOME/.config/sway/local_config + +# apps +bindsym { + # Snip a selection and pipe to swappy + $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f - + + # unicode picker + $mod+u exec unipicker --command "fuzzel --dmenu | wl-copy" + + # Launch the browser + $mod+i exec qutebrowser + + # Launch the file explorer + $mod+o exec pcmanfm + + # Dismiss message + $mod+n exec makoctl dismiss + $mod+Shift+n exec makoctl dismiss -a +} + +# config tools +set $mode_monitor (b) btop, (h) htop, (s) isd, (j) journal, (n) nvtop +mode "$mode_monitor" { + bindsym b exec footclient --app-id floating_shell --window-size-chars 140x50 btop, mode "default" + bindsym h exec footclient --app-id floating_shell --window-size-chars 140x50 htop, mode "default" + bindsym s exec footclient --app-id floating_shell --window-size-chars 140x50 isd, mode "default" + bindsym j exec footclient --app-id floating_shell --window-size-chars 140x50 lazyjournal, mode "default" + bindsym n exec footclient --app-id floating_shell --window-size-chars 140x50 nvtop, mode "default" + + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+m mode "$mode_monitor" + +# ------------------------------------------ +# AUTOSTART +# ------------------------------------------ +# Auth with polkit-gnome +exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + +# Import environment variables for user systemd service manager +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP + +# Update dbus environments with display variables +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP + +# Idle configuration +exec swayidle idlehint 1 +exec_always swayidle -w before-sleep "gtklock -d" + +# Start foot server +exec_always --no-startup-id foot --server + +exec { + # Desktop notifications + exec mako + + # Set wallpaper + ~/.azotebg + + # Network Applet + nm-applet --indicator + + # automount usb + pcmanfm --daemon-mode + + # Bluetooth Applet + blueman-applet + + # night-time color shift + wlsunset -l 59.91:10.76 +} + +exec_always { + # nwg-drawer + nwg-drawer -r -c 7 -is 90 -mb 10 -ml 50 -mr 50 -mt 10 + + # flashfocus + systemctl --user start flashfocus + + # persist clipboard after close + pkill -x wl-clip-persist + wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+' + + # enable noisetorch + noisetorch -u + noisetorch -i +} + +# ------------------------------------------ +# WINDOWS +# ------------------------------------------ +# Custom windowing rules +for_window [class="Yad" instance="yad"] floating enable +for_window [app_id="yad"] floating enable +for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt +for_window [app_id="pavucontrol" ] floating enable, resize set width 40 ppt height 30 ppt +for_window [window_role="pop-up"] floating enable +for_window [window_role="bubble"] floating enable +for_window [window_role="task_dialog"] floating enable +for_window [window_role="Preferences"] floating enable +for_window [window_type="dialog"] floating enable +for_window [window_type="menu"] floating enable +for_window [window_role="About"] floating enable +for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt +for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable +for_window [title="Picture in picture"] floating enable, sticky enable +for_window [title="Save File"] floating enable +for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill + +# steam +# https://github.com/ValveSoftware/steam-for-linux/issues/1040 +for_window [app_id="^steam$"] floating enable +for_window [app_id="^Steam$"] floating enable +for_window [app_id="^steam$" title="^Steam$"] floating disable + +# Inhibit idle +for_window [app_id="firefox"] inhibit_idle fullscreen +for_window [app_id="Chromium"] inhibit_idle fullscreen + +# Don't allow applications to inhibit shortcuts, i.e. grab total control of the +# keyboard. Chrome currently abuses this by enabling it for all "--app=..." shortcuts. +seat * shortcuts_inhibitor disable + +# ------------------------------------------ +# IO +# ------------------------------------------ +input type:touchpad { + dwt enabled + tap disabled + natural_scroll enabled + accel_profile "adaptive" +} + +input type:keyboard { + xkb_layout "us" + xkb_variant "altgr-weur" + xkb_options "caps:escape" +} + +input type:mouse { + accel_profile "flat" + pointer_accel 0.5 +} + diff --git a/CONFIG/sway/scripts/import-gsettings b/CONFIG/sway/scripts/import-gsettings new file mode 100755 index 0000000..e1257df --- /dev/null +++ b/CONFIG/sway/scripts/import-gsettings @@ -0,0 +1,15 @@ +#!/bin/sh + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | cut -d'=' -f2)" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)" +font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" diff --git a/CONFIG/sway/scripts/power_menu.sh b/CONFIG/sway/scripts/power_menu.sh new file mode 100755 index 0000000..3e782a9 --- /dev/null +++ b/CONFIG/sway/scripts/power_menu.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +SELECTION="$(printf "󰌾 Lock\n󰤄 Suspend\n󰍃 Log out\n Reboot\n Reboot to UEFI\n󰐥 Shutdown" | fuzzel --dmenu -a top-right -l 6 -w 18 -p "Select an option: ")" + +confirm_action() { + local action="$1" + CONFIRMATION="$(printf "No\nYes" | fuzzel --dmenu -a top-right -l 2 -w 18 -p "$action?")" + [[ "$CONFIRMATION" == *"Yes"* ]] +} + +case $SELECTION in + *"󰌾 Lock"*) + gtklock;; + *"󰤄 Suspend"*) + if confirm_action "Suspend"; then + systemctl suspend + fi;; + *"󰍃 Log out"*) + if confirm_action "Log out"; then + swaymsg exit + fi;; + *" Reboot"*) + if confirm_action "Reboot"; then + systemctl reboot + fi;; + *" Reboot to UEFI"*) + if confirm_action "Reboot to UEFI"; then + systemctl reboot --firmware-setup + fi;; + *"󰐥 Shutdown"*) + if confirm_action "Shutdown"; then + systemctl poweroff + fi;; +esac diff --git a/CONFIG/sway/scripts/window_switcher.sh b/CONFIG/sway/scripts/window_switcher.sh new file mode 100755 index 0000000..cc0032d --- /dev/null +++ b/CONFIG/sway/scripts/window_switcher.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Define the lengths for each column +ws_length=2 +app_id_length=14 +name_length=50 + +# Fetch the data from swaymsg and format it +formatted_output=$(swaymsg -t get_tree | jq -r --arg ws_length "$ws_length" --arg app_id_length "$app_id_length" --arg name_length "$name_length" ' + def lpad($len; $char): + if (.|length) > $len then $char * ($len - (.|length)) +.[:$len-1] + "\u2026" else $char * ($len - (.|length)) +. end; + def rpad($len; $char): + if (.|length) > $len then.[:$len-1] + "\u2026" else. + $char * ($len - (.|length)) end; +.. + | objects + | select(.type == "workspace") as $ws + |.. + | objects + | select(has("app_id")) + | (if.focused then "*" else " " end) as $asterisk + | "\($asterisk)[\($ws.name | lpad($ws_length | tonumber; " "))]\((.app_id // "xwayland") | lpad($app_id_length | tonumber; " ")): \(.name | rpad($name_length | tonumber; " ")) (\(.id))" +') + +# Launch fuzzel with the formatted output +row=$(echo "$formatted_output" | fuzzel --dmenu --width=80 --lines=12) + +# Get the container ID from the selection and focus the container +if [ -n "$row" ]; then + winid="${row##*(}" + winid="${winid%%)*}" + swaymsg "[con_id=$winid] focus" +fi diff --git a/tig/config b/CONFIG/tig/config similarity index 100% rename from tig/config rename to CONFIG/tig/config diff --git a/tmux/tmux.conf b/CONFIG/tmux/tmux.conf similarity index 100% rename from tmux/tmux.conf rename to CONFIG/tmux/tmux.conf diff --git a/CONFIG/vdirsyncer/config.secret b/CONFIG/vdirsyncer/config.secret new file mode 100644 index 0000000..c94d271 Binary files /dev/null and b/CONFIG/vdirsyncer/config.secret differ diff --git a/CONFIG/waybar/config.jsonc b/CONFIG/waybar/config.jsonc new file mode 100644 index 0000000..c23d064 --- /dev/null +++ b/CONFIG/waybar/config.jsonc @@ -0,0 +1,196 @@ +{ + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + // "height": 30, // Auto-height is used when commented + // "width": 1280, // Full screen width when commented + "spacing": 16, // Gaps between modules (in px) + // See `man waybar` for more configuration options + +// Configuration - modules-left + + "modules-left": [ + "custom/launcher", + "sway/workspaces", + "sway/mode", + "sway/window" + ], + + "custom/launcher": { + "format":"", + "on-click": "exec nwg-drawer", + "tooltip": false + }, + + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "10" + } + }, + + "sway/mode": { + "format": "{}", + "tooltip": false + }, + + "sway/window": { + "format": "{}", + //"all-outputs": true, // Active window shows only on active display when commented + "max-length": 120 + }, + +// Configuration - modules-center + + "modules-center": [ + "systemd-failed-units", "network" + ], + + "systemd-failed-units": { + "hide-on-ok": false, // Do not hide if there is zero failed units. + "format": "Systemd ✗ {nr_failed}", + "format-ok": "Systemd ✓", + "system": true, // Monitor failed systemwide units. + "user": true, // Ignore failed user units. + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 isd'" + }, + + "network": { + "format-disabled": " Disabled", + "format-wifi": " {bandwidthDownBits:>} 󰶡 {bandwidthUpBits:>} 󰶣 ({signalStrength}%)", + "tooltip-format-wifi": "{essid}", + "format-ethernet": "󰈀 {bandwidthDownBits:>} 󰶡 {bandwidthUpBits:>} 󰶣", + "tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}", + "format-disconnected": " Disconnected", + "on-click": "footclient --app-id floating_shell --window-size-chars 60x45 -e nmtui", + "interval": 2 + }, + +// Configuration - modules-right + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + }, + "tooltip-format-activated": "Idle Inhibitor Activated", + "tooltip-format-deactivated": "Idle Inhibitor Deactivated" + }, + + "cpu": { + "interval": 5, + "format": "{usage:>3}%", + "states": { + "warning": 70, + "critical": 90, + }, + "on-click": "footclient --app-id floating_shell --window-size-chars 120x45 -e btop" + }, + + "custom/cputemp": { + "exec": "sensors | grep 'CPU:' | awk '{print substr($2,2); }'", + "format": " {}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'", + "interval": 1 + }, + + "memory": { + "interval": 5, + "format": "{:>3}%", + "on-click": "footclient --app-id floating_shell --window-size-chars 100x100 -e btop", + "states": { + "warning": 70, + "critical": 90 + } + }, + + "disk#root": { + "path": "/", + "interval": 30, + "format": " / {specific_free:0.0f} of {specific_total:0.0f} GB free", + "unit": "GB", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /'" + }, + + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"], + "tooltip-format": "Backlight (Scroll): {percent:}%", + "on-scroll-down": "brightnessctl -c backlight set 5%-", + "on-scroll-up": "brightnessctl -c backlight set +5%" + }, + + "pulseaudio": { + "scroll-step": 2, + "format": "{icon} {volume}%", + "format-muted":"󰝟 muted", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "on-click": "pavucontrol", + "tooltip-format": "{icon}  {volume}% {format_source}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x12 pulsemixer'", + "on-click-middle": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +5%", + "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -5%" + }, + + + "include": "~/.config/waybar/local_config.jsonc", + + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": ["", "", "", "", ""] + }, + + "clock": { + "format": "󰅐 {:%H:%M}", + "format-alt": "󰅐 {:%OI:%M %p}", + "tooltip-format": " {:%A %m/%d}\n\n{calendar}", + "calendar": { + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + }, + }, + "actions": { + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + }, + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 khal interactive'" + }, + + "tray": { + "icon-size": 16, + "spacing":10 + }, + + "custom/power": { + "format":"⏻", + "on-click": "exec ~/.config/sway/scripts/power_menu.sh", + "tooltip": false + }, +} diff --git a/CONFIG/waybar/style.css b/CONFIG/waybar/style.css new file mode 100644 index 0000000..679b896 --- /dev/null +++ b/CONFIG/waybar/style.css @@ -0,0 +1,186 @@ +/* ============================================================================= + * + * Waybar configuration + * + * Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration + * + * =========================================================================== */ + +/* ----------------------------------------------------------------------------- + * Keyframes + * -------------------------------------------------------------------------- */ + +@define-color highlight #685878 ; +@define-color base1 #19191e ; + +@keyframes blink-warning { + 70% { + color: white; + } + + to { + color: white; + background-color: orange; + } +} + +@keyframes blink-critical { + 70% { + color: white; + } + + to { + color: white; + background-color: red; + } +} + +/* ----------------------------------------------------------------------------- + * Base styles + * -------------------------------------------------------------------------- */ + +/* Reset all styles */ +* { + border: none; + border-radius: 0; + min-height: 0; + margin: 1px; + padding: 0; +} + +/* The whole bar */ +#waybar { + background: transparent; + color: #e3e3ea; + background-color: @base1; + font-family: JetBrainsMono; + font-size: 13px; +} + +/* Every modules */ +#mode, +#network, +#custom-keyboard-layout, +#idle_inhibitor, +#cpu, +#memory, +#backlight, +#pulseaudio, +#battery, +#clock, +#tray { + padding:0.5rem 0.6rem; + margin: 1px 0px; +} + +/* ----------------------------------------------------------------------------- + * Module styles + * -------------------------------------------------------------------------- */ + +#custom-launcher { + margin-left:15px; + margin-right:10px; +} + +#workspaces { + font-size:13px; +} + +#workspaces button { + border-radius: 5px; + color: #eceff4; + padding: 1px 6px; + margin-right: 2px; + margin-left: 2px; +} + +#workspaces button.focused { + border: 1px solid #d8dee9; +} + +#workspaces button.urgent { + border-color: #c9545d; + color: #c9545d; +} + +#mode { + background: @highlight; + border-bottom: 3px transparent; + color:white; + margin-left: 5px; + padding: 7px; +} + +#window { + font-weight: bold; +} + +#network.disconnected { + color: orange; +} + +#cpu.warning { + color: orange; +} + +#cpu.critical { + color: red; +} + +#memory { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#memory.warning { + color: orange; + } + +#memory.critical { + color: red; + animation-name: blink-critical; + animation-duration: 2s; + padding-left:5px; + padding-right:5px; +} + +#backlight.icon { +} + +#pulseaudio { +} + +#pulseaudio.muted { + color: @highlight; +} + +#battery { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#battery.warning { + color: orange; +} + +#battery.critical { + color: red; +} + +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +#custom-power { + margin-left:15px; + margin-right:15px; + font-size:15px; +} diff --git a/yazi/init.lua b/CONFIG/yazi/init.lua similarity index 100% rename from yazi/init.lua rename to CONFIG/yazi/init.lua diff --git a/yazi/keymap.toml b/CONFIG/yazi/keymap.toml similarity index 100% rename from yazi/keymap.toml rename to CONFIG/yazi/keymap.toml diff --git a/yazi/yazi.toml b/CONFIG/yazi/yazi.toml similarity index 100% rename from yazi/yazi.toml rename to CONFIG/yazi/yazi.toml diff --git a/zathura/zathurarc b/CONFIG/zathura/zathurarc similarity index 100% rename from zathura/zathurarc rename to CONFIG/zathura/zathurarc diff --git a/zsh/.zshrc b/CONFIG/zsh/.zshrc similarity index 100% rename from zsh/.zshrc rename to CONFIG/zsh/.zshrc diff --git a/HOME/.profile b/HOME/.profile deleted file mode 100644 index 9296641..0000000 --- a/HOME/.profile +++ /dev/null @@ -1,3 +0,0 @@ -# required for qt5ct to know QT_QPA_PLATFORMTHEME -export QT_QPA_PLATFORMTHEME=qt5ct -export TERMINAL=/usr/bin/footclient diff --git a/ROOT/etc/greetd/config.toml b/ROOT/etc/greetd/config.toml deleted file mode 100644 index 3970c13..0000000 --- a/ROOT/etc/greetd/config.toml +++ /dev/null @@ -1,16 +0,0 @@ -[terminal] -# The VT to run the greeter on. Can be "next", "current" or a number -# designating the VT. -vt = 1 - -# The default session, also known as the greeter. -[default_session] - -# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh` -# with whatever you want started, such as `sway`. -command = "start-sway --unsupported-gpu --config /etc/greetd/sway-config 2> /etc/sway/sway.log" - -# The user to run the command as. The privileges this user must have depends -# on the greeter. A graphical greeter may for example require the user to be -# in the `video` group. -user = "greeter" diff --git a/ROOT/etc/greetd/environments b/ROOT/etc/greetd/environments deleted file mode 100644 index d16bb19..0000000 --- a/ROOT/etc/greetd/environments +++ /dev/null @@ -1,2 +0,0 @@ -sway -bash diff --git a/ROOT/etc/modules-load.d/br_netfilter.conf b/ROOT/etc/modules-load.d/br_netfilter.conf new file mode 100644 index 0000000..a13fc17 --- /dev/null +++ b/ROOT/etc/modules-load.d/br_netfilter.conf @@ -0,0 +1 @@ +br_netfilter diff --git a/ROOT/etc/qtgreet/config.ini b/ROOT/etc/qtgreet/config.ini deleted file mode 100644 index e0bbc91..0000000 --- a/ROOT/etc/qtgreet/config.ini +++ /dev/null @@ -1,23 +0,0 @@ -[General] -Backend = GreetD -Theme = sidebar -BlurBackground = true -IconTheme = breeze - -[Overrides] -Background = /usr/share/qtgreet/backgrounds/Water.svg -BaseColor = Theme -TextColor = Theme -FontFamily = Noto Sans - -[videobg] -File = -Playlist = - -[Environment] - -[PowerCommands] -Suspend = dbus -Hibernate = dbus -Shutdown = dbus -Reboot = dbus diff --git a/ROOT/usr/local/bin/start-sway b/ROOT/usr/local/bin/start-sway deleted file mode 100755 index 7e1c589..0000000 --- a/ROOT/usr/local/bin/start-sway +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Session -export XDG_SESSION_TYPE=wayland -export XDG_SESSION_DESKTOP=sway -export XDG_CURRENT_DESKTOP=sway - -# Environment -# Source environmental variable from all files in PATH_ENVIRONMENT -# file should be named *.conf and have KEY=value format use # for comment -PATH_ENVIRONMENT=$HOME/.config/environment.d -if [ -d "$PATH_ENVIRONMENT" ]; then - for i in "$PATH_ENVIRONMENT"/*.conf ; do - if [ -f "$i" ]; then - set -a; . "$i"; set +a - fi - done -fi - -exec sway "$@" diff --git a/custom-droneship/sway/local_config b/custom-droneship/CONFIG/sway/local_config similarity index 100% rename from custom-droneship/sway/local_config rename to custom-droneship/CONFIG/sway/local_config diff --git a/custom-droneship/CONFIG/waybar/local_config.jsonc b/custom-droneship/CONFIG/waybar/local_config.jsonc new file mode 100644 index 0000000..27fff38 --- /dev/null +++ b/custom-droneship/CONFIG/waybar/local_config.jsonc @@ -0,0 +1,30 @@ +{ + "disk#hdd1": { + "path": "/mnt/hdd1", + "interval": 30, + "format": " /mnt/hdd1 {specific_free:0.0f} of {specific_total:0.0f} GB free", + "unit": "GB", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" + }, + "custom/nvidia": { + "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", + "format": "󰓅 {}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", + "interval": 1 + }, + "modules-right": [ + "idle_inhibitor", + "cpu", + "custom/cputemp", + "memory", + "custom/nvidia", + "disk#root", + "disk#hdd1", + "backlight", + "pulseaudio", + "battery", + "clock", + "tray", + "custom/power" + ] +} diff --git a/custom-droneship/ROOT/etc/greetd/sway-config b/custom-droneship/ROOT/etc/greetd/sway-config deleted file mode 100644 index c9b718d..0000000 --- a/custom-droneship/ROOT/etc/greetd/sway-config +++ /dev/null @@ -1,12 +0,0 @@ -# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. -exec "qtgreet; swaymsg exit" - -bindsym Mod4+shift+e exec swaynag \ --t warning \ --m 'What do you want to do?' \ --b 'Poweroff' 'sudo poweroff' \ --b 'Reboot' 'sudo reboot' - -output DP-1 resolution 2560x1440 position 0 0 - -# include /etc/sway/config.d/* diff --git a/custom-droneship/ROOT/etc/greetd/sway.cfg b/custom-droneship/ROOT/etc/greetd/sway.cfg new file mode 100644 index 0000000..8616c73 --- /dev/null +++ b/custom-droneship/ROOT/etc/greetd/sway.cfg @@ -0,0 +1,3 @@ +output DP-1 resolution 2560x1440 position 0 0 +output DP-2 resolution 3840x2160 position 2560 0 +exec "regreet; swaymsg exit" diff --git a/custom-droneship/ROOT/etc/systemd/logind.conf.d/suspend.conf b/custom-droneship/ROOT/etc/systemd/logind.conf.d/suspend.conf new file mode 100644 index 0000000..9cc22aa --- /dev/null +++ b/custom-droneship/ROOT/etc/systemd/logind.conf.d/suspend.conf @@ -0,0 +1,3 @@ +[Login] +HandlePowerKey=ignore +HandlePowerKeyLongPress=poweroff diff --git a/custom-droneship/ROOT/etc/systemd/sleep.conf.d/hibernate.conf b/custom-droneship/ROOT/etc/systemd/sleep.conf.d/hibernate.conf new file mode 100644 index 0000000..02b3548 --- /dev/null +++ b/custom-droneship/ROOT/etc/systemd/sleep.conf.d/hibernate.conf @@ -0,0 +1,5 @@ +[Sleep] +AllowSuspend=no +AllowHibernation=no +AllowHybridSleep=no +AllowSuspendThenHibernate=no diff --git a/custom-droneship/waybar/local_config.jsonc b/custom-droneship/waybar/local_config.jsonc deleted file mode 100644 index d696c75..0000000 --- a/custom-droneship/waybar/local_config.jsonc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "disk#disk1": { - "path": "/", - "interval": 30, - "format": " / {specific_free:0.0f} of {specific_total:0.0f} GB free", - "unit": "GB", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /'" - }, - "disk#disk2": { - "path": "/mnt/hdd1", - "interval": 30, - "format": " /mnt/hdd1 {specific_free:0.0f} of {specific_total:0.0f} GB free", - "unit": "GB", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" - }, - "network": { - "interface": "enp6s0", - "interval": 5, - "format-wifi": "{icon}", - "format-ethernet": "󰈀", - "format-disconnected": "󰖪", - "format-disabled": "󰀝", - "format-icons": [ "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" ], - "format-wifi": "{icon} {ipaddr} {essid} ({signalStrength}%)", - "format-ethernet": "{icon} {ipaddr}", - "format-disconnected": "", //An empty format will hide the module. - "tooltip-format": "{icon} {ifname}: {ipaddr}", - "tooltip-format-ethernet": "{icon} {ifname}: {ipaddr}", - "tooltip-format-wifi": "{icon} {ifname} ({essid}): {ipaddr} ({signalStrength}%)", - "tooltip-format-disconnected": "{icon} disconnected", - "tooltip-format-disabled": "{icon} disabled", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 60x45 nmtui connect'" - } -} diff --git a/custom-mothership/CONFIG/sway/local_config b/custom-mothership/CONFIG/sway/local_config new file mode 100644 index 0000000..8c1611d --- /dev/null +++ b/custom-mothership/CONFIG/sway/local_config @@ -0,0 +1,32 @@ +# input +input type:tablet_tool map_to_region 2560 0 2560 1440 + +# output +output DP-1 resolution 5120x1440 + +# workspaces +bindsym { + # Switch to workspace + $mod+1 workspace $ws1 + $mod+2 workspace $ws2 + $mod+3 workspace $ws3 + $mod+4 workspace $ws4 + $mod+5 workspace $ws5 + $mod+6 workspace $ws6 + $mod+7 workspace $ws7 + $mod+8 workspace $ws8 + $mod+9 workspace $ws9 + $mod+0 workspace $ws10 + + # Move focused container to workspace + $mod+Shift+1 move container to workspace $ws1 + $mod+Shift+2 move container to workspace $ws2 + $mod+Shift+3 move container to workspace $ws3 + $mod+Shift+4 move container to workspace $ws4 + $mod+Shift+5 move container to workspace $ws5 + $mod+Shift+6 move container to workspace $ws6 + $mod+Shift+7 move container to workspace $ws7 + $mod+Shift+8 move container to workspace $ws8 + $mod+Shift+9 move container to workspace $ws9 + $mod+Shift+0 move container to workspace $ws10 +} diff --git a/custom-mothership/CONFIG/waybar/local_config.jsonc b/custom-mothership/CONFIG/waybar/local_config.jsonc new file mode 100644 index 0000000..27fff38 --- /dev/null +++ b/custom-mothership/CONFIG/waybar/local_config.jsonc @@ -0,0 +1,30 @@ +{ + "disk#hdd1": { + "path": "/mnt/hdd1", + "interval": 30, + "format": " /mnt/hdd1 {specific_free:0.0f} of {specific_total:0.0f} GB free", + "unit": "GB", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" + }, + "custom/nvidia": { + "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", + "format": "󰓅 {}", + "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", + "interval": 1 + }, + "modules-right": [ + "idle_inhibitor", + "cpu", + "custom/cputemp", + "memory", + "custom/nvidia", + "disk#root", + "disk#hdd1", + "backlight", + "pulseaudio", + "battery", + "clock", + "tray", + "custom/power" + ] +} diff --git a/custom-mothership/ROOT/etc/greetd/sway-config b/custom-mothership/ROOT/etc/greetd/sway-config deleted file mode 100644 index cb448b2..0000000 --- a/custom-mothership/ROOT/etc/greetd/sway-config +++ /dev/null @@ -1,12 +0,0 @@ -# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. -exec "qtgreet; swaymsg exit" - -bindsym Mod4+shift+e exec swaynag \ --t warning \ --m 'What do you want to do?' \ --b 'Poweroff' 'sudo poweroff' \ --b 'Reboot' 'sudo reboot' - -output DP-1 resolution 5120x1440 - -# include /etc/sway/config.d/* diff --git a/custom-mothership/ROOT/etc/greetd/sway.cfg b/custom-mothership/ROOT/etc/greetd/sway.cfg new file mode 100644 index 0000000..b889bb4 --- /dev/null +++ b/custom-mothership/ROOT/etc/greetd/sway.cfg @@ -0,0 +1,2 @@ +output DP-1 resolution 5120x1440 +exec "regreet; swaymsg exit" diff --git a/custom-mothership/ROOT/etc/systemd/logind.conf.d/suspend.conf b/custom-mothership/ROOT/etc/systemd/logind.conf.d/suspend.conf new file mode 100644 index 0000000..9cc22aa --- /dev/null +++ b/custom-mothership/ROOT/etc/systemd/logind.conf.d/suspend.conf @@ -0,0 +1,3 @@ +[Login] +HandlePowerKey=ignore +HandlePowerKeyLongPress=poweroff diff --git a/custom-mothership/ROOT/etc/systemd/sleep.conf.d/hibernate.conf b/custom-mothership/ROOT/etc/systemd/sleep.conf.d/hibernate.conf new file mode 100644 index 0000000..02b3548 --- /dev/null +++ b/custom-mothership/ROOT/etc/systemd/sleep.conf.d/hibernate.conf @@ -0,0 +1,5 @@ +[Sleep] +AllowSuspend=no +AllowHibernation=no +AllowHybridSleep=no +AllowSuspendThenHibernate=no diff --git a/custom-mothership/sway/local_config b/custom-mothership/sway/local_config deleted file mode 100644 index fc76aed..0000000 --- a/custom-mothership/sway/local_config +++ /dev/null @@ -1,51 +0,0 @@ -input type:tablet_tool map_to_region 2560 0 2560 1440 - -output DP-1 resolution 5120x1440 - -# switch to workspace -workspace $ws1 output DP-0 -workspace $ws2 output DP-0 -workspace $ws3 output DP-0 -workspace $ws4 output DP-0 -workspace $ws5 output DP-0 -workspace $ws6 output DP-0 -workspace $ws7 output DP-0 -workspace $ws8 output DP-0 -workspace $ws9 output DP-0 -workspace $ws10 output DP-0 - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws10 - -# Move focused container to workspace -bindsym $mod+Ctrl+1 move container to workspace $ws1 -bindsym $mod+Ctrl+2 move container to workspace $ws2 -bindsym $mod+Ctrl+3 move container to workspace $ws3 -bindsym $mod+Ctrl+4 move container to workspace $ws4 -bindsym $mod+Ctrl+5 move container to workspace $ws5 -bindsym $mod+Ctrl+6 move container to workspace $ws6 -bindsym $mod+Ctrl+7 move container to workspace $ws7 -bindsym $mod+Ctrl+8 move container to workspace $ws8 -bindsym $mod+Ctrl+9 move container to workspace $ws9 -bindsym $mod+Ctrl+0 move container to workspace $ws10 - -# Move to workspace with focused container -bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10 diff --git a/custom-mothership/waybar/local_config.jsonc b/custom-mothership/waybar/local_config.jsonc deleted file mode 100644 index 8ca3459..0000000 --- a/custom-mothership/waybar/local_config.jsonc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "disk#disk1": { - "path": "/", - "interval": 30, - "format": " / {specific_free:0.0f} of {specific_total:0.0f} GB free", - "unit": "GB", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /'" - }, - "disk#disk2": { - "path": "/mnt/hdd1", - "interval": 30, - "format": " /mnt/hdd1 {specific_free:0.0f} of {specific_total:0.0f} GB free", - "unit": "GB", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 ncdu -x /mnt/hdd1/'" - }, - "network": { - "interface": "wlp5s0", - "interval": 5, - "format-wifi": "{icon}", - "format-ethernet": "󰈀", - "format-disconnected": "󰖪", - "format-disabled": "󰀝", - "format-icons": [ "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" ], - "format-wifi": "{icon} {ipaddr} {essid} ({signalStrength}%)", - "format-ethernet": "{icon} {ipaddr}", - "format-disconnected": "", //An empty format will hide the module. - "tooltip-format": "{icon} {ifname}: {ipaddr}", - "tooltip-format-ethernet": "{icon} {ifname}: {ipaddr}", - "tooltip-format-wifi": "{icon} {ifname} ({essid}): {ipaddr} ({signalStrength}%)", - "tooltip-format-disconnected": "{icon} disconnected", - "tooltip-format-disabled": "{icon} disabled", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 60x45 nmtui connect'" - } -} diff --git a/custom-sl3/CONFIG/sway/local_config b/custom-sl3/CONFIG/sway/local_config new file mode 100644 index 0000000..380cdca --- /dev/null +++ b/custom-sl3/CONFIG/sway/local_config @@ -0,0 +1,34 @@ +# input +input type:touchpad { + pointer_accel 0.8 +} + +# output +output eDP-1 resolution 2736x1824 scale 1.6 + +# workspaces +bindsym { + # Switch to workspace + $mod+1 workspace $ws1 + $mod+2 workspace $ws2 + $mod+3 workspace $ws3 + $mod+4 workspace $ws4 + $mod+5 workspace $ws5 + $mod+6 workspace $ws6 + $mod+7 workspace $ws7 + $mod+8 workspace $ws8 + $mod+9 workspace $ws9 + $mod+0 workspace $ws10 + + # Move focused container to workspace + $mod+Shift+1 move container to workspace $ws1 + $mod+Shift+2 move container to workspace $ws2 + $mod+Shift+3 move container to workspace $ws3 + $mod+Shift+4 move container to workspace $ws4 + $mod+Shift+5 move container to workspace $ws5 + $mod+Shift+6 move container to workspace $ws6 + $mod+Shift+7 move container to workspace $ws7 + $mod+Shift+8 move container to workspace $ws8 + $mod+Shift+9 move container to workspace $ws9 + $mod+Shift+0 move container to workspace $ws10 +} diff --git a/custom-sl3/CONFIG/waybar/local_config.jsonc b/custom-sl3/CONFIG/waybar/local_config.jsonc new file mode 100644 index 0000000..6c2b44e --- /dev/null +++ b/custom-sl3/CONFIG/waybar/local_config.jsonc @@ -0,0 +1,15 @@ +{ + "modules-right": [ + "idle_inhibitor", + "cpu", + "custom/cputemp", + "memory", + "disk#root", + "backlight", + "pulseaudio", + "battery", + "clock", + "tray", + "custom/power" + ] +} diff --git a/custom-sl3/sway/config.d/99_output b/custom-sl3/ROOT/etc/greetd/sway.cfg similarity index 60% rename from custom-sl3/sway/config.d/99_output rename to custom-sl3/ROOT/etc/greetd/sway.cfg index 3fbb277..85742d3 100644 --- a/custom-sl3/sway/config.d/99_output +++ b/custom-sl3/ROOT/etc/greetd/sway.cfg @@ -1 +1,2 @@ output eDP-1 resolution 2736x1824 scale 1.6 +exec "regreet; swaymsg exit" diff --git a/ROOT/etc/systemd/logind.conf.d/suspend.conf b/custom-sl3/ROOT/etc/systemd/logind.conf.d/suspend.conf similarity index 100% rename from ROOT/etc/systemd/logind.conf.d/suspend.conf rename to custom-sl3/ROOT/etc/systemd/logind.conf.d/suspend.conf diff --git a/ROOT/etc/systemd/sleep.conf.d/hibernate.conf b/custom-sl3/ROOT/etc/systemd/sleep.conf.d/hibernate.conf similarity index 75% rename from ROOT/etc/systemd/sleep.conf.d/hibernate.conf rename to custom-sl3/ROOT/etc/systemd/sleep.conf.d/hibernate.conf index 1dcc192..ff73bf7 100644 --- a/ROOT/etc/systemd/sleep.conf.d/hibernate.conf +++ b/custom-sl3/ROOT/etc/systemd/sleep.conf.d/hibernate.conf @@ -1,2 +1,2 @@ -[sleep] +[Sleep] HibernateDelaySec=30min diff --git a/custom-sl3/sway/config.d/99_input b/custom-sl3/sway/config.d/99_input deleted file mode 100644 index 2ddd5c4..0000000 --- a/custom-sl3/sway/config.d/99_input +++ /dev/null @@ -1,3 +0,0 @@ -input type:touchpad { - pointer_accel 0.8 -} diff --git a/custom-spro5/CONFIG/sway/local_config b/custom-spro5/CONFIG/sway/local_config new file mode 100644 index 0000000..9b9d5af --- /dev/null +++ b/custom-spro5/CONFIG/sway/local_config @@ -0,0 +1,35 @@ +# input +input type:touchpad { + pointer_accel 0.4 +} +bindswitch tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true + +# output +output eDP-1 resolution 2496x1664 scale 1.6 + +# workspaces +bindsym { + # Switch to workspace + $mod+1 workspace $ws1 + $mod+2 workspace $ws2 + $mod+3 workspace $ws3 + $mod+4 workspace $ws4 + $mod+5 workspace $ws5 + $mod+6 workspace $ws6 + $mod+7 workspace $ws7 + $mod+8 workspace $ws8 + $mod+9 workspace $ws9 + $mod+0 workspace $ws10 + + # Move focused container to workspace + $mod+Shift+1 move container to workspace $ws1 + $mod+Shift+2 move container to workspace $ws2 + $mod+Shift+3 move container to workspace $ws3 + $mod+Shift+4 move container to workspace $ws4 + $mod+Shift+5 move container to workspace $ws5 + $mod+Shift+6 move container to workspace $ws6 + $mod+Shift+7 move container to workspace $ws7 + $mod+Shift+8 move container to workspace $ws8 + $mod+Shift+9 move container to workspace $ws9 + $mod+Shift+0 move container to workspace $ws10 +} diff --git a/custom-spro5/CONFIG/waybar/local_config.jsonc b/custom-spro5/CONFIG/waybar/local_config.jsonc new file mode 100644 index 0000000..6c2b44e --- /dev/null +++ b/custom-spro5/CONFIG/waybar/local_config.jsonc @@ -0,0 +1,15 @@ +{ + "modules-right": [ + "idle_inhibitor", + "cpu", + "custom/cputemp", + "memory", + "disk#root", + "backlight", + "pulseaudio", + "battery", + "clock", + "tray", + "custom/power" + ] +} diff --git a/custom-spro5/sway/config.d/99_output b/custom-spro5/ROOT/etc/greetd/sway.cfg similarity index 60% rename from custom-spro5/sway/config.d/99_output rename to custom-spro5/ROOT/etc/greetd/sway.cfg index 465ac40..7cacca1 100644 --- a/custom-spro5/sway/config.d/99_output +++ b/custom-spro5/ROOT/etc/greetd/sway.cfg @@ -1 +1,2 @@ output eDP-1 resolution 2496x1664 scale 1.6 +exec "regreet; swaymsg exit" diff --git a/custom-spro5/ROOT/etc/systemd/logind.conf.d/suspend.conf b/custom-spro5/ROOT/etc/systemd/logind.conf.d/suspend.conf new file mode 100644 index 0000000..33648b7 --- /dev/null +++ b/custom-spro5/ROOT/etc/systemd/logind.conf.d/suspend.conf @@ -0,0 +1,8 @@ +[Login] +IdleAction=suspend-then-hibernate +IdleActionSec=10min +HandlePowerKey=suspend-then-hibernate +HandlePowerKeyLongPress=poweroff +HandleLidSwitch=suspend-then-hibernate +HandleLidSwitchExternalPower=suspend-then-hibernate +HandleLidSwitchDocked=ignore diff --git a/custom-spro5/ROOT/etc/systemd/sleep.conf.d/hibernate.conf b/custom-spro5/ROOT/etc/systemd/sleep.conf.d/hibernate.conf new file mode 100644 index 0000000..ff73bf7 --- /dev/null +++ b/custom-spro5/ROOT/etc/systemd/sleep.conf.d/hibernate.conf @@ -0,0 +1,2 @@ +[Sleep] +HibernateDelaySec=30min diff --git a/custom-spro5/sway/config.d/99_input b/custom-spro5/sway/config.d/99_input deleted file mode 100644 index f85e8d6..0000000 --- a/custom-spro5/sway/config.d/99_input +++ /dev/null @@ -1,4 +0,0 @@ -input type:touchpad { - pointer_accel 0.4 -} -bindswitch tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true diff --git a/endos.py b/endos.py index 8a67999..d84f4fb 100755 --- a/endos.py +++ b/endos.py @@ -6,31 +6,37 @@ # ] # /// # TODO -# add or deprecate -# - ROOT/etc/[greetd|qtgreet] -# - ROOT/usr/local/bin/start-sway -# - custom-droneship -# - custom-mothership -# - homeassistant + musicassistant -# - environment.d -# - HOME/.profile -# - waybar -# - mypy -# - mako -# - helix -# - nushell +# fix btop colors +# pre-luks remote ssh +# modify /etc/greetd/regreet.toml WLR_NO_HARDWARE_CURSORS +# add +# - sudo ufw allow 22/tcp comment "ssh" +# - sudo ufw default allow FORWARD +# - sudo ufw allow 2222 +# - ... etc +# - sudo enable ufw from difflib import unified_diff from os.path import lexists from pathlib import Path +from shutil import rmtree from subprocess import run from urllib.request import urlretrieve -HOME = Path("~").expanduser() -CFG = HOME / ".config" -DOTFILES = HOME / "dotfiles" -CUSTOMDIR = DOTFILES / f"custom-{open('/etc/hostname').read().strip()}" +HOSTNAME = open("/etc/hostname").read().strip() +HOME_TGT = Path("~").expanduser() +ROOT_TGT = Path("/") +DOTFILES = HOME_TGT / "dotfiles" +HOME_SRC = DOTFILES / "HOME" +ROOT_SRC = DOTFILES / "ROOT" +CFG_TGT = HOME_TGT / ".config" +CFG_SRC = DOTFILES / "CONFIG" +CUSTOM_SRC = DOTFILES / f"custom-{HOSTNAME}" installmap = dict( - fonts=("noto-fonts-emoji", "ttf-hack", "font-manager"), + fonts=( + "noto-fonts-emoji", + "ttf-hack", + "font-manager", + ), zsh=( "zsh", "zsh-autosuggestions", @@ -44,16 +50,58 @@ installmap = dict( "bat", ), tmux=("tmux", "urlscan"), - nvim=("neovim", "ripgrep"), - utils=("uv", "bat", "ncdu", "unzip", "jq"), - gittools=("tig", "diff-so-fancy", "git-secret", "git-delta", "git-lfs", "lazygit", "bat"), + editors=( + "neovim", + "helix", + "ripgrep", + "npm", # required for nvim plugins + "go", # required for vim-hexokinase build + ), + utils=("uv", "ncdu", "unzip", "jq"), + gittools=( + "tig", + "diff-so-fancy", + "git-secret", + "git-delta", + "git-lfs", + "lazygit", + "bat", + ), pdftools=("sioyek", "zathura", "zathura-pdf-mupdf", "zathura-djvu", "zathura-ps"), - media=("vlc", "mpv", "protobuf", "yt-dlp", "quodlibet", "qimgv"), - filebrowsers=("pcmanfm", "yazi", "ranger", "zoxide", "eza"), + mediaviewers=( + # video + "vlc", + "mpv", + "protobuf", + "yt-dlp", + "v4l-utils", + # photos + "qimgv", + # music + "quodlibet", + # audio + "pamixer", + "noisetorch", + ), + filebrowsers=( + "yazi", + "ranger", + "pcmanfm", + "thunar", + "gparted", + "sshfs", + "file-roller", + "zoxide", # quick search + "eza", # pretty alternative to `ls` + "glow", # markdown renderer + ), netbrowsers=( "qutebrowser", "firefox", - "python-adblock", + "google-chrome", + "microsoft-edge-stable-bin", + "w3m", + "python-adblock", # for qutebrowser ad blocker "python-tldextract", "bitwarden-cli", # for qutebrowser autofill ), @@ -71,42 +119,45 @@ installmap = dict( "python-aiohttp-oauthlib", # for google vdirsyncer ), monitors=( + "htop", # hardware "btop", # hardware "nvtop", # gpu "lazyjournal", # journald "isd", # systemd "bandwhich", # network + "sysstat", ), - apps=("bitwarden", "qalculate-gtk", "vesktop"), - swaytools=( - "flashfocus", # quick flash when changing app in focus - "noisetorch", # noise cancellation - "unipicker", # unicode symbol selector - "wl-clip-persist", # keep clipboard after close + apps=("keepassxc", "bitwarden", "qalculate-gtk", "vesktop"), + sway=( + # visuals "wlsunset", # eye saver - "blueman", # bluetooth "wdisplays", # ui for display settings + "flashfocus", # quick flash when changing app in focus + # clipboard + "wl-clip-persist", # keep clipboard after close + # div + "unipicker", # unicode symbol selector + "blueman", # bluetooth "wev", # debugging of ui - "gtklock", # lock screen ), remotedata=("rclone", "dropbox", "minio-client"), - screensharing=( - "wireplumber", - "xdg-desktop-portal", - "xdg-desktop-portal-wlr", - ), - optional_nvidia=("cuda", "nvidia-settings"), - optional_coolercontrol=("coolercontrol",), - optional_containers=( + screensharing=("wireplumber",), + nvidia=("cuda", "nvidia-settings"), + coolercontrol=("coolercontrol",), + docker=( "docker", - "docker-compose", + "dry-bin", # docker tui + ), + k8s=( "docker-buildx", # advanced build "qemu-user-static-binfmt", # build arm64 "qemu-user-static", # build arm64 - "dry-bin", # docker tui "k9s", # kubernetes tui + "wireguard-tools", # includes wg-quick + "sops", # secret mgmt + "flux-bin", + "open-iscsi", # required by longhorn ), - optional_nvidia_containers=("nvidia-docker",), ) @@ -125,9 +176,12 @@ def compare(src: Path, tgt: Path) -> str: return "".join(unified_diff(srcdata, tgtdata, str(src), str(tgt))) -def helper_maybe_symlink(src: Path, tgt: Path, overwrite: bool) -> bool: - src = src.expanduser() - tgt = tgt.expanduser() +def helper_maybe_copy( + src_folder: Path, tgt_folder: Path, sub: str, overwrite: bool, symlink: bool +) -> bool: + src = src_folder.expanduser() / sub + tgt = tgt_folder.expanduser() / sub + assert src.exists() tgt.parent.mkdir(exist_ok=True) if lexists(tgt): if not overwrite: @@ -138,27 +192,28 @@ def helper_maybe_symlink(src: Path, tgt: Path, overwrite: bool) -> bool: if tgt.is_file() or tgt.is_symlink(): tgt.unlink() else: - tgt.rmdir() + rmtree(str(tgt)) tgt.symlink_to(src) return True -def helper_symlink_contents( - src_folder: Path, tgt_folder: Path, overwrite: bool +def helper_symlink_foldercontent( + src_parent: Path, tgt_parent: Path, folder: str, overwrite: bool ) -> None: - src_folder = src_folder.expanduser() - tgt_folder = tgt_folder.expanduser() + src_folder = src_parent.expanduser() / folder + tgt_folder = tgt_parent.expanduser() / folder tgt_folder.mkdir(exist_ok=True) assert src_folder.is_dir() assert tgt_folder.is_dir() or tgt_folder.is_symlink() for src in src_folder.iterdir(): - if src.name.endswith(".secret"): # git-secret item + name = src.name + if name.endswith(".secret"): # git-secret item continue - helper_maybe_symlink(src, tgt_folder / src.name, overwrite) + helper_maybe_copy(src_folder, tgt_folder, name, overwrite, symlink=True) def helper_check_if_installed(pkg: str) -> bool: - return run(["yay", "-Qs", pkg], capture_output=True).returncode == 0 + return run(["pacman", "-Q", pkg], capture_output=True).returncode == 0 def helper_uninstall(*pkgs: str) -> None: @@ -173,58 +228,63 @@ def helper_install(*pkgs: str, reinstall: bool) -> None: def install_fonts(reinstall: bool) -> None: + tgt = Path("~/.local/share/fonts/Akkurat-Mono.otf").expanduser() + tgt.parent.mkdir(exist_ok=True) urlretrieve( "https://raw.githubusercontent.com/SUNET/static_sunet_se/refs/heads/master/fonts/Akkurat-Mono.otf", - Path("~/.local/share/fonts/Akkurat-Mono.otf").expanduser(), + tgt, ) helper_install(*installmap["fonts"], reinstall=reinstall) def install_zsh(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["zsh"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "zsh", CFG / "zsh", overwrite) - run("sudo chsh -s /usr/bin/zsh".split()) - helper_maybe_symlink(DOTFILES / "starship.toml", CFG / "starship.toml", overwrite) - helper_maybe_symlink(DOTFILES / "HOME/.zshenv", HOME / ".zshenv", overwrite) - helper_maybe_symlink( - DOTFILES / "atuin/config.toml", CFG / "atuin/config.toml", overwrite - ) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "zsh", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "atuin", overwrite) + run("chsh -s /usr/bin/zsh".split()) + helper_maybe_copy(CFG_SRC, CFG_TGT, "starship.toml", overwrite, symlink=True) + helper_maybe_copy(HOME_SRC, HOME_TGT, ".zshenv", overwrite, symlink=True) def install_tmux(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["tmux"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "tmux", CFG / "tmux", overwrite) - tpmpath = CFG / "tmux/plugins/tpm" + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "tmux", overwrite) + tpmpath = CFG_TGT / "tmux/plugins/tpm" if overwrite or not lexists(tpmpath): if lexists(tpmpath): if tpmpath.is_symlink(): tpmpath.unlink() else: - tpmpath.rmdir() + rmtree(str(tpmpath)) run(["git", "clone", "https://github.com/tmux-plugins/tpm", tpmpath]) -def install_nvim(overwrite: bool, reinstall: bool) -> None: - helper_install(*installmap["nvim"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "nvim", CFG / "nvim", overwrite) +def install_editors(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["editors"], reinstall=reinstall) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "nvim", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "helix", overwrite) def install_gittools(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["gittools"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "tig", CFG / "tig", overwrite) - helper_maybe_symlink(DOTFILES / "HOME/.gitconfig", Path("~/.gitconfig"), overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "tig", overwrite) + helper_maybe_copy(HOME_SRC, HOME_TGT, ".gitconfig", overwrite, symlink=True) def install_pdftools(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["pdftools"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "sioyek", CFG / "sioyek", overwrite) - helper_symlink_contents(DOTFILES / "zathura", CFG / "zathura", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "sioyek", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "zathura", overwrite) + + +def install_mediaviewers(reinstall: bool) -> None: + helper_install(*installmap["mediaviewers"], reinstall=reinstall) def install_filebrowsers(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["filebrowsers"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "ranger", CFG / "ranger", overwrite) - helper_symlink_contents(DOTFILES / "yazi", CFG / "yazi", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "ranger", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "yazi", overwrite) for plugin in [ "chmod", "git", @@ -237,73 +297,116 @@ def install_filebrowsers(overwrite: bool, reinstall: bool) -> None: run(f"ya pkg add yazi-rs/plugins:{plugin}".split()) +def install_netbrowsers(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["netbrowsers"], reinstall=reinstall) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "qutebrowser", overwrite) + helper_maybe_copy(HOME_SRC, HOME_TGT, ".w3m/keymap", overwrite, symlink=True) + (HOME_TGT / "Downloads").mkdir(exist_ok=True) + + def install_chat(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["chat"], reinstall=reinstall) - helper_symlink_contents(DOTFILES / "discordo", CFG / "discordo", overwrite) - helper_symlink_contents(DOTFILES / "gurk", CFG / "gurk", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "discordo", overwrite) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "gurk", overwrite) def install_emailcalrss(overwrite: bool, reinstall: bool) -> None: helper_install(*installmap["emailcalrss"], reinstall=reinstall) for tgt in ["vdirsyncer", "khard", "khal", "aerc", "newsboat"]: - helper_symlink_contents(DOTFILES / tgt, CFG / tgt, overwrite) - for sub in [".local/share/applications/userapp-khalimport.des", ".w3m/keymap"]: - helper_maybe_symlink(DOTFILES / "HOME" / sub, HOME / sub, overwrite) - run(f"chmod 600 {CFG / 'aerc/accounts.conf'}".split()) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, tgt, overwrite) + run("systemctl enable --user --now vdirsyncer.timer".split()) + helper_maybe_copy( + HOME_SRC / ".local/share/applications/", + HOME_TGT / ".local/share/applications/", + "userapp-khalimport.desktop", + overwrite, + symlink=True, + ) + run(f"chmod 600 {CFG_TGT / 'aerc/accounts.conf'}".split()) + (HOME_TGT / ".cache/newsboat").mkdir(exist_ok=True) + (HOME_TGT / "Calendars").mkdir(exist_ok=True) + (HOME_TGT / "Contacts").mkdir(exist_ok=True) -def install_swaytools(overwrite: bool, reinstall: bool) -> None: - helper_install(*installmap["swaytools"], reinstall=reinstall) - for base in [DOTFILES, CUSTOMDIR]: - sub = "sway/config.d" - helper_symlink_contents(base / sub, CFG / sub, overwrite) - run("sudo systemctl enable --now bluetooth".split()) +def install_sway(overwrite: bool, reinstall: bool) -> None: + # sudo + helper_uninstall("autotiling", "cliphist") + helper_install(*installmap["sway"], reinstall=reinstall) for sub in [ "etc/systemd/logind.conf.d/suspend.conf", "etc/systemd/sleep.conf.d/hibernate.conf", + "etc/greetd/sway.cfg", ]: - run(["sudo", "cp", str(DOTFILES / "ROOT" / sub), str(Path("/") / sub)]) + src = CUSTOM_SRC / "ROOT" / sub + tgt = ROOT_TGT / sub + run(["sudo", "mkdir", "-p", str(tgt.parent)]) + if tgt.exists(): + if diff := compare(src, tgt): + print("DIFF:\n" + diff) + if input("overwrite? (y/n) ") == "n": + continue + run(["sudo", "rm", str(tgt)]) + run(["sudo", "cp", str(src), str(tgt)]) run("sudo systemctl enable --now bluetooth".split()) + # user + run("systemctl --user enable --now flashfocus".split()) + if (tgt := CFG_TGT / "waybar/config").exists(): + tgt.unlink() + for sub in ["sway", "waybar", "gtk-3.0", "mako", "fuzzel", "nwg-drawer"]: + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, sub, overwrite) + helper_symlink_foldercontent(CUSTOM_SRC / "CONFIG", CFG_TGT, "sway", overwrite) + helper_symlink_foldercontent(CUSTOM_SRC / "CONFIG", CFG_TGT, "waybar", overwrite) + helper_maybe_copy(CFG_SRC, CFG_TGT, "mimeapps.list", overwrite, symlink=True) + helper_symlink_foldercontent( + HOME_SRC, + HOME_TGT, + ".local/share/applications", + overwrite, + ) + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "foot", overwrite) def configure_pytools(overwrite: bool) -> None: for sub in [".ipython/profile_default", ".jupyter"]: - helper_symlink_contents(DOTFILES / "HOME" / sub, HOME / sub, overwrite) + tgt = HOME_TGT / sub + run(["mkdir", "-p", str(tgt)]) + helper_symlink_foldercontent(HOME_SRC, HOME_TGT, sub, overwrite) -def configure_foot(overwrite: bool) -> None: - helper_symlink_contents(DOTFILES / "foot", CFG / "foot", overwrite) +def install_k8sreqs(overwrite: bool, reinstall: bool) -> None: + # sudo + helper_install(*installmap["k8s"], reinstall=reinstall) + run("sudo systemctl enable --now docker.service".split()) + sub = "etc/modules-load.d/br_netfilter.conf" + run(["sudo", "cp", str(ROOT_SRC / sub), str(ROOT_TGT / sub)]) + # user + helper_symlink_foldercontent(CFG_SRC, CFG_TGT, "k9s", overwrite) def installer( + *, overwrite: bool = False, reinstall: bool = False, - with_gpu: bool = False, - with_containers: bool = False, - with_coolercontrol: bool = False, ) -> None: - if helper_check_if_installed("cliphist"): - helper_uninstall("cliphist") - print("removed cliphist") install_fonts(reinstall) print("installed fonts") install_zsh(overwrite, reinstall) print("installed zsh") install_tmux(overwrite, reinstall) print("installed tmux") - install_nvim(overwrite, reinstall) - print("installed nvim") + install_editors(overwrite, reinstall) + print("installed editors") helper_install(*installmap["utils"], reinstall=reinstall) print("installed utils") install_gittools(overwrite, reinstall) print("installed gittools") install_pdftools(overwrite, reinstall) print("installed pdftools") - helper_install(*installmap["media"], reinstall=reinstall) - print("installed media") + install_mediaviewers(reinstall) + print("installed mediaviewers") install_filebrowsers(overwrite, reinstall) print("installed filebrowsers") - helper_install(*installmap["netbrowsers"], reinstall=reinstall) + install_netbrowsers(overwrite, reinstall) print("installed netbrowsers") install_emailcalrss(overwrite, reinstall) print("installed emailcalrss") @@ -313,7 +416,7 @@ def installer( print("installed monitors") helper_install(*installmap["apps"], reinstall=reinstall) print("installed apps") - install_swaytools(overwrite, reinstall) + install_sway(overwrite, reinstall) print("installed sway") helper_install(*installmap["remotedata"], reinstall=reinstall) print("installed remotedata") @@ -321,37 +424,51 @@ def installer( print("installed screensharing") configure_pytools(overwrite=overwrite) print("configured python tools") - configure_foot(overwrite=overwrite) - print("configured foot") - if with_gpu: - helper_install(*installmap["optional_nvidia"], reinstall=reinstall) + if HOSTNAME in ["mothership", "droneship"]: + helper_install(*installmap["nvidia"], reinstall=reinstall) print("installed nvidia") - if with_containers: - helper_install(*installmap["optional_containers"], reinstall=reinstall) - run("sudo systemctl enable --now docker.service".split()) - helper_symlink_contents(DOTFILES / "k9s", CFG / "k9s", overwrite) - print("installed containers") - if with_gpu and with_containers: - helper_install(*installmap["optional_nvidia_containers"], reinstall=reinstall) - print("installed nvidia containers") - if with_coolercontrol: - helper_install(*installmap["optional_coolercontrol"], reinstall=reinstall) + if HOSTNAME in ["mothership", "droneship"]: + install_k8sreqs(overwrite, reinstall) + print("installed k8s requirements") + if HOSTNAME in ["mothership", "droneship"]: + helper_install(*installmap["coolercontrol"], reinstall=reinstall) run("sudo systemctl enable --now coolercontrold.service".split()) print("installed coolercontrol") + if HOSTNAME in ["mothership"]: + helper_install(*installmap["docker"], reinstall=reinstall) + for file in ["configuration.yaml", "SERVICE_ACCOUNT.JSON"]: + helper_maybe_copy( + CFG_SRC, + CFG_TGT, + f"homeassistant/{file}", + overwrite, + symlink=False, + ) + print("installed docker + home assistant") print(""" MANUAL NEXT STEPS: - set up vdirsyncer with google calendar using - https://vdirsyncer.pimutils.org/en/stable/config.html#google + # vdirsyncer + - set up with google calendar using + https://vdirsyncer.pimutils.org/en/stable/config.html#google + - run `vdirsyncer discover` then `vdiscover sync` - allow firefox windowed fullscreen by setting full-screen-api.ignore-widgets - to true in about:config + # firefox + - allow windowed fullscreen by setting full-screen-api.ignore-widgets to + true in about:config - set coolercontrold log level to WARN: - `sudo systemctl edit coolercontrold.service` + # coolercontrol + - set coolercontrold log level to WARN: `sudo systemctl edit + coolercontrold.service` - docker with non-root daemon - `sudo groupadd docker && sudo usermod -aG docker $USER` + # k8s + - configure `/etc/hosts` + - run `hjarl-system/k8s.py` scripts + + # docker / home assistant + - docker with non-root daemon + `sudo groupadd docker && sudo usermod -aG docker $USER` + - run home assistant and music assistant scripts to start docker services """) diff --git a/environment.d/0-sway.conf b/environment.d/0-sway.conf deleted file mode 100644 index d9b3ca6..0000000 --- a/environment.d/0-sway.conf +++ /dev/null @@ -1,18 +0,0 @@ -# graphics -MOZ_ENABLE_WAYLAND=1 -QT_QPA_PLATFORM=wayland-egl -CLUTTER_BACKEND=wayland -ECORE_EVAS_ENGINE=wayland-egl -ELM_ENGINE=wayland_egl -SDL_VIDEODRIVER=wayland -_JAVA_AWT_WM_NONREPARENTING=1 -NO_AT_BRIDGE=1 - -# QT theme -QT_QPA_PLATFORMTHEME=qt5ct - -TERMINAL=/usr/bin/footclient -BROWSER=/usr/bin/qutebrowser - -# sioyek fix -# QT_QPA_PLATFORM=xcb diff --git a/homeassistant/SERVICE_ACCOUNT.JSON.secret b/homeassistant/SERVICE_ACCOUNT.JSON.secret deleted file mode 100644 index 3b6935d..0000000 Binary files a/homeassistant/SERVICE_ACCOUNT.JSON.secret and /dev/null differ diff --git a/homeassistant/configuration.yaml b/homeassistant/configuration.yaml deleted file mode 100644 index a4f3280..0000000 --- a/homeassistant/configuration.yaml +++ /dev/null @@ -1,269 +0,0 @@ - -# Loads default set of integrations. Do not remove. -default_config: - -# Load frontend themes from the themes folder -frontend: - themes: !include_dir_merge_named themes - -http: - use_x_forwarded_for: true - trusted_proxies: 10.2.0.0/16 - -automation: !include automations.yaml -script: !include scripts.yaml -scene: !include scenes.yaml - -google_assistant: - project_id: homeassistant-mothership-1123 - service_account: !include SERVICE_ACCOUNT.JSON - report_state: true - -sensor: -- platform: nordpool - region: "NO1" - currency: "NOK" - low_price_cutoff: 0.95 -# - platform: template -# sensors: -# # NORDPOOL PRICES -# nordpool_today_hr_00_01: -# friendly_name: "Today hour 0" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[0] }}" -# nordpool_today_hr_01_02: -# friendly_name: "Today hour 1" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[1] }}" -# nordpool_today_hr_02_03: -# friendly_name: "Today hour 2" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[2] }}" -# nordpool_today_hr_03_04: -# friendly_name: "Today hour 3" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[3] }}" -# nordpool_today_hr_04_05: -# friendly_name: "Today hour 4" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[4] }}" -# nordpool_today_hr_05_06: -# friendly_name: "Today hour 5" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[5] }}" -# nordpool_today_hr_06_07: -# friendly_name: "Today hour 6" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[6] }}" -# nordpool_today_hr_07_08: -# friendly_name: "Today hour 7" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[7] }}" -# nordpool_today_hr_08_09: -# friendly_name: "Today hour 8" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[8] }}" -# nordpool_today_hr_09_10: -# friendly_name: "Today hour 9" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[9] }}" -# nordpool_today_hr_10_11: -# friendly_name: "Today hour 10" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[10] }}" -# nordpool_today_hr_11_12: -# friendly_name: "Today hour 11" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[11] }}" -# nordpool_today_hr_12_13: -# friendly_name: "Today hour 12" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[12] }}" -# nordpool_today_hr_13_14: -# friendly_name: "Today hour 13" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[13] }}" -# nordpool_today_hr_14_15: -# friendly_name: "Today hour 14" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[14] }}" -# nordpool_today_hr_15_16: -# friendly_name: "Today hour 15" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[15] }}" -# nordpool_today_hr_16_17: -# friendly_name: "Today hour 16" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[16] }}" -# nordpool_today_hr_17_18: -# friendly_name: "Today hour 17" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[17] }}" -# nordpool_today_hr_18_19: -# friendly_name: "Today hour 18" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[18] }}" -# nordpool_today_hr_19_20: -# friendly_name: "Today hour 19" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[19] }}" -# nordpool_today_hr_20_21: -# friendly_name: "Today hour 20" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[20] }}" -# nordpool_today_hr_21_22: -# friendly_name: "Today hour 21" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[21] }}" -# nordpool_today_hr_22_23: -# friendly_name: "Today hour 22" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[22] }}" -# nordpool_today_hr_23_24: -# friendly_name: "Today hour 23" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.today[23] }}" -# nordpool_tomorrow_hr_00_01: -# friendly_name: "Tomorrow hour 0" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[0] }}" -# nordpool_tomorrow_hr_01_02: -# friendly_name: "Tomorrow hour 1" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[1] }}" -# nordpool_tomorrow_hr_02_03: -# friendly_name: "Tomorrow hour 2" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[2] }}" -# nordpool_tomorrow_hr_03_04: -# friendly_name: "Tomorrow hour 3" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[3] }}" -# nordpool_tomorrow_hr_04_05: -# friendly_name: "Tomorrow hour 4" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[4] }}" -# nordpool_tomorrow_hr_05_06: -# friendly_name: "Tomorrow hour 5" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[5] }}" -# nordpool_tomorrow_hr_06_07: -# friendly_name: "Tomorrow hour 6" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[6] }}" -# nordpool_tomorrow_hr_07_08: -# friendly_name: "Tomorrow hour 7" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[7] }}" -# nordpool_tomorrow_hr_08_09: -# friendly_name: "Tomorrow hour 8" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[8] }}" -# nordpool_tomorrow_hr_09_10: -# friendly_name: "Tomorrow hour 9" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[9] }}" -# nordpool_tomorrow_hr_10_11: -# friendly_name: "Tomorrow hour 10" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[10] }}" -# nordpool_tomorrow_hr_11_12: -# friendly_name: "Tomorrow hour 11" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[11] }}" -# nordpool_tomorrow_hr_12_13: -# friendly_name: "Tomorrow hour 12" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[12] }}" -# nordpool_tomorrow_hr_13_14: -# friendly_name: "Tomorrow hour 13" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[13] }}" -# nordpool_tomorrow_hr_14_15: -# friendly_name: "Tomorrow hour 14" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[14] }}" -# nordpool_tomorrow_hr_15_16: -# friendly_name: "Tomorrow hour 15" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[15] }}" -# nordpool_tomorrow_hr_16_17: -# friendly_name: "Tomorrow hour 16" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[16] }}" -# nordpool_tomorrow_hr_17_18: -# friendly_name: "Tomorrow hour 17" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[17] }}" -# nordpool_tomorrow_hr_18_19: -# friendly_name: "Tomorrow hour 18" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[18] }}" -# nordpool_tomorrow_hr_19_20: -# friendly_name: "Tomorrow hour 19" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[19] }}" -# nordpool_tomorrow_hr_20_21: -# friendly_name: "Tomorrow hour 20" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[20] }}" -# nordpool_tomorrow_hr_21_22: -# friendly_name: "Tomorrow hour 21" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[21] }}" -# nordpool_tomorrow_hr_22_23: -# friendly_name: "Tomorrow hour 22" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[22] }}" -# nordpool_tomorrow_hr_23_24: -# friendly_name: "Tomorrow hour 23" -# icon_template: mdi:cash -# unit_of_measurement: "øre" -# value_template: "{{ states.sensor.nordpool_kwh_oslo_nok_3_10_025.attributes.tomorrow[23] }}" diff --git a/mako/config b/mako/config deleted file mode 100644 index 41c340f..0000000 --- a/mako/config +++ /dev/null @@ -1,28 +0,0 @@ -font=Cozette 11 -format=%a ⏵ %s\n%b -sort=-time -output=DP-2 -layer=overlay -anchor=bottom-center -background-color=#2e3440 -width=300 -height=110 -margin=5 -padding=0,5,10 -border-size=2 -border-color=#88c0d0 -border-radius=15 -icons=0 -max-icon-size=64 -default-timeout=0 -ignore-timeout=1 - -[urgency=normal] -border-color=#d08770 - -[urgency=high] -border-color=#bf616a -default-timeout=0 - -[summary~="log-.*"] -border-color=#a3be8c diff --git a/mypy/mypy.ini b/mypy/mypy.ini deleted file mode 100644 index 82087eb..0000000 --- a/mypy/mypy.ini +++ /dev/null @@ -1,6 +0,0 @@ -[mypy] -strict = true -local_partial_types = true -warn_return_any = false -disallow_subclassing_any = false -pretty = true diff --git a/homeassistant/run_homeassistant.sh b/scripts/run_homeassistant.sh similarity index 100% rename from homeassistant/run_homeassistant.sh rename to scripts/run_homeassistant.sh diff --git a/musicassistant/run_musicassistant.sh b/scripts/run_musicassistant.sh similarity index 100% rename from musicassistant/run_musicassistant.sh rename to scripts/run_musicassistant.sh diff --git a/sway/config b/sway/config deleted file mode 100644 index 30b7523..0000000 --- a/sway/config +++ /dev/null @@ -1,332 +0,0 @@ -include /etc/sway/config.d/10-service.conf -include /etc/sway/config.d/50-systemd-user.conf - -# THEME -set $background /usr/share/backgrounds/wallpapers-juhraya/Austria_by_Rutger_Heijmerikx.jpg -set $gui-font Noto Sans 10 -set $term-font Akkurat Mono -# light -# set $cursor-theme xcursor-breeze-snow -# set $gtk-theme catppuccin-latte-teal-standard+default -# set $icon-theme Papirus -# set $kvantum-theme catppuccin-latte-teal -# set $gtk-color-scheme prefer-light -# dark -set $cursor-theme xcursor-breeze -set $gtk-theme catppuccin-mocha-teal-standard+default -set $icon-theme Papirus-Dark -set $kvantum-theme catppuccin-mocha-teal -set $gtk-color-scheme prefer-dark -# colors -set $background-color #1E1E2E -set $text-color #CDD6F4 -set $accent-color #89B4FA -# target title bg text indicator -client.focused #556064 #F9CE5C #000000 #FDF6E3 -client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 -client.unfocused #556064 #2F3D44 #1ABC9C #454948 -client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 -client.placeholder #000000 #0C0C0C #ffffff #000000 -client.background #2B2C2B - -# DEFINIIONS -# controls -set $mod Mod4 -set $left h -set $down j -set $up k -set $right l -# Workspace numbers -set $ws1 number 1 -set $ws2 number 2 -set $ws3 number 3 -set $ws4 number 4 -set $ws5 number 5 -set $ws6 number 6 -set $ws7 number 7 -set $ws8 number 8 -set $ws9 number 9 -set $ws10 number 10 -# terminal editor -set $term footclient -set $term_float footclient --app-id floating_shell --window-size-chars 120x45 -# swayidle -set $locking swaylock --screenshots --clock --grace 10 --fade-in 0.5 --effect-blur 5x5 --effect-greyscale -# scaling -set $scale_up /usr/share/sway/scripts/scale.sh up -set $scale_down /usr/share/sway/scripts/scale.sh down -set $scale_default /usr/share/sway/scripts/scale.sh default -# audio -set $pulseaudio $term_float pulsemixer -set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//' -set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//' -set $volume_down $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume) -set $volume_up $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume) -set $volume_mute $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p") -set $mic_mute $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p") -# rofi -set $rofi_theme "* {\nlightbg: $background-color;\nbackground: $background-color;\nlightfg: $accent-color;\nforeground: $text-color;\n}\nwindow {\nwidth: 25em;\n}\n" -set $menu rofi -show combi -combi-modi "drun,run" -terminal "$term" -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -run-shell-command "{terminal} {cmd}" -show-icons -font "$gui-font" -lines 10 -# Screenshot commands -set $grimshot grimshot -set $pipe_output $grimshot save output - -set $pipe_selection $grimshot save area - -set $notify_paste [[ $(wl-paste -l) == "image/png" ]] && notify-send "Screenshot copied to clipboard" -set $swappy swappy -f - -set $upload_pipe curl -s -F "file=@-;filename=.png" https://x0.at/ | tee >(wl-copy) >(xargs notify-send) -set $screenshot_screen $pipe_output | $swappy && $notify_paste -set $screenshot_screen_upload $pipe_output | $upload_pipe -set $screenshot_selection $pipe_selection | $swappy && $notify_paste -set $screenshot_selection_upload $pipe_selection | $upload_pipe - -# AUTOSTART APPLICATIONS -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec_always { - # theming (from manjaro sway desktop config) - /usr/share/sway/scripts/enable-gtk-theme.sh "$gtk-theme" - /usr/share/sway/scripts/fontconfig.sh "monospace" "$term-font" - gsettings set org.gnome.desktop.interface icon-theme "$icon-theme" - gsettings set org.gnome.desktop.interface cursor-theme "$cursor-theme" - gsettings set org.gnome.desktop.interface font-name "$gui-font" - gsettings set org.gnome.desktop.input-sources show-all-sources true - gsettings set org.gnome.desktop.interface monospace-font-name "$term-font" - gsettings set org.freedesktop.appearance color-scheme "$gtk-color-scheme" - gsettings set org.gnome.desktop.interface color-scheme "$gtk-color-scheme" - kvantummanager --set "$kvantum-theme" -} -exec { - pamac-tray-plasma - wlsunset -l 59.91:10.76 - systemctl --user enable --now blueman-applet - # idle lock - systemctl --user enable --now swayidle - systemctl --user enable --now idlehack - # focus switch animations - systemctl --user enable --now flashfocus - # usb automount - systemctl --user enable --now pcmanfm - # workspace icons - systemctl --user enable --now sworkstyle - # foot server - systemctl --user enable --now foot-server -} -exec_always { - nm-applet - calcurse --daemon - # persist clipboard after close - pkill -x wl-clip-persist - wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+' - # mako daemon - pkill -x mako - mako --font "$term-font" --text-color "$text-color" --border-color "$accent-color" --background-color "$background-color" --border-size 3 --width 400 --height 200 --padding 20 --margin 20 --default-timeout 15000 - # enable noisetorch - noisetorch -u - noisetorch -i - # update rofi theme - mkdir -p $HOME/.config/rofi/ - echo $rofi_theme > $HOME/.config/rofi/config.rasi -} - -# CONFIGS -font $gui-font -focus_follows_mouse no -mouse_warping none -workspace_auto_back_and_forth no -bar { - swaybar_command waybar -} -# don't show gaps if there's only one window on the desktop -smart_gaps on -gaps inner 5 -# borders -default_border normal -default_floating_border normal -hide_edge_borders smart - -# BINDINGS -include ~/.config/sway/local_config -bindsym $mod+Return exec $term -bindsym $mod+Shift+Return exec foot -bindsym $mod+Shift+q kill -bindsym $mod+d exec $menu -floating_modifier $mod normal -bindsym $mod+r reload -bindsym $mod+a focus parent -bindsym $mod+Shift+a focus child -# Moving around -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right -# Moving -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right -# splits -bindsym $mod+b splith -bindsym $mod+s splitv -bindsym $mod+q split toggle -# split formats -bindsym $mod+w layout stacking -bindsym $mod+t layout tabbed -bindsym $mod+e layout toggle split -bindsym $mod+f fullscreen -# floating -bindsym $mod+Shift+space floating toggle -bindsym $mod+Ctrl+space sticky toggle -bindsym $mod+space focus mode_toggle -# scratchpad -bindsym $mod+Shift+minus move scratchpad -bindsym $mod+Shift+slash move scratchpad -bindsym $mod+minus scratchpad show -bindsym $mod+slash scratchpad show -# sound -bindsym Scroll_Lock exec $volume_mute -bindsym Print exec $volume_down -bindsym Pause exec $volume_up -# screenshots -bindsym $mod+Shift+s exec --no-startup-id $screenshot_selection -# scale -bindsym $mod+greater exec $scale_up -bindsym $mod+less exec $scale_down -bindsym $mod+equal exec $scale_default -# apps -bindsym $mod+F1 exec qalculate-qt -bindsym $mod+F2 exec qutebrowser -bindsym $mod+F3 exec quodlibet -bindsym $mod+F4 exec $term_float ncspot -bindsym $mod+n exec makoctl dismiss -bindsym $mod+Shift+n exec makoctl dismiss -a -bindsym $mod+p exec pcmanfm-qt -bindsym $mod+Shift+p exec $term_float yazi -bindsym $mod+u exec unipicker --command "rofi -dmenu | wl-copy" -bindsym $mod+period exec $term_float khal interactive -bindsym $mod+comma exec $term_float aerc - -# Special keys -bindsym --locked XF86AudioMute exec $volume_mute -bindsym --locked XF86AudioLowerVolume exec $volume_down -bindsym --locked XF86AudioRaiseVolume exec $volume_up -bindsym --locked XF86AudioMicMute exec $mic_mute -bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- -bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ - -# resize -mode "resize" { - bindsym $left resize shrink width 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px - bindsym Shift+$left resize shrink width 50px - bindsym Shift+$down resize grow height 50px - bindsym Shift+$up resize shrink height 50px - bindsym Shift+$right resize grow width 50px - - # Return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+z mode "resize" - -# shut down, restart and locking -set $mode_system System (l) lock, (e) exit, (s) suspend, (r) reboot, (p) shutdown -mode "$mode_system" { - bindsym e exec --no-startup-id swaymsg exit, mode "default" - bindsym s exec --no-startup-id systemctl suspend, mode "default" - bindsym r exec --no-startup-id systemctl reboot, mode "default" - bindsym p exec --no-startup-id systemctl poweroff -i, mode "default" - bindsym l exec --no-startup-id $locking, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+e mode "$mode_system" - -# config tools -set $mode_config (b) bt, (c) cooling, (d) display, (g) gparted, (k) kvantum, (l) lxappearance, (m) manjaro, (p) packages, (q) qt5, (Q) qt6, (s) sound, (u) upgrade -mode "$mode_config" { - # bindsym b exec --no-startup-id blueman-manager, mode "default" - bindsym c exec --no-startup-id coolercontrol, mode "default" - bindsym d exec --no-startup-id wdisplays, mode "default" - bindsym g exec --no-startup-id gparted, mode "default" - bindsym k exec --no-startup-id kvantummanager, mode "default" - bindsym l exec --no-startup-id lxappearance, mode "default" - bindsym m exec --no-startup-id manjaro-settings-manager, mode "default" - bindsym p exec --no-startup-id pamac-manager, mode "default" - bindsym q exec --no-startup-id qt5ct, mode "default" - bindsym Shift+q exec --no-startup-id qt6ct, mode "default" - bindsym s exec --no-startup-id pavucontrol-qt, mode "default" - bindsym u exec --no-startup-id $term_float topgrade --only config_update --only system, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+c mode "$mode_config" - -# config tools -set $mode_monitor (b) btop, (h) htop, (s) isd, (j) journal, (n) nvtop -mode "$mode_monitor" { - bindsym b exec $term_float btop, mode "default" - bindsym h exec $term_float htop, mode "default" - bindsym s exec $term_float isd, mode "default" - bindsym j exec $term_float lazyjournal, mode "default" - bindsym n exec $term_float nvtop, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+m mode "$mode_monitor" - -# WINDOWS -for_window [all] title_format "%app_id - %title" - -# set floating mode for generated windows -for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable -for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 800 600 -for_window [title="Save File"] floating enable -for_window [window_role="pop-up"] floating enable -for_window [window_role="bubble"] floating enable -for_window [window_role="task_dialog"] floating enable -for_window [window_role="Preferences"] floating enable -for_window [window_type="dialog"] floating enable -for_window [window_type="menu"] floating enable - -# remove title -for_window [app_id="foot"] border pixel 2 -for_window [class="discord"] border pixel 2 -for_window [app_id="thunderbird"] border pixel 2 -for_window [app_id="qutebrowser"] border pixel 2 - -# Open specific applications in floating mode -for_window [app_id="GParted"] floating enable -for_window [app_id="qalculate-qt"] floating enable -for_window [class="pavucontrol-qt"] floating enable - -# https://github.com/ValveSoftware/steam-for-linux/issues/1040 -for_window [app_id="^steam$"] floating enable -for_window [app_id="^Steam$"] floating enable -for_window [app_id="^steam$" title="^Steam$"] floating disable - -# set floating mode for specific applications -for_window [app_id="thunderbird"] border pixel 2 -for_window [app_id="thunderbird" title=".*Reminder"] floating enable -for_window [app_id="floating_shell"] floating enable, border pixel 1 - -# Don't allow applications to inhibit shortcuts, i.e. grab total control of the -# keyboard. Chrome currently abuses this by enabling it for all "--app=..." shortcuts. -seat * shortcuts_inhibitor disable - -# IO -output * bg $background fill -input type:keyboard { - xkb_layout "us" - xkb_variant "altgr-weur" - xkb_options "caps:escape" - repeat_delay 400 - repeat_rate 30 -} -input type:mouse { - accel_profile "flat" - pointer_accel 0.5 -} diff --git a/sway/config.d/10_application_defaults b/sway/config.d/10_application_defaults deleted file mode 100644 index 9bb778e..0000000 --- a/sway/config.d/10_application_defaults +++ /dev/null @@ -1,31 +0,0 @@ -# Custom windowing rules -for_window [class="Yad" instance="yad"] floating enable -for_window [app_id="yad"] floating enable -for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt -for_window [app_id="pavucontrol" ] floating enable, resize set width 40 ppt height 30 ppt -for_window [window_role="pop-up"] floating enable -for_window [window_role="bubble"] floating enable -for_window [window_role="task_dialog"] floating enable -for_window [window_role="Preferences"] floating enable -for_window [window_type="dialog"] floating enable -for_window [window_type="menu"] floating enable -for_window [window_role="About"] floating enable -for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt -for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt -for_window [title="Picture in picture"] floating enable, sticky enable -for_window [title="waybar_htop"] floating enable, resize set width 70 ppt height 70 ppt -for_window [title="waybar_nmtui"] floating enable -for_window [title="Save File"] floating enable -for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill -# https://github.com/ValveSoftware/steam-for-linux/issues/1040 -for_window [app_id="^steam$"] floating enable -for_window [app_id="^Steam$"] floating enable -for_window [app_id="^steam$" title="^Steam$"] floating disable - -# Inhibit idle -for_window [app_id="firefox"] inhibit_idle fullscreen -for_window [app_id="Chromium"] inhibit_idle fullscreen - -# Don't allow applications to inhibit shortcuts, i.e. grab total control of the -# keyboard. Chrome currently abuses this by enabling it for all "--app=..." shortcuts. -seat * shortcuts_inhibitor disable diff --git a/sway/config.d/10_autostart_applications b/sway/config.d/10_autostart_applications deleted file mode 100644 index 03358e0..0000000 --- a/sway/config.d/10_autostart_applications +++ /dev/null @@ -1,50 +0,0 @@ -# Auth with polkit-gnome: -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 - -# Import environment variables for user systemd service manager -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK - -# Update dbus environments with display variables -exec hash dbus-update-activation-environment 2>/dev/null && \ - dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK - -# Idle configuration -exec swayidle idlehint 1 -exec_always swayidle -w before-sleep "gtklock -d" - -# Desktop notifications -exec mako - -# Start foot server -exec_always --no-startup-id foot --server - -# Autotiling -exec autotiling - -# Network Applet -exec nm-applet --indicator - -# Firewall Applet -exec sleep 2 && firewall-applet - -# nwg-drawer -exec_always nwg-drawer -r -c 7 -is 90 -mb 10 -ml 50 -mr 50 -mt 10 - -# focus switch animations -exec systemctl --user enable --now flashfocus - -# usb automount -exec systemctl --user enable --now pcmanfm - -# persist clipboard after close -exec_always { - # persist clipboard after close - pkill -x wl-clip-persist - wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+' -} - -# enable noisetorch -exec_always { - noisetorch -u - noisetorch -i -} diff --git a/sway/config.d/10_default b/sway/config.d/10_default deleted file mode 100644 index 625899d..0000000 --- a/sway/config.d/10_default +++ /dev/null @@ -1,247 +0,0 @@ -# Logo key. Use Mod1 for Alt. -set $mod Mod4 - -# Add Vim key support -set $left h -set $down j -set $up k -set $right l - -# Set default terminal emulator -set $term footclient - -# Application launcher -set $launcher fuzzel - -# Application menu -set $menu nwg-drawer - -# Power Menu -set $powermenu ~/.config/sway/scripts/power_menu.sh - -### Key bindings -# -# Basics: -# - bindsym $mod+r reload - - # Launch the terminal - bindsym $mod+Return exec $term - bindsym $mod+Shift+Return exec foot - - # Open the power menu - bindsym $mod+Shift+e exec $powermenu - - # Kill focused window - bindsym $mod+Shift+q kill - - # Start your launcher - bindsym $mod+d exec $launcher - - # Menu - bindsym $mod+Shift+d exec $menu - - # Lock screen - bindsym $mod+f1 exec gtklock - - # Activities - bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh - - # Move windows by holding down $mod and left mouse button. - # Resize them with right mouse button + $mod. - # Change "normal" to "inverse" to switch left and right - floating_modifier $mod normal - - # Reload the configuration file - bindsym $mod+Shift+c reload - -# -# Moving around: -# - bindsym { - # Change window focus - $mod+Left focus left - $mod+Down focus down - $mod+Up focus up - $mod+Right focus right - # Vim key support - $mod+$left focus left - $mod+$down focus down - $mod+$up focus up - $mod+$right focus right - - # Move the focused window - $mod+Shift+Left move left - $mod+Shift+Down move down - $mod+Shift+Up move up - $mod+Shift+Right move right - # Vim key support - $mod+Shift+$left move left - $mod+Shift+$down move down - $mod+Shift+$up move up - $mod+Shift+$right move right - } - -# -# Workspaces: -# - # Workspace bindings are using bindcode instead of bindsym for better Azerty compatibility. - # https://github.com/EndeavourOS-Community-Editions/sway/pull/81 - # Use wev to find keycodes for setting up other bindings this way. - - bindcode { - # Switch to workspace - $mod+10 workspace number 1 - $mod+11 workspace number 2 - $mod+12 workspace number 3 - $mod+13 workspace number 4 - $mod+14 workspace number 5 - $mod+15 workspace number 6 - $mod+16 workspace number 7 - $mod+17 workspace number 8 - $mod+18 workspace number 9 - $mod+19 workspace number 10 - - # Move focused container to workspace - $mod+Shift+10 move container to workspace number 1 - $mod+Shift+11 move container to workspace number 2 - $mod+Shift+12 move container to workspace number 3 - $mod+Shift+13 move container to workspace number 4 - $mod+Shift+14 move container to workspace number 5 - $mod+Shift+15 move container to workspace number 6 - $mod+Shift+16 move container to workspace number 7 - $mod+Shift+17 move container to workspace number 8 - $mod+Shift+18 move container to workspace number 9 - $mod+Shift+19 move container to workspace number 10 - } - # Note: workspaces can have any name you want, not just numbers. - # We just use 1-10 as the default. - -# -# Layout stuff: -# - # Set how the current window will be split - # Split the window vertically - # bindsym $mod+v splitv - # Split the window horizontally - # bindsym $mod+b splith - # Toggle - bindsym $mod+q split toggle - - # Switch the current container between different layout styles - bindsym $mod+w layout stacking - bindsym $mod+t layout tabbed - bindsym $mod+e layout toggle split - - # Make the current focus fullscreen - bindsym $mod+f fullscreen - - # Toggle between tiling and floating mode - bindsym $mod+Shift+space floating toggle - bindsym $mod+Ctrl+space sticky toggle - - # Swap focus between the tiling area and the floating area - bindsym $mod+space focus mode_toggle - - # Move focus to the parent container - bindsym $mod+a focus parent - # Move focus to the child container - bindsym $mod+Shift+a focus child - -# -# Scratchpad: -# - # Sway has a "scratchpad", which is a bag of holding for windows. - # You can send windows there and get them back later. - - # Move the currently focused window to the scratchpad - bindsym $mod+Shift+minus move scratchpad - - # Show the next scratchpad window or hide the focused scratchpad window. - # If there are multiple scratchpad windows, this command cycles through them. - bindsym $mod+minus scratchpad show - -# -# Resizing containers: -# - bindsym { - # Resize with arrow keys - $mod+ctrl+Right resize shrink width 10 px - $mod+ctrl+Up resize grow height 10 px - $mod+ctrl+Down resize shrink height 10 px - $mod+ctrl+Left resize grow width 10 px - # Resize with Vim keys - $mod+ctrl+$right resize shrink width 10 px - $mod+ctrl+$up resize grow height 10 px - $mod+ctrl+$down resize shrink height 10 px - $mod+ctrl+$left resize grow width 10 px - } - - # Resize floating windows with mouse scroll: - bindsym --whole-window --border { - # Resize vertically - $mod+button4 resize shrink height 5 px or 5 ppt - $mod+button5 resize grow height 5 px or 5 ppt - # Resize horizontally - $mod+Shift+button4 resize shrink width 5 px or 5 ppt - $mod+Shift+button5 resize grow width 5 px or 5 ppt - } - -# -# Media Keys -# - bindsym { - # Volume - XF86AudioRaiseVolume exec pamixer -ui 2 - XF86AudioLowerVolume exec pamixer -ud 2 - XF86AudioMute exec pamixer --toggle-mute - - # Player - XF86AudioPlay exec playerctl play-pause - XF86AudioNext exec playerctl next - XF86AudioPrev exec playerctl previous - - # Backlight - XF86MonBrightnessUp exec brightnessctl -c backlight set +5% - XF86MonBrightnessDown exec brightnessctl -c backlight set 5%- - } - -# -# App shortcuts -# - bindsym $mod+u exec unipicker --command "rofi -dmenu | wl-copy" - - # Launch the file explorer - bindsym $mod+b exec pcmanfm - - # Dismiss message - bindsym $mod+n exec makoctl dismiss - bindsym $mod+Shift+n exec makoctl dismiss -a - - # Launch the browser - bindsym $mod+o exec qutebrowser - - # config tools - set $mode_monitor (b) btop, (h) htop, (s) isd, (j) journal, (n) nvtop - mode "$mode_monitor" { - bindsym b exec $term_float btop, mode "default" - bindsym h exec $term_float htop, mode "default" - bindsym s exec $term_float isd, mode "default" - bindsym j exec $term_float lazyjournal, mode "default" - bindsym n exec $term_float nvtop, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" - } - bindsym $mod+m mode "$mode_monitor" - -# -# Screenshots -# - # Snip a selection and pipe to swappy - bindsym print exec grim -g "$(slurp)" - | swappy -f - - # Screenshot a window and pipe to swappy - bindsym Ctrl+Print exec ~/.config/sway/scripts/screenshot_window.sh - # Screenshot the current display and pipe to swappy - bindsym Shift+Print exec ~/.config/sway/scripts/screenshot_display.sh - diff --git a/sway/config.d/10_input b/sway/config.d/10_input deleted file mode 100644 index 6147fd5..0000000 --- a/sway/config.d/10_input +++ /dev/null @@ -1,17 +0,0 @@ -input type:touchpad { - dwt enabled - tap disabled - natural_scroll enabled - accel_profile "adaptive" -} - -input type:keyboard { - xkb_layout "us" - xkb_variant "altgr-weur" - xkb_options "caps:escape" -} - -input type:mouse { - accel_profile "flat" - pointer_accel 0.5 -} diff --git a/sway/config.d/10_theme b/sway/config.d/10_theme deleted file mode 100644 index 0e49ecc..0000000 --- a/sway/config.d/10_theme +++ /dev/null @@ -1,38 +0,0 @@ -# Apply gtk theming -exec_always ~/.config/sway/scripts/import-gsettings - -# Set inner/outer gaps -gaps inner 2 -gaps outer 0 - -# Hide titlebar on windows: -default_border pixel 1 - -# Default Font -font pango:Noto Sans Regular 10 - -# Thin borders: -smart_borders on - -# Set wallpaper: -exec ~/.azotebg - -# Title format for windows -for_window [shell="xdg_shell"] title_format "%title (%app_id)" -for_window [shell="x_wayland"] title_format "%class - %title" - -# class border bground text indicator child_border -client.focused #556064 #F9CE5C #000000 #FDF6E3 #FDF6E3 -client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 #454948 -client.unfocused #556064 #2F3D44 #1ABC9C #454948 #454948 -client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 #268BD2 -client.placeholder #000000 #0C0C0C #ffffff #000000 #000000 -client.background #2B2C2B - -# -# Status Bar: -# -# Read `man 5 sway-bar` for more information about this section. -bar { - swaybar_command waybar -} diff --git a/sway/idle.yaml b/sway/idle.yaml deleted file mode 100644 index 19aa377..0000000 --- a/sway/idle.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -debug: true -wait: false -timeouts: - # idle_timeout - - timeout: 240 - command: brightnessctl -s && brightnessctl set 10 - resume: brightnessctl -r - # locking_timeout - - timeout: 1200 - command: swaymsg exec \$locking - # screen_timeout - - timeout: 2400 - command: swaymsg "output * power off" - resume: swaymsg "output * power on" - # dpms_timeout - # - timeout: 3600 - # command: swaymsg "output * dpms off" - # resume: swaymsg "output * dpms on" - # sleep_timeout_bat - # - timeout: 900 - # command: acpi --ac-adapter | grep -v 'on-line' && systemctl sleep - # sleep_timeout_ac - # - timeout: 3600 - # command: acpi --ac-adapter | grep 'on-line' && systemctl sleep -before-sleep: swaymsg exec \$locking -after-resume: swaymsg "output * dpms on", exec "systemctl restart --user mako" -lock: swaymsg exec \$locking -idlehint: '240' diff --git a/vdirsyncer/config.secret b/vdirsyncer/config.secret deleted file mode 100644 index 4827068..0000000 Binary files a/vdirsyncer/config.secret and /dev/null differ diff --git a/waybar/config.jsonc b/waybar/config.jsonc deleted file mode 100644 index 2baae9c..0000000 --- a/waybar/config.jsonc +++ /dev/null @@ -1,105 +0,0 @@ -// MAYBE add kubernetes status -{ - // Basic config - "layer": "bottom", - "position": "bottom", - "margin-top": 0, - "margin-bottom": 0, - "margin-right": 100, - "margin-left": 100, - - "modules-center": ["sway/mode", "sway/workspaces"], - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": false, - "format": "{icon}", - }, - "sway/mode": { - "format": "{}", - "tooltip": false - }, - - "modules-left": ["systemd-failed-units", "memory", "load", "custom/cputemp", "custom/nvidia", "disk#disk1", "disk#disk2", "network"], - "custom/cputemp": { - "exec": "sensors | grep 'CPU:' | awk '{print substr($2,2); }'", - "format": " {}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'", - "interval": 1 - }, - "custom/nvidia": { - "exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'", - "format": "󰓅 {}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'", - "interval": 1 - }, - "load": { - "interval": 1, - "format": "󰘚 {load1}%", - "states": { - "warning": 70, - "critical": 90 - }, - "tooltip": true, - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 btop'" - }, - "memory": { - "interval": 1, - "format": "󰍛 {used:0.1f}G", - "states": { - "warning": 70, - "critical": 90 - }, - "tooltip": true, - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 btop'" - }, - "systemd-failed-units": { - "hide-on-ok": false, // Do not hide if there is zero failed units. - "format": "Systemd ✗ {nr_failed}", - "format-ok": "Systemd ✓", - "system": true, // Monitor failed systemwide units. - "user": true, // Ignore failed user units. - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 isd'" - }, - "include": "~/.config/waybar/local_config.jsonc", - - "modules-right": ["tray", "pulseaudio", "custom/scratchpad", "clock"], - "pulseaudio": { - "scroll-step": 5, - "format": "{icon} {volume}%{format_source}", - "format-muted": "󰖁 {format_source}", - "format-source": " ", - "format-source-muted": " 󰍭", - "format-icons": { - "headphone": "󰋋", - "headset": "󰋎", - "default": [ "󰕿", "󰖀", "󰕾" ] - }, - "tooltip-format": "{icon}  {volume}% {format_source}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x12 pulsemixer'", - "on-click-middle": "pactl set-sink-mute @DEFAULT_SINK@ toggle", - "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +5%", - "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -5%" - }, - "custom/scratchpad": { - "interval": 5, - "return-type": "json", - "format": "{icon}", - "format-icons": { - "one": "󰖯", - "many": "󰖲" - }, - "exec": "/bin/sh /usr/share/sway/scripts/scratchpad.sh", - "on-click": "swaymsg 'scratchpad show'", - "signal": 7 - }, - "tray": { - "icon-size": 21, - "spacing": 10 - }, - "clock": { - "interval": 1, - "tooltip-format": "{calendar}", - "format": " {:%Y-%m-%d %H:%M:%S}", - "on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 khal interactive'" - } -} diff --git a/waybar/style.css b/waybar/style.css deleted file mode 100644 index ac4e892..0000000 --- a/waybar/style.css +++ /dev/null @@ -1,55 +0,0 @@ -* { - border: 0; - font-family: Noto Sans; - font-size: 14px; - min-height: 0; -} - -window#waybar { - background: transparent; - color: #eceff4; -} - -window#waybar:first-child > box { - margin-top: 0px; - padding: 8px 4px 4px 4px; - border-radius: 20px 20px 0px 0px; - background-color: #2e3440; - border: 2px solid #88c0d0; - border-bottom: 0; -} - -#workspaces button { - padding: 0 5px; - background: transparent; - color: #4c566a; -} - -#workspaces button:hover { - box-shadow: inherit; - text-shadow: inherit; - color: #d8dee9; -} - -#workspaces button.focused { - color: #88c0d0; -} - -#clock, -#custom-cputemp, -#custom-scratchpad, -#custom-nvidia, -#custom-theme, -#disk.disk1, -#disk.disk2, -#load, -#memory, -#network, -#pulseaudio, -#sway-mode, -#systemd-failed-units, -#tray { - color: #88c0d0; - padding-right: 16px; - padding-left: 16px; -}