From ed65b0aa43215fe72c750439929c3d7058463664 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Fri, 10 Jan 2025 21:13:38 -0500 Subject: [PATCH] Update picom rules for dunst and add album art to mpdnotif.sh --- bin/mpdnotif.sh | 5 +- config/picom/picom.conf | 187 +--------------------------------------- 2 files changed, 7 insertions(+), 185 deletions(-) diff --git a/bin/mpdnotif.sh b/bin/mpdnotif.sh index 1f63271..c2275f5 100755 --- a/bin/mpdnotif.sh +++ b/bin/mpdnotif.sh @@ -3,7 +3,10 @@ while "true"; do status="`mpc status`" if [[ ${status} == *"[playing]"* ]]; then - dunstify -a Music --replace=27072 -t 2000 -i "$HOME/media/pics/music.png" "Now Playing:" "Artist: $(mpc --format '%artist%' current)\nSong: $(mpc --format '%title%' current)" + + ffmpeg -i ~/media/music/"$(mpc --format "%file%" current)" -an -c:v copy ~/media/music/.now_playing.jpg + dunstify -a Music --replace=27072 -t 2000 -i "$HOME/media/music/.now_playing.jpg" "Now Playing:" "Artist: $(mpc --format '%artist%' current)\nSong: $(mpc --format '%title%' current)" + rm ~/media/music/.now_playing.jpg fi mpc current --wait > /dev/null done diff --git a/config/picom/picom.conf b/config/picom/picom.conf index 787ede3..55bca68 100644 --- a/config/picom/picom.conf +++ b/config/picom/picom.conf @@ -22,51 +22,6 @@ animations =({ ) -############################################################################## -# TRANSITION # -# Fork: Arian8j2 # -############################################################################## - -# When windows get moved or resized it transitions window position -transition = true; - -# How many pixels move window to make the first position in transition (defaults to 20) -transition-offset = 20; - -# Direction of transition (top, right, bottom, left) e.g: "right" direction will make -# all windows come from right to left - -# (smart-x, smart-y) are smart direction that will check if there are -# multiple windows that splits the screen and will change their directions, -# in "smart-x" it changes direction of left window to "right" and direction of -# right window to "left", if screen is not splited and a window is taking -# a lot of screen it will change that window direction to "left". -# "smart-y" is also exactly like "smart-x" but instead of translating directions to -# "right" and "left", it translate to "top" and "bottom" -transition-direction = "fly-in"; - -# Function that calculates new position of window (defaults to "ease-out-cubic") -# see https://easings.net for list of all functions -# naming conventions are different to that site tho, e.g "easeInSine" is listed -# on site but here that translated to "ease-in-sine" -transition-timing-function = "ease-out-cubic"; - -# Time between frames in transition. (0.01 - 1.0, defaults to 0.028) -transition-step = 0.036; - -# Similar to opacity rules but determites transition direction e.g: -# "right: name *= 'Firefox'" will make firefox transition direction to right -# Specify a list of transition rules, in the format `DIRECTION:PATTERN` - -# for disabling transition on specific patterns use "none" keyword as a direction -# e.g: use "none: window_type = 'popup_menu'" for disabling transitions on popup menus -transition-rule = [ - "smart-x: class_g ?= 'Dunst'", - "smart-y: class_g ?= 'rofi'", - "smart-y: class_g ?= 'eww-calendar'", - "smart-y: class_g ?= 'eww-notification-popup'", -]; - ############################################################################## # CORNERS # ############################################################################## @@ -76,9 +31,6 @@ transition-rule = [ # `transparent-clipping`. corner-radius = 10; -# Exclude conditions for rounded corners. -rounded-corners-exclude = []; - ############################################################################## # SHADOWS # ############################################################################## @@ -86,7 +38,7 @@ rounded-corners-exclude = []; # Enabled client-side shadows on windows. Note desktop windows # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, # unless explicitly requested using the wintypes option. -shadow = false +shadow = true # The blur radius for shadows, in pixels. (defaults to 12) shadow-radius = 20 @@ -100,121 +52,7 @@ shadow-offset-x = -20 # The top offset for shadows, in pixels. (defaults to -15) shadow-offset-y = -20 -# Avoid drawing shadows on dock/panel windows. This option is deprecated, -# you should use the *wintypes* option in your config file instead. -# -# no-dock-shadow = false - -# Don't draw shadows on drag-and-drop windows. This option is deprecated, -# you should use the *wintypes* option in your config file instead. -# -# no-dnd-shadow = false - -# Red color value of shadow (0.0 - 1.0, defaults to 0). -# shadow-red = .18 -# Green color value of shadow (0.0 - 1.0, defaults to 0). -# shadow-green = .19 - -# Blue color value of shadow (0.0 - 1.0, defaults to 0). -# shadow-blue = .20 - -# Do not paint shadows on shaped windows. Note shaped windows -# here means windows setting its shape through X Shape extension. -# Those using ARGB background is beyond our control. -# Deprecated, use -# shadow-exclude = 'bounding_shaped' -# or -# shadow-exclude = 'bounding_shaped && !rounded_corners' -# instead. -# -# shadow-ignore-shaped = '' - -# Specify a list of conditions of windows that should have no shadow. -# -# examples: -# shadow-exclude = "n:e:Notification"; -# -# shadow-exclude = [] -shadow-exclude = []; - -# Specify a X geometry that describes the region in which shadow should not -# be painted in, such as a dock window region. Use -# shadow-exclude-reg = "x10+0+0" -# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. -# -# shadow-exclude-reg = "" - -# Crop shadow of a window fully on a particular Xinerama screen to the screen. -# xinerama-shadow-crop = false - -############################################################################## -# FADING # -############################################################################## - -# Fade windows in/out when opening/closing and when opacity changes, -# unless no-fading-openclose is used. -fading = false - -# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) -# fade-in-step = 0.028 -fade-in-step = 0.06; - -# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) -# fade-out-step = 0.03 -fade-out-step = 0.06; - -# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) -fade-delta = 10 - -# Specify a list of conditions of windows that should not be faded. - fade-exclude = ["class_g~='slop'"] - -# Do not fade on window open/close. -# no-fading-openclose = false - -# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. -# no-fading-destroyed-argb = false - -############################################################################## -# OPACITY # -############################################################################## - -# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) -inactive-opacity = 1.0 - -# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) -frame-opacity = 1.0 - -# DEPRECATED! -# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) -# menu-opacity = 1.0 - -# 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 - -# 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'" ]; - -# Use fixed inactive dim value, instead of adjusting according to window opacity. -# inactive-dim-fixed = 1.0 - -# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, -# like `50:name *= "Firefox"`. picom-trans is recommended over this. -# Note we don't make any guarantee about possible conflicts with other -# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. -# example: -# opacity-rule = [ "80:class_g = 'URxvt'" ]; -# -opacity-rule = [] ############################################################################## # BLUR # @@ -248,12 +86,6 @@ blur-background-fixed = false # Exclude conditions for background blur. # blur-background-exclude = [] -blur-background-exclude = [ - "name *= 'slop'", - "window_type = 'dock'", - "window_type = 'desktop'", - "_GTK_FRAME_EXTENTS@:c" -]; ############################################################################## # GENERAL # @@ -278,12 +110,6 @@ vsync = true # Try to detect WM windows (a non-override-redirect window with no # child that has 'WM_STATE') and mark them as active. # -# mark-wmwin-focused = false -mark-wmwin-focused = true; - -# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. -# mark-ovredir-focused = false -mark-ovredir-focused = true; # Try to detect windows with rounded corners and don't consider them # shaped windows. The accuracy is not very high, unfortunately. @@ -297,11 +123,6 @@ detect-rounded-corners = true; # detect-client-opacity = false 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 = 60 -refresh-rate = 0 # Limit picom to repaint at most once every 1 / 'refresh_rate' second to # boost performance. This should not be used with @@ -471,7 +292,7 @@ log-level = "warn"; # rules = ( {match = "name = 'Dunst'" animations =({ - triggers = ["open"]; + triggers = ["open", "show"]; preset = "slide-in"; direction ="right" })}, @@ -479,6 +300,4 @@ rules = ( triggers = ["close", "hide"]; preset = "disappear"; })}, -{match = "name = 'slop'"; blur-background =false; animations =({ - })} -) +{match = "name = 'slop'"; blur-background =false; animations = ()})