diff --git a/.gitmodules b/.gitmodules index b5b5e77..64d85cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule "fzf"] path = fzf url = https://github.com/junegunn/fzf.git -[submodule "meta/dotbot_plugins/aptget"] - path = meta/dotbot_plugins/aptget - url = https://github.com/dein0s/dotbot_plugin_aptget [submodule "meta/dotbot_plugins/pip"] path = meta/dotbot_plugins/pip url = https://github.com/sobolevn/dotbot-pip diff --git a/config/aliasrc b/config/aliasrc index 7e7cbfa..8f4fe2f 100644 --- a/config/aliasrc +++ b/config/aliasrc @@ -4,9 +4,7 @@ command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Uses non default software alias \ - cat="bat" \ diff="diff-so-fancy" \ - find="fd" \ fzf="fzf --preview=\"bat {} --color=always\"" \ # Verbosity and settings that you pretty much just always are going to want. @@ -54,7 +52,7 @@ alias \ y="yay" \ ,gs="git status" \ ,gc="git commit" \ - ,gch="git checkout" \ + ,gck="git checkout" \ ,gcm="git commit -m" \ ,gfa="git fetch --all" \ ,gpl="git pull" \ @@ -64,7 +62,7 @@ alias \ ,gd="git diff" \ ,gds="git diff --staged" \ ,gcan="git commit --amend --no-edit" \ - ,gpsf="git push --force" \ + ,gpsf="git push --force-with-lease" \ ,gr="git rebase" \ ,grc="git rebase --continue" \ lt="tree -L 2" \ @@ -73,10 +71,9 @@ alias \ xc="xclip -sel clip" \ xcp="xclip -sel clip -target image/png -i" \ kx="killall xcape" \ - fs='flameshot gui -r | tee ~/Pictures/Flameshot_$(date +%Y-%m-%d_%H-%M-%S).jpg | xcp' \ + fs='env QT_SCREEN_SCALE_FACTORS="$REVERSE_SCALE" flameshot gui -r | tee ~/Pictures/Flameshot_$(date +%Y-%m-%d_%H-%M-%S).jpg | xcp' \ /="ack" \ - # This alias is important. It enables the `pauseallmpv` command. alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)" @@ -100,9 +97,19 @@ function qe() { v ~/.local/share/qutebrowser_$1/config/custom_config.py } -,e() { du --exclude-from=$HOME/.config/du_excludes -a ~/.scripts/* ~/.config/* ~/.dotfiles/*(N) /var/lib/transmission/.config/*(N) | cut -d$'\t' -f2- | fzf | xargs -d '\n' -r $EDITOR ;} +,e() { du --exclude-from=$HOME/.config/du_excludes -a ~/.scripts/* ~/scripts/*(N) ~/.config/* ~/.dotfiles/*(N) /var/lib/transmission/.config/*(N) | cut -d$'\t' -f2- | fzf | xargs -d '\n' -r $EDITOR ;} ,t() { fzf | xargs -d '\n' -r -I % $EDITOR % ;} -cdf() { cd -- "$(du | cut -d$'\t' -f2- | fzf)"} -cdp() { cd -- "$(/usr/bin/ls -C -d ~/dev/git/*(N) ~/dev/projects/*(N) ~/localstorage/dev/*(N) | fzf;)"} +cdf() { cd -- "$(du | cut -d$'\t' -f2- | fzf)"} cdt() { cd -- "$HOME/Downloads/Torrent/$(/usr/bin/ls -C --format=single-column ~/Downloads/Torrent | fzf;)"} + +gfixup() { + rev=$(_fzf_git_hashes) + [[ $rev == "" ]] && return + git commit --fixup ${rev} && git rebase -i --autostash --autosquash ${rev}^ && echo --------git status---------- && git status +} +gdrop() { + rev=$(_fzf_git_hashes) + [[ $rev == "" ]] && return + git rebase -i --autostash --autosquash ${rev}^ && echo --------git status---------- && git status +} diff --git a/config/ccache/ccache.conf b/config/ccache/ccache.conf new file mode 100644 index 0000000..d1bd96f --- /dev/null +++ b/config/ccache/ccache.conf @@ -0,0 +1 @@ +max_size = 200.0G diff --git a/config/dirs.csv b/config/dirs.csv index b0a5f5c..a70340b 100644 --- a/config/dirs.csv +++ b/config/dirs.csv @@ -31,3 +31,6 @@ L ~/localstorage w ~/localstorage/workspace S ~/shares .t ~/.tools +pc ~/localstorage/workspace/P33617/repos/project/.ci_tools +qp ~/shares/data/02_Software/2.1_Admin_Software/2.1.1_Team_Orga/QuarterlyPlanning/2021-Q4 +pcli ~/localstorage/dev/project-cli diff --git a/config/fakevim/vimrc b/config/fakevim/vimrc index 0de1387..92f9229 100644 --- a/config/fakevim/vimrc +++ b/config/fakevim/vimrc @@ -218,5 +218,7 @@ nnoremap ,eh :OpenHeaderSourceInNextSplit nnoremap :tag nnoremap ,ec :EditWithCode -nnoremap ,yp :CopyFullPath +nnoremap ,yp :CopyPath nnoremap ,yn :CopyFileName + +nnoremap ,fu :FindUsages diff --git a/config/files.csv b/config/files.csv index 63ae19b..675dba4 100644 --- a/config/files.csv +++ b/config/files.csv @@ -15,3 +15,5 @@ x ~/.Xdefaults c ~/.dotfiles/meta/configs n ~/Dokumente/note.org t ~/Dokumente/today.org +b ~/Dokumente/bericht.org +qp ~/shares/data/02_Software/2.1_Admin_Software/2.1.1_Team_Orga/QuarterlyPlanning/2021-Q4/2021-Q4_ZolbooErdenebayar.jpg diff --git a/config/fontconfig/conf.d/10-powerline-symbols.conf b/config/fontconfig/conf.d/10-powerline-symbols.conf deleted file mode 100644 index 7e34a12..0000000 --- a/config/fontconfig/conf.d/10-powerline-symbols.conf +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - monospace - PowerlineSymbols - - - Droid Sans Mono - PowerlineSymbols - - - Droid Sans Mono Slashed - PowerlineSymbols - - - Droid Sans Mono Dotted - PowerlineSymbols - - - DejaVu Sans Mono - PowerlineSymbols - - - DejaVu Sans Mono - PowerlineSymbols - - - Envy Code R - PowerlineSymbols - - - Inconsolata - PowerlineSymbols - - - Lucida Console - PowerlineSymbols - - - Monaco - PowerlineSymbols - - - Pragmata - PowerlineSymbols - - - PragmataPro - PowerlineSymbols - - - Menlo - PowerlineSymbols - - - Source Code Pro - PowerlineSymbols - - - Consolas - PowerlineSymbols - - - Anonymous pro - PowerlineSymbols - - - Bitstream Vera Sans Mono - PowerlineSymbols - - - Liberation Mono - PowerlineSymbols - - - Ubuntu Mono - PowerlineSymbols - - - Meslo LG L - PowerlineSymbols - - - Meslo LG L DZ - PowerlineSymbols - - - Meslo LG M - PowerlineSymbols - - - Meslo LG M DZ - PowerlineSymbols - - - Meslo LG S - PowerlineSymbols - - - Meslo LG S DZ - PowerlineSymbols - - diff --git a/config/i3/config b/config/i3/config index 29c2d87..bd8447e 100755 --- a/config/i3/config +++ b/config/i3/config @@ -5,7 +5,7 @@ # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. # new_window pixel -default_border pixel +default_border pixel 4 set_from_resource $fontsize fontsize 13 # font pango:DejaVu Sans Mono for Powerline, FontAwesome $fontsize @@ -106,6 +106,8 @@ for_window [title="mpvfloat"] sticky enable for_window [title="mpvfloat"] border pixel 0 no_focus [title="mpvfloat"] +for_window [class="^Ires20$"] floating disable + set $workspace2 "2: " set $workspace3 "3: " set $workspace4 "4: " @@ -160,12 +162,22 @@ bar { # #---Basic Bindings---# # bindsym button3 --border kill bindsym $mod+button1 --whole-window floating toggle +bindsym $mod+s mode "indurad" + +set $devops "devops" +set $33617 "33617" +set $33020 "33020" + +mode "indurad" { + bindsym d workspace $devops ; mode "default" + bindsym z exec --no-startup-id i3zen switch; mode "default" -set $wsBuK "S: BuK" -set $wsNumRe "S: NumRe" -set $wsST "S: ST" -set $wsCC "S: CC" -set $wsAS "S: AS" + + bindsym Shift+d move container to workspace $devops + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} # assign [class="Chromium-browser"] 7 # assign [class="Firefox"] $workspace2 diff --git a/config/i3blocks/config b/config/i3blocks/config index 328a5b3..a9299a4 100644 --- a/config/i3blocks/config +++ b/config/i3blocks/config @@ -53,7 +53,11 @@ command=disk /  [disk] interval=60 -command=disk /home +command=disk /home/ilocalstorage-sata il + +[disk] +interval=60 +command=disk /home/zerdenebayar/shares_cached 💻 [battery] command=battery BAT0 @@ -71,8 +75,10 @@ interval=30 label=🕓 interval=1 -#[internet] -#interval=10 +[shutdown] +interval=0 +command=wm_exit suspend +full_text=😪 [vpn] interval=10 diff --git a/config/keyboard/xkbmap_def b/config/keyboard/xkbmap_def index 6ddf1a6..bf701fb 100644 --- a/config/keyboard/xkbmap_def +++ b/config/keyboard/xkbmap_def @@ -1,6 +1,7 @@ xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" + = 66; }; xkb_types { include "complete" }; diff --git a/config/keyboard/xmodmaprc b/config/keyboard/xmodmaprc index d051a59..5e6f785 100644 --- a/config/keyboard/xmodmaprc +++ b/config/keyboard/xmodmaprc @@ -11,8 +11,8 @@ add control = Control_R clear shift add shift = Shift_L -add mod3 = Shift_R +! add mod3 = Shift_R -! add shift = Shift_R +add shift = Shift_R -pointer = 3 2 1 +!pointer = 3 2 1 diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 6bf76bd..780a4a8 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1114,9 +1114,9 @@ let g:coc_global_extensions = [ \ 'coc-ultisnips', \ 'coc-highlight', \ 'coc-texlab', - \ 'coc-spell-checker', \ 'coc-python', \ ] + " \ 'coc-spell-checker', " grep word under cursor command! -nargs=+ -complete=custom,s:GrepArgs Rg exe 'CocList grep '. diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index bf131e6..724c0f9 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -127,12 +127,15 @@ "!sp": "https://www.startpage.com/do/dsearch?query={}", "!pirate": "https://www.pirate-bay.net/search?q={}", "!torrent": "https://www.pirate-bay.net/search?q={}", + "g" :"https://git.indurad.x/search?utf8=%E2%9C%93&search={}&group_id=&project_id=&snippets=false&repository_ref=&nav_source=navbar", + "w" :"https://wiki.indurad.x/foswiki/bin/view/Main/WebSearch?tab=search&search={}&scope=all", } if ENVMODE == 'indurad': c.url.searchengines.update({ "g": "https://git.indurad.x/search?utf8=%E2%9C%93&search={}&group_id=&project_id=&snippets=false&repository_ref=&nav_source=navbar", "w": "https://wiki.indurad.x/foswiki/bin/view/Main/WebSearch?search={}&scope=all&web=Main", "j": "https://jenkins.indurad.x/search/?q={}&Jenkins-Crumb=8bfe1ab4d1d762edca143d9a7be37aae752c17de126e62349d4a2d2604993772", + "r": "https://redmine.indurad.x/issues/{}" }) @@ -192,6 +195,9 @@ c.hints.selectors["ad"] = [ "a.pull-right > span.glyphicons-remove", ] +c.hints.selectors["issuesubject"] = [ + 'span[data-name="issue[subject]"]' +] if DIRMODUS == 'jkl;': config.bind('', 'back') @@ -239,6 +245,8 @@ config.bind('hyy','hint links yank') config.bind('hyd','hint div userscript copy_selected.py') + config.bind('h,s','hint --first issuesubject userscript copy_selected.py') + config.source('custom_config.py') diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc index 95f5617..32f8b87 100644 --- a/config/sxhkd/sxhkdrc +++ b/config/sxhkd/sxhkdrc @@ -58,10 +58,6 @@ super + Q; {l, e, s, h, H, r, S, g} super + comma; {a,b, B, d, h, k, l, m, M, o, O, r, S, s, t, u, v, V, w, W, x, X, z, slash} {dmenurecord, rofi -show windowcd -lines 15,vertical_bar_pos.sh,i3 "bar mode toggle",help-shortcut,i3 'sticky toggle',extbacklight,i3-msg 'move workspace to output right',i3-msg 'move workspace to output up',i3order, i3order --split 3,sudo /usr/bin/systemctl restart NetworkManager,i3 'move scratchpad',i3 'scratchpad show',rofi -show window -lines 15,dmenuunicode,vpntoggle 'vpn-default',vpntoggle 'PIA - Switzerland',sxivw,i3 'floating enable;;exec 21_9_width',fixit.sh l,fixit.sh d,i3zen toggle,ducksearch} -# music -super + m; {a, j, o, p, l, n, t, q, space, N, r, semicolon, XF86AudioLowerVolume, XF86AudioRaiseVolume} - {mpd_controll -a, lmc backward, mpd_controll -o, mpd_controll -p, mpd_controll -l, lmc next, mpd_controll -t, mpc stop, lmc toggle, lmc prev, lmc replay, lmc forward, mpc volume -5, mpc volume +5} - # # Audiokeys XF86AudioMute lmc mute @@ -103,7 +99,7 @@ super + XF86MonBrightness{Up,Down} xbacklight.py HDMI-1 {+,-}0.1 Print - flameshot gui -r | tee ~/Pictures/Flameshot_$(date +%Y-%m-%d_%H-%M-%S).jpg | xcp + flameshot gui -c -p ~/Pictures/Flameshot_$(date +%Y-%m-%d_%H-%M-%S).jpg super + Print maim Pictures/screenshot-"$(date '+%y%m%d-%H%M-%S').png" super + shift+Print @@ -158,6 +154,16 @@ super+{_,shift+}{w,e,r,y,u,i,p} mode="{ ,move container to}";\ wsnumber="$WORKSPACE{2,3,4,6,7,8,0}";\ i3-msg "$mode workspace $wsnumber" +Print + xdotool getmouselocation --shell; \ + scrot -a 482,272,1074,767 # cw + # scrot -a 440,281,1266,755 # under 23100 + # scrot -a 5,349,1902,709 # rhs 23100 + # scrot -a 50,280,1852,750 # lhs 23100 + # scrot -a 10,273,1899,794 # lhs + # scrot -a 318,324,1420,696 # rhs + # scrot -a 258,289,1140,750 + # flameshot gui -r > ~/Bilder/Flameshot_$(date +%Y-%m-%d_%H-%M-%S).jpg super+z pass generate -c diff --git a/config/zsh/.induradzshrc b/config/zsh/.induradzshrc new file mode 100644 index 0000000..d189591 --- /dev/null +++ b/config/zsh/.induradzshrc @@ -0,0 +1,68 @@ +#!/usr/bin/zsh + +# export GDK_SCALE=1.5 +# export GDK_DPI_SCALE=0.5 +# export QT_AUTO_SCREEN_SET_FACTOR=0 +[[ $(cat /etc/hostname) =~ kellerberg ]] && export QT_SCALE_FACTOR=1.5 && export REVERSE_SCALE=0.66 +[[ $(cat /etc/hostname) =~ kellerberg ]] && export QT_FONT_DPI=96 + +export CMAKE_GENERATOR=Ninja +export INDURAD_PRECOMMIT_AUTO_FIX=1 + +compctl -W ~/localstorage/workspace/ -/ gp +export PATH=$PATH:${HOME}/localstorage/dev/project-cli +export PATH=$PATH:${HOME}/localstorage/dev/monolith/install/bin +export PATH=$PATH:${HOME}/localstorage/dev/indurad-ci/staging/scripts/ + +export CALVIN_CORE=$(($(nproc) - 2)) + +function _get_irpu_root() { + if [[ -d "./_ARTIFACT" ]]; then + echo "./_ARTIFACT" + else + echo "build/_ARTIFACT" + fi +} + +# indurad +alias \ + clD="calvin -D" \ + cald="(calvin -D -n -m='-j${CALVIN_CORE}' build/calvin && notify-send 'cald done. Success;') || notify-send 'clmld done. Error'" \ + cC="calvin -C build/calvin_checkout" \ + cDf="(calvin --color -D -M ../../monolith -n build/calvin && notify-send 'cD done. Success;') || notify-send 'cD done. Error'" \ + clm="(calvin -D -n -M \`git rev-parse --show-toplevel\`/../monolith -m='-j${CALVIN_CORE}' build/calvin_lm && notify-send 'cD done. Success;') || notify-send 'clm done. Error'" \ + clmld="(calvin -D -n -M \`git rev-parse --show-toplevel\`/../monolith --target localdev -m='-j${CALVIN_CORE}' --platform local build/calvin_local_lm && notify-send 'clmld done. Success;') || notify-send 'clmld done. Error'" \ + cld="(calvin -D -n -m='-j${CALVIN_CORE}' --platform local --target localdev build/calvin_local && notify-send 'clmld done. Success;') || notify-send 'clmld done. Error'" \ + main_old="export LD_LIBRARY_PATH=$PWD/lib && ./main -v 5" \ + main="$(_get_irpu_root)/SOFT/bin/indurad-launcher --main='-v 5 -m replay'" \ + mainh="$(_get_irpu_root)/SOFT/bin/indurad-launcher --main='-v 5 -m replay' --hermes-proxy" \ + mainl="$(_get_irpu_root)/SOFT/bin/indurad-launcher --main='-m live -v 5'" \ + mainlh="$(_get_irpu_root)/SOFT/bin/indurad-launcher --main='-m live -v 5' --hermes-proxy" \ + hermesp="$(_get_irpu_root)/SOFT/bin/indurad-launcher --hermes-proxy" \ + cidat="$(_get_irpu_root)/SOFT/bin/indurad-launcher --idat" \ + il="$(_get_irpu_root)/SOFT/bin/indurad-launcher" \ + clc="calvin -C build/calvin_checkout" \ + + +function twdone() { + local id="$1" + tw tag ${id} x && tw untag ${id} o + twsi o +} + +gp() { ([ -z "$1" ] && cd -- "$HOME/localstorage/workspace/$(cd ~/localstorage/workspace; /usr/bin/find P* -maxdepth 2 -type d | cut -d$'\t' -f2- | fzf)") || cd "$HOME/localstorage/workspace/$1" } +cdp() { cd -- "$(/usr/bin/ls -C -d ~/dev/git/*(N) ~/dev/projects/*(N) ~/localstorage/dev/*(N) | fzf;)"} + +eval "$(register-python-argcomplete pcli)" +eval "$(register-python-argcomplete gli)" + +function fix_node_modules() { + local git_root="$(git rev-parse --show-toplevel)" + local node_modules_path="components/iweb4/node_modules" + local monolith_root="${git_root}/../monolith" + local monolith_node_modules="${monolith_root}/${node_modules_path}" + local build_node_modules="$(find . -type d -iname "iweb4" | head -n 1)/node_modules" + rm $monolith_node_modules + ln -s ${build_node_modules} ${monolith_node_modules} +} + diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index ec2ca34..3b64179 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -60,6 +60,7 @@ if ! zgen saved; then # zgen oh-my-zsh themes/arrow # zgen load bhilburn/powerlevel9k powerlevel9k zgen load romkatv/powerlevel10k powerlevel9k + zgen load svenXY/timewarrior # save all to init script zgen save @@ -122,15 +123,22 @@ mcd() { } +source ~/.config/zsh/.induradzshrc + ############################################################### # Software settings ############################################################### -#latex -#export PATH=/usr/local/texlive/2017/bin/x86_64-linux/:$PATH - -#java -#export PATH=/home/zzz/softwares/jdk1.8.0_162/bin:$PATH -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh -compctl -W ~/localstorage/workspace/ -/ gp export PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')" +source $HOME/.dotfiles/submodules/fzf-git.sh + +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +eval "$(register-python-argcomplete pipx)" + +# discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/5470/keyring +# export SSH_AUTH_SOCK=/run/user/5470/keyring/ssh + +export NVM_DIR="$HOME/.config/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +[ -d "${HOME}/node_modules/.bin" ] && export PATH="$HOME/node_modules/.bin:$PATH" \ No newline at end of file diff --git a/docs/pcs.txt b/docs/pcs.txt new file mode 100644 index 0000000..0d420a7 --- /dev/null +++ b/docs/pcs.txt @@ -0,0 +1,2 @@ +brackie +belgoo diff --git a/docs/qutebrowser.org b/docs/qutebrowser.org new file mode 100644 index 0000000..794ff55 --- /dev/null +++ b/docs/qutebrowser.org @@ -0,0 +1,3 @@ +pip install pyqtwebengine==5.13 +pip install pyqt5==12.3 +pip install qutebrowser==1.14.1 diff --git a/gitconfig b/gitconfig index 05c48eb..1899528 100644 --- a/gitconfig +++ b/gitconfig @@ -1,11 +1,13 @@ [user] - email = zolboo.deb@gmail.com - name = Zolboo + email = zolboo.erdenebayar@indurad.com + name = Zolboo Erdenebayar + signingkey = B4CA3E0AADBDBC45 [push] default = simple [core] pager = diff-so-fancy | less --tabs=4 -RFX autolf = true + excludesFile = ~/.gitignore_global [merge] tool = nvim [mergetool] @@ -52,7 +54,9 @@ next = rebase --continue find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'" show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'" - fixup = "!sh -c 'rev=$(git rev-parse ${0}) && git commit --no-verify --fixup ${rev} && git rebase -i --autostash --autosquash ${rev}^ && echo --------git status---------- && git status'" + ; fixup = "!sh -c 'rev=$(git rev-parse ${0}) && git commit --fixup ${rev} && git rebase -i --autostash --autosquash ${rev}^ && echo --------git status---------- && git status'" + fixup = "!zsh -c 'gfixup'" + code = "!sh -c 'code $(git rev-parse --show-toplevel)'" [cola] spellcheck = false [pull] @@ -61,3 +65,7 @@ templateDir = /home/zerdenebayar/.git-template [credential] helper = cache --timeout=720000 +[checkout] + defaultRemote = origin +[diff] + submodule = log diff --git a/gitignore_global b/gitignore_global index e69de29..c991407 100644 --- a/gitignore_global +++ b/gitignore_global @@ -0,0 +1,16 @@ +__pycache__/* +CMakeLists_idat.txt +**/build +**/cmake-build-debug*/ +**/.idea/ +**/iWEB2/config-local.js +__pycache__ +cmake-build-* +components/iweb4/node_modules +.venv +components/iweb4/public +config-local.js +*.egg-info +.artifacts +_ARTIFACT +.vscode diff --git a/ideavimrc b/ideavimrc index 417559a..48aecc4 100644 --- a/ideavimrc +++ b/ideavimrc @@ -1,3 +1,56 @@ +set nowrap +set linebreak " when wrapping, wrap at word boundaries (vs last char) +set breakindent " preserves the indent level of wrapped lines +set showbreak=↪ " illustrate wrapped lines +set wrap " wrapping with breakindent is tolerable +set clipboard^=unnamed " This sets the clipboard as the default register. Useful for copy paste from tmux +set backspace=indent,eol,start +" when scrolling, keep cursor 3 lines away from screen border +set scrolloff=3 +set sidescrolloff=5 +set sidescroll=1 +set display+=lastline " show the last line that fits in window (vs '@@@@') + +" Show linenumbers +set number +set relativenumber +set ruler +"search +set hlsearch +set incsearch +set ignorecase +set smartcase + +" Set Proper Tabs +set tabstop=2 +set softtabstop=2 +set shiftwidth=2 +set smarttab +set expandtab + +" Always display the status line +set laststatus=2 +set showcmd +set showtabline=1 + +set wildmenu +set virtualedit=block,insert,all,onemore +" set digraph +" +set report=0 + +set winminheight=0 +set wildmode=list:longest,full +set wildignore+=*swp,*.class,*.pyc,*.png,*.jpg,*.gif,*.zip +set wildignore+=*/tmp/*,*.o,*.obj,*.so " Unix +set wildignore+=*\\tmp\\*,*.exe " Windows +set autoread + +set history=10000 + +set sessionoptions-=options " exclude options from the :mksession command + + noremap j h noremap k j noremap l k @@ -6,4 +59,5 @@ noremap ; l nnoremap h nnoremap l nnoremap vv v +nnoremap Q q nnoremap q :wq diff --git a/local/share/gnupg/gpg-agent.conf b/local/share/gnupg/gpg-agent.conf new file mode 100644 index 0000000..b1825c8 --- /dev/null +++ b/local/share/gnupg/gpg-agent.conf @@ -0,0 +1,3 @@ +pinentry-program /usr/bin/pinentry-qt +default-cache-ttl 34560000 +max-cache-ttl 34560000 diff --git a/local/share/qutebrowser/userscripts/qute-pass b/local/share/qutebrowser/userscripts/qute-pass index 71646eb..b1f9fc8 100755 --- a/local/share/qutebrowser/userscripts/qute-pass +++ b/local/share/qutebrowser/userscripts/qute-pass @@ -68,9 +68,16 @@ def expanded_path(path): # Add trailing slash if not present return os.path.join(expanded, '') +def get_url(): + iweb_regex = re.compile('.*iWEB2') + title = os.getenv('QUTE_TITLE') + if iweb_regex.match(title): + return 'iweb2' + return os.getenv('QUTE_URL') + argument_parser = argparse.ArgumentParser(description=__doc__, usage=USAGE, epilog=EPILOG) -argument_parser.add_argument('url', nargs='?', default=os.getenv('QUTE_URL')) +argument_parser.add_argument('url', nargs='?', default=get_url()) argument_parser.add_argument('--password-store', '-p', default=expanded_path(os.getenv('PASSWORD_STORE_DIR', default='~/.password-store')), help='Path to your pass password-store (only used in pass-mode)', type=expanded_path) diff --git a/meta/after_backup/install_timew.txt b/meta/after_backup/install_timew.txt new file mode 100644 index 0000000..e4c2bfa --- /dev/null +++ b/meta/after_backup/install_timew.txt @@ -0,0 +1,10 @@ + +# Download https://timewarrior.net/releases/ + +# extract + +cmake .. +make -j12 +cmake --install . --prefix $HOME/.local/ + + diff --git a/meta/after_backup/ubuntu18/ubuntu b/meta/after_backup/ubuntu18/ubuntu index 3c50b11..baf4a82 100644 --- a/meta/after_backup/ubuntu18/ubuntu +++ b/meta/after_backup/ubuntu18/ubuntu @@ -1,9 +1,9 @@ # softwares -apt install vim qjoypad firefox chromium-browser sshfs gimp xfce4-terminal git zsh curl variety redshift-gtk synaptic keynav mpv htop classicmenu-indicator pdfgrep udevil -snap install telegram-desktop +apt install vim qjoypad firefox chromium-browser sshfs gimp xfce4-terminal git zsh curl variety redshift-gtk synaptic keynav mpv htop classicmenu-indicator pdfgrep udevil libx11-xcb-dev libxft-dev sxhkd bat qtwebengine5-dev python3-pip xclip flameshot pass compton sxiv npm neovim bat +snap install telegram-desktop # ranger -apt install xsel #for copy path - python-pip - gnome-screensaver +apt install xsel \ + python3-pip \ + gnome-screensaver \ diff --git a/meta/configs/i3.build.yaml b/meta/configs/i3.yaml similarity index 100% rename from meta/configs/i3.build.yaml rename to meta/configs/i3.yaml diff --git a/meta/configs/install.conf.yaml b/meta/configs/install.conf.yaml index 613ef72..25d6271 100644 --- a/meta/configs/install.conf.yaml +++ b/meta/configs/install.conf.yaml @@ -30,6 +30,8 @@ ~/.config/fontconfig : config/fontconfig ~/.config/networkmanager-dmenu/config.ini : config/networkmanager-dmenu/config.ini ~/.config/wget/wgetrc : config/wget/wgetrc + ~/.config/ccache : config/ccache + ~/.config/timewarrior : config/timewarrior # ~/.aria2/aria2.conf: # ~/.axelrc: @@ -59,6 +61,7 @@ ~/.config/fontawesome: config/fontawesome ~/.icons: ~/.local/share/applications/custom: local/share/applications/custom + ~/.local/share/gnupg/gpg-agent.conf: local/share/gnupg/gpg-agent.conf ~/.config/mimeapps.list: config/mimeapps.list ~/.config/user-dirs.dirs: config/user-dirs.dirs diff --git a/meta/configs/zsh.yaml b/meta/configs/zsh.yaml index 59a9aa0..15a8b64 100644 --- a/meta/configs/zsh.yaml +++ b/meta/configs/zsh.yaml @@ -7,6 +7,7 @@ ~/.config/du_excludes: config/du_excludes ~/.scripts: ~/.config/zsh/.zshrc: config/zsh/.zshrc + ~/.config/zsh/.induradzshrc: config/zsh/.induradzshrc ~/.zshenv: profile ~/.config/inputrc: config/inputrc - shell: diff --git a/meta/dotbot_plugins/aptget b/meta/dotbot_plugins/aptget deleted file mode 160000 index f871117..0000000 --- a/meta/dotbot_plugins/aptget +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f871117ed7a2e60811c70d8425fcd2599d43eb50 diff --git a/meta/help.md b/meta/help.md new file mode 100644 index 0000000..06e0cb9 --- /dev/null +++ b/meta/help.md @@ -0,0 +1,20 @@ +if: + + Git error - gpg failed to sign data + +then: + https://stackoverflow.com/questions/41052538/git-error-gpg-failed-to-sign-data + git config --global user.signingkey ${ssid} + + +if: + pass too slow +then: + local/share/gnupg/gnu-agent pinentry + remove ~/.gnupg + + +if: + vscode authentification does not work +then: + cancel 3 times until it shows code to use for other login diff --git a/meta/setup.sh b/meta/setup.sh new file mode 100755 index 0000000..ac5c72e --- /dev/null +++ b/meta/setup.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo apt install python3-virtualenvwrapper ranger python3-pip sxhkd mutt urlview i3 i3blocks arandr rofi pcmanfm shutter pavucontrol feh xfce4-power-manager bat fonts-font-awesome fonts-dejavu fonts-noto pipx npm keychain diff --git a/profile b/profile index d3485b2..a05c73e 100644 --- a/profile +++ b/profile @@ -10,23 +10,26 @@ [ -d "$HOME/.Xdefaults" ] && xrdb $HOME/.Xdefaults +eval $(keychain --eval main) + export DIRMODUS='jkl;' export ENVMODE='indurad' # set PATH so it includes user's private bin if it exists [ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH" export PATH="$PATH:$(du "$HOME/.scripts/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" +export PATH="$PATH:$(du "$HOME/scripts/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" # Default programs: export EDITOR="nvim" export TERMINAL="st" -export BROWSER="qutebrowser" +export BROWSER="firefox-esr" export READER="zathura" export FILE="ranger" export SUDO_ASKPASS="$HOME/.scripts/tools/dmenupass" export DMENU="rofi -dmenu -i" export CALENDAR="gcalendar" -export EMAIL="gmail" +export EMAIL="thunderbird" # ~/ Clean-up: # export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. @@ -47,6 +50,7 @@ export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc export GEM_HOME="$XDG_DATA_HOME"/gem export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem +export NPM_PACKAGES="${XDG_DATA_HOME}/npm-packages" # Other program settings: # less/man colors diff --git a/scripts/tools/extract b/scripts/tools/extract index 6e58fb8..c679bf0 100755 --- a/scripts/tools/extract +++ b/scripts/tools/extract @@ -35,6 +35,9 @@ if [ -f "$archive" ] ; then *.xz) unxz "$archive" ;; *.exe) cabextract "$archive" ;; *.jar) jar xf "$archive" ;; + *.ifus2) ifus2soft.py --extract-path "." "$archive" ;; + *.zst) zstd -d --output-dir-flat . "$archive" ;; + *.tar.gz.bin) ifus2soft.py --extract-path "." "$archive" ;; *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; esac else diff --git a/scripts/tools/mark b/scripts/tools/mark index be0b369..3617ec0 100755 --- a/scripts/tools/mark +++ b/scripts/tools/mark @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import os import pandas as pd diff --git a/scripts/tools/remaps b/scripts/tools/remaps index 8e0bf6a..4eaee7a 100755 --- a/scripts/tools/remaps +++ b/scripts/tools/remaps @@ -11,14 +11,14 @@ cd ${HOME} # setxkbmap de xset r rate 300 50 # Map the caps lock key to super... -# setxkbmap -option caps:super +setxkbmap -option caps:super xkbcomp -w 0 ~/.config/keyboard/xkbmap${post} $DISPLAY; xmodmap ~/.config/keyboard/xmodmaprc # But when it is pressed only once, treat it as escape. killall xcape 2>/dev/null; if [[ ! $post == "_def" ]]; then xcape -e 'Super_L=Escape;Control_L=ISO_Level3_Shift|Shift_L|p;ISO_Level3_Shift=space' fi -#setxkbmap -layout u s,mn -variant altgr-intl, -option grp:rctrl_rshift_toggle +setxkbmap -layout us,mn -variant altgr-intl, -option grp:rctrl_rshift_toggle i3 'reload' restart sxhkd # xinput set-prop $(xinput | grep SynPS | awk '{print $6}' | awk -F '=' '{print $2}') "libinput Tapping Enabled" 1 diff --git a/scripts/tools/wm_exit b/scripts/tools/wm_exit index f638675..59ddfad 100755 --- a/scripts/tools/wm_exit +++ b/scripts/tools/wm_exit @@ -1,8 +1,9 @@ #!/bin/sh lock() { - # i3lock -t -i ~/.config/wall.png + # i3lock -i ~/.config/wall.png + ~/localstorage/dev/i3lock-multimonitor/lock -i ~/.config/wall.png # gnome-screensaver-command -l - loginctl lock-session + # loginctl lock-session # scrot /tmp/screen_locked.png # convert /tmp/screen_locked.png -scale 10% -scale 1000% /tmp/screen_locked2.png # i3lock -i /tmp/screen_locked2.png diff --git a/submodules/fzf b/submodules/fzf index 18e3b38..3f3d1ef 160000 --- a/submodules/fzf +++ b/submodules/fzf @@ -1 +1 @@ -Subproject commit 18e3b38c69da2828efac6adc2ea3a5e85f70e571 +Subproject commit 3f3d1ef8f57b11b244c73d7f3d70f7233ec02776 diff --git a/submodules/fzf-git.sh b/submodules/fzf-git.sh new file mode 100644 index 0000000..38e3930 --- /dev/null +++ b/submodules/fzf-git.sh @@ -0,0 +1,331 @@ +# The MIT License (MIT) +# +# Copyright (c) 2024 Junegunn Choi +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# shellcheck disable=SC2039 +[[ $0 = - ]] && return + +__fzf_git_color() { + if [[ -n $NO_COLOR ]]; then + echo never + elif [[ $# -gt 0 ]] && [[ -n $FZF_GIT_PREVIEW_COLOR ]]; then + echo "$FZF_GIT_PREVIEW_COLOR" + else + echo "${FZF_GIT_COLOR:-always}" + fi +} + +__fzf_git_cat() { + if [[ -n $FZF_GIT_CAT ]]; then + echo "$FZF_GIT_CAT" + return + fi + + # Sometimes bat is installed as batcat + _fzf_git_bat_options="--style='${BAT_STYLE:-full}' --color=$(__fzf_git_color .) --pager=never" + if command -v batcat > /dev/null; then + echo "batcat $_fzf_git_bat_options" + elif command -v bat > /dev/null; then + echo "bat $_fzf_git_bat_options" + else + echo cat + fi +} + +__fzf_git_pager() { + local pager + pager="${FZF_GIT_PAGER:-${GIT_PAGER:-$(git config --get core.pager 2>/dev/null)}}" + echo "${pager:-cat}" +} + +if [[ $1 = --list ]]; then + shift + if [[ $# -eq 1 ]]; then + branches() { + git branch "$@" --sort=-committerdate --sort=-HEAD --format=$'%(HEAD) %(color:yellow)%(refname:short) %(color:green)(%(committerdate:relative))\t%(color:blue)%(subject)%(color:reset)' --color=$(__fzf_git_color) | column -ts$'\t' + } + refs() { + git for-each-ref "$@" --sort=-creatordate --sort=-HEAD --color=$(__fzf_git_color) --format=$'%(if:equals=refs/remotes)%(refname:rstrip=-2)%(then)%(color:magenta)remote-branch%(else)%(if:equals=refs/heads)%(refname:rstrip=-2)%(then)%(color:brightgreen)branch%(else)%(if:equals=refs/tags)%(refname:rstrip=-2)%(then)%(color:brightcyan)tag%(else)%(if:equals=refs/stash)%(refname:rstrip=-2)%(then)%(color:brightred)stash%(else)%(color:white)%(refname:rstrip=-2)%(end)%(end)%(end)%(end)\t%(color:yellow)%(refname:short) %(color:green)(%(creatordate:relative))\t%(color:blue)%(subject)%(color:reset)' | column -ts$'\t' + } + hashes() { + git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=$(__fzf_git_color) "$@" + } + case "$1" in + branches) + echo $'CTRL-O (open in browser) ╱ ALT-A (show all branches)\n' + branches + ;; + all-branches) + echo $'CTRL-O (open in browser)\n' + branches -a + ;; + hashes) + echo $'CTRL-O (open in browser) ╱ CTRL-D (diff)\nCTRL-S (toggle sort) ╱ ALT-A (show all hashes)\n' + hashes + ;; + all-hashes) + echo $'CTRL-O (open in browser) ╱ CTRL-D (diff)\nCTRL-S (toggle sort)\n' + hashes --all + ;; + refs) + echo $'CTRL-O (open in browser) ╱ ALT-E (examine in editor) ╱ ALT-A (show all refs)\n' + refs --exclude='refs/remotes' + ;; + all-refs) + echo $'CTRL-O (open in browser) ╱ ALT-E (examine in editor)\n' + refs + ;; + *) exit 1 ;; + esac + elif [[ $# -gt 1 ]]; then + set -e + + branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) + if [[ $branch = HEAD ]]; then + branch=$(git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD) + fi + + # Only supports GitHub for now + case "$1" in + commit) + hash=$(grep -o "[a-f0-9]\{7,\}" <<< "$2") + path=/commit/$hash + ;; + branch|remote-branch) + branch=$(sed 's/^[* ]*//' <<< "$2" | cut -d' ' -f1) + remote=$(git config branch."${branch}".remote || echo 'origin') + branch=${branch#$remote/} + path=/tree/$branch + ;; + remote) + remote=$2 + path=/tree/$branch + ;; + file) path=/blob/$branch/$(git rev-parse --show-prefix)$2 ;; + tag) path=/releases/tag/$2 ;; + *) exit 1 ;; + esac + + remote=${remote:-$(git config branch."${branch}".remote || echo 'origin')} + remote_url=$(git remote get-url "$remote" 2> /dev/null || echo "$remote") + + if [[ $remote_url =~ ^git@ ]]; then + url=${remote_url%.git} + url=${url#git@} + url=https://${url/://} + elif [[ $remote_url =~ ^http ]]; then + url=${remote_url%.git} + fi + + case "$(uname -s)" in + Darwin) open "$url$path" ;; + *) xdg-open "$url$path" ;; + esac + exit 0 + fi +fi + +if [[ $- =~ i ]]; then +# ----------------------------------------------------------------------------- + +# Redefine this function to change the options +_fzf_git_fzf() { + fzf --height=50% --tmux 90%,70% \ + --layout=reverse --multi --min-height=20 --border \ + --border-label-pos=2 \ + --color='header:italic:underline,label:blue' \ + --preview-window='right,50%,border-left' \ + --bind='ctrl-/:change-preview-window(down,50%,border-top|hidden|)' "$@" +} + +_fzf_git_check() { + git rev-parse HEAD > /dev/null 2>&1 && return + + [[ -n $TMUX ]] && tmux display-message "Not in a git repository" + return 1 +} + +__fzf_git=${BASH_SOURCE[0]:-${(%):-%x}} +__fzf_git=$(readlink -f "$__fzf_git" 2> /dev/null || /usr/bin/ruby --disable-gems -e 'puts File.expand_path(ARGV.first)' "$__fzf_git" 2> /dev/null) + +_fzf_git_files() { + _fzf_git_check || return + local root query + root=$(git rev-parse --show-toplevel) + [[ $root != "$PWD" ]] && query='!../ ' + + (git -c color.status=$(__fzf_git_color) status --short --no-branch + git ls-files "$root" | grep -vxFf <(git status -s | grep '^[^?]' | cut -c4-; echo :) | sed 's/^/ /') | + _fzf_git_fzf -m --ansi --nth 2..,.. \ + --border-label '📁 Files ' \ + --header $'CTRL-O (open in browser) ╱ ALT-E (open in editor)\n\n' \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list file {-1}" \ + --bind "alt-e:execute:${EDITOR:-vim} {-1} > /dev/tty" \ + --query "$query" \ + --preview "git diff --no-ext-diff --color=$(__fzf_git_color .) -- {-1} | $(__fzf_git_pager); $(__fzf_git_cat) {-1}" "$@" | + cut -c4- | sed 's/.* -> //' +} + +_fzf_git_branches() { + _fzf_git_check || return + bash "$__fzf_git" --list branches | + _fzf_git_fzf --ansi \ + --border-label '🌲 Branches ' \ + --header-lines 2 \ + --tiebreak begin \ + --preview-window down,border-top,40% \ + --color hl:underline,hl+:underline \ + --no-hscroll \ + --bind 'ctrl-/:change-preview-window(down,70%|hidden|)' \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list branch {}" \ + --bind "alt-a:change-border-label(🌳 All branches)+reload:bash \"$__fzf_git\" --list all-branches" \ + --preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' \$(sed s/^..// <<< {} | cut -d' ' -f1) --" "$@" | + sed 's/^..//' | cut -d' ' -f1 +} + +_fzf_git_tags() { + _fzf_git_check || return + git tag --sort -version:refname | + _fzf_git_fzf --preview-window right,70% \ + --border-label '📛 Tags ' \ + --header $'CTRL-O (open in browser)\n\n' \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list tag {}" \ + --preview "git show --color=$(__fzf_git_color .) {} | $(__fzf_git_pager)" "$@" +} + +_fzf_git_hashes() { + _fzf_git_check || return + bash "$__fzf_git" --list hashes | + _fzf_git_fzf --ansi --no-sort --bind 'ctrl-s:toggle-sort' \ + --border-label '🍡 Hashes ' \ + --header-lines 3 \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list commit {}" \ + --bind "ctrl-d:execute:grep -o '[a-f0-9]\{7,\}' <<< {} | head -n 1 | xargs git diff --color=$(__fzf_git_color) > /dev/tty" \ + --bind "alt-a:change-border-label(🍇 All hashes)+reload:bash \"$__fzf_git\" --list all-hashes" \ + --color hl:underline,hl+:underline \ + --preview "grep -o '[a-f0-9]\{7,\}' <<< {} | head -n 1 | xargs git show --color=$(__fzf_git_color .) | $(__fzf_git_pager)" "$@" | + awk 'match($0, /[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*/) { print substr($0, RSTART, RLENGTH) }' +} + +_fzf_git_remotes() { + _fzf_git_check || return + git remote -v | awk '{print $1 "\t" $2}' | uniq | + _fzf_git_fzf --tac \ + --border-label '📡 Remotes ' \ + --header $'CTRL-O (open in browser)\n\n' \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list remote {1}" \ + --preview-window right,70% \ + --preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' '{1}/$(git rev-parse --abbrev-ref HEAD)' --" "$@" | + cut -d$'\t' -f1 +} + +_fzf_git_stashes() { + _fzf_git_check || return + git stash list | _fzf_git_fzf \ + --border-label '🥡 Stashes ' \ + --header $'CTRL-X (drop stash)\n\n' \ + --bind 'ctrl-x:reload(git stash drop -q {1}; git stash list)' \ + -d: --preview "git show --color=$(__fzf_git_color .) {1} | $(__fzf_git_pager)" "$@" | + cut -d: -f1 +} + +_fzf_git_lreflogs() { + _fzf_git_check || return + git reflog --color=$(__fzf_git_color) --format="%C(blue)%gD %C(yellow)%h%C(auto)%d %gs" | _fzf_git_fzf --ansi \ + --border-label '📒 Reflogs ' \ + --preview "git show --color=$(__fzf_git_color .) {1} | $(__fzf_git_pager)" "$@" | + awk '{print $1}' +} + +_fzf_git_each_ref() { + _fzf_git_check || return + bash "$__fzf_git" --list refs | _fzf_git_fzf --ansi \ + --nth 2,2.. \ + --tiebreak begin \ + --border-label '☘️ Each ref ' \ + --header-lines 2 \ + --preview-window down,border-top,40% \ + --color hl:underline,hl+:underline \ + --no-hscroll \ + --bind 'ctrl-/:change-preview-window(down,70%|hidden|)' \ + --bind "ctrl-o:execute-silent:bash \"$__fzf_git\" --list {1} {2}" \ + --bind "alt-e:execute:${EDITOR:-vim} <(git show {2}) > /dev/tty" \ + --bind "alt-a:change-border-label(🍀 Every ref)+reload:bash \"$__fzf_git\" --list all-refs" \ + --preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' {2} --" "$@" | + awk '{print $2}' +} + +_fzf_git_worktrees() { + _fzf_git_check || return + git worktree list | _fzf_git_fzf \ + --border-label '🌴 Worktrees ' \ + --header $'CTRL-X (remove worktree)\n\n' \ + --bind 'ctrl-x:reload(git worktree remove {1} > /dev/null; git worktree list)' \ + --preview " + git -c color.status=$(__fzf_git_color .) -C {1} status --short --branch + echo + git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' {2} -- + " "$@" | + awk '{print $1}' +} + +if [[ -n "${BASH_VERSION:-}" ]]; then + __fzf_git_init() { + bind -m emacs-standard '"\er": redraw-current-line' + bind -m emacs-standard '"\C-z": vi-editing-mode' + bind -m vi-command '"\C-z": emacs-editing-mode' + bind -m vi-insert '"\C-z": emacs-editing-mode' + + local o c + for o in "$@"; do + c=${o:0:1} + bind -m emacs-standard '"\C-g\C-'$c'": " \C-u \C-a\C-k`_fzf_git_'$o'`\e\C-e\C-y\C-a\C-y\ey\C-h\C-e\er \C-h"' + bind -m vi-command '"\C-g\C-'$c'": "\C-z\C-g\C-'$c'\C-z"' + bind -m vi-insert '"\C-g\C-'$c'": "\C-z\C-g\C-'$c'\C-z"' + bind -m emacs-standard '"\C-g'$c'": " \C-u \C-a\C-k`_fzf_git_'$o'`\e\C-e\C-y\C-a\C-y\ey\C-h\C-e\er \C-h"' + bind -m vi-command '"\C-g'$c'": "\C-z\C-g'$c'\C-z"' + bind -m vi-insert '"\C-g'$c'": "\C-z\C-g'$c'\C-z"' + done + } +elif [[ -n "${ZSH_VERSION:-}" ]]; then + __fzf_git_join() { + local item + while read item; do + echo -n "${(q)item} " + done + } + + __fzf_git_init() { + local m o + for o in "$@"; do + eval "fzf-git-$o-widget() { local result=\$(_fzf_git_$o | __fzf_git_join); zle reset-prompt; LBUFFER+=\$result }" + eval "zle -N fzf-git-$o-widget" + for m in emacs vicmd viins; do + eval "bindkey -M $m '^g^${o[1]}' fzf-git-$o-widget" + eval "bindkey -M $m '^g${o[1]}' fzf-git-$o-widget" + done + done + } +fi +__fzf_git_init files branches tags remotes hashes stashes lreflogs each_ref worktrees + +# ----------------------------------------------------------------------------- +fi diff --git a/submodules/st b/submodules/st index 88062b5..cd27df2 160000 --- a/submodules/st +++ b/submodules/st @@ -1 +1 @@ -Subproject commit 88062b59df4916c89d88849714f14f4a18eaa6c5 +Subproject commit cd27df23d33aba0b51407d2cd926a53818a204f8 diff --git a/xinitrc b/xinitrc index 79b0d54..0c5488f 100755 --- a/xinitrc +++ b/xinitrc @@ -11,12 +11,15 @@ [ -f ~/.zshenv ] && . ~/.zshenv export $(dbus-launch) export XDG_CURRENT_DESKTOP=i3 -export WORKSPACE2="2: " -export WORKSPACE3="3: " -export WORKSPACE4="4: " -export WORKSPACE6="6: " -export WORKSPACE7="7: " -export WORKSPACE8="8: " -export WORKSPACE0="10: " +export WORKSPACE1="1" +export WORKSPACE2="2" +export WORKSPACE3="3" +export WORKSPACE4="4" +export WORKSPACE5="5" +export WORKSPACE6="6" +export WORKSPACE7="7" +export WORKSPACE8="8" +export WORKSPACE9="9" +export WORKSPACE0="10" [ -f ~/.xprofile ] && . ~/.xprofile exec i3 diff --git a/xprofile b/xprofile index 5f919e6..eac3459 100644 --- a/xprofile +++ b/xprofile @@ -6,6 +6,7 @@ # Fix Gnome Apps Slow Start due to failing services # Add this when you include flatpak in your system dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY +dbus-update-activation-environment --all [[ -f ~/.zshenv ]] && source ~/.zshenv @@ -16,8 +17,6 @@ autorandr -c & blueman-applet & compton --config ~/.config/compton/compton.conf & dunst & -gcalendar & -gmail & calendar & mail & gnome-screensaver & @@ -31,11 +30,10 @@ sxhkd & telegram-desktop & udiskie -t & # automount unclutter & # mouse invinsible -variety & xfce4-power-manager & xset r rate 300 50 & # Speed xrate up -([[ $(cat /etc/hostname) =~ kellerberg|heidenpeters|manjaro ]] || xmodmap -e "pointer = 3 2 1") & -([[ $(cat /etc/hostname) =~ kellerberg|heidenpeters|manjaro ]] && feh --bg-fill .config/wall.jpg ) & +([[ $(cat /etc/hostname) =~ kellerberg|heidenpeters|manjaro|mythos|frankfurter ]] || xmodmap -e "pointer = 3 2 1") & +([[ $(cat /etc/hostname) =~ kellerberg|heidenpeters|manjaro|mythos ]] && feh --bg-fill .config/wall.jpg ) & # podentr &