🦀 no more awesome

This commit is contained in:
Cheri 2020-06-30 09:48:58 +03:00 committed by vibikim
parent a6f9b0bb98
commit 672031f6a9
366 changed files with 0 additions and 12082 deletions

View file

@ -1,37 +0,0 @@
#!/bin/bash
function run {
if ! pgrep $1 ;
then
$@&
fi
}
run "scripts/polybar.sh"
#run "xrandr --output VGA-1 --primary --mode 1360x768 --pos 0x0 --rotate normal"
#run "xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off"
#run "wicd-client -t"
run "copyq"
run "picom"
run "nm-applet"
#run "caffeine"
#run "pamac-tray"
#run "variety"
run "xfce4-power-manager"
#run "blueberry-tray"
run "blueman-applet"
run "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
run "numlockx on"
#run "volumeicon"
run "nitrogen --restore"
#run "conky -c $HOME/.config/awesome/system-overview"
#you can set wallpapers in themes as well
#feh --bg-fill /usr/share/backgrounds/arcolinux/arco-wallpaper.jpg &
#run applications from startup
#run "firefox"
#run "atom"
#run "dropbox"
#run "insync start"
#run "spotify"
#run "ckb-next -b"
#run "discord"
#run "telegram-desktop"

View file

@ -1,185 +0,0 @@
####################################
####### BACK-END ########
####################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
#backend = "glx";
backend = "xrender";
####################################
####### GLX ########
####################################
#glx-no-stencil = true; # Recommended.
# 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";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;
####################################
####### Shadow ########
####################################
shadow = false; # Enabled client-side shadows on windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the
# window. Fix some weirdness with ARGB windows.
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
# shadow-opacity = 0.5; # The translucency for shadows. (default .75)
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
# Exclude conditions for shadows.
shadow-exclude = [
"name = 'Notification'",
"class_g ?= 'Notify-osd'",
"class_g = 'VirtualBox'",
"class_g = 'Conky'",
"_GTK_FRAME_EXTENTS@:c",
"class_g = 'Cairo-clock'",
"class_g = 'i3-frame'",
"window_type *= 'normal' && ! name ~= ''"
];
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
# (see also: --detect-rounded-corners)
####################################
####### Opacity ########
####################################
#menu-opacity = 0.9; # The opacity for menus. (default 1.0)
#inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0)
# active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
# frame-opacity = 0.9; # Opacity of window titlebars and borders. (0.1 - 1.0)
# inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
# value of _NET_WM_OPACITY. Bad choice.
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
# it may result in less X resource usage,
# Yet fading may look bad.
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
# inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
# blur-background = true; # Blur background of transparent windows.
# Bad performance with X Render backend.
# GLX backend is an alternative.
# blur-background-frame = true; # Blur background of opaque windows with transparent
# frames as well.
blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.
#blur-kern = "3x3box";
# 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";
# Exclude conditions for background blur.
# find the names with xwininfo
blur-background-exclude = [
"window_type = 'dock'",
"class_g = 'Peek'",
"window_type = 'desktop'",
"window_type = 'tooltip'",
"_GTK_FRAME_EXTENTS@:c"
];
opacity-rule = [ "80:class_g = 'XTerm'" ];
#opacity-rule = [ "80:class_g = 'UXTerm'" ];
#opacity-rule = [ "99:class_g = 'VirtualBox'" ];
####################################
####### Fading ########
####################################
#fading = true; # Fade windows during opacity changes.
# fade-delta = 10; # The time between steps in a fade in milliseconds. (default 10).
#fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
#fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
# no-fading-destroyed-argb = true;
focus-exclude = [
"class_g = 'Cairo-clock'",
"name *?= 'Steam'",
"class_g *?= 'Steam'",
"class_g *?= 'Virtualbox'"
];
####################################
####### Other ########
####################################
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
use-ewmh-active-win = false; # 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.
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on.
detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
# managers not passing _NET_WM_OPACITY of client windows to frame
# windows.
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
vsync = "none"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
# See man page for more details.
dbe = false; # Enable DBE painting mode. Rarely needed.
paint-on-overlay = false; # Painting on X Composite overlay window. Recommended.
sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
# Incompatible with certain VSync methods.
unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
# detected, to maximize performance for full-screen windows.
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
# the same group focused at the same time.
detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
# resize-damage = 1;
####################################
###### Window type settings ########
####################################
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; };
# fade: Fade the particular type of windows.
# shadow: Give those windows shadow
# opacity: Default opacity for the type of windows.
# focus: Whether to always consider windows of this type focused.
};

