Merge
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
# name: purify
|
||||
# base on: theme-clearance (https://github.com/oh-my-fish/theme-clearance)
|
||||
|
||||
# Set fish global colors
|
||||
set -l normal fafafa
|
||||
set -l selection 3e4452
|
||||
set -l comment 5f5f87
|
||||
|
||||
set -l red ff6059
|
||||
set -l green 5fff87
|
||||
set -l blue 5fafff
|
||||
set -l yellow ffff87
|
||||
set -l pink ff79c6
|
||||
set -l salmon ff875f
|
||||
|
||||
set -g fish_color_autosuggestion $selection
|
||||
set -g fish_color_command $green
|
||||
set -g fish_color_comment $comment
|
||||
set -g fish_color_end $salmon
|
||||
set -g fish_color_error $red
|
||||
set -g fish_color_escape $pink
|
||||
set -g fish_color_normal $normal
|
||||
set -g fish_color_operator $green
|
||||
set -g fish_color_param $normal
|
||||
set -g fish_color_quote $yellow
|
||||
set -g fish_color_redirection $foreground
|
||||
set -g fish_color_search_match --background=$selection
|
||||
set -g fish_color_selection --background=$selection
|
||||
|
||||
# Function to support git
|
||||
#function _git_branch_name
|
||||
# echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
|
||||
#end
|
||||
|
||||
#function _git_is_dirty
|
||||
# echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
|
||||
#end
|
||||
|
||||
#function fish_prompt
|
||||
# set -l last_status $status
|
||||
|
||||
# Define required colors
|
||||
# set -l cyan (set_color 88fcfc)
|
||||
# set -l pink (set_color ff79c6)
|
||||
# set -l red (set_color ff6059)
|
||||
# set -l blue (set_color 5fafff)
|
||||
# set -l green (set_color 5fff87)
|
||||
# set -l normal (set_color fafafa)
|
||||
|
||||
# set -l cwd $blue(pwd | sed "s:^$HOME:~:")
|
||||
|
||||
# Add a newline before new prompts
|
||||
# echo -e ''
|
||||
|
||||
# Display [venvname] if in a virtualenv
|
||||
# if set -q VIRTUAL_ENV
|
||||
# echo -n -s (set_color -b blue black) '[' (basename "$VIRTUAL_ENV") ']' $normal ' '
|
||||
# end
|
||||
|
||||
# Print pwd or full path
|
||||
# echo -n -s $cwd $normal
|
||||
|
||||
# Show git branch and status
|
||||
# if [ (_git_branch_name) ]
|
||||
# set -l git_branch (_git_branch_name)
|
||||
#
|
||||
# if [ (_git_is_dirty) ]
|
||||
# set git_info $cyan $git_branch $red " !"
|
||||
# else
|
||||
# set git_info $cyan $git_branch $green " √"
|
||||
# end
|
||||
|
||||
# echo -n -s $cyan ' ⇢ ' $git_info
|
||||
# end
|
||||
|
||||
# Terminate with a nice prompt char
|
||||
# echo -e ''
|
||||
# echo -e -n -s $pink '❯ '
|
||||
#end
|
@@ -1,6 +1,8 @@
|
||||
# Start X at login
|
||||
if status --is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
exec sway
|
||||
exec sway
|
||||
# pour activer le partage d'écran mais sway ne fonctionne plus.
|
||||
#exec env XDG_CURRENT_DESKTOP=sway dbus-run-session sway
|
||||
end
|
||||
end
|
||||
|
@@ -24,7 +24,7 @@ SETUVAR fish_color_operator:00a6b2
|
||||
SETUVAR fish_color_param:00afff
|
||||
SETUVAR fish_color_quote:999900
|
||||
SETUVAR fish_color_redirection:00afff
|
||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
|
@@ -1,6 +1,6 @@
|
||||
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||
set --local fisher_version 4.4.4
|
||||
set --local fisher_version 4.4.5
|
||||
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||
|
||||
switch "$cmd"
|
||||
@@ -29,7 +29,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
set --local old_plugins $_fisher_plugins
|
||||
set --local new_plugins
|
||||
|
||||
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
|
||||
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
|
||||
|
||||
if ! set --query argv[2]
|
||||
if test "$cmd" != update
|
||||
@@ -206,7 +206,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
||||
end
|
||||
|
||||
printf "%s\n" $commit_plugins >$fish_plugins
|
||||
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
|
||||
else
|
||||
set --erase _fisher_plugins
|
||||
command rm -f $fish_plugins
|
||||
|
@@ -783,10 +783,11 @@ endfunction
|
||||
function! s:syntax()
|
||||
syntax clear
|
||||
syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber
|
||||
syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX
|
||||
syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX,plugAbort
|
||||
syn match plugNumber /[0-9]\+[0-9.]*/ contained
|
||||
syn match plugBracket /[[\]]/ contained
|
||||
syn match plugX /x/ contained
|
||||
syn match plugAbort /\~/ contained
|
||||
syn match plugDash /^-\{1}\ /
|
||||
syn match plugPlus /^+/
|
||||
syn match plugStar /^*/
|
||||
@@ -811,6 +812,7 @@ function! s:syntax()
|
||||
hi def link plug2 Repeat
|
||||
hi def link plugH2 Type
|
||||
hi def link plugX Exception
|
||||
hi def link plugAbort Ignore
|
||||
hi def link plugBracket Structure
|
||||
hi def link plugNumber Number
|
||||
|
||||
@@ -908,7 +910,7 @@ function! s:prepare(...)
|
||||
endif
|
||||
endfor
|
||||
|
||||
call s:job_abort()
|
||||
call s:job_abort(0)
|
||||
if s:switch_in()
|
||||
if b:plug_preview == 1
|
||||
pc
|
||||
@@ -944,6 +946,8 @@ function! s:close_pane()
|
||||
if b:plug_preview == 1
|
||||
pc
|
||||
let b:plug_preview = -1
|
||||
elseif exists('s:jobs') && !empty(s:jobs)
|
||||
call s:job_abort(1)
|
||||
else
|
||||
bd
|
||||
endif
|
||||
@@ -1326,7 +1330,12 @@ function! s:update_finish()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:job_abort()
|
||||
function! s:mark_aborted(name, message)
|
||||
let attrs = { 'running': 0, 'error': 1, 'abort': 1, 'lines': [a:message] }
|
||||
let s:jobs[a:name] = extend(get(s:jobs, a:name, {}), attrs)
|
||||
endfunction
|
||||
|
||||
function! s:job_abort(cancel)
|
||||
if (!s:nvim && !s:vim8) || !exists('s:jobs')
|
||||
return
|
||||
endif
|
||||
@@ -1340,8 +1349,18 @@ function! s:job_abort()
|
||||
if j.new
|
||||
call s:rm_rf(g:plugs[name].dir)
|
||||
endif
|
||||
if a:cancel
|
||||
call s:mark_aborted(name, 'Aborted')
|
||||
endif
|
||||
endfor
|
||||
let s:jobs = {}
|
||||
|
||||
if a:cancel
|
||||
for todo in values(s:update.todo)
|
||||
let todo.abort = 1
|
||||
endfor
|
||||
else
|
||||
let s:jobs = {}
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:last_non_empty_line(lines)
|
||||
@@ -1355,6 +1374,16 @@ function! s:last_non_empty_line(lines)
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:bullet_for(job, ...)
|
||||
if a:job.running
|
||||
return a:job.new ? '+' : '*'
|
||||
endif
|
||||
if get(a:job, 'abort', 0)
|
||||
return '~'
|
||||
endif
|
||||
return a:job.error ? 'x' : get(a:000, 0, '-')
|
||||
endfunction
|
||||
|
||||
function! s:job_out_cb(self, data) abort
|
||||
let self = a:self
|
||||
let data = remove(self.lines, -1) . a:data
|
||||
@@ -1363,10 +1392,9 @@ function! s:job_out_cb(self, data) abort
|
||||
" To reduce the number of buffer updates
|
||||
let self.tick = get(self, 'tick', -1) + 1
|
||||
if !self.running || self.tick % len(s:jobs) == 0
|
||||
let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-')
|
||||
let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines)
|
||||
if len(result)
|
||||
call s:log(bullet, self.name, result)
|
||||
call s:log(s:bullet_for(self), self.name, result)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
@@ -1380,7 +1408,7 @@ endfunction
|
||||
|
||||
function! s:job_cb(fn, job, ch, data)
|
||||
if !s:plug_window_exists() " plug window closed
|
||||
return s:job_abort()
|
||||
return s:job_abort(0)
|
||||
endif
|
||||
call call(a:fn, [a:job, a:data])
|
||||
endfunction
|
||||
@@ -1452,17 +1480,16 @@ function! s:reap(name)
|
||||
endif
|
||||
|
||||
let more = len(get(job, 'queue', []))
|
||||
let bullet = job.error ? 'x' : more ? (job.new ? '+' : '*') : '-'
|
||||
let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines)
|
||||
if len(result)
|
||||
call s:log(bullet, a:name, result)
|
||||
call s:log(s:bullet_for(job), a:name, result)
|
||||
endif
|
||||
|
||||
if !job.error && more
|
||||
let job.spec.queue = job.queue
|
||||
let s:update.todo[a:name] = job.spec
|
||||
else
|
||||
let s:update.bar .= job.error ? 'x' : '='
|
||||
let s:update.bar .= s:bullet_for(job, '=')
|
||||
call s:bar()
|
||||
endif
|
||||
endfunction
|
||||
@@ -1541,6 +1568,12 @@ while 1 " Without TCO, Vim stack is bound to explode
|
||||
|
||||
let name = keys(s:update.todo)[0]
|
||||
let spec = remove(s:update.todo, name)
|
||||
if get(spec, 'abort', 0)
|
||||
call s:mark_aborted(name, 'Skipped')
|
||||
call s:reap(name)
|
||||
continue
|
||||
endif
|
||||
|
||||
let queue = get(spec, 'queue', [])
|
||||
let new = empty(globpath(spec.dir, '.git', 1))
|
||||
|
||||
|
@@ -84,9 +84,10 @@ output eDP-1 bg "$HOME/nextcloud/perso/images/wallapper_desktop.png" fill
|
||||
|
||||
bindsym $mod+l exec swaylock --color "#243646"
|
||||
|
||||
### Laptop screen open / close
|
||||
bindswitch --reload lid:on output eDP-1 disabel
|
||||
bindswitch --reload lid:off output eDP-1 enable
|
||||
### Laptop screen is close
|
||||
bindswitch --locked lid:on output eDP-1 disable
|
||||
### Laptop screen is open
|
||||
bindswitch --locked lid:off output eDP-1 enable
|
||||
|
||||
exec kanshi
|
||||
|
||||
@@ -94,10 +95,8 @@ bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
#Wait 1s some icons don't appear otherwise
|
||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
exec blueman-applet
|
||||
exec nm-applet --indicator
|
||||
exec rocketchat-desktop --start-hidden
|
||||
exec sleep 10s
|
||||
exec nextcloud --background
|
||||
exec keepassxc
|
||||
|
@@ -11,4 +11,4 @@ Restart=on-failure
|
||||
|
||||
[Install]
|
||||
Also=gnome-keyring-daemon.socket
|
||||
WantedBy=graphical-session-pre.target
|
||||
WantedBy=default.target
|
||||
|
13
.gitconfig
13
.gitconfig
@@ -5,3 +5,16 @@
|
||||
rebase = true
|
||||
[credential]
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
[http]
|
||||
sslbackend = openssl
|
||||
sslVerify = false
|
||||
[safe]
|
||||
directory = /home/bredow/ansible/src
|
||||
directory = /home/bredow/ansible/inventaire
|
||||
[core]
|
||||
editor = nvim
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
@@ -22,7 +22,7 @@ def main():
|
||||
args = load_args()
|
||||
name = ' '.join(args['all'])
|
||||
today = date.today().strftime('%Y-%m-%d')
|
||||
filename = f'/home/bredow/nextcloud/perso/notes/zettelkasten/inbox/{today}_{name}.md'
|
||||
filename = f'/home/bredow/nextcloud/perso/notes/zettelkasten/inbox/{name}.md'
|
||||
|
||||
content = textwrap.dedent(f"""\
|
||||
---
|
||||
|
Reference in New Issue
Block a user