From 0914a3eb5a10705f188f1d3604f24980d9ef6b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Thu, 11 Oct 2018 20:36:31 +0200 Subject: [PATCH] Updates for new docking station Various polybar and termite configs --- compton/.config/compton/compton.conf | 233 +++++++++++++++++++++++++++ gtk/.config/gtk-3.0/gtk.css | 3 + gtk/.config/gtk-3.0/settings.ini | 2 +- gtk/.gtkrc-2.0 | 2 +- i3/.i3/config | 7 +- i3/.i3/scripts/home-layout.sh | 10 +- i3/.i3/scripts/home-monitors.sh | 2 +- i3/.i3/scripts/laptop-layout.sh | 4 +- i3/.i3/scripts/start_layout.sh | 10 -- i3/.i3/scripts/work-layout.sh | 6 +- polybar/.config/polybar/config | 3 +- termite/.config/termite/config | 4 +- 12 files changed, 259 insertions(+), 27 deletions(-) create mode 100644 compton/.config/compton/compton.conf create mode 100644 gtk/.config/gtk-3.0/gtk.css diff --git a/compton/.config/compton/compton.conf b/compton/.config/compton/compton.conf new file mode 100644 index 0000000..702d08b --- /dev/null +++ b/compton/.config/compton/compton.conf @@ -0,0 +1,233 @@ +# Thank you code_nomad: http://9m.no/ꪯ鵞 + +################################# +# +# 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. +# Useful with --glx-swap-method, as well. +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; +# Don't draw shadows on DND windows. +no-dnd-shadow = true; +# Avoid drawing shadows on dock/panel windows. +no-dock-shadow = true; +# Zero the part of the shadow's mask behind the window. Fix some weirdness with ARGB windows. +clear-shadow = true; +# 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 compton 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 *= 'VLC'", + "name *= 'compton'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "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" +]; +# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) +shadow-ignore-shaped = false; + +################################# +# +# Opacity +# +################################# + +menu-opacity = 1; +inactive-opacity = 0.9; +active-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = false; +alpha-step = 0.06; + +# 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 = false; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +################################# +# +# 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, compton will try detecting this with X RandR extension. +refresh-rate = 0; + +# Set VSync method. VSync methods currently available: +# none: No VSync +# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers. +# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers. +# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers. +# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental. +# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use. +# (Note some VSync methods may not be enabled at compile time.) +vsync = "opengl-swc"; + +# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. +# Reported to have no effect, though. +dbe = false; +# Painting on X Composite overlay window. Recommended. +paint-on-overlay = true; + +# Limit compton 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. +# paint-on-overlay may make the flickering less obvious. +unredir-if-possible = true; + +# 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; + }; +}; diff --git a/gtk/.config/gtk-3.0/gtk.css b/gtk/.config/gtk-3.0/gtk.css new file mode 100644 index 0000000..b491b0f --- /dev/null +++ b/gtk/.config/gtk-3.0/gtk.css @@ -0,0 +1,3 @@ +VVteTerminal, vte-terminal { + padding: 5px; +} diff --git a/gtk/.config/gtk-3.0/settings.ini b/gtk/.config/gtk-3.0/settings.ini index 0a41abc..640307e 100644 --- a/gtk/.config/gtk-3.0/settings.ini +++ b/gtk/.config/gtk-3.0/settings.ini @@ -1,4 +1,4 @@ [Settings] gtk-icon-theme-name = Papirus-Dark gtk-theme-name = Materia-dark -gtk-font-name = Roboto Mono Medium for Powerline 12 +gtk-font-name = Source Code Pro for Powerline 12 diff --git a/gtk/.gtkrc-2.0 b/gtk/.gtkrc-2.0 index 32e5216..2284d02 100644 --- a/gtk/.gtkrc-2.0 +++ b/gtk/.gtkrc-2.0 @@ -1,3 +1,3 @@ gtk-icon-theme-name = "Papirus-Dark" gtk-theme-name = "Materia-dark" -gtk-font-name = "Roboto Mono Medium for Powerline 12" +gtk-font-name = "Source Code Pro for Powerline 12" diff --git a/i3/.i3/config b/i3/.i3/config index e49813d..a8950ab 100644 --- a/i3/.i3/config +++ b/i3/.i3/config @@ -8,7 +8,7 @@ set $mod Mod4 #workspace_layout stacking # Configure border style -new_window pixel 1 +new_window pixel 0 new_float normal # Hide borders @@ -16,7 +16,7 @@ hide_edge_borders none # change borders bindsym $mod+u border none -bindsym $mod+y border pixel 1 +bindsym $mod+y border pixel 0 bindsym $mod+n border normal # Font for window titles. Will also be used by the bar unless a different font @@ -154,7 +154,7 @@ bindsym $mod+Ctrl+9 exec --no-startup-id ~/.i3/workspaces/ws09.sh bindsym $mod+Ctrl+0 exec --no-startup-id ~/.i3/workspaces/ws00.sh # Open specific applications in floating mode -for_window [class="^.*"] border pixel 3 +for_window [class="^.*"] border pixel 0 for_window [class="Nitrogen"] floating enable sticky enable border normal for_window [class="feh"] floating enable sticky enable border normal for_window [class="mpv"] floating enable sticky enable border normal @@ -176,6 +176,7 @@ exec --no-startup-id nm-applet exec --no-startup-id pasystray #exec --no-startup-id blueman-applet exec --no-startup-id light-locker +exec --no-startup-id compton --config /home/jfm/.config/compton/compton.conf # Color palette used for the terminal ( ~/.Xresources file ) # Colors are gathered based on the documentation: diff --git a/i3/.i3/scripts/home-layout.sh b/i3/.i3/scripts/home-layout.sh index 695249f..f912d32 100755 --- a/i3/.i3/scripts/home-layout.sh +++ b/i3/.i3/scripts/home-layout.sh @@ -3,12 +3,14 @@ ENV_FILE="/home/jfm/.i3/env" /bin/cat <$ENV_FILE -export LAPTOP="eDP1" -export PRIMARY="eDP1" -export SECONDARY="HDMI1" +export LAPTOP="DP1-2" +export PRIMARY="DP1-3" +export SECONDARY="DP1-2" export LDPI_PROFILE="default" export HDPI_PROFILE="laptop" EOM -#~/.config/polybar/home-polybar.sh +. $ENV_FILE +polybar primary & +polybar secondary & diff --git a/i3/.i3/scripts/home-monitors.sh b/i3/.i3/scripts/home-monitors.sh index a6b560e..0fa21d4 100755 --- a/i3/.i3/scripts/home-monitors.sh +++ b/i3/.i3/scripts/home-monitors.sh @@ -1,2 +1,2 @@ #!/bin/sh -xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 2560x1440 --pos 0x1200 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --mode 1920x1200 --pos 312x0 --rotate normal --output DP2 --off +xrandr --output VIRTUAL1 --off --output eDP1 --off --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP1-3 --primary --mode 1920x1200 --pos 0x0 --rotate normal --output DP1-2 --mode 1920x1200 --pos 1920x0 --rotate normal --output DP1-1 --off --output DP2 --off diff --git a/i3/.i3/scripts/laptop-layout.sh b/i3/.i3/scripts/laptop-layout.sh index ee454f7..c5de04d 100755 --- a/i3/.i3/scripts/laptop-layout.sh +++ b/i3/.i3/scripts/laptop-layout.sh @@ -11,5 +11,5 @@ export LDPI_PROFILE="laptop" export HDPI_PROFILE="laptop" EOM -#~/.config/polybar/laptop-polybar.sh & - +. $ENV_FILE +polybar primary & diff --git a/i3/.i3/scripts/start_layout.sh b/i3/.i3/scripts/start_layout.sh index 4436983..448d7b8 100755 --- a/i3/.i3/scripts/start_layout.sh +++ b/i3/.i3/scripts/start_layout.sh @@ -7,16 +7,6 @@ sleep 5 if [ $monitors -gt 1 ] then ~/.i3/scripts/dock.sh & - . ~/.i3/env - - sleep 1 - polybar primary & - polybar secondary & - polybar laptop & else ~/.i3/scripts/undock.sh & - . ~/.i3/env - - sleep 1 - polybar primary & fi diff --git a/i3/.i3/scripts/work-layout.sh b/i3/.i3/scripts/work-layout.sh index 8b13577..7a5cfe5 100755 --- a/i3/.i3/scripts/work-layout.sh +++ b/i3/.i3/scripts/work-layout.sh @@ -11,5 +11,7 @@ export LDPI_PROFILE="default" export HDPI_PROFILE="laptop" EOM -#~/.config/polybar/work-polybar.sh -#feh --bg-scale --zoom fill ~/.config/i3/wallpaper/fedora_simple.jpg +. $ENV_FILE +polybar primary & +polybar secondary & +polybar laptop & diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index dc0968a..1245e88 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -241,7 +241,8 @@ label = %date% %time% type = internal/battery battery = BAT0 adapter = AC -full-at = 98 +full-at = 95 +interval = 120 format-charging = diff --git a/termite/.config/termite/config b/termite/.config/termite/config index 5095e01..b5ced12 100644 --- a/termite/.config/termite/config +++ b/termite/.config/termite/config @@ -1,13 +1,13 @@ [options] -#font = DejaVu Sans Mono for Powerline 11 font = Source Code Pro for Powerline 11 scrollback_lines = 10000 +size_hints = true # Solarized dark color scheme [colors] foreground = #839496 foreground_bold = #eee8d5 -#foreground_dim = #888888 +foreground_dim = #002b36 background = #002b36 cursor = #93a1a1