From 04a8ab95cc52d30a095e29c7c97a8ae6984fea34 Mon Sep 17 00:00:00 2001 From: altffour Date: Sat, 13 Mar 2021 16:01:31 +0300 Subject: [PATCH] update --- .bashrc | 1 - .config/alacritty.yml | 10 +-- .config/env | 2 + .config/newsboat/config | 3 +- .config/nvim/init.vim | 24 ++++-- .config/picom.conf | 133 ++++++++++++++++++++++++++----- .local/bin/qutebrowser_reload.py | 21 +++++ .local/bin/refresh_wallpaper | 2 +- .local/bin/upload_file | 8 +- .local/bin/zathura | 1 - 10 files changed, 163 insertions(+), 42 deletions(-) create mode 100755 .local/bin/qutebrowser_reload.py delete mode 120000 .local/bin/zathura diff --git a/.bashrc b/.bashrc index 4a2754f..65f694a 100644 --- a/.bashrc +++ b/.bashrc @@ -28,4 +28,3 @@ export PS1="[\W] \\$ " set -o vi source ~/.config/env -source "/home/dizzy/.local/share/cargo/env" diff --git a/.config/alacritty.yml b/.config/alacritty.yml index a7ccc86..58be647 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -96,7 +96,7 @@ font: # - (macOS) Menlo # - (Linux/BSD) monospace # - (Windows) Consolas - family: iosevka + family: ProFontIIx Nerd Font # The `style` can be specified to pick a specific face. style: Regular @@ -107,7 +107,7 @@ font: # # If the bold family is not specified, it will fall back to the # value specified for the normal font. - family: iosevka + family: ProFontIIx Nerd Font # The `style` can be specified to pick a specific face. style: Bold @@ -118,7 +118,7 @@ font: # # If the italic family is not specified, it will fall back to the # value specified for the normal font. - family: iosevka + family: ProFontIIx Nerd Font # The `style` can be specified to pick a specific face. style: Italic @@ -129,7 +129,7 @@ font: # # If the bold italic family is not specified, it will fall back to the # value specified for the normal font. - family: iosevka + family: ProFontIIx Nerd Font # The `style` can be specified to pick a specific face. style: Bold Italic @@ -310,7 +310,7 @@ colors: # # Window opacity as a floating point number from `0.0` to `1.0`. # The value `0.0` is completely transparent and `1.0` is opaque. -background_opacity: 0.95 +background_opacity: 0.85 #selection: #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" diff --git a/.config/env b/.config/env index b2643aa..e61b64d 100644 --- a/.config/env +++ b/.config/env @@ -13,6 +13,7 @@ export TERMINAL="alacritty" export BROWSER="firefox" export PATH="$XDG_DATA_HOME/gem/bin:$PATH" +export PATH="/usr/games/:$PATH" export PATH="$XDG_BIN_HOME:$PATH" export GPG_TTY=$(tty) @@ -58,6 +59,7 @@ alias lynx="lynx -cfg=$XDG_CONFIG_HOME/lynx/lynx.cfg" alias config='/usr/bin/git --git-dir=$HOME/.config/dotfiles --work-tree=$HOME' alias update="sudo mount /dev/sda1 /boot && sudo pacman -Syu" alias pman="pacman" +alias cleanup_packages='(set -x; sudo pacman -R $(pacman -Qdtq))' alias myip="curl ipinfo.io/ip" alias cp="cp -iv" alias mv="mv -iv" diff --git a/.config/newsboat/config b/.config/newsboat/config index a63868b..2f00d07 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -24,12 +24,13 @@ bind-key k up article # -- macros macro m set browser "mpv --ytdl %u --profile=360p > /dev/null &"; open-in-browser ; set browser "lynx -nocolor" macro a set browser "echo %u | xclip -sel clip"; open-in-browser ; set browser "lynx -nocolor" +macro v set browser "curl %u | feh - &"; open-in-browser ; set browser "lynx -nocolor" # -- podboat delete-played-files no download-path "~/dox/pod/%h/%n" max-downloads 4 -player "play" +player "nvlc" # -- color color listfocus white black bold diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index e3439b3..26f7b60 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -21,18 +21,29 @@ filetype plugin indent on " Setup theme. set t_Co=256 -colorscheme wal +"colorscheme wal let g:airline_themes='onedark' -" Setup Global Settings +" General set textwidth=80 let mapleader = " " -set nowrap set clipboard+=unnamed +set autoread +set backspace=indent,eol,start +set ignorecase +set smartcase +set incsearch +set magic - -" Plugin Settings -autocmd FileType cpp nnoremap fw :CompileAndRun +" Appearance +set number +set nowrap +set showbreak=↪ + " toggle invisible characters +set list +set listchars=tab:→\ ,eol:¬,trail:⋅,extends:❯,precedes:❮,space:· +set list +set ttyfast " Leader keys map e :bufdo e! @@ -40,7 +51,6 @@ nnoremap :WhichKey '' " Custom settings. set mouse=a -set number set encoding=utf-8 set backspace=indent,eol,start set timeoutlen=50 diff --git a/.config/picom.conf b/.config/picom.conf index e9fb6fe..6b817f8 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -1,3 +1,39 @@ +################################# +# Animations # +################################# +# requires https://github.com/jonaburg/picom +# (These are also the default values) +transition-length = 300 +transition-pow-x = 0.1 +transition-pow-y = 0.1 +transition-pow-w = 0.1 +transition-pow-h = 0.1 +size-transition = true + + +################################# +# Corners # +################################# +# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom +corner-radius = 5.0; +rounded-corners-exclude = [ + #"window_type = 'normal'", + "class_g = 'dwm'", + "class_g = 'URxvt'", + "class_g = 'XTerm'", + "class_g = 'kitty'", + #"class_g = 'Alacritty'", + "class_g = 'Polybar'", + "class_g = 'code-oss'", + #"class_g = 'TelegramDesktop'", + "class_g = 'firefox'", + "class_g = 'Thunderbird'" +]; +round-borders = 1; +round-borders-exclude = [ + #"class_g = 'TelegramDesktop'", +]; + ################################# # Shadows # ################################# @@ -66,6 +102,8 @@ shadow-exclude = [ "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'", + "class_g = 'slop'", + "class_g = 'Polybar'", "_GTK_FRAME_EXTENTS@:c" ]; @@ -88,7 +126,7 @@ shadow-exclude = [ # Fade windows in/out when opening/closing and when opacity changes, # unless no-fading-openclose is used. # fading = false -fading = false +fading = false; # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) # fade-in-step = 0.028 @@ -102,7 +140,10 @@ fade-out-step = 0.03; # fade-delta = 10 # Specify a list of conditions of windows that should not be faded. -# fade-exclude = [] +# don't need this, we disable fading for all normal windows with wintypes: {} +fade-exclude = [ + "class_g = 'slop'" # maim +] # Do not fade on window open/close. # no-fading-openclose = false @@ -117,29 +158,39 @@ fade-out-step = 0.03; # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) -inactive-opacity = 1 -#inactive-opacity = 0.8; +# inactive-opacity = 1 +inactive-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # frame-opacity = 1.0 frame-opacity = 0.7; # Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) -# menu-opacity = 1.0 +# menu-opacity = 1.0 +# menu-opacity is depreciated use dropdown-menu and popup-menu instead. + +#If using these 2 below change their values in line 510 & 511 aswell +popup_menu = { opacity = 0.7; } +dropdown_menu = { opacity = 0.7; } + # Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. # inactive-opacity-override = true inactive-opacity-override = false; # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) -# active-opacity = 1.0 +active-opacity = 1.0; # Dim inactive windows. (0.0 - 1.0, defaults to 0.0) # inactive-dim = 0.0 # Specify a list of conditions of windows that should always be considered focused. # focus-exclude = [] -focus-exclude = [ "class_g = 'Cairo-clock'" ]; +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'" # maim +]; # Use fixed inactive dim value, instead of adjusting according to window opacity. # inactive-dim-fixed = 1.0 @@ -152,6 +203,21 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # opacity-rule = [ "80:class_g = 'URxvt'" ]; # # opacity-rule = [] +opacity-rule = [ + "80:class_g = 'Bar'", # lemonbar + "100:class_g = 'slop'", # maim + "100:class_g = 'XTerm'", + "100:class_g = 'URxvt'", + "100:class_g = 'kitty'", + "100:class_g = 'Alacritty'", + "80:class_g = 'Polybar'", + "100:class_g = 'code-oss'", + "100:class_g = 'Meld'", + "70:class_g = 'TelegramDesktop'", + "90:class_g = 'Joplin'", + "100:class_g = 'firefox'", + "100:class_g = 'Thunderbird'" +]; ################################# @@ -161,44 +227,62 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # Parameters for background blurring, see the *BLUR* section for more information. # blur-method = -blur-size = 24 +# blur-size = 12 # -blur-deviation = true +# blur-deviation = false # Blur background of semi-transparent / ARGB windows. # Bad in performance, with driver-dependent behavior. # The name of the switch may change without prior notifications. # -# blur-background = false +# blur-background = true; # Blur background of windows when the window frame is not opaque. # Implies: # blur-background # Bad in performance, with driver-dependent behavior. The name may change. # -# blur-background-frame = false +# blur-background-frame = false; # Use fixed blur strength rather than adjusting according to window opacity. -blur-background-fixed = true +# blur-background-fixed = false; # Specify the blur convolution kernel, with the following format: # example: -blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; # # blur-kern = '' -#blur-kern = "3x3box"; +# blur-kern = "3x3box"; +blur: { + # requires: https://github.com/ibhagwan/picom + method = "kawase"; + #method = "kernel"; + strength = 7; + # deviation = 1.0; + # kernel = "11x11gaussian"; + background = false; + background-frame = false; + background-fixed = false; + kern = "3x3box"; +} # Exclude conditions for background blur. -# blur-background-exclude = [] blur-background-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'", + #"window_type = 'dock'", + #"window_type = 'desktop'", + #"class_g = 'URxvt'", + # + # prevents picom from blurring the background + # when taking selection screenshot with `main` + # https://github.com/naelstrof/maim/issues/130 + "class_g = 'slop'", "_GTK_FRAME_EXTENTS@:c" ]; + ################################# # General Settings # ################################# @@ -209,8 +293,10 @@ blur-background-exclude = [ # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. # `xrender` is the default one. # -# backend = 'glx' -backend = "xr_glx_hybrid"; +experimental-backends = true; +backend = "glx"; +#backend = "xrender"; + # Enable/disable VSync. # vsync = false @@ -263,7 +349,7 @@ refresh-rate = 0 # Unredirect all windows if a full-screen opaque window is detected, # to maximize performance for full-screen windows. Known to cause flickering -# when redirecting/unredirecting windows. +# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. # # unredir-if-possible = false @@ -324,7 +410,9 @@ detect-client-leader = true # The opposing option is use-damage # # no-use-damage = false -use-damage = true +#use-damage = true (Causing Weird Black semi opaque rectangles when terminal is opened) +#Changing use-damage to false fixes the problem +use-damage = false # Use X Sync fence to sync clients' draw calls, to make sure all draw # calls are finished before picom starts drawing. Needed on nvidia-drivers @@ -367,7 +455,7 @@ use-damage = true # using *--log-file*, since it can generate a huge stream of logs. # # log-level = "debug" -log-level = "warn"; +log-level = "info"; # Set the log file. # If *--log-file* is never specified, logs will be written to stderr. @@ -415,6 +503,7 @@ log-level = "warn"; # wintypes: { + normal = { fade = false; shadow = false; } tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; dock = { shadow = false; } dnd = { shadow = false; } diff --git a/.local/bin/qutebrowser_reload.py b/.local/bin/qutebrowser_reload.py new file mode 100755 index 0000000..1415a26 --- /dev/null +++ b/.local/bin/qutebrowser_reload.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +""" +Small Python script to reload qutebrowser themes. + +""" +try: + from qutebrowser import qutebrowser, app + from qutebrowser.misc import ipc +except ImportError: + print("error: qutebrowser missing.") + exit(1) + + +def qute_reload(): + """Send config-source command to qutebrowsers ipc server.""" + args = qutebrowser.get_argparser().parse_args() + app.standarddir.init(args) + socket = ipc._get_socketname(args.basedir) + ipc.send_to_running_instance(socket, [":config-source"], args.target) + +qute_reload() diff --git a/.local/bin/refresh_wallpaper b/.local/bin/refresh_wallpaper index 7e2f271..3a7fff8 100755 --- a/.local/bin/refresh_wallpaper +++ b/.local/bin/refresh_wallpaper @@ -3,7 +3,7 @@ pkill -9 feh feh --no-fehbg --bg-fill ~/proj/sysconf/wallpapers/wallpaper rm -r ~/.cache/wal/ -wal -i ~/proj/sysconf/wallpapers/wallpaper +wal -i ~/proj/sysconf/wallpapers/wallpaper -o ~/.local/bin/qutebrowser_reload.py xrdb ~/.cache/wal/colors.Xresources cp ~/.cache/wal/dunstrc ~/.config/dunst/dunstrc diff --git a/.local/bin/upload_file b/.local/bin/upload_file index baed407..90f1427 100755 --- a/.local/bin/upload_file +++ b/.local/bin/upload_file @@ -1,5 +1,5 @@ #!/bin/bash - - file=$(find $HOME -type f | dmenu -i -l 25) - curl -F "file=@$file" 0x0.st | xclip -selection c - notify-send "Your file link is in clipboard" + +file=$(find '$HOME/dox' -type f | dmenu -i -l 25) +curl -F "file=@$file" 0x0.st | xclip -selection c +notify-send "Your file link is in clipboard" diff --git a/.local/bin/zathura b/.local/bin/zathura deleted file mode 120000 index 3bf6e37..0000000 --- a/.local/bin/zathura +++ /dev/null @@ -1 +0,0 @@ -/home/dizzy/dox/opt/Zathura-Pywal/zathura \ No newline at end of file