View file

@ -1,153 +0,0 @@
# Shadow
shadow = false;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
log-level = "warn";
#change your username here
#log-file = "/home/erik/.config/compton.log";
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'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g ?= 'Cairo-dock'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"n:w:*VirtualBox*",
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Opacity
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
# 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;
blur-kern = "3x3box";
# 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";
# Do not let blur radius adjust based on window opacity.
# blur-background-fixed = true;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
# If you have issues with transparency with these terminals
# maybe next lines will help
#opacity-rule = [ "80:class_g = 'URxvt'" ];
#opacity-rule = [ "80:class_g = 'termite'" ];
# Fading
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 30).
fade-delta = 5;
# Opacity change between steps while fading in. (default 0.03).
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;
# no-fading-destroyed-argb = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
# Other
#backend = "glx";
backend = "xrender";
# 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 doesnt 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 = "none";
# 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;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# 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;
invert-color-include = [ ];
# resize-damage = 1;
# GLX backend
# glx-no-stencil = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.9; }
dropdown_menu = { opacity = 0.9; }
};

View file

@ -1,153 +0,0 @@
# Shadow
shadow = false;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
log-level = "warn";
#change your username here
#log-file = "/home/erik/.config/compton.log";
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'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g ?= 'Cairo-dock'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"name = 'Plank'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'xfce4-notifyd'",
"name *= 'VLC'",
"name *= 'compton'",
"name *= 'Chromium'",
"name *= 'Chrome'",
"n:w:*VirtualBox*",
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Opacity
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
# 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;
blur-kern = "3x3box";
# 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";
# Do not let blur radius adjust based on window opacity.
# blur-background-fixed = true;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
# If you have issues with transparency with these terminals
# maybe next lines will help
#opacity-rule = [ "80:class_g = 'URxvt'" ];
#opacity-rule = [ "80:class_g = 'termite'" ];
# Fading
# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 30).
fade-delta = 5;
# Opacity change between steps while fading in. (default 0.03).
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;
# no-fading-destroyed-argb = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
# Other
#backend = "glx";
backend = "xrender";
# 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 doesnt 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 = "none";
# 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;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# 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;
invert-color-include = [ ];
# resize-damage = 1;
# GLX backend
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
# glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.9; }
dropdown_menu = { opacity = 0.9; }
};

View file

@ -1,226 +0,0 @@
# 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 = 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 = '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 = 1;
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 = 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;
# 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 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.
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/compton/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;

View file

@ -1,228 +0,0 @@
# 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";
#backend = "xrender"
#################################
#
# 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;
log-level = "warn";
#change your username here
#log-file = "/home/erik/.config/compton.log";
# 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 = 'Firefox' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g = 'Cairo-clock'",
"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 = 1;
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 = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = false;
# 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;
# Vertical synchronization: match the refresh rate of the monitor
# this breaks transparency in virtualbox - put a "#" before next line to fix that
vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# 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.
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 = true; shadow = true; opacity = 0.9; focus = true;};
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.9; }
dropdown_menu = { opacity = 0.9; }
};
######################
#
# XSync
# See: https://github.com/yshui/compton/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;

View file

