From d024af63183c53d62a44d71ebc1d782e6ee00d86 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Wed, 19 Jul 2023 21:10:06 +0200 Subject: [PATCH] add qutebrowser+persistent rclone --- HOME/.profile | 6 +-- i3/config | 2 +- qutebrowser/autoconfig.yml | 60 ++++++++++++++++++++++++++++++ systemd/user/rclone-gdrive.service | 21 +++++++++++ 4 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 qutebrowser/autoconfig.yml create mode 100644 systemd/user/rclone-gdrive.service diff --git a/HOME/.profile b/HOME/.profile index 766f9f6..cd58e69 100644 --- a/HOME/.profile +++ b/HOME/.profile @@ -2,7 +2,5 @@ export EDITOR=/usr/bin/nvim export VISUAL=/usr/bin/nvim export TERMINAL=/usr/bin/kitty export PAGER="bat --style=header,rule,snip" -export BROWSER=/usr/bin/vivaldi-stable - -export QT_QPA_PLATFORMTHEME="qt5ct" -export GTK2_RC_FILES="$HOME/.gtkrc-2.0" +export BROWSER=/usr/bin/qutebrowser +export QT_QPA_PLATFORMTHEME=/sr/bin/qt5ct diff --git a/i3/config b/i3/config index 6393058..4a47977 100644 --- a/i3/config +++ b/i3/config @@ -90,7 +90,7 @@ bindsym $mod+Shift+s --release exec --no-startup-id i3-scrot -s bindsym $mod+Shift+x --release exec --no-startup-id xkill bindsym $mod+F1 exec kitty -e 'htop' -bindsym $mod+F2 exec vivaldi-stable +bindsym $mod+F2 exec qutebrowser bindsym $mod+F3 exec pcmanfm bindsym $mod+F4 exec kitty -e 'ranger' bindsym $mod+F5 exec pavucontrol diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml new file mode 100644 index 0000000..12481dd --- /dev/null +++ b/qutebrowser/autoconfig.yml @@ -0,0 +1,60 @@ +# If a config.py file exists, this file is ignored unless it's explicitly loaded +# via config.load_autoconfig(). For more information, see: +# https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#loading-autoconfigyml +# DO NOT edit this file by hand, qutebrowser will overwrite it. +# Instead, create a config.py - see :help for details. + +config_version: 2 +settings: + auto_save.session: + global: true + bindings.commands: + global: + normal: + <: tab-move - + '>': tab-move + + pb: spawn --userscript qute-bitwarden + tm: tab-move + to: tab-focus + ΓΈ: 'set-cmd-text :' + colors.hints.bg: + global: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 247, 133, 1.0), + stop:1 rgba(255, 197, 66, 1.0)) + colors.webpage.darkmode.enabled: + global: true + content.register_protocol_handler: + https://mail.google.com?extsrc=mailto&url=%25s: true + content.tls.certificate_errors: + global: block + fonts.hints: + global: default_size default_family + scrolling.bar: + global: always + session.lazy_restore: + global: true + tabs.padding: + global: + bottom: 2 + left: 5 + right: 5 + top: 2 + tabs.position: + global: left + tabs.undo_stack_size: + global: 1000 + tabs.width: + global: 15% + url.searchengines: + global: + DEFAULT: https://duckduckgo.com/?q={} + goo: https://google.com/search?q={} + url.start_pages: + global: https://rss.hjarl.com/tt-rss + url.yank_ignored_parameters: + global: + - ref + - utm_source + - utm_medium + - utm_campaign + - utm_term + - utm_content diff --git a/systemd/user/rclone-gdrive.service b/systemd/user/rclone-gdrive.service new file mode 100644 index 0000000..8aaba32 --- /dev/null +++ b/systemd/user/rclone-gdrive.service @@ -0,0 +1,21 @@ +[Unit] +Description=Gdrive (rclone) +AssertPathIsDirectory=/mnt/hdd1/gdrive +# Make sure we have network enabled +After=network.target + +[Service] +Type=simple + +ExecStart=/usr/bin/rclone mount --vfs-cache-mode full gdrive: /mnt/hdd1/gdrive + +# Perform lazy unmount +ExecStop=/usr/bin/fusermount -zu /mnt/hdd1/gdrive + +# Restart the service whenever rclone exists with non-zero exit code +Restart=on-failure +RestartSec=15 + +[Install] +# Autostart after reboot +WantedBy=default.target