From b57512dc467397490a89817911eb4b23e5d86d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Thu, 30 Jul 2020 15:44:43 +0200 Subject: [PATCH] Enable newsboat in WSL and change it if I run windows or Linux. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .config/newsboat/config | 7 ++++--- .gitignore | 1 + .local/bin/browser-x | 5 ++++- .local/bin/wsl-notify | 4 ++++ .zshrc | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 .local/bin/wsl-notify diff --git a/.config/newsboat/config b/.config/newsboat/config index a006a42..16d7c97 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -1,6 +1,7 @@ auto-reload yes -reload-time 900 -notify-program "/usr/bin/notify-send" +refresh-on-startup yes +reload-time 1 +notify-program "$HOME/.local/bin/notify-program" notify-always yes unbind-key o @@ -18,5 +19,5 @@ color listfocus_unread yellow default bold color info red black bold color article white default bold -browser "firefox -new-tab %u" +browser "$HOME/.local/bin/browser-x -new-tab %u" player mpv diff --git a/.gitignore b/.gitignore index 52ba14f..209039d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .cache/ .cert/ .config/ +.config/newsboat/urlswork .dbus/ .fehbg .ghc/ diff --git a/.local/bin/browser-x b/.local/bin/browser-x index c8de0df..14c7ed9 100755 --- a/.local/bin/browser-x +++ b/.local/bin/browser-x @@ -1,3 +1,6 @@ #!/bin/bash +set -x #GDK_DPI_SCALE="1.3" firefox -brave-bin --force-device-scale-factor=1.2& +KERNEL=$(uname -sr) +[[ $KERNEL =~ "Microsoft" ]] && $HOME/.brave.exe "$@" +[[ $KERNEL =~ "gentoo" ]] && brave-bin --force-device-scale-factor=1.2 "$@"& diff --git a/.local/bin/wsl-notify b/.local/bin/wsl-notify new file mode 100755 index 0000000..7e9f7bb --- /dev/null +++ b/.local/bin/wsl-notify @@ -0,0 +1,4 @@ +#!/bin/bash + + +/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe "New-BurntToastNotification -Text \"$1\"" diff --git a/.zshrc b/.zshrc index 543592b..c96f386 100644 --- a/.zshrc +++ b/.zshrc @@ -83,6 +83,7 @@ alias vpnch="sudo /root/.local/bin/protonvpn c --cc CH" alias vpnd="sudo /root/.local/bin/protonvpn d" alias prolog="swipl" alias tv="~/MEGA/tv/tv.sh" +alias newswork="newsboat --url=$HOME/.config/newsboat/urlswork" # Cleaning-up export KODI_DATA="$HOME/.config/kodi"