You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello there, Im new to Void linux (from fedora linux) and would really appreciate your help in getting my scripts working properly in Void. the main one being this script that toggles all colors on the screen to grayscale. Currently using qtile so this is in my autostart.sh file:
# compositor
picom --config ~/.config/picom/picom-grayscale.conf -b &
that is supposed to start the window manager in grayscale mode by default, but it doesnt. then I should be able to toggle between the two different modes by pressing Tux+G as it is a keybind in qtile:
Currenlty, hitting the keybind only displays a notification from dunst, nothing occurs in terms of color changes, the default colors are preserved. the keybind is supposed to run this script for toggling colors:
#!/usr/bin/env bash# strict mode
CONFIG_PATH="$HOME/.config/picom/picom.conf"
GRAY_CONFIG_PATH="$HOME/.config/picom/picom-grayscale.conf"# Identify the active monitor
MONITOR=$(xrandr | grep " connected"| cut -d'' -f1 | head -n 1)# clean up stuck gamma/brightnessreset_colors() {
xrandr --output "$MONITOR" --gamma 1:1:1 --brightness 1
}
if pgrep -a picom | grep -q "picom-grayscale.conf";then# EXITING GRAYSCALE: Turn Redshift back on
killall picom
# Wait until the old picom process is completely deadwhile pgrep -x picom >/dev/null;do sleep 0.05;done
reset_colors
dunstify -a picom -t 3000 -u low "let there be colours :)"
picom --config ${CONFIG_PATH} -b &else# ENTERING GRAYSCALE: Kill Redshift to prevent color conflicts
killall picom
# Wait until the old picom process is completely deadwhile pgrep -x picom >/dev/null;do sleep 0.05;done
reset_colors
dunstify -a picom -t 3000 -u low "turning on grayscale"
picom --config ${GRAY_CONFIG_PATH} -b &fi
which inturn uses the following picom configuration to set the grayscale:
#################################
# Shadows #
#################################
# Default: false
shadow = true;
shadow-radius = 7;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g ?= 'Notify-osd'",
];
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used. Can be set per-window using rules.
#
# Default: false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 3;
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
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;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_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;
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
opacity-rule = [
# NOTE: handle this in-app! works better with inbuilt progs
# neovim, tmux e.t.c
"100:class_g = 'helium' && focused",
"100:class_g = 'helium' && !focused",
"100:class_g = 'teams-for-linux' && focused",
"100:class_g = 'teams-for-linux' && !focused",
"100:class_g = 'thunar' && focused",
"100:class_g = 'thunar' && !focused",
];
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 20;
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"! name~=''", # excluding windows with no name such as Qtile bar
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see BLUR section in the man page for more information.
blur-method = "dual_kawase";
blur-strength = 4;
# blur-size = 12
# 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";
# Can also be a pre-defined kernel, see the man page.
#
# Default: ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
];
#################################
# General Settings #
#################################
# Specify the backend to use: `xrender`, `glx`, or `egl`.
#
# Default: "xrender"
backend = "glx";
# Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL.
dithered-present = false;
# Enable/disable VSync.
# vsync = false
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.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
#
# detect-transient = false
detect-transient = true;
# Disable the use of damage information.
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# 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
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
window-shader-fg = "/home/daagi/.config/picom/grayscale.glsl"
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.95; }
dropdown_menu = { opacity = 0.95; }
};
and the glsl shader settings are in the below file:
I realised that Void does not have the 'killall command by default, and so I have added that by installing the psmisc utility that contains killall. Apart from that I cannot see any other fault in the config that would make the script notwork. I can also see that picom is running as a process using the grayscale config, but the colors are not being changed:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
hello there, Im new to Void linux (from fedora linux) and would really appreciate your help in getting my scripts working properly in Void. the main one being this script that toggles all colors on the screen to grayscale. Currently using qtile so this is in my
autostart.shfile:that is supposed to start the window manager in grayscale mode by default, but it doesnt. then I should be able to toggle between the two different modes by pressing
Tux+Gas it is a keybind in qtile:Currenlty, hitting the keybind only displays a notification from dunst, nothing occurs in terms of color changes, the default colors are preserved. the keybind is supposed to run this script for toggling colors:
which inturn uses the following picom configuration to set the grayscale:
and the glsl shader settings are in the below file:
I realised that Void does not have the '
killallcommand by default, and so I have added that by installing thepsmiscutility that contains killall. Apart from that I cannot see any other fault in the config that would make the script notwork. I can also see that picom is running as a process using the grayscale config, but the colors are not being changed:Could Void linux have something that prevents the colors from switiching?
Beta Was this translation helpful? Give feedback.
All reactions