~pvsr/dotfiles

ref: 91e9be2a2fbc7a63a3424de07c34f3a187d62e8f dotfiles/qutebrowser/.config/qutebrowser/config.py -rw-r--r-- 3.2 KiB
91e9be2aPeter Rice tweak custom keybindings 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import glob
import os.path

c.aliases = {
        'q': 'quit',
        'w': 'session-save',
        'wq': 'quit --save',
        'x': 'quit --save',
        'h': 'help'
        }

c.bindings.commands = {
        'command': {
            '<Ctrl-w>': 'rl-backward-kill-word',
            # TODO not the most convenient mapping
            '<Ctrl-Shift-w>': 'rl-unix-word-rubout'
            },
        'prompt': {
            '<Ctrl-w>': 'rl-backward-kill-word',
            '<Ctrl-Shift-w>': 'rl-unix-word-rubout'
            }
        }

c.confirm_quit = ['downloads']

c.new_instance_open_target = 'tab-silent'
c.new_instance_open_target_window = 'last-focused'

c.editor.command = ['termite', '-e', 'bash -c \'exec nvim -f {file} -c "normal {line}G{column0}l"\'']

c.auto_save.session = True

c.content.host_blocking.lists = ['https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts']
c.content.javascript.enabled = True
c.content.autoplay = False
c.content.pdfjs = True
c.content.netrc_file = '~/.netrc'

c.completion.shrink = True
c.completion.scrollbar.width = 0
c.completion.scrollbar.padding = 0
c.completion.open_categories = ['quickmarks', 'bookmarks', 'history']

c.hints.auto_follow = 'always'
c.hints.auto_follow_timeout = 400
c.hints.mode = 'letter'

c.search.incremental = False

c.tabs.background = True
c.tabs.favicons.scale = 0.9
c.tabs.last_close = 'close'
c.tabs.padding = {'bottom': 4, 'left': 3, 'right': 3, 'top': 4}
c.tabs.mode_on_change = 'restore'
c.tabs.show = 'multiple'
c.tabs.indicator.width = 0

c.url.open_base_url = True
c.url.searchengines = {
        'DEFAULT': 'https://duckduckgo.com/?q={}',
        'ap': 'https://archlinux.org/packages/?q={}',
        'aur': 'https://aur.archlinux.org/packages.php?K={}',
        'a': 'https://wiki.archlinux.org/?search={}',
        'd': 'https://duckduckgo.com/?q={}',
        'gi': 'https://github.com/search?q={}',
        'ho': 'https://www.haskell.org/hoogle/?hoogle={}',
        'ji': 'http://jisho.org/search/{}',
        'ra': 'https://rateyourmusic.com/search?searchtype=a&searchterm={}',
        'wikt': 'https://en.wiktionary.org/wiki/Special:Search?search={}',
        'w': 'https://en.wikipedia.org/wiki/Special:Search?search={}',
        'y': 'https://youtube.com/results?search_query={}'
        }

c.fonts.default_family = ['Sarasa Term J', 'monospace']
c.fonts.default_size = '13pt'

# c.fonts.completion.entry = mono
c.fonts.completion.category = 'bold default_size default_family'
# c.fonts.debug_console = mono
# c.fonts.downloads = mono
c.fonts.hints = 'bold 12pt default_family'
c.fonts.prompts = '12pt sans_serif'
# c.fonts.keyhint = mono
# c.fonts.messages.error = mono
# c.fonts.messages.info = mono
# c.fonts.messages.warning = mono
# c.fonts.statusbar = mono
# c.fonts.tabs = mono

config.bind(',d', 'hint all delete')
config.bind(',r', 'set-cmd-text :open {url:domain}/')
config.bind('xP', 'open -b -- {primary}')
config.bind('xp', 'open -b -- {clipboard}')
config.bind(';x', 'hint links spawn -dv mpv --profile=no-term {hint-url}')
config.bind('X', 'spawn -dv mpv --profile=no-term {url}')

for f in glob.glob(str(config.configdir / 'conf.d' / '*.py')):
    config.source(str(os.path.relpath(f, start=config.configdir)))