wip
This commit is contained in:
parent
9700d4ca14
commit
ddbae06533
@ -1,25 +1,66 @@
|
||||
import os
|
||||
#import time
|
||||
#start_ts=time.time()
|
||||
|
||||
import os
|
||||
env=os.environ
|
||||
|
||||
################# general ############
|
||||
config.load_autoconfig(False)
|
||||
# actions
|
||||
config.set('tabs.tabs_are_windows', True)
|
||||
config.set('tabs.show', 'never')
|
||||
c.tabs.tabs_are_windows = True
|
||||
c.tabs.show = 'never'
|
||||
######################################
|
||||
|
||||
############### keybinds ##############
|
||||
for mode in ['normal','insert','hint','passthrough','command','prompt','yesno','register']:
|
||||
config.bind('<Cut>', 'fake-key -g <Ctrl-x>', mode)
|
||||
config.bind('<Copy>', 'fake-key -g <Ctrl-c>', mode)
|
||||
config.bind('<Paste>', 'fake-key -g <Ctrl-v>', mode)
|
||||
m = c.bindings.commands[mode]={}
|
||||
d = c.bindings.default[mode]
|
||||
|
||||
m['<Cut>'] = 'fake-key -g <Ctrl-x>'
|
||||
m['<Copy>'] = 'fake-key -g <Ctrl-c>'
|
||||
m['<Paste>'] = 'fake-key -g <Ctrl-v>'
|
||||
|
||||
noremap=[
|
||||
'n','h', 'N','H', '<Ctrl-N>','<Ctrl-H>',
|
||||
'e','k', 'E','K', '<Ctrl-E>','<Ctrl-K>',
|
||||
'i','j', 'I','J', '<Ctrl-I>','<Ctrl-J>',
|
||||
'o','l', 'O','L', '<Ctrl-O>','<Ctrl-L>',
|
||||
|
||||
'k','n', 'K','N', '<Ctrl-K>','<Ctrl-N>',
|
||||
'l','i', 'L','I', '<Ctrl-L>','<Ctrl-I>',
|
||||
'h','o', 'H','O', '<Ctrl-H>','<Ctrl-O>',
|
||||
'j','e' 'J','E', '<Ctrl-J>','<Ctrl-E>',
|
||||
]
|
||||
for i in range(0,len(noremap)-1,2):
|
||||
cmd=d.get(noremap[i+1])
|
||||
if(cmd):
|
||||
m[noremap[i]]=cmd
|
||||
|
||||
#config.unbind('.')
|
||||
#en_keys = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"+'QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?'
|
||||
#ru_keys = 'йцукенгшщзхъфывапролджэячсмитьбю.'+'ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,'
|
||||
#c.bindings.key_mappings.update(dict(zip(ru_keys, en_keys)))
|
||||
############################################
|
||||
|
||||
# styles
|
||||
config.set('colors.webpage.preferred_color_scheme','dark')
|
||||
config.set('colors.webpage.darkmode.enabled', True)
|
||||
config.set('colors.webpage.bg','#'+os.environ['QB_THEME_COLOR_BG'])
|
||||
config.set('fonts.default_family','Roboto')
|
||||
# engines
|
||||
config.set('url.searchengines', {
|
||||
'DEFAULT': 'https://lite.duckduckgo.com/lite?&q={}',
|
||||
'!d': 'https://lite.duckduckgo.com/lite?&q={}',
|
||||
'!g': 'https://google.com/search?hl=en&q={}',
|
||||
'!y': 'https://ya.ru/search/?text={}',
|
||||
'!c': 'https://chat.openai.com/chat?q={}',
|
||||
})
|
||||
config.set('url.default_page', 'file:///home/'+os.environ['USER']+'/.local/share/qutebrowser/start.html')
|
||||
config.set('url.start_pages', ['file:///home/'+os.environ['USER']+'/.local/share/qutebrowser/start.html'])
|
||||
c.colors.webpage.preferred_color_scheme = 'dark'
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
c.colors.webpage.bg = '#'+env['QB_THEME_COLOR_BG']
|
||||
c.fonts.default_family = 'Roboto'
|
||||
##########################################
|
||||
|
||||
# search engines
|
||||
c.url.searchengines = {
|
||||
'DEFAULT': 'https://lite.duckduckgo.com/lite?&q={}',
|
||||
'!d': 'https://lite.duckduckgo.com/lite?&q={}',
|
||||
'!g': 'https://google.com/search?hl=en&q={}',
|
||||
'!y': 'https://ya.ru/search/?text={}',
|
||||
'!c': 'https://chat.openai.com/chat?q={}',
|
||||
}
|
||||
###########################################
|
||||
|
||||
# start page ############
|
||||
c.url.default_page = 'file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html'
|
||||
c.url.start_pages = ['file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html']
|
||||
########################################
|
||||
|
||||
#print(f"Execution time {time.time() - start_ts}")
|
||||
|
@ -1,4 +1,4 @@
|
||||
" Don't try to be vi compatible
|
||||
" don't try to be vi compatible
|
||||
set nocompatible
|
||||
|
||||
" Show matching brackets when text indicator is over them
|
||||
@ -22,6 +22,7 @@ set ruler
|
||||
" W - Save file as superuser
|
||||
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
|
||||
|
||||
|
||||
" colemak-dh
|
||||
noremap n h
|
||||
noremap e k
|
||||
@ -32,3 +33,16 @@ noremap k n
|
||||
noremap l i
|
||||
noremap h o
|
||||
noremap j e
|
||||
|
||||
set langmap=йЙцЦуУкКеЕнНгГшШщЩзЗхХъЪфФыЫвВаАпПрРоОлЛдДжЖэЭяЯчЧсСмМиИтТьЬбБюЮ.\\,;qQwWfFpPbBjJlLuUyY;:[{]}aArRsStTgGmMnNeEiIoO'\"xXcCdDvVzZkKhH\\,<.>/?
|
||||
noremap о ь
|
||||
noremap л т
|
||||
noremap д н
|
||||
noremap ж г
|
||||
|
||||
noremap т о
|
||||
noremap г д
|
||||
noremap ь ж
|
||||
noremap н л
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user