@ -1,89 +0,0 @@
# 2018 12 21
# https://github.com/yshui/compton/blob/next/compton.sample.conf
#
# Shadow
shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
log-level = "warn";
# log-file = "/path/to/your/log/file";
# shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Opacity
inactive-opacity = 0.8;
# active-opacity = 0.8;
frame-opacity = 0.7;
inactive-opacity-override = false;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box";
# 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";
# blur-background-fixed = true;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
# opacity-rule = [ "80:class_g = 'URxvt'" ];
# Fading
fading = true;
# fade-delta = 30;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];
# Other
backend = "xrender";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
# use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
# resize-damage = 1;
# GLX backend
# glx-no-stencil = true;
# glx-no-rebind-pixmap = true;
glx-swap-method = "undefined";
# glx-use-gpushader4 = true;
# xrender-sync = true;
# xrender-sync-fence = true;
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};

View file

@ -1,254 +0,0 @@
--[[
Awesome-Freedesktop
Freedesktop.org compliant desktop entries and menu
Desktop section
Licensed under GNU General Public License v2
* (c) 2016, Luke Bonham
* (c) 2009-2015, Antonio Terceiro
--]]
local awful = require("awful")
local theme = require("beautiful")
local utils = require("menubar.utils")
local wibox = require("wibox")
local capi = capi
local io = io
local ipairs = ipairs
local mouse = mouse
local os = os
local string = string
local table = table
-- Desktop icons
-- freedesktop.desktop
local desktop = {
-- Default desktop basic icons
baseicons = {
[1] = {
label = "This PC",
icon = "computer",
onclick = "computer://"
},
[2] = {
label = "Home",
icon = "user-home",
onclick = os.getenv("HOME")
},
[3] = {
label = "Trash",
icon = "user-trash",
onclick = "trash://"
}
},
-- Default parameters
iconsize = { width = 48, height = 48 },
labelsize = { width = 140, height = 20 },
margin = { x = 20, y = 20 },
}
-- MIME types list
local mime_types = {}
-- Icons positioning
local desktop_current_pos = {}
-- @return iterator on input pipe
local function pipelines(...)
local f = assert(io.popen(...))
return function ()
local data = f:read()
if data == nil then f:close() end
return data
end
end
-- Adds an icon to desktop
-- @param args settings from desktop.add_icons
-- @param label icon string label
-- @param icon icon string file path
-- @param onclick function to execute on click
function desktop.add_single_icon(args, label, icon, onclick)
local s = args.screen
-- define icon dimensions and position
if not desktop_current_pos[s] then
desktop_current_pos[s] = { x = (capi.screen[s].geometry.x + args.iconsize.width + args.margin.x), y = 40 }
end
local totheight = (icon and args.iconsize.height or 0) + (label and args.labelsize.height or 0)
if totheight == 0 then return end
if desktop_current_pos[s].y + totheight > capi.screen[s].geometry.height - 40 then
desktop_current_pos[s].x = desktop_current_pos[s].x + args.labelsize.width + args.iconsize.width + args.margin.x
desktop_current_pos[s].y = 40
end
local common = { screen = s, bg = "#00000000", visible = true, type = "desktop" }
-- create icon container
if icon then
common.width = args.iconsize.width
common.height = args.iconsize.height
common.x = desktop_current_pos[s].x
common.y = desktop_current_pos[s].y
icon = wibox.widget {
image = icon,
resize = false,
widget = wibox.widget.imagebox
}
icon:buttons(awful.button({ }, 1, nil, onclick))
icon_container = wibox(common)
icon_container:set_widget(icon)
desktop_current_pos[s].y = desktop_current_pos[s].y + args.iconsize.height + 5
end
-- create label container
if label then
common.width = args.labelsize.width
common.height = args.labelsize.height
common.x = desktop_current_pos[s].x - (args.labelsize.width/2) + args.iconsize.width/2
common.y = desktop_current_pos[s].y
caption = wibox.widget {
text = label,
align = "center",
forced_width = common.width,
forced_height = common.height,
ellipsize = "middle",
widget = wibox.widget.textbox
}
caption:buttons(awful.button({ }, 1, onclick))
caption_container = wibox(common)
caption_container:set_widget(caption)
end
desktop_current_pos[s].y = desktop_current_pos[s].y + args.labelsize.height + args.margin.y
end
-- Adds base icons (This PC, Trash, etc) to desktop
-- @param args settings from desktop.add_icons
function desktop.add_base_icons(args)
for _,base in ipairs(args.baseicons) do
desktop.add_single_icon(args, base.label, utils.lookup_icon(base.icon), function()
awful.spawn(string.format("%s '%s'", args.open_with, base.onclick))
end)
end
end
-- Looks up a suitable icon for filename
-- @param filename string file name
-- @return icon file path (string)
function desktop.lookup_file_icon(filename)
-- load system MIME types
if #mime_types == 0 then
for line in io.lines("/etc/mime.types") do
if not line:find("^#") then
local parsed = {}
for w in line:gmatch("[^%s]+") do
table.insert(parsed, w)
end
if #parsed > 1 then
for i = 2, #parsed do
mime_types[parsed[i]] = parsed[1]:gsub("/", "-")
end
end
end
end
end
-- try to search a possible icon among standards
local extension = filename:match("%a+$")
local mime = mime_types[extension] or ""
local mime_family = mime:match("^%a+") or ""
local possible_filenames = {
mime, "gnome-mime-" .. mime,
mime_family, "gnome-mime-" .. mime_family,
extension
}
for i, filename in ipairs(possible_filenames) do
local icon = utils.lookup_icon(filename)
if icon then return icon end
end
-- if we don"t find ad icon, then pretend is a plain text file
return utils.lookup_icon("text-x-generic")
end
-- Parse subdirectories and files list from input directory
-- @input dir directory to parse (string)
-- @return files table with found entries
function desktop.parse_dirs_and_files(dir)
local files = {}
local paths = pipelines('find '..dir..' -maxdepth 1 -type d | tail -1')
for path in paths do
if path:match("[^/]+$") then
local file = {}
file.filename = path:match("[^/]+$")
file.path = path
file.show = true
file.icon = utils.lookup_icon("folder")
table.insert(files, file)
end
end
local paths = pipelines('find '..dir..' -maxdepth 1 -type f')
for path in paths do
if not path:find("%.desktop$") then
local file = {}
file.filename = path:match("[^/]+$")
file.path = path
file.show = true
file.icon = desktop.lookup_file_icon(file.filename)
table.insert(files, file)
end
end
return files
end
-- Adds subdirectories and files icons from args.dir
-- @param args settings from desktop.add_icons
function desktop.add_dirs_and_files_icons(args)
for _, file in ipairs(desktop.parse_dirs_and_files(args.dir)) do
if file.show then
local label = args.showlabels and file.filename or nil
local onclick = function () awful.spawn(string.format("%s '%s'", args.open_with, file.path)) end
desktop.add_single_icon(args, label, file.icon, onclick)
end
end
end
-- Main function, adds base, directory and files icons
-- @param args user defined settings, with fallback on defaults
function desktop.add_icons(args)
args = args or {}
args.screen = args.screen or mouse.screen
args.dir = args.dir or os.getenv("HOME") .. "/Desktop"
args.showlabels = args.showlabel or true
args.open_with = args.open_with or "xdg_open"
args.baseicons = args.baseicons or desktop.baseicons
args.iconsize = args.iconsize or desktop.iconsize
args.labelsize = args.labelsize or desktop.labelsize
args.margin = args.margin or desktop.margin
-- trying to fallback on Adwaita if theme.icon_theme is not defined
-- if Adwaita is missing too, no icons will be shown
if not theme.icon_theme then
theme.icon_theme = args.icon_theme or "Adwaita"
end
desktop.add_base_icons(args)
desktop.add_dirs_and_files_icons(args)
end
return desktop

