diff --git a/.gitmodules b/.gitmodules index 5be3ccd7..89aa139e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "misc/ranger/plugins/devicons2"] path = misc/ranger/plugins/devicons2 url = https://github.com/cdump/ranger-devicons2.git +[submodule "misc/ranger/plugins/devicons"] + path = misc/ranger/plugins/devicons + url = https://github.com/cdump/ranger-devicons2 diff --git a/misc/profile b/misc/profile index 52c2670a..03fe1b44 100755 --- a/misc/profile +++ b/misc/profile @@ -5,7 +5,6 @@ export _JAVA_AWT_WM_NONREPARENTING=1 export AWT_TOOLKIT=MToolkit export SHELL=/bin/zsh export TERMINAL=/usr/local/bin/st -export TERM=st export ANDROID_HOME=~/Android/Sdk export FLUTTER_HOME=~/flutter export TMUX_PLUGIN_MANAGER_PATH=~/.tmux/plugins @@ -20,5 +19,6 @@ export CM_SYNC_PRIMARY_TO_CLIPBOARD=1 export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$FLUTTER_HOME/bin +export DEFAULT_RECIPIENT="yigitcolakoglu@hotmail.com" export PATH="$PATH:/home/yigit/.scripts:/home/yigit/.local/bin:/home/yigit/.gem/ruby/2.7.0/bin:$GOPATH/bin:$GOPATH/binexport:/home/yigit/.local/bin" export CPATH=/usr/include/opencv4 diff --git a/misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc b/misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc index bbf0745f..f30c192c 100644 Binary files a/misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc and b/misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc differ diff --git a/misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc b/misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc index f0444100..bcfc18a9 100644 Binary files a/misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc and b/misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc differ diff --git a/misc/ranger/colorschemes/material-ocean.py b/misc/ranger/colorschemes/material-ocean.py index 3d50e2e4..33304c5c 100644 --- a/misc/ranger/colorschemes/material-ocean.py +++ b/misc/ranger/colorschemes/material-ocean.py @@ -5,17 +5,24 @@ from __future__ import (absolute_import, division, print_function) from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import ( - black, blue, cyan, green, magenta, red, white, yellow, default, - normal, bold, reverse, dim, BRIGHT, - default_colors, + default, normal, bold, reverse, dim, BRIGHT, default_colors, ) +black = 16 +blue = 32 +cyan = 50 +green = 47 +magenta = 141 +red = 9 +white = 255 +yellow =227 + class Default(ColorScheme): - progress_bar_color = blue + progress_bar_color = 87 def use(self, context): # pylint: disable=too-many-branches,too-many-statements - fg, bg, attr = default_colors + fg, bg, attr = 231, black, bold if context.reset: return default_colors @@ -39,22 +46,18 @@ class Default(ColorScheme): if context.directory: attr |= bold fg = blue - fg += BRIGHT elif context.executable and not \ any((context.media, context.container, context.fifo, context.socket)): attr |= bold fg = green - fg += BRIGHT if context.socket: attr |= bold fg = magenta - fg += BRIGHT if context.fifo or context.device: fg = yellow if context.device: attr |= bold - fg += BRIGHT if context.link: fg = cyan if context.good else magenta if context.tag_marker and not context.selected: @@ -63,11 +66,9 @@ class Default(ColorScheme): fg = white else: fg = red - fg += BRIGHT if not context.selected and (context.cut or context.copied): attr |= bold fg = black - fg += BRIGHT # If the terminal doesn't support bright colors, use dim white # instead of black. if BRIGHT == 0: @@ -111,16 +112,13 @@ class Default(ColorScheme): if context.marked: attr |= bold | reverse fg = yellow - fg += BRIGHT if context.frozen: attr |= bold | reverse fg = cyan - fg += BRIGHT if context.message: if context.bad: attr |= bold fg = red - fg += BRIGHT if context.loaded: bg = self.progress_bar_color if context.vcsinfo: diff --git a/misc/ranger/commands.py b/misc/ranger/commands.py index 43addbfd..2af58eb2 100644 --- a/misc/ranger/commands.py +++ b/misc/ranger/commands.py @@ -109,43 +109,6 @@ class fzf_select(Command): else: self.fm.select_file(selected) -class fzf_rga_documents_search(Command): - """ - :fzf_rga_search_documents - Search in PDFs, E-Books and Office documents in current directory. - Allowed extensions: .epub, .odt, .docx, .fb2, .ipynb, .pdf. - - Usage: fzf_rga_search_documents - """ - def execute(self): - if self.arg(1): - search_string = self.rest(1) - else: - self.fm.notify("Usage: fzf_rga_search_documents ", bad=True) - return - - import subprocess - import os.path - from ranger.container.file import File - command="rga '%s' . --rga-adapters=pandoc,poppler | fzf +m | awk -F':' '{print $1}'" % search_string - fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE) - stdout, stderr = fzf.communicate() - if fzf.returncode == 0: - fzf_file = os.path.abspath(stdout.rstrip('\n')) - self.fm.execute_file(File(fzf_file)) - -class tmsu_tag(Command): - """:tmsu_tag - - Tags the current file with tmsu - """ - - def execute(self): - cf = self.fm.thisfile - - self.fm.run("tmsu tag \"{0}\" {1}".format(cf.basename, self.rest(1))) - - class YankContent(Command): """ Copy the content of image file and text file with xclip diff --git a/misc/ranger/plugins/compress.py b/misc/ranger/plugins/compress.py index 8286ea8a..dbdcdf61 100644 --- a/misc/ranger/plugins/compress.py +++ b/misc/ranger/plugins/compress.py @@ -22,7 +22,7 @@ class compress(Command): if len(parts) > 1: au_flags = [' '.join(parts[1:])] else: - au_flags = [os.path.basename(self.fm.thisdir.path) + '.zip'] + au_flags = [os.path.basename(self.fm.thisdir.path) + '.tar.gz'] # Making description line files_num = len(marked_files) diff --git a/misc/ranger/plugins/devicons2 b/misc/ranger/plugins/devicons similarity index 100% rename from misc/ranger/plugins/devicons2 rename to misc/ranger/plugins/devicons diff --git a/misc/ranger/rc.conf b/misc/ranger/rc.conf index 0ea318f3..ceec81e3 100644 --- a/misc/ranger/rc.conf +++ b/misc/ranger/rc.conf @@ -286,8 +286,14 @@ map gR eval fm.cd(ranger.RANGERDIR) map g/ cd / map g? cd /usr/share/doc/ranger +# Encryption and Compression +map eE encrypt +map eD decrypt +map X extract +map C compress + # External Programs -map E edit +map e edit map du shell -p du --max-depth=1 -h --apparent-size map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b @@ -311,7 +317,7 @@ map pL paste_symlink relative=True map phl paste_hardlink map pht paste_hardlinked_subtree -map dD console delete +map D delete map dd cut map ud uncut @@ -320,6 +326,7 @@ map dr cut mode=remove map dt cut mode=toggle map yy copy +map Y YankContent map uy uncut map ya copy mode=add map yr copy mode=remove diff --git a/scripts/fastfetch b/scripts/fastfetch new file mode 100755 index 00000000..5218d342 --- /dev/null +++ b/scripts/fastfetch @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ ! -f "$HOME/.cache/neofetch" ]; then + mkdir -p "$HOME/.cache" + touch "$HOME/.cache/neofetch" + neofetch --ascii ~/.config/neofetch/ascii.txt > "$HOME/.cache/neofetch" +fi + +cat "$HOME/.cache/neofetch" + diff --git a/scripts/nextcloud-sync b/scripts/nextcloud-sync index d7666ca3..88500a97 100755 --- a/scripts/nextcloud-sync +++ b/scripts/nextcloud-sync @@ -11,7 +11,7 @@ for i in "${!mappings[@]}"; do "${mappings[$i]}" "$i" >> /tmp/nextcloud.out 2>> /tmp/nextcloud.err done -echo $(date '+%R') >> $HOME/.cache/nextcloud-track +echo $(date '+%R') > $HOME/.cache/nextcloud-track kill -59 $(pidof dwmblocks) diff --git a/scripts/status-bar/weather b/scripts/status-bar/weather index 60a68748..8015d286 100755 --- a/scripts/status-bar/weather +++ b/scripts/status-bar/weather @@ -5,6 +5,57 @@ source ~/.config.env weatherreport="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" weatherreportjson="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreportjson" +WCODES=( + ["113"]="^c#ebcb8b^" + ["116"]="^c#ebcb8b^杖" + ["119"]="摒" + ["122"]="" + ["143"]="" + ["176"]="^c#81a1c1^" + ["179"]="^c#81a1c1^" + ["182"]="^c#81a1c1^" + ["185"]="^c#81a1c1^" + ["200"]="" + ["227"]="" + ["230"]="" + ["248"]="" + ["260"]="" + ["263"]="^c#81a1c1^" + ["266"]="^c#81a1c1^" + ["281"]="^c#81a1c1^" + ["284"]="^c#81a1c1^" + ["293"]="^c#81a1c1^" + ["296"]="^c#81a1c1^" + ["299"]="^c#81a1c1^" + ["302"]="^c#81a1c1^" + ["305"]="^c#81a1c1^" + ["308"]="^c#81a1c1^" + ["311"]="^c#81a1c1^" + ["314"]="^c#81a1c1^" + ["317"]="^c#81a1c1^" + ["320"]="" + ["323"]="^c#81a1c1^" + ["326"]="^c#81a1c1^" + ["329"]="" + ["332"]="" + ["335"]="^c#81a1c1^" + ["338"]="" + ["350"]="^c#81a1c1^" + ["353"]="^c#81a1c1^" + ["356"]="^c#81a1c1^" + ["359"]="^c#81a1c1^" + ["362"]="^c#81a1c1^" + ["365"]="^c#81a1c1^" + ["368"]="^c#81a1c1^" + ["371"]="^c#81a1c1^" + ["374"]="^c#81a1c1^" + ["377"]="^c#81a1c1^" + ["386"]="^c#81a1c1^" + ["389"]="^c#81a1c1^" + ["392"]="^c#81a1c1^" + ["395"]="^c#81a1c1^" +) + getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} getforecastjson() { curl -sf "wttr.in/$LOCATION?format=j1" > "$weatherreportjson" || exit 1 ;} @@ -12,14 +63,15 @@ getforecastjson() { curl -sf "wttr.in/$LOCATION?format=j1" > "$weatherreportjson # precipitation chance and the daily high and low from the downloaded file and # display them with coresponding emojis. showweather() { - jq -r ".weather|.[0]|.hourly|.[$(expr $(date '+%H') / 4)]|.FeelsLikeC,.chanceofrain,.chanceofsnow,.WindGustKmph" "$weatherreportjson" |sed ':a;N;$!ba;s/\n/ /g' \ - | awk -F' ' '{ + data=$(jq -r ".weather|.[0]|.hourly|.[$(expr $(date '+%H') / 4)]|.FeelsLikeC,.chanceofrain,.chanceofsnow,.WindGustKmph,.weatherCode" "$weatherreportjson") + data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}") + echo $data | awk -F' ' '{ if ($4 > 30) - print "^c#ffffff^ ^d^" $4 "kph ^c#ebcb8b^ 盛 ^d^ " $1 "°" + print "^c#ffffff^ ^d^" $4 "kh "$5 " ^d^ " $1 "°" else if ($2 < $3) - print "^c#ffffff^ ^d^" $3 "% ^c#ebcb8b^ 盛 ^d^ " $1 "°" + print "^c#ffffff^ ^d^" $3 "% "$5 " ^d^ " $1 "°" else - print "^c#81a1c1^ ^d^" $2 "% ^c#ebcb8b^ 盛 ^d^ " $1 "°"}' + print "^c#81a1c1^ ^d^" $2 "% " $5 " ^d^ " $1 "°"}' } case $BLOCK_BUTTON in diff --git a/suckless/build.sh b/suckless/build.sh index d9634e80..42d41464 100755 --- a/suckless/build.sh +++ b/suckless/build.sh @@ -1,7 +1,7 @@ #!/bin/bash for d in */ ; do - echo "Building in $d..." + echo "Building in $d" cd $d sudo make install if [ $? -ne 0 ]; then diff --git a/suckless/st/config.h b/suckless/st/config.h index a40e8cee..8e181202 100644 --- a/suckless/st/config.h +++ b/suckless/st/config.h @@ -7,7 +7,7 @@ */ static char *font = "CaskaydiaCove Nerd Font Mono:pixelsize=16:antialias=true:autohint=true"; static char *font2[] = { - "Symbola:pixelsize=12:antialias=true:autohint=true", + "Symbola:pixelsize=16:antialias=true:autohint=true", }; static int borderpx = 2; diff --git a/xorg/xinitrc b/xorg/xinitrc index 77b92f72..72199da2 100755 --- a/xorg/xinitrc +++ b/xorg/xinitrc @@ -30,6 +30,7 @@ if [ "$ACTIVITYWATCHER" = true ] ; then aw-watcher-window & aw-watcher-afk & fi +touch ~/.cache/nextcloud-track xss-lock -- /home/yigit/.scripts/lock & echo "on" > ~/.cache/dunst echo "on" > ~/.cache/screensaver @@ -44,7 +45,7 @@ pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY xset b 100 xset dpms 600 600 600 -~/.keyboard +~/.keyboard > /tmp/keyboard.out 2> /tmp/keyboard.err dunst & diff --git a/zsh/aliases b/zsh/aliases index 636b996f..992de4e8 100755 --- a/zsh/aliases +++ b/zsh/aliases @@ -2,7 +2,7 @@ alias feh="feh --scale-down --auto-zoom" alias cclear="$(which clear)" -alias clear="clear && neofetch --ascii ~/.config/neofetch/ascii.txt" +alias clear="clear && fastfetch" alias neofetch="neofetch --ascii ~/.config/neofetch/ascii.txt" alias idea="/home/yigit/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/201.7223.91/bin/idea.sh" alias open=xdg-open diff --git a/zsh/antibody/p10k.zsh b/zsh/antibody/p10k.zsh index 11710da6..0bc40a0a 100644 --- a/zsh/antibody/p10k.zsh +++ b/zsh/antibody/p10k.zsh @@ -84,7 +84,7 @@ # Red prompt symbol if the last command failed. typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red # Default prompt symbol. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION="$MODE λ" + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION="$MODE"λ # Prompt symbol in command vi mode. typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION="$MODE❮λ❯" # Prompt symbol in visual vi mode is the same as in command mode. diff --git a/zsh/antibody/zsh_plugins.txt b/zsh/antibody/zsh_plugins.txt index eaf25b8b..4a7a57e9 100644 --- a/zsh/antibody/zsh_plugins.txt +++ b/zsh/antibody/zsh_plugins.txt @@ -8,6 +8,6 @@ zsh-users/zsh-syntax-highlighting zsh-users/zsh-history-substring-search zsh-users/zsh-autosuggestions le0me55i/zsh-extract -hcgraf/zsh-sudo +Aloxaf/fzf-tab rupa/z diff --git a/zsh/cmds b/zsh/cmds index e187a9b2..a65a0dab 100644 --- a/zsh/cmds +++ b/zsh/cmds @@ -29,14 +29,14 @@ colors() { fi echo -en "$color:$space\\033[38;5;${color}myeet\\033[48;5;${color}mworld\\033[0m" echo -n " " - if [[ $count == 10 ]] + if [[ $count == 7 ]] then echo -en "\n"; count=-1 fi ((color++)); ((count++)) - done + done echo "" } diff --git a/zsh/zshrc b/zsh/zshrc index 4fb2aaf3..0fb764e4 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,5 +1,5 @@ eval "$(direnv hook zsh)" >> /tmp/direnv -neofetch --ascii ~/.config/neofetch/ascii.txt +fastfetch if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi @@ -9,8 +9,8 @@ source ~/.profile source <(antibody init) HISTFILE=~/.zsh_history -HISTSIZE=10000 -SAVEHIST=10000 +HISTSIZE=100000 +SAVEHIST=100000 setopt appendhistory #Autocompletion @@ -39,7 +39,7 @@ source ~/.cmds [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241' +export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241,bold' export KEYTIMEOUT=5 # added by travis gem