Newsboat in Nightfox theme, update script

This commit is contained in:
Kujiu 2023-09-03 00:36:15 +02:00
parent 8436344542
commit 853ada5444
Signed by: kujiu
GPG key ID: ABBB2CAC6855599F
5 changed files with 127 additions and 8 deletions

View file

@ -0,0 +1,64 @@
#!/usr/bin/env fish
function update-homes
argparse 'h/help' 'g/git' 'd/desktop' 'p/private' 'r/root' 'R/remove' -- $argv
if set --query _flag_help
echo "Update home's configuration"
echo
echo "You need to have homes and homes-private in your home directory."
echo "This function launch the two scripts to update your conf."
echo
echo " -g --git"
echo " Pull-rebase before launch script"
echo
echo " -d --desktop"
echo " Update desktop part"
echo
echo " -p --private"
echo " Update private part"
echo
echo " -r --root"
echo " Update root part"
echo
echo " -R --remove"
echo " Remove old configuration"
echo
echo " -h --help"
echo " Show this screen"
return
end
pushd ~/homes
if set --query _flag_git
gitpr
end
set -f options ""
if set --query _flag_desktop
set -f options "--desktop"
end
if set --query _flag_remove
set -f options "$options --remove"
end
if set --query _flag_root
set -f options "$options --root"
end
./update-home.fish $options
popd
pushd ~/homes-private
if set --query _flag_git
gitpr
end
set -f options ""
if set --query _flag_private
set -f options "--private"
end
if set --query _flag_root
set -f options "$options --root"
end
./update-private.fish $options
popd
end

View file

@ -0,0 +1,16 @@
# Theme : nightfox
# Upstream : https://github.com/EdenEast/nightfox.nvim/
color background color145 default
color listnormal color145 default
color listfocus color80 color59 bold
color listnormal_unread color108 default
color listfocus_unread color215 color59 bold
color info color39 color237 bold
color article color145 default
color end-of-text-marker color140 default
color title color39 color237 bold
color hint-key color180 color237
color hint-keys-delimiter color39 color237
color hint-separator color39 color237
color hint-description color39 color237

View file

@ -535,7 +535,7 @@ freshrss-flag-star "b"
#
# Default value: ""
#
freshrss-login "example_user"
freshrss-login "FRESHRSSLOGIN"
#### freshrss-min-items
#
@ -569,7 +569,7 @@ freshrss-min-items 200
#
# Default value: ""
#
freshrss-passwordeval "keyring get 'rss:freshrss.example.com' example_user"
freshrss-passwordeval "keyring get 'FRESHRSSKEEPASSXC' FRESHRSSLOGIN"
#### freshrss-passwordfile
#
@ -602,7 +602,7 @@ freshrss-passwordeval "keyring get 'rss:freshrss.example.com' example_user"
#
# Default value: ""
#
freshrss-url "https://freshrss.example.com/api/greader.php"
freshrss-url "FRESHRSSURL"
#### goto-first-unread
#
@ -745,7 +745,7 @@ freshrss-url "https://freshrss.example.com/api/greader.php"
#
# Default value: n/a
#
# include "~/.newsboat/colors"
include "~/.config/newsboat/colors.conf"
#### inoreader-app-id
#

View file

@ -19,9 +19,8 @@ end
if set --query _flag_desktop
# Copy the desktop part
echo "**** Copying desktop part"
rsync -av ./desktop/ ~/
rsync --exclude=".*.swp" -av ./desktop/ ~/
pip install --user --break-system-packages -U poezio-omemo epr-reader
sed -i "s/REPLACEDEVICEHOSTNAME/`hostname`/g" ~/.config/poezio/poezio.cfg
end
if set --query _flag_remove
@ -39,7 +38,7 @@ end
if set --query _flag_root
echo "**** Copying root part"
rsync -av ./root/ ~/
rsync --exclude=".*.swp" -av ./root/ ~/
end
go install github.com/jesseduffield/lazydocker@latest
@ -54,4 +53,4 @@ popd
rm -rf ~/.cache/nvimpager-git
# Copy the common part
rsync -av ./common/ ~/
rsync --exclude=".*.swp" -av ./common/ ~/

40
update-private-example.fish Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/env fish
# Template for update-private.fish
# To place in ~/homes-private
#
# This example assumes these folders exist:
# - ~/homes-private/private
# - ~/homes-private/root
#
# Please create your own private repository for secrets
argparse 'r/root' 'p/private' 'h/help' -- $argv
if set --query _flag_help
echo "Update home with config files"
echo "WARNING: ERASE YOUR ACTUAL CONFIG"
echo
echo "Usage:"
echo "-p : private files"
echo "-r : copy root files"
echo "-h : this help"
echo
exit
end
if set --query _flag_private
# Copy the private part
echo "**** Copying private part"
rsync --exclude=".*.swp" -av ./private/ ~/
sed -i "s/REPLACEDEVICEHOSTNAME/`hostname`/g" ~/.config/poezio/poezio.cfg
sed -i "s/FRESHRSSLOGIN/example_user/g" ~/.config/newsboat/config
sed -i "s/FRESHRSSKEEPASSXC/rss:freshrss.example.com/g" ~/.config/newsboat/config
sed -i "s/FRESHRSSURL/https:\/\/freshrss.example.com\/api\/greader.php/g" ~/.config/newsboat/config
end
if set --query _flag_root
rsync --exclude=".*.swp" -av ./root/ ~/
end