From b4433234dbc876c5fcc923ad43c0402c3d7f5052 Mon Sep 17 00:00:00 2001 From: Joachim Date: Fri, 17 Jul 2020 23:26:28 +0200 Subject: [PATCH] First rounded setup, let's gestate. --- dot_Xresources | 16 +- dot_config/picom/picom.conf | 230 ++++++++++++++++++ dot_dotfiles/i3/config | 8 +- dot_dotfiles/i3/executable_screenshot.sh | 2 +- dot_dotfiles/polybar/config.tmpl | 29 ++- .../polybar/executable_launch-multi.sh | 3 +- dot_dotfiles/vim/vimrc.d/20-plugins.vim | 6 +- 7 files changed, 274 insertions(+), 20 deletions(-) create mode 100644 dot_config/picom/picom.conf diff --git a/dot_Xresources b/dot_Xresources index 86750e0..1b5d5d0 100644 --- a/dot_Xresources +++ b/dot_Xresources @@ -3,16 +3,24 @@ ! x.y > straight child ! x*y > any depth in resources hierarchy ! -URxvt.transparent: true -URxvt.shading:20 + +!true transparency +urxvt*depth: 32 +!urxvt*background: rgba:0000/0000/0200/c800 +URxvt.background: [90]#1d2021 + +!fake transparency (takes precedence) +!URxvt.transparent: true +!URxvt.shading: 10 + ! Included this so you know how to make your foreground not match the color of your background ! light0_hard gruvbox URxvt.foreground: #f9f5d7 ! dark0 gruvbox -URxvt*background: #1d2021 +!URxvt*background: #1d2021 URxvt*scrollBar: false URxvt*scrollstyle: plain -URxvt.internalBorder: 8 +URxvt.internalBorder: 15 URxvt*saveLines: 65500 ! starts as a login shell, prepending - to argv[0] of the shell. URxvt*loginShell: false diff --git a/dot_config/picom/picom.conf b/dot_config/picom/picom.conf new file mode 100644 index 0000000..f1dffbd --- /dev/null +++ b/dot_config/picom/picom.conf @@ -0,0 +1,230 @@ +# Thank you code_nomad: http://9m.no/ꪯ鵞 +# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton + +################################# +# +# Backend +# +################################# + +# Backend to use: "xrender" or "glx". +# GLX backend is typically much faster but depends on a sane driver. +backend = "glx"; + +################################# +# +# GLX backend +# +################################# + +glx-no-stencil = true; + +# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all. +# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified, +# but a 20% increase when only 1/4 is. +# My tests on nouveau show terrible slowdown. +glx-copy-from-front = false; + +# GLX backend: Use MESA_copy_sub_buffer to do partial screen update. +# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated. +# May break VSync and is not available on some drivers. +# Overrides --glx-copy-from-front. +# glx-use-copysubbuffermesa = true; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe). +# Recommended if it works. +# glx-no-rebind-pixmap = true; + +# GLX backend: GLX buffer swap method we assume. +# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1). +# undefined is the slowest and the safest, and the default value. +# copy is fastest, but may fail on some drivers, +# 2-6 are gradually slower but safer (6 is still faster than 0). +# Usually, double buffer means 2, triple buffer means 3. +# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers. +# Useless with --glx-use-copysubbuffermesa. +# Partially breaks --resize-damage. +# Defaults to undefined. +#glx-swap-method = "undefined"; + +################################# +# +# Shadows +# +################################# + +# Enabled client-side shadows on windows. +shadow = false; +# The blur radius for shadows. (default 12) +shadow-radius = 5; +# The left offset for shadows. (default -15) +shadow-offset-x = -5; +# The top offset for shadows. (default -15) +shadow-offset-y = -5; +# The translucency for shadows. (default .75) +shadow-opacity = 0.5; + +# Set if you want different colour shadows +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; + +# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches +# (most applications are fine, only apps that do weird things with xshapes or argb are affected). +# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. +shadow-exclude = [ + "! name~=''", + "name = 'Notification'", + "name = 'Plank'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name = 'cpt_frame_window'", + "name *= 'VLC'", + "name *= 'compton'", + "name *= 'picom'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "class_g = 'Firefox' && argb", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c", + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; +# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) +shadow-ignore-shaped = false; + +################################# +# +# Opacity +# +################################# + +inactive-opacity = 0.8; +active-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = false; + +# Dim inactive windows. (0.0 - 1.0) +# inactive-dim = 0.2; +# Do not let dimness adjust based on window opacity. +# inactive-dim-fixed = true; +# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. +blur-background = true; +# Blur background of opaque windows with transparent frames as well. +blur-background-frame = true; +# Do not let blur radius adjust based on window opacity. +blur-background-fixed = true; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; +# this supposedly fixes blur artifacts in terminal (saw some black lines) +use-damage = false + +################################# +# +# Fading +# +################################# + +# Fade windows during opacity changes. +fading = true; +# The time between steps in a fade in milliseconds. (default 10). +fade-delta = 4; +# Opacity change between steps while fading in. (default 0.028). +fade-in-step = 0.03; +# Opacity change between steps while fading out. (default 0.03). +fade-out-step = 0.03; +# Fade windows in/out when opening/closing +# no-fading-openclose = true; + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ ]; + +################################# +# +# Other +# +################################# + +# Try to detect WM windows and mark them as active. +mark-wmwin-focused = true; +# Mark all non-WM but override-redirect windows active (e.g. menus). +mark-ovredir-focused = true; +# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. +# Usually more reliable but depends on a EWMH-compliant WM. +use-ewmh-active-win = true; +# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. +detect-rounded-corners = true; + +# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. +# This prevents opacity being ignored for some apps. +# For example without this enabled my xfce4-notifyd is 100% opacity no matter what. +detect-client-opacity = true; + +# Specify refresh rate of the screen. +# If not specified or 0, picom will try detecting this with X RandR extension. +refresh-rate = 0; + +# Vertical synchronization: match the refresh rate of the monitor +vsync = true; + +# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. +# Reported to have no effect, though. +dbe = false; + +# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance. +# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +#sw-opti = true; + +# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. +# Known to cause flickering when redirecting/unredirecting windows. +unredir-if-possible = false; + +# Specify a list of conditions of windows that should always be considered focused. +focus-exclude = [ ]; + +# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. +detect-transient = true; +# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. +# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. +detect-client-leader = true; + +################################# +# +# Window type settings +# +################################# + +wintypes: +{ + tooltip = + { + # fade: Fade the particular type of windows. + fade = true; + # shadow: Give those windows shadow + shadow = false; + # opacity: Default opacity for the type of windows. + opacity = 0.85; + # focus: Whether to always consider windows of this type focused. + focus = true; + }; +}; + +###################### +# +# XSync +# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d +# +###################### + +# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users. +xrender-sync-fence = true; diff --git a/dot_dotfiles/i3/config b/dot_dotfiles/i3/config index d8edd25..59e0599 100644 --- a/dot_dotfiles/i3/config +++ b/dot_dotfiles/i3/config @@ -7,13 +7,15 @@ set $mod Mod4 # is used in the bar {} block below. # font pango:monospace 8 # overrides title bars -> makes sure i3-gaps can do its thing -for_window [class="^.*"] border pixel 2 +for_window [class="^.*"] border pixel 0 # for jetbrains windows... focus on dialogs! for_window [class="^jetbrains-.+"][window_type=dialog] focus # fix citrix windows for_window [class="Wfica_Seamless"] floating enable +border_radius 15 + # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. # Using the prefix of workspaces in order to be able to define ordering for special workspaces. @@ -43,8 +45,8 @@ assign [class="Wfica_Seamless"] $ws10 #assign [class="jetbrains-datagrip"] 9 # i3-gaps -gaps inner 10 -gaps outer 5 +gaps inner 10 +gaps outer 5 # Disallow endless looping of focus: extreme right is extreme right, don't flip to extreme left whenever you want... focus_wrapping no diff --git a/dot_dotfiles/i3/executable_screenshot.sh b/dot_dotfiles/i3/executable_screenshot.sh index a482170..a06737d 100644 --- a/dot_dotfiles/i3/executable_screenshot.sh +++ b/dot_dotfiles/i3/executable_screenshot.sh @@ -1,6 +1,6 @@ #!/bin/bash # the screenshot will be saved here -TARGETDIR=/home/jnieland/pictures/screenshots +TARGETDIR=$HOME/pictures/screenshots # make a screenshot filename TARGETFILE=screenshot.$(date '+%Y.%m.%d.%H.%M.%S').png # start the process diff --git a/dot_dotfiles/polybar/config.tmpl b/dot_dotfiles/polybar/config.tmpl index c0e1566..809d38b 100644 --- a/dot_dotfiles/polybar/config.tmpl +++ b/dot_dotfiles/polybar/config.tmpl @@ -49,8 +49,9 @@ faded_orange = #af3a03 # want to get colors from xrdb / .Xresources? # background = ${xrdb:color0:#222} -bar-background = #00FFFFFF - +# bar-background = #00FFFFFF +# ARGB +bar-background = #dd1d2021 [bar/general] width = 100% @@ -62,17 +63,21 @@ fixed-center = true line-size = 2 line-color = #f00 ; rounded corners of the bar -radius = 0.0 +radius = 10.0 ;this makes sure that i3 doesn't reposition everything when polybar becomes active... is shit override-redirect = false wm-restack = i3 ; all the bar colors background = ${colors.bar-background} foreground = ${colors.light0_hard} -border-color = ${colors.bright_blue} +;border-color = ${colors.bright_blue} +border-color = #00FFFFFF +border-left-size = 15 +border-right-size = 15 +border-top-size = 5 ; spaces on begin/end of bar -padding-left = 2 -padding-right = 2 +padding-left = 5 +padding-right = 5 ; set the bar fonts ;font-0 = fixed:pixelsize=10;1 ;font-0 = "Wuncon Siji:pixelsize=15;1" @@ -92,6 +97,7 @@ cursor-scroll = pointer [bar/primary] inherit = bar/general monitor = ${env:MONITOR:eDP-1} +bottom = false ;offset-x = 2% ;offset-y = 1% ;i'm faking the left and right margins with a fat border. i'm helpless @@ -106,7 +112,7 @@ modules-right = net wifi0 vpn powermenu ; TRAY MANAGEMENT ;tray-position = right tray-position = ${env:TRAY_POSITION:none} -;tray-transparent = true +tray-transparent = false tray-detached = false tray-maxsize = 16 ;tray-background = ${colors.background-alt} @@ -133,12 +139,12 @@ monitor = ${env:MONITOR:eDP-1} modules-right = pulseaudio modules-center = player-mpris-tail modules-left = date info-hackspeed -padding-left = 3 +padding-left = 2 padding-right = 2 [module/player-mpris-tail] type = custom/script -exec = ~/.config/polybar/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py -f '{icon} {artist} - {title}' --icon-playing  --icon-paused  --icon-stopped  --icon-none ﱙ +exec = ~/.config/polybar/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py -f '{icon} {artist} - {:t30:{title}:}' --icon-playing  --icon-paused  --icon-stopped  --icon-none ﱙ tail = true label = %output% label-foreground = ${colors.light0_hard} @@ -196,8 +202,13 @@ format-prefix-foreground = ${colors.light0} [module/filesystem] type = internal/fs interval = 25 +; mounts differ depending on the machine +{{- if eq .chezmoi.hostname "dome" }} +mount-0 = / +{{ else if eq .chezmoi.hostname "carbonraptor" -}} mount-0 = / mount-1 = /mnt/ext4 +{{- end }} ;label-mounted = %{F#0a81f5}%mountpoint%%{F-} %percentage_used%% ;#b8bb26 label-mounted = %{F#b8bb26}%mountpoint%%{F-} %percentage_used%% diff --git a/dot_dotfiles/polybar/executable_launch-multi.sh b/dot_dotfiles/polybar/executable_launch-multi.sh index dea794e..066d415 100644 --- a/dot_dotfiles/polybar/executable_launch-multi.sh +++ b/dot_dotfiles/polybar/executable_launch-multi.sh @@ -17,7 +17,8 @@ for m in $(polybar --list-monitors | cut -d":" -f1); do echo "Launching polybar on monitor $m" MONITOR=$m TRAY_POSITION=none polybar --reload secondary & if [ "$started_tray" = false ]; then - MONITOR=$m TRAY_POSITION=right polybar --reload primary & + # change none to right if you want to see the tray + MONITOR=$m TRAY_POSITION=none polybar --reload primary & started_tray=true echo "launching $m with tray" else diff --git a/dot_dotfiles/vim/vimrc.d/20-plugins.vim b/dot_dotfiles/vim/vimrc.d/20-plugins.vim index f5c4c06..01d526f 100644 --- a/dot_dotfiles/vim/vimrc.d/20-plugins.vim +++ b/dot_dotfiles/vim/vimrc.d/20-plugins.vim @@ -58,8 +58,10 @@ Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' " ripgrep integration Plug 'jremmen/vim-ripgrep' -" intellisense like plugin! -" Plug 'neoclide/coc.nvim', {'branch': 'release'} +" haskell auto completer (general intellisense autocomplete?) +Plug 'neoclide/coc.nvim', {'branch': 'release'} +" haskell support +Plug 'neovimhaskell/haskell-vim' call plug#end()