From 5cb1207b3986c67a6f219c07b4c0527e9a57348c Mon Sep 17 00:00:00 2001 From: Breizh Date: Wed, 18 May 2022 23:22:55 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20configuration=20MPD=20et?= =?UTF-8?q?=20NCMPCPP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/cava/config | 61 +++++++++---- .config/conky/conkyrc1 | 6 +- .config/htop/htoprc | 35 ++++++-- .config/i3/config | 25 +++--- .config/mpd/mpd.conf | 9 ++ {.ncmpcpp => .config/ncmpcpp}/config | 118 +++++++++++++++++++------- .config/pikaur.conf | 2 +- .config/variety/scripts/set_wallpaper | 21 ++++- .config/yt-dlp/config | 1 + .local/bin/mpd-notif | 1 + .local/bin/music-replaygain-solo | 2 +- 11 files changed, 206 insertions(+), 75 deletions(-) rename {.ncmpcpp => .config/ncmpcpp}/config (79%) diff --git a/.config/cava/config b/.config/cava/config index ceb3f22..93260e0 100644 --- a/.config/cava/config +++ b/.config/cava/config @@ -15,7 +15,7 @@ ; autosens = 1 ; overshoot = 20 -# Manual sensitivity in %. Autosens must be turned off for this to take effect. +# Manual sensitivity in %. If autosens is enabled, this will only be the initial value. # 200 means double height. Accepts only non-negative values. ; sensitivity = 100 @@ -24,6 +24,13 @@ ; bars = 0 ; bar_width = 2 ; bar_spacing = 1 +# bar_height is only used for output in "noritake" format +; bar_height = 32 + +# For SDL width and space between bars is in pixels, defaults are: +; bar_width = 20 +; bar_spacing = 5 + # Lower and higher cutoff frequencies for lowest and highest bars # the bandwidth of the visualizer. @@ -32,13 +39,10 @@ ; lower_cutoff_freq = 50 ; higher_cutoff_freq = 10000 -# FFT buffer is set in the exponent of 2 and must be between 8 - 16, 8 = 256, 16 = 65536 -# this is the audio buffer used to create the spectrum -# increasing the will improve the accuracy of the visualization, -# but will also make it slower and increase CPU usage -# anything below 10 and above 13 is considered experimental. -; FFTbufferSize = 12; +# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and +# only check for input once per second. Cava will wake up once input is detected. 0 = disable. +; sleep_timer = 0 [input] @@ -75,21 +79,28 @@ [output] -# Output method. Can be 'ncurses', 'noncurses' or 'raw'. -# 'noncurses' uses a custom framebuffer technique and draws only changes -# from frame to frame. As of version 0.7.0 'noncurses' is default. +# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake' or 'sdl'. +# 'noncurses' uses a custom framebuffer technique and prints only changes +# from frame to frame in the terminal. 'ncurses' is default if supported. # # 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data # stream of the bar heights that can be used to send to other applications. # 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. -method = ncurses +# +# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display +# in graphic mode. It only support the 3000 series graphical VFDs for now. +# +# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context. +; method = ncurses # Visual channels. Can be 'stereo' or 'mono'. # 'stereo' mirrors both channels with low frequencies in center. # 'mono' outputs left to right lowest to highest frequencies. # 'mono_option' set mono to either take input from 'left', 'right' or 'average'. +# set 'reverse' to 1 to display frequencies the other way around. ; channels = stereo ; mono_option = average +; reverse = 0 # Raw output target. A fifo will be created if target does not exist. ; raw_target = /dev/stdout @@ -108,17 +119,27 @@ method = ncurses ; bar_delimiter = 59 ; frame_delimiter = 10 - +# sdl window size and position. -1,-1 is centered. +; sdl_width = 1000 +; sdl_height = 500 +; sdl_x = -1 +; sdl_y= -1 [color] # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. # Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires # ncurses output method and a terminal that can change color definitions such as Gnome-terminal or rxvt. +# if supported, ncurses mode will be forced on if user defined colors are used. # default is to keep current terminal color ; background = default ; foreground = default +# SDL only support hex code colors, these are the default: +; background = '#111111' +; foreground = '#33cccc' + + # Gradient mode, only hex defined colors (and thereby ncurses mode) are supported, # background must also be defined in hex or remain commented out. 1 = on, 0 = off. # You can define as many as 8 different colors. They range from bottom to top of screen @@ -140,26 +161,36 @@ gradient_color_3 = '#D50000' # Percentage value for integral smoothing. Takes values from 0 - 100. # Higher values means smoother, but less precise. 0 to disable. +# DEPRECATED as of 0.8.0, use noise_reduction instead ; integral = 77 # Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. -monstercat = 1 -; waves = 1 +; monstercat = 0 +; waves = 0 # Set gravity percentage for "drop off". Higher values means bars will drop faster. # Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off". +# DEPRECATED as of 0.8.0, use noise_reduction instead ; gravity = 100 -gravity = 200 + # In bar height, bars that would have been lower that this will not be drawn. +# DEPRECATED as of 0.8.0 ; ignore = 0 +# Noise reduction, float 0 - 1. default 0.77 +# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth +# 1 will be very slow and smooth, 0 will be fast but noisy. +; noise_reduction = 0.77 + [eq] # This one is tricky. You can have as much keys as you want. # Remember to uncomment more then one key! More keys = more precision. # Look at readme.md on github for further explanations and examples. +# DEPRECATED as of 0.8.0 can be brought back by popular request, open issue at: +# https://github.com/karlstav/cava ; 1 = 1 # bass ; 2 = 1 ; 3 = 1 # midtone diff --git a/.config/conky/conkyrc1 b/.config/conky/conkyrc1 index 6555e2d..a89a1b6 100644 --- a/.config/conky/conkyrc1 +++ b/.config/conky/conkyrc1 @@ -82,9 +82,9 @@ ${template2 5} ${color2}${font2}Carte graphique $hr${font}${color} ${voffset 2}Usage${goto 140}${texeci 3 conky_radeon}% VRAM: ${texeci 3 conky_radeon vram mb}M${goto 140}${texeci 3 conky_radeon vram}% -Temp${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2700"."edge"."temp1_input"'}>70}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2700"."edge"."temp1_input"' | cut -d. -f1}°C${color} -Conso${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2700"."slowPPT"."power1_average"'}>180}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2700"."slowPPT"."power1_average"' | cut -d. -f1} W${color} -Ventilo${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2700"."fan1"."fan1_input"'}>3000}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2700"."fan1"."fan1_input"' | cut -d. -f1} RPM${color} +Temp${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2900"."edge"."temp1_input"'}>70}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2900"."edge"."temp1_input"' | cut -d. -f1}°C${color} +Conso${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2900"."slowPPT"."power1_average"'}>180}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2900"."slowPPT"."power1_average"' | cut -d. -f1} W${color} +Ventilo${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2900"."fan1"."fan1_input"'}>3000}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2900"."fan1"."fan1_input"' | cut -d. -f1} RPM${color} ${color2}${font2}Système $hr$font$color${voffset 2} Kernel${goto 140}$kernel diff --git a/.config/htop/htoprc b/.config/htop/htoprc index d8175a2..675f8dc 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -1,12 +1,8 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.1.2 -config_reader_min_version=2 +htop_version=3.2.0 +config_reader_min_version=3 fields=0 48 17 18 113 38 39 40 119 111 2 46 47 49 1 -sort_key=47 -sort_direction=-1 -tree_sort_key=0 -tree_sort_direction=1 hide_kernel_threads=1 hide_userland_threads=1 shadow_other_users=1 @@ -21,10 +17,8 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=1 -tree_view=1 -tree_view_always_by_pid=0 -all_branches_collapsed=0 header_margin=1 +screen_tabs=0 detailed_cpu_time=1 cpu_count_from_one=0 show_cpu_usage=1 @@ -42,3 +36,26 @@ column_meters_0=LeftCPUs2 Blank CPU Memory Swap Blank Hostname System DateTime B column_meter_modes_0=1 2 1 1 1 2 2 2 2 2 2 2 2 2 2 column_meters_1=RightCPUs2 Blank CPU Memory Swap Blank Uptime LoadAverage Tasks Blank DiskIO NetworkIO Blank PressureStallMemoryFull PressureStallIOFull column_meter_modes_1=1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 +tree_view=0 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE OOM M_VIRT M_RESIDENT M_SHARE M_SWAP IO_RATE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/.config/i3/config b/.config/i3/config index 30a0182..b20562c 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -115,6 +115,13 @@ bindsym XF86AudioPrev exec --no-startup-id mpc prev bindsym XF86AudioPlay exec --no-startup-id mpc toggle bindsym $mod+XF86AudioPlay exec --no-startup-id mpc stop +# Notifications +bindsym Ctrl+space exec dunstctl close +bindsym Ctrl+Shift+space exec dunstctl close-all +bindsym Ctrl+Shift+dollar exec dunstctl context +bindsym Ctrl+dollar exec dunstctl history-pop +#bindsym $mod+Pause exec dunstctl set-paused toggle + # Beep tog bindsym $mod+Delete exec --no-startup-id $HOME/.local/bin/toggle-beep && pkill -SIGRTMIN+14 i3blocks @@ -139,8 +146,6 @@ bindsym $mod+Print --release exec --no-startup-id i3-scrot -w bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s bindsym $mod+Ctrl+x --release exec --no-startup-id xkill bindsym $mod+l exec passmenu --type -l 10 $DMENU_OPTIONS -bindsym $mod+Pause exec --no-startup-id killall -SIGUSR1 dunst -bindsym $mod+Shift+Pause exec --no-startup-id killall -SIGUSR2 dunst #set $mode_ide (a)tom (t)exmaker #mode "$mode_ide" { @@ -265,13 +270,13 @@ bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 force_display_urgency_hint 2000 ms -workspace $ws1 output DisplayPort-1 -workspace $ws2 output DisplayPort-1 -workspace $ws3 output DisplayPort-1 -workspace $ws4 output DisplayPort-1 -workspace $ws5 output DisplayPort-1 -workspace $ws6 output DisplayPort-1 -workspace $ws7 output DisplayPort-1 +workspace $ws1 output DisplayPort-2 +workspace $ws2 output DisplayPort-2 +workspace $ws3 output DisplayPort-2 +workspace $ws4 output DisplayPort-2 +workspace $ws5 output DisplayPort-2 +workspace $ws6 output DisplayPort-2 +workspace $ws7 output DisplayPort-2 workspace $ws8 output HDMI-A-1 # Open applications on specific workspaces @@ -363,7 +368,7 @@ exec --no-startup-id redshift-gtk exec --no-startup-id nm-applet exec --no-startup-id steam-native -silent -noverifyfiles -language french #exec --no-startup-id SVPManager -exec --no-startup-id hp-systray -x +#exec --no-startup-id hp-systray -x exec --no-startup-id play "$HOME/Musique/WELCOME BACK.wav" exec --no-startup-id variety diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index 412af11..d8a174a 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -363,6 +363,15 @@ audio_output { # mixer_type "none" # optional #} # + +# ncmpcpp visualization +audio_output { + type "fifo" + name "ncmpcpp_fifo" + path "/run/user/1000/mpd.fifo" + format "44100:16:2" +} + ############################################################################### diff --git a/.ncmpcpp/config b/.config/ncmpcpp/config similarity index 79% rename from .ncmpcpp/config rename to .config/ncmpcpp/config index 3314113..31df8e5 100644 --- a/.ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -1,7 +1,8 @@ -############################################################################## -## This is the example configuration file. Copy it to $HOME/.ncmpcpp/config ## -## or $XDG_CONFIG_HOME/ncmpcpp/config and set up your preferences. ## -############################################################################## +############################################################## +## This is an example configuration file. Copy it to ## +## $XDG_CONFIG_HOME/ncmpcpp/config or $HOME/.ncmpcpp/config ## +## and set up your preferences. ## +############################################################## # ##### directories ###### ## @@ -11,7 +12,7 @@ ## ncmpcpp. ## # -ncmpcpp_directory = ~/.ncmpcpp +ncmpcpp_directory = ~/.config/ncmpcpp # ## ## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other @@ -34,12 +35,16 @@ ncmpcpp_directory = ~/.ncmpcpp # #mpd_crossfade_time = 5 # +# Exclude pattern for random song action +# http://www.boost.org/doc/libs/1_46_1/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html +#random_exclude_pattern = "^(temp|midi_songs).*" +# ##### music visualizer ##### ## -## Note: In order to make music visualizer work you'll need to use mpd fifo -## output, whose format parameter has to be set to 44100:16:1 for mono -## visualization or 44100:16:2 for stereo visualization. Example configuration -## (it has to be put into mpd.conf): +## In order to make music visualizer work with MPD you need to use the fifo +## output. Its format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. As an example here is +## the relevant section for mpd.conf: ## ## audio_output { ## type "fifo" @@ -48,30 +53,43 @@ ncmpcpp_directory = ~/.ncmpcpp ## format "44100:16:2" ## } ## +## If the visualization on occasion diverges from the audio output, please set +## 'buffer_time' parameter of your audio output in mpd.conf to '100000' (100ms) +## or less to prevent that from happening. +## +## Note: If you're using Mopidy, an address of a udpsink gstreamer's output is +## also accepted. For example, the following section in mopidy.conf: +## +## [audio] +## output = tee name=t ! queue ! autoaudiosink t. +## ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE +## ! udpsink host=localhost port=5555 +## +## will make localhost:5555 available as a source of data for the stereo +## visualizer. +## # -#visualizer_fifo_path = /tmp/mpd.fifo +visualizer_data_source = /run/user/1000/mpd.fifo # ## ## Note: Below parameter is needed for ncmpcpp to determine which output -## provides data for visualizer and thus allow syncing between visualization and -## sound as currently there are some problems with it. +## provides data for visualizer and reset it at the beginning of visualization +## to synchronize with audio. ## # -#visualizer_output_name = Visualizer feed +visualizer_output_name = ncmpcpp_fifo # ## ## If you set format to 44100:16:2, make it 'yes'. ## -#visualizer_in_stereo = yes +visualizer_in_stereo = yes # ## -## Note: Below parameter defines how often ncmpcpp has to "synchronize" -## visualizer and audio outputs. 30 seconds is optimal value, but if you -## experience synchronization problems, set it to lower value. Keep in mind -## that sane values start with >=10. +## Note: set below to >=10 only if you have synchronization issues with +## visualization and audio. ## # -#visualizer_sync_interval = 30 +#visualizer_sync_interval = 0 # ## ## Note: To enable spectrum frequency visualization you need to compile ncmpcpp @@ -80,7 +98,11 @@ ncmpcpp_directory = ~/.ncmpcpp # ## Available values: spectrum, wave, wave_filled, ellipse. ## -#visualizer_type = wave +#visualizer_type = spectrum +# +#visualizer_fps = 60 +# +#visualizer_autoscale = no # #visualizer_look = ●▮ # @@ -88,7 +110,34 @@ ncmpcpp_directory = ~/.ncmpcpp # ## Alternative subset of 256 colors for terminals that support it. ## -#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 +#visualizer_color = 47, 83, 119, 155, 191, 227, 221, 215, 209, 203, 197, 161 +# +## +## Note: The next few visualization options apply to the spectrum visualizer. +## +# +## Use unicode block characters for a smoother, more continuous look. +## This will override the visualizer_look option. With transparent terminals +## and visualizer_in_stereo set, artifacts may be visible on the bottom half of +## the visualization. +# +#visualizer_spectrum_smooth_look = yes +# +## A value between 1 and 5 inclusive. Specifying a larger value makes the +## visualizer look at a larger slice of time, which results in less jumpy +## visualizer output. +# +#visualizer_spectrum_dft_size = 2 +# +#visualizer_spectrum_gain = 10 +# +## Left-most frequency of visualizer in Hz, must be less than HZ MAX +# +#visualizer_spectrum_hz_min = 20 +# +## Right-most frequency of visualizer in Hz, must be greater than HZ MIN +# +#visualizer_spectrum_hz_max = 20000 # ##### system encoding ##### ## @@ -182,7 +231,7 @@ ncmpcpp_directory = ~/.ncmpcpp ## Note: colors can be nested. ## # -#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9} +#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3%l$9} # #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} # @@ -220,12 +269,12 @@ ncmpcpp_directory = ~/.ncmpcpp ## Note: Below variables are used for sorting songs in browser. The sort mode ## determines how songs are sorted, and can be used in combination with a sort ## format to specify a custom sorting format. Available values for -## browser_sort_mode are "name", "mtime", "format" and "noop". +## browser_sort_mode are "type", "name", "mtime", "format" and "none". ## # -#browser_sort_mode = name +#browser_sort_mode = type # -#browser_sort_format = {%a - }{%t}|{%f} {(%l)} +#browser_sort_format = {%a - }{%t}|{%f} {%l} # ##### columns settings ##### ## @@ -317,7 +366,7 @@ centered_cursor = yes ## Note: You can specify third character which will be used to build 'empty' ## part of progressbar. ## -# progressbar_look = "▄▄▄" +#progressbar_look = => # ## Available values: database, playlist. ## @@ -335,6 +384,8 @@ user_interface = alternative # #media_library_albums_split_by_date = yes # +#media_library_hide_album_dates = no +# ## Available values: wrapped, normal. ## #default_find_mode = wrapped @@ -345,19 +396,20 @@ user_interface = alternative # #statusbar_visibility = yes # +## Show the "Connected to ..." message on startup +#connected_message_on_startup = yes +# #titles_visibility = yes # #header_text_scrolling = yes # #cyclic_scrolling = no # -#lines_scrolled = 2 +#lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet # -lyrics_fetchers = azlyrics, genius, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg +#follow_now_playing_lyrics = no # -follow_now_playing_lyrics = yes -# -fetch_lyrics_for_current_song_in_background = yes +#fetch_lyrics_for_current_song_in_background = no # #store_lyrics_in_song_dir = no # @@ -444,7 +496,9 @@ fetch_lyrics_for_current_song_in_background = yes # #mouse_support = yes # -#mouse_list_scroll_whole_page = yes +#mouse_list_scroll_whole_page = no +# +#lines_scrolled = 5 # #empty_tag_marker = # diff --git a/.config/pikaur.conf b/.config/pikaur.conf index 121ba2f..708ecbc 100644 --- a/.config/pikaur.conf +++ b/.config/pikaur.conf @@ -9,7 +9,7 @@ ignoreoutofdateaurupgrades = no keepbuilddir = no keepdevbuilddir = no keepbuilddeps = no -skipfailedbuild = yes +skipfailedbuild = no alwaysusedynamicusers = no ignorearch = no diff --git a/.config/variety/scripts/set_wallpaper b/.config/variety/scripts/set_wallpaper index e59c22b..4f137f7 100755 --- a/.config/variety/scripts/set_wallpaper +++ b/.config/variety/scripts/set_wallpaper @@ -105,7 +105,7 @@ if [[ "$DESKTOP" == *"Enlightenment"* ]] || [[ "$DESKTOP" == *"Moksha"* ]]; then # Remove all Variety wallpapers, but the current one and the previous one # as we are calling enlightenment_remote asynchronously, if the previous wallpaper hasn't been # replaced yet then the wallpaper will get set back to the theme one causing ugly artifacts - LAST_WALLPAPER_FILE="/home/breizh/.config/variety/.enlightenment_last_wallpaper.txt" + LAST_WALLPAPER_FILE="$HOME/.config/variety/.enlightenment_last_wallpaper.txt" if [ -e "$LAST_WALLPAPER_FILE" ]; then find "$OUTPUT_DIR" -name "variety_wallpaper*.*" | grep -v "$OFILE.edj" | grep -v "$(cat "$LAST_WALLPAPER_FILE")" | xargs rm @@ -167,6 +167,7 @@ fi # Gnome 3, Unity gsettings set org.gnome.desktop.background picture-uri "file://$WP" 2> /dev/null +gsettings set org.gnome.desktop.background picture-uri-dark "file://$WP" 2> /dev/null if [ "$(gsettings get org.gnome.desktop.background picture-options)" == "'none'" ]; then gsettings set org.gnome.desktop.background picture-options 'zoom' fi @@ -210,7 +211,7 @@ fi # For simple WMs, use either feh or nitrogen # Implementation note: this uses spaces around list items to enforce matching whole words. # This also means that an empty variable won't cause false positives, since it expands to " " -SIMPLE_WMS=("bspwm" "dwm" "herbstluftwm" "i3" "i3-with-shmlog" "jwm" "openbox" "qtile" "qtile-venv" "xmonad") +SIMPLE_WMS=("bspwm" "dwm" "herbstluftwm" "i3" "i3-with-shmlog" "jwm" "LeftWM" "openbox" "qtile" "qtile-venv" "xmonad") if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} " = *" $XDG_SESSION_DESKTOP "* || " ${SIMPLE_WMS[*]} " = *" $DESKTOP_SESSION "* ]]; then if command -v "feh" >/dev/null 2>&1; then @@ -221,8 +222,20 @@ if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} " fi if [[ -n $SWAYSOCK ]]; then - swaymsg output "*" bg "$WP" fit "#2D2D2D" 2> /dev/null - pkill -RTMIN+12 i3blocks + # If swaybg is available, use it as prevents system freeze. + # See https://github.com/swaywm/sway/issues/5606 + if command -v "swaybg" >/dev/null 2>&1; then + # Grey background flicker is prevented by killing old swaybg process after new one. + # See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720 + PID=`pidof swaybg` + swaybg -i "$WP" -m fill & + if [ ! -z "$PID" ]; then + sleep 1 + kill $PID 2>/dev/null + fi + else + swaymsg output "*" bg "$WP" fill 2> /dev/null + fi fi # trinity diff --git a/.config/yt-dlp/config b/.config/yt-dlp/config index 08934f8..c47b24c 100644 --- a/.config/yt-dlp/config +++ b/.config/yt-dlp/config @@ -1,5 +1,6 @@ -o "%(title)s.%(ext)s" --embed-subs +--write-subs --write-auto-subs --sub-lang fr,en -i diff --git a/.local/bin/mpd-notif b/.local/bin/mpd-notif index 4c617d5..862822f 100755 --- a/.local/bin/mpd-notif +++ b/.local/bin/mpd-notif @@ -32,6 +32,7 @@ do --data-urlencode "album=${album}" \ https://pleroma.breizh.pm/api/v1/pleroma/scrobble &>/dev/null & dunstify -r $DUNST_ID "MPD" "$infos" + [[ -f ${XDG_RUNTIME_DIR}/i3blocks/mpdvol ]] && mpc volume "$(<${XDG_RUNTIME_DIR}/i3blocks/mpdvol)" #( pidof cava && sleep 1 && pkill -USR1 cava ) & fi done diff --git a/.local/bin/music-replaygain-solo b/.local/bin/music-replaygain-solo index 8020a5b..7cd6e9d 100755 --- a/.local/bin/music-replaygain-solo +++ b/.local/bin/music-replaygain-solo @@ -24,7 +24,7 @@ do declare -a running running=($(jobs -p)) - if [[ "${#running[@]}" -ge 12 ]] + if [[ "${#running[@]}" -ge 6 ]] then wait -n fi