diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2024-04-13 20:40:05 +0200 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2024-04-13 20:41:00 +0200 |
commit | b117ace1dffec2f6e29b46d28a78fd60b9defd1d (patch) | |
tree | 1db350add6a107a4fc62bbcebb9cc30ff0175384 | |
parent | fd61b69d56bb2ab7ec3bd2aa60b6dd45490c3287 (diff) | |
download | dotfiles-b117ace1dffec2f6e29b46d28a78fd60b9defd1d.tar.gz dotfiles-b117ace1dffec2f6e29b46d28a78fd60b9defd1d.zip |
newsboat
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Common/newsboat/config.m4 | 14 | ||||
-rw-r--r-- | Makefile.m4 | 26 | ||||
-rwxr-xr-x | configure | 20 |
4 files changed, 65 insertions, 0 deletions
@@ -92,3 +92,8 @@ config *.add.spl tags .netrwhist + +Common/newsboat/cache.db +Common/newsboat/cache.db.lock +Common/newsboat/history.cmdline +Common/newsboat/urls diff --git a/Common/newsboat/config.m4 b/Common/newsboat/config.m4 new file mode 100644 index 0000000..659bd23 --- /dev/null +++ b/Common/newsboat/config.m4 @@ -0,0 +1,14 @@ +articlelist-format "%4i %f %e %D %?T?|%-17T| ?%t" +urls-source "miniflux" +miniflux-url "DT_NEWSBOAT_SOURCE" +miniflux-login "DT_NEWSBOAT_USER" +miniflux-passwordeval "read -s password; echo $password" + + +color listnormal black white +color listnormal_unread black white +color listfocus white blue bold +color listfocus_unread white blue bold +color info white red bold +color background black white +color article black white diff --git a/Makefile.m4 b/Makefile.m4 index 72fdfc7..2630bd5 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -50,6 +50,7 @@ m4_ifelse(DT_SWAY, `yes', `$(HOME_DIR)/.config/sway/autostart') m4_dnl m4_ifelse(DT_NEOVIM, `yes', `$(HOME_DIR)/.config/nvim') m4_dnl m4_ifelse(DT_MYCLI, `yes', `$(HOME_DIR)/.my.cnf') m4_dnl m4_ifelse(DT_MYCLI, `yes', `$(HOME_DIR)/.myclirc') m4_dnl +m4_ifelse(DT_NEWSBOAT, `yes', `$(HOME_DIR)/.newsboat') m4_dnl $(M4_SYSFILE): $(CONFIG_FILE) @@ -182,6 +183,14 @@ $(HOME_DIR)/.myclirc: Common/myclirc $(call create_dotfile_symlink,Common/myclirc,.myclirc) ')m4_dnl +m4_ifelse(DT_NEWSBOAT, `yes', `m4_dnl +Common/newsboat/config: Common/newsboat/config.m4 \ + ${M4_COMMON_DEPS} + $(call M4_EXEC) + +$(HOME_DIR)/.newsboat: Common/newsboat Common/newsboat/config + $(call create_dotfile_symlink,Common/newsboat,.newsboat) +')m4_dnl # General package manager stuff m4_ifelse(DT_DISTRO, `debian', m4_dnl @@ -246,3 +255,20 @@ update_packages: @echo "Updating all packages..." sudo dnf upgrade -y $(DPKG_DEPENDENCIES) )m4_dnl + +PIP := pip +PIP_FLAGS := +PIP_DEPENDENCIES := m4_dnl +m4_ifelse(DT_QTILE, `yes', `qtile qtile_extras',) m4_dnl qtile core + +install_pip_packages: + @missing_packages=""; \ + for pkg in $(PIP_DEPENDENCIES); do \ + if [ "$(pip list | grep -sw "$$pkg" | wc -l)" = "0" ]; then \ + missing_packages="$$missing_packages $$pkg"; \ + fi; \ + done; \ + if [ -n "$$missing_packages" ]; then \ + echo "Installing missing packages: $$missing_packages"; \ + sudo pip install $$missing_packages; \ + fi @@ -47,6 +47,7 @@ fi : "${DT_TMUX:=yes}" : "${DT_HELIX:=no}" : "${DT_MYCLI:=no}" +: "${DT_NEWSBOAT:=no}" radiolist_on() { local value="$1" @@ -168,6 +169,7 @@ FEATURES="$(dialog --stdout \ 12 "home folder bin dir" $(checklist_on "${DT_HOMEBIN}") \ 13 "tmux" $(checklist_on "${DT_NEOVIM}") \ 15 "MyCLI" $(checklist_on "${DT_MYCLI}") \ + 16 "Newsboat" $(checklist_on "${DT_NEWSBOAT}") \ 14 "Helix" $(checklist_on "${DT_HELIX}"))" if [ "$?" -eq 1 ]; then exit 0; fi @@ -186,6 +188,7 @@ DT_HOMEBIN=no DT_TMUX=no DT_HELIX=no DT_MYCLI=no +DT_NEWSBOAT=no for choice in ${FEATURES}; do case $choice in @@ -204,9 +207,26 @@ for choice in ${FEATURES}; do 13) DT_TMUX=yes;; 14) DT_HELIX=yes;; 15) DT_MYCLI=yes;; + 16) DT_NEWSBOAT=yes;; esac done +if [ "${DT_NEWSBOAT}" = "yes" ]; then + NEWSBOAT_VALUES=$(dialog \ + --keep-tite \ + --backtitle "Dotfile configuration" \ + --title "Configure" \ + --form "Newsboat settings" \ + 0 50 0 \ + "Url:" 1 1 "${DT_NEWSBOAT_SOURCE:-}" 1 10 255 0 \ + "Username:" 2 1 "${DT_NEWSBOAT_USER:-}" 2 10 255 0 \ + 3>&1 1>&2 2>&3 3>&-) + NEWSBOAT_VALUES=($NEWSBOAT_VALUES) + if [ "$?" -eq 1 ]; then exit 0; fi + DT_NEWSBOAT_SOURCE=${NEWSBOAT_VALUES[0]} + DT_NEWSBOAT_USER=${NEWSBOAT_VALUES[1]} +fi + # write config to file printf "" > "${CONFIG_FILE}" set | grep '^DT_' | awk -F '=' '{print $1"="$2""}' >> "${CONFIG_FILE}" |