View file

@ -1,15 +0,0 @@
--[[
Awesome-Freedesktop
Freedesktop.org compliant desktop entries and menu
Licensed under GNU General Public License v2
* (c) 2016, Luke Bonham
* (c) 2009-2015, Antonio Terceiro
--]]
return {
desktop = require("freedesktop.desktop"),
menu = require("freedesktop.menu")
}

View file

@ -1,133 +0,0 @@
--[[
Awesome-Freedesktop
Freedesktop.org compliant desktop entries and menu
Menu section
Licensed under GNU General Public License v2
* (c) 2016, Luke Bonham
* (c) 2014, Harvey Mittens
--]]
local awful_menu = require("awful.menu")
local menu_gen = require("menubar.menu_gen")
local menu_utils = require("menubar.utils")
--local icon_theme = require("menubar.icon_theme")
local io, pairs, string, table, os = io, pairs, string, table, os
-- Add support for NixOS systems too
table.insert(menu_gen.all_menu_dirs, string.format("%s/.nix-profile/share/applications", os.getenv("HOME")))
-- Expecting a wm_name of awesome omits too many applications and tools
menu_utils.wm_name = ""
-- Menu
-- freedesktop.menu
local menu = {}
-- Determines if a path points to a directory, by checking if it can be read
-- (which is `nil` also for empty files) and if its size is not 0.
-- @author blueyed
-- @param path the path to check
function menu.is_dir(path)
local f = io.open(path)
return f and not f:read(0) and f:seek("end") ~= 0 and f:close()
end
-- Remove non existent paths in order to avoid issues
local existent_paths = {}
for k,v in pairs(menu_gen.all_menu_dirs) do
if menu.is_dir(v) then
table.insert(existent_paths, v)
end
end
menu_gen.all_menu_dirs = existent_paths
-- Determines whether an table includes a certain element
-- @param tab a given table
-- @param val the element to search for
-- @return true if the given string is found within the search table; otherwise, false if not
function menu.has_value (tab, val)
for index, value in pairs(tab) do
if val:find(value) then
return true
end
end
return false
end
-- Use MenuBar parsing utils to build a menu for Awesome
-- @return awful.menu
function menu.build(args)
local args = args or {}
-- local icon_size = args.icon_size
local before = args.before or {}
local after = args.after or {}
local skip_items = args.skip_items or {}
local sub_menu = args.sub_menu or false
local result = {}
local _menu = awful_menu({ items = before })
menu_gen.generate(function(entries)
-- Add category icons
for k in pairs(menu_gen.all_categories) do
table.insert(result, { k, {}, })
end
-- Get items table
for k, v in pairs(entries) do
for _, cat in pairs(result) do
if cat[1] == v.category then
if not menu.has_value(skip_items, v.name) then
table.insert(cat[2], { v.name, v.cmdline })
end
break
end
end
end
-- Cleanup things a bit
for i = #result, 1, -1 do
local v = result[i]
if #v[2] == 0 then
-- Remove unused categories
table.remove(result, i)
else
--Sort entries alphabetically (by name)
table.sort(v[2], function (a, b) return string.byte(a[1]) < string.byte(b[1]) end)
-- Replace category name with nice name
v[1] = menu_gen.all_categories[v[1]].name
end
end
-- Sort categories alphabetically also
table.sort(result, function(a, b) return string.byte(a[1]) < string.byte(b[1]) end)
-- Add menu item to hold the generated menu
if sub_menu then
result = {{sub_menu, result}}
end
-- Add items to menu
for _, v in pairs(result) do _menu:add(v) end
for _, v in pairs(after) do _menu:add(v) end
end)
-- Set icon size
--[[ if icon_size then
for _,v in pairs(menu_gen.all_categories) do
v.icon = icon_theme():find_icon_path(v.icon_name, icon_size)
end
end
--]]
-- Hold the menu in the module
menu.menu = _menu
return _menu
end
return menu

