Compare commits

...

10 Commits

Author SHA1 Message Date
46b534d447 [~] Refactor 2024-07-01 08:58:47 +03:00
aba9020f34 [~] Refactor 2024-07-01 08:58:47 +03:00
8a4a8eaa32 [~] Refactor 2024-07-01 08:58:47 +03:00
67ce19ca44 [~] Refactor 2024-07-01 08:58:46 +03:00
fefee3c3ea [~] Refactor 2024-07-01 08:58:46 +03:00
9bc2752fab [~] Refactor 2024-07-01 08:58:46 +03:00
d17e9cf880 [~] Refactor 2024-07-01 08:58:45 +03:00
8dd1a9f612 [~] Refactor 2024-07-01 08:58:10 +03:00
7775cdc6a2 [~] Refactor 2024-07-01 08:58:10 +03:00
d7b8c2f974 [~] Refactor 2024-07-01 08:58:10 +03:00
2 changed files with 45 additions and 12 deletions
dotfiles
.local/bin
.vimrc

@ -2,6 +2,7 @@
import asyncio
import enum
import threading
import shutil
import collections
import datetime
import functools
@ -22,6 +23,9 @@ import time
import traceback
logger = logging.getLogger(__name__)
def custom_notify(
title=None,
msg=None,
@ -1141,7 +1145,7 @@ def http_server(argv):
else:
path = options.token
print(
logger.info(
'access url is http://%s:%d/%s/' % (
options.host,
options.port,
@ -1258,7 +1262,8 @@ http {
) as f:
f.write(r'''
server {
listen 80;
server_name %s;
listen %d;
charset UTF-8;
client_max_body_size 2K;
@ -1272,20 +1277,24 @@ server {
%s
}
''' % (
options.host,
options.port,
DATA_DIR,
location_section,
))
subprocess.check_call(
r'''
exec nginx -c $CONF_DIR/nginx.conf -p $DATA_DIR -g "daemon off;"
''',
env=dict(
CONF_DIR=CONF_DIR,
DATA_DIR=DATA_DIR,
#APP_DIR=APP_DIR,
),
shell=True,
sys.stderr.flush()
sys.stdout.flush()
os.execv(
'/usr/sbin/nginx',
[
'/usr/sbin/nginx',
'-c',
os.path.join(CONF_DIR, 'nginx.conf'),
'-p', DATA_DIR,
'-g', 'daemon off;',
],
)
def pass_ssh_osx(argv):
@ -3355,6 +3364,7 @@ def media_keys(argv):
def commands_cli():
logging.getLogger().setLevel(logging.INFO)
logger.setLevel(logging.INFO)
msg = None

@ -19,6 +19,7 @@ set backspace=indent,eol,start
set mouse=a
au FileType netrw nmap <buffer> <LeftMouse> <LeftMouse> <CR>
au FocusLost * silent! wa
set term=xterm-256color
@ -28,12 +29,34 @@ set hls
colorscheme morning
hi MatchParen guifg=white guibg=black gui=NONE ctermfg=1 ctermbg=0
function! MakeSession()
let b:sessiondir = '.vim/'
if (filewritable(b:sessiondir) != 2)
exe 'silent !mkdir -p ' b:sessiondir
redraw!
endif
let b:filename = b:sessiondir . '/session.vim'
exe "mksession! " . b:filename
endfunction
function! LoadSession()
let b:sessiondir = '.vim/'
let b:sessionfile = b:sessiondir . "/session.vim"
if (filereadable(b:sessionfile))
exe 'source ' b:sessionfile
else
echo "No session loaded."
endif
endfunction
map <Leader>w <C-w>
map <Leader>wo :py3 print('fuck')<CR>
map <Leader>z :wqa<CR>
map <Leader>m :py3 f1()<CR>
map <Leader>r :redraw!<CR>
map <Leader>s :call MakeSession()<CR>
map <Leader>l :call LoadSession()
map <Leader>cq :cq<CR>
map <Leader>f2 :py3 f2()<CR>
map <Leader>f3 :source ~/.vimrc<CR>:echo 'reloaded'<CR>