~alexdavid/dotfiles

1eaa9658ff9e593c83db56a000afb6c035d08b8c — Alex David a month ago 2cd6582
Replace qutebrowser with firefox again

Qutebrowser just feels too sluggish
6 files changed, 10 insertions(+), 48 deletions(-)

M archlinux/PKGBUILD-desktop
M bin/browser
M firefox/launch
M mimeapps.list
D qutebrowser/.gitignore
D qutebrowser/config.py
M archlinux/PKGBUILD-desktop => archlinux/PKGBUILD-desktop +1 -2
@@ 1,5 1,5 @@
pkgname=alexdavid-desktop-meta
pkgver=1.1.14
pkgver=1.1.15
pkgrel=1
arch=('any')
url="https://git.sr.ht/~alexdavid/dotfiles/"


@@ 42,7 42,6 @@ newsboat
nmap
pass
pass-otp
qutebrowser qt5-wayland
units
youtube-dl
zathura

M bin/browser => bin/browser +1 -1
@@ 8,5 8,5 @@ case "$1" in
  https://youtube.com/*)     mpvsingleton "$1"          ;;
  https://www.youtube.com/*) mpvsingleton "$1"          ;;
  https://youtu.be/*)        mpvsingleton "$1"          ;;
  https://*)                 firefox "$1"               ;;
  https://*)                 ~/.config/firefox/launch "New Temporary Profile" "$1" ;;
esac

M firefox/launch => firefox/launch +3 -1
@@ 4,10 4,12 @@ PROFILES_DIR=~/.local/share/firefox-profiles

mkdir -p "$PROFILES_DIR"

URL="$2"

function launchff {
  if [ -d "$1" ]; then
    export MOZ_ENABLE_WAYLAND=1
    firefox-developer-edition --profile "$1"
    firefox-developer-edition --profile "$1" "$URL"
  else
    exec swaynag -m "No such profile '$1'"
  fi

M mimeapps.list => mimeapps.list +5 -5
@@ 5,10 5,10 @@ image/gif=imv.desktop;
image/jpeg=imv.desktop;
image/png=imv.desktop;
text/css=nvim.desktop;
text/html=qutebrowser.desktop
text/html=browser.desktop
text/plain=nvim.desktop;
video/mp4=mpv.desktop;
x-scheme-handler/about=qutebrowser.desktop
x-scheme-handler/http=qutebrowser.desktop
x-scheme-handler/https=qutebrowser.desktop
x-scheme-handler/unknown=qutebrowser.desktop
x-scheme-handler/about=browser.desktop
x-scheme-handler/http=browser.desktop
x-scheme-handler/https=browser.desktop
x-scheme-handler/unknown=nvim.desktop

D qutebrowser/.gitignore => qutebrowser/.gitignore +0 -2
@@ 1,2 0,0 @@
autoconfig.yml
qsettings/

D qutebrowser/config.py => qutebrowser/config.py +0 -37
@@ 1,37 0,0 @@
c.editor.command = ['popup-term', 'nvim "{file}" -c "normal {line}G{column0}l"']
c.editor.encoding = 'utf-8'

config.set('downloads.location.directory', '~/Downloads')
config.set('downloads.location.prompt', False)
config.set('downloads.remove_finished', 5000)
config.set('fonts.default_family', 'SF Pro Display')
config.set('fonts.default_size', '14pt')
config.set('tabs.background', True)
config.set('tabs.show', 'multiple')

# Make :q work more like vim:
config.set('tabs.last_close', 'close')
config.set('aliases', {
    "q": "tab-close",
    "qa": "quit",
})

# Privacy
config.set('content.webrtc_ip_handling_policy', 'default-public-interface-only')

# Key bindings
config.unbind('d')
config.bind('m', 'hint links spawn --detach mpvsingleton {hint-url}')
config.bind('o', 'set-cmd-text -s :open -s')
config.bind('O', 'set-cmd-text -s :open -st')
config.bind('we', 'edit-url')


from os.path import expanduser
try:
    open(expanduser("~/.config/isdark")).close()
    config.set('colors.webpage.prefers_color_scheme_dark', True)
    config.set('colors.webpage.darkmode.enabled', True)
except FileNotFoundError:
    config.set('colors.webpage.darkmode.enabled', False)
    config.set('colors.webpage.prefers_color_scheme_dark', False)