summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <>2023-04-20 00:00:51 +0200
committerMike Vink <>2023-04-20 00:00:51 +0200
commit78ece59a6edadf3b1b345fd0c7255a66eccb4343 (patch)
tree92307c4e34dfb70ac0019d94e26c0c9186447860
parent4f09bc2d115a76dcd3037608462e201df0f1b5e4 (diff)
newsboat
-rw-r--r--flake.nix1
-rw-r--r--home.nix48
-rw-r--r--home/neovim.nix10
-rw-r--r--home/newsboat.nix38
-rwxr-xr-xshell-scripts/news5
5 files changed, 55 insertions, 47 deletions
diff --git a/flake.nix b/flake.nix
index 83266c7..d1bfcb0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -50,6 +50,7 @@
./home/neovim.nix
./home/codeium.nix
./home/packages.nix
+ ./home/newsboat.nix
];
extraSpecialArgs = {
inherit home-manager username email;
diff --git a/home.nix b/home.nix
index 8a99503..ad7f3bb 100644
--- a/home.nix
+++ b/home.nix
@@ -27,53 +27,6 @@
nix-direnv.enable = true;
};
-
- editorconfig = {
- enable = true;
- settings = {
- "*.{fnl,rkt,nix,md,hcl,tf,py,cpp,qml,js,txt,json,html,lua,yaml,yml,bash,sh,go}" = {
- trim_trailing_whitespace = true;
- insert_final_newline = true;
- };
- };
- };
-
- programs.newsboat = {
- enable = true;
- autoReload = true;
- extraConfig = ''
- # general settings
- max-items 50
-
- # unbind keys
- unbind-key ENTER
- unbind-key j
- unbind-key k
- unbind-key J
- unbind-key K
-
- # bind keys - vim style
- bind-key j down
- bind-key k up
- bind-key l open
- bind-key h quit
-
- # solarized
- color background default default
- color listnormal default default
- color listnormal_unread default default
- color listfocus black cyan
- color listfocus_unread black cyan
- color info default black
- color article default default
-
- # highlights
- highlight article "^(Title):.*$" blue default
- highlight article "https?://[^ ]+" red default
- highlight article "\\[image\\ [0-9]+\\]" green default
- '';
- };
-
programs.bash = {
enable = true;
profileExtra = ''
@@ -105,6 +58,7 @@
"/.direnv/"
"/.envrc"
"/.env"
+ "/.vimsession.vim"
];
};
diff --git a/home/neovim.nix b/home/neovim.nix
index 4d47235..4cfc373 100644
--- a/home/neovim.nix
+++ b/home/neovim.nix
@@ -25,6 +25,16 @@
'';
};
+ editorconfig = {
+ enable = true;
+ settings = {
+ "*.{fnl,rkt,nix,md,hcl,tf,py,cpp,qml,js,txt,json,html,lua,yaml,yml,bash,sh,go}" = {
+ trim_trailing_whitespace = true;
+ insert_final_newline = true;
+ };
+ };
+ };
+
programs.neovim = {
enable = true;
package = pkgs.neovim-unwrapped;
diff --git a/home/newsboat.nix b/home/newsboat.nix
new file mode 100644
index 0000000..6c1b9ae
--- /dev/null
+++ b/home/newsboat.nix
@@ -0,0 +1,38 @@
+{...}: {
+ programs.newsboat = {
+ enable = true;
+ autoReload = true;
+ urls = [{url = "https://github.com/rancher/rancher/releases.atom";}];
+ extraConfig = ''
+ # general settings
+ max-items 50
+
+ # unbind keys
+ unbind-key ENTER
+ unbind-key j
+ unbind-key k
+ unbind-key J
+ unbind-key K
+
+ # bind keys - vim style
+ bind-key j down
+ bind-key k up
+ bind-key l open
+ bind-key h quit
+
+ # solarized
+ color background default default
+ color listnormal default default
+ color listnormal_unread default default
+ color listfocus black cyan
+ color listfocus_unread black cyan
+ color info default black
+ color article default default
+
+ # highlights
+ highlight article "^(Title):.*$" blue default
+ highlight article "https?://[^ ]+" red default
+ highlight article "\\[image\\ [0-9]+\\]" green default
+ '';
+ };
+}
diff --git a/shell-scripts/news b/shell-scripts/news
new file mode 100755
index 0000000..e01b720
--- /dev/null
+++ b/shell-scripts/news
@@ -0,0 +1,5 @@
+#!/bin/bash
+cat <(cat ~/.config/newsboat/urls) <(for url in $(env | grep NEWSBOAT_URL_); do
+ printf '%s' ${url#NEWSBOAT_URL_*=}
+done) > ~/.newsboat-urls
+newsboat -u ~/.newsboat-urls