~alexdavid/dotfiles

b6e23f59d542764f276ef2cc5766878576cf5c62 — Alex David 6 months ago c5e9ec6
Switch back to qutebrowser
M archlinux/PKGBUILD-desktop => archlinux/PKGBUILD-desktop +2 -1
@@ 1,5 1,5 @@
pkgname=alexdavid-desktop-meta
pkgver=1.1.13
pkgver=1.1.14
pkgrel=1
arch=('any')
url="https://git.sr.ht/~alexdavid/dotfiles/"


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

M bin/popup-term => bin/popup-term +1 -1
@@ 3,4 3,4 @@
alacritty \
  --title=popupterm \
  --dimensions 100 8 \
  --command $1
  --command sh -c "$1"

M bin/toggle-colors => bin/toggle-colors +5 -0
@@ 12,3 12,8 @@ fi

~/.config/sway/set-wallpaper &
killall -s SIGUSR1 nvim || true

_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"

printf '{"args": [":config-source"], "target_arg": null, "version": "1.0.4", "protocol_version": 1, "cwd": "%s"}\n' \
       "${PWD}" | socat - UNIX-CONNECT:"${_ipc_socket}" 2>/dev/null

M mimeapps.list => mimeapps.list +6 -8
@@ 1,16 1,14 @@
[Added Associations]
[Default Applications]
application/javascript=nvim.desktop;
application/pdf=org.pwmt.zathura.desktop;
image/gif=imv.desktop;
image/jpeg=imv.desktop;
image/png=imv.desktop;
text/css=nvim.desktop;
text/html=qutebrowser.desktop
text/plain=nvim.desktop;
video/mp4=mpv.desktop;

[Default Applications]
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/unknown=firefox.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

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

A qutebrowser/config.py => qutebrowser/config.py +37 -0
@@ 0,0 1,37 @@
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)

M sway/config => sway/config +1 -1
@@ 33,7 33,7 @@ bindsym $mod+$alt+4 exec ~/.config/sway/actions/take-screenshot box
bindsym $mod+$alt+5 exec ~/.config/sway/actions/take-screenshot window

bindsym $mod+Return exec alacritty
bindsym $mod+n exec ~/.config/firefox/launch Main
bindsym $mod+n exec env XDG_SESSION_TYPE=wayland qutebrowser
bindsym $mod+Shift+n exec ~/.config/firefox/launch

bindsym $mod+space exec launch