View file

@ -1,204 +0,0 @@
--[[
Licensed under GNU General Public License v2
* (c) 2013, Luca CPZ
--]]
local spawn = require("awful.spawn")
local timer = require("gears.timer")
local debug = require("debug")
local io = { lines = io.lines,
open = io.open }
local pairs = pairs
local rawget = rawget
local table = { sort = table.sort, unpack = table.unpack }
local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility
-- Lain helper functions for internal use
-- lain.helpers
local helpers = {}
helpers.lain_dir = debug.getinfo(1, 'S').source:match[[^@(.*/).*$]]
helpers.icons_dir = helpers.lain_dir .. 'icons/'
helpers.scripts_dir = helpers.lain_dir .. 'scripts/'
-- {{{ Modules loader
function helpers.wrequire(table, key)
local module = rawget(table, key)
return module or require(table._NAME .. '.' .. key)
end
-- }}}
-- {{{ File operations
-- check if the file exists and is readable
function helpers.file_exists(path)
local file = io.open(path, "rb")
if file then file:close() end
return file ~= nil
end
-- get a table with all lines from a file
function helpers.lines_from(path)
local lines = {}
for line in io.lines(path) do
lines[#lines + 1] = line
end
return lines
end
-- get a table with all lines from a file matching regexp
function helpers.lines_match(regexp, path)
local lines = {}
for line in io.lines(path) do
if string.match(line, regexp) then
lines[#lines + 1] = line
end
end
return lines
end
-- get first line of a file
function helpers.first_line(path)
local file, first = io.open(path, "rb"), nil
if file then
first = file:read("*l")
file:close()
end
return first
end
-- get first non empty line from a file
function helpers.first_nonempty_line(path)
for line in io.lines(path) do
if #line then return line end
end
return nil
end
-- }}}
-- {{{ Timer maker
helpers.timer_table = {}
function helpers.newtimer(name, timeout, fun, nostart, stoppable)
if not name or #name == 0 then return end
name = (stoppable and name) or timeout
if not helpers.timer_table[name] then
helpers.timer_table[name] = timer({ timeout = timeout })
helpers.timer_table[name]:start()
end
helpers.timer_table[name]:connect_signal("timeout", fun)
if not nostart then
helpers.timer_table[name]:emit_signal("timeout")
end
return stoppable and helpers.timer_table[name]
end
-- }}}
-- {{{ Pipe operations
-- run a command and execute a function on its output (asynchronous pipe)
-- @param cmd the input command
-- @param callback function to execute on cmd output
-- @return cmd PID
function helpers.async(cmd, callback)
return spawn.easy_async(cmd,
function (stdout, stderr, reason, exit_code)
callback(stdout, exit_code)
end)
end
-- like above, but call spawn.easy_async with a shell
function helpers.async_with_shell(cmd, callback)
return spawn.easy_async_with_shell(cmd,
function (stdout, stderr, reason, exit_code)
callback(stdout, exit_code)
end)
end
-- run a command and execute a function on its output line by line
function helpers.line_callback(cmd, callback)
return spawn.with_line_callback(cmd, {
stdout = function (line)
callback(line)
end,
})
end
-- }}}
-- {{{ A map utility
helpers.map_table = {}
function helpers.set_map(element, value)
helpers.map_table[element] = value
end
function helpers.get_map(element)
return helpers.map_table[element]
end
-- }}}
-- {{{ Misc
-- check if an element exist on a table
function helpers.element_in_table(element, tbl)
for _, i in pairs(tbl) do
if i == element then
return true
end
end
return false
end
-- iterate over table of records sorted by keys
function helpers.spairs(t)
-- collect the keys
local keys = {}
for k in pairs(t) do keys[#keys+1] = k end
table.sort(keys)
-- return the iterator function
local i = 0
return function()
i = i + 1
if keys[i] then
return keys[i], t[keys[i]]
end
end
end
-- create the partition of singletons of a given set
-- example: the trivial partition set of {a, b, c}, is {{a}, {b}, {c}}
function helpers.trivial_partition_set(set)
local ss = {}
for _,e in pairs(set) do
ss[#ss+1] = {e}
end
return ss
end
-- create the powerset of a given set
function helpers.powerset(s)
if not s then return {} end
local t = {{}}
for i = 1, #s do
for j = 1, #t do
t[#t+1] = {s[i],unpack(t[j])}
end
end
return t
end
-- }}}
return helpers

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,000 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Some files were not shown because too many files have changed in this diff Show more