diff --git a/dunst/dunstrc b/dunst/dunstrc new file mode 100644 index 0000000..4bc905a --- /dev/null +++ b/dunst/dunstrc @@ -0,0 +1,458 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = keyboard + + ### Geometry ### + + # dynamic width from 0 to 300 + # width = (0, 300) + # constant width of 300 + width = 300 + + # The maximum height of a single notification, excluding the frame. + height = (0,300) + + # Position the notification in the top right corner + origin = top-center + + # Offset from the origin + offset = 0x35 + # offset = 0x0 + + # Scale factor. It is auto-detected if value is 0. + scale = 0 + + # Maximum number of notification (0 means no limit) + notification_limit = 20 + + ### Progress bar ### + + # Turn on the progess bar. It appears when a progress hint is passed with + # for example dunstify -h int:value:12 + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + # Corner radius for the progress bar. 0 disables rounded corners. + progress_bar_corner_radius = 10 + + # Corner radius for the icon image. + icon_corner_radius = 0 + + # Show how many messages are currently hidden (because of + # notification_limit). + indicate_hidden = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). (X11 only) + transparency = 30 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + # If gap_size is greater than 0, this setting will be ignored. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 0 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#ffffff" + + # Size of gap to display between notifications - requires a compositor. + # If value is greater than 0, separator_height will be ignored and a border + # of size frame_width will be drawn around each notification instead. + # Click events on gaps do not currently propagate to applications below. + gap_size = 0 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + # idle_threshold = 120 + + ### Text ### + + font = "FiraCode Nerd Font" 11 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 3 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Recursive icon lookup. You can set a single theme, instead of having to + # define all lookup paths. + enable_recursive_icon_lookup = true + + # Set icon theme (only used for recursive icon lookup) + icon_theme = Adwaita + # You can also set multiple icon themes, with the leftmost one being used first. + # icon_theme = "Adwaita, breeze" + + # Align icons left/right/top/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 32 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 128 + + # Paths to default icons (only neccesary when not using recursive icon lookup) + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 10 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#00000070" + foreground = "#ffffff" + timeout = 6 + # Icon for notifications with low urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_normal] + background = "#00000070" + foreground = "#ffffff" + timeout = 6 + # Icon for notifications with normal urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_critical] + background = "#90000070" + foreground = "#ffffff" + frame_color = "#ffffff" + timeout = 6 + # Icon for notifications with critical urgency, uncomment to enable + #default_icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# set_category +# timeout +# urgency +# icon_position +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# hide_text +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# skip_display = true + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/picom/picom.conf b/picom/picom.conf new file mode 100644 index 0000000..1dc41bb --- /dev/null +++ b/picom/picom.conf @@ -0,0 +1,441 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +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; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +# shadow-color = "#000000" + +# 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 = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", +]; + +# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. +# clip-shadow-above = [] + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular monitor to that monitor. This is +# currently implemented using the X RandR extension. +# crop-shadow-to-monitor = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 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 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +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.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +opacity-rule = [ +#"80:class_g = 'kitty'" +]; + + +################################# +# 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 = 15; + +rounded-borders=15; + + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ +# "window_type = 'dock'", + "window_type = 'desktop'", + "QTILE_INTERNAL:32c = 1", +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = "dual_kawase"; +# blur-size = 3; + +# +# blur-deviation = true +# +# blur-strength = 6 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# 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"; +# +# blur-kern = "" +#blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +#blur-background-exclude = [ + # "window_type = 'dock'", + #"window_type = 'desktop'", + #"_GTK_FRAME_EXTENTS@:c" +#]; + +################################# +# General Settings # +################################# + +# Enable remote control via D-Bus. See the man page for more details. +# dbus = true + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx"; +# backend = "xrender"; +backend = "egl"; + +# 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; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# 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 + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. This usually means windows from the same application +# will be considered focused or unfocused at the same time. +# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. +# +# detect-client-leader = false + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# 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, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# 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 = "default" + +# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar +# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg. +# +# window-shader-fg-rule = [ +# "my_shader.frag:window_type != 'dock'" +# ] + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Specify a list of conditions of windows that should never have transparent +# clipping applied. Useful for screenshot tools, where you need to be able to +# see through transparent parts of the window. +# +# transparent-clipping-exclude = [] + +# 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"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls whether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; diff --git a/qtile/__pycache__/config.cpython-311.pyc b/qtile/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000..f52afab Binary files /dev/null and b/qtile/__pycache__/config.cpython-311.pyc differ diff --git a/qtile/__pycache__/config.cpython-312.pyc b/qtile/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000..81e6e7e Binary files /dev/null and b/qtile/__pycache__/config.cpython-312.pyc differ diff --git a/qtile/__pycache__/config.cpython-314.pyc b/qtile/__pycache__/config.cpython-314.pyc new file mode 100644 index 0000000..97b5b43 Binary files /dev/null and b/qtile/__pycache__/config.cpython-314.pyc differ diff --git a/qtile/config.py b/qtile/config.py new file mode 100644 index 0000000..8960905 --- /dev/null +++ b/qtile/config.py @@ -0,0 +1,46 @@ +import os + +from modules.get_theme import colors +from modules.groups import groups +from modules.hooks import * +from modules.keys import keys, mod +from modules.layouts import layouts, floating_layout +from modules.screens import screens +from modules.scratchpads import * + +from libqtile import qtile +from libqtile.config import Click, Drag +from libqtile.lazy import lazy + +from libqtile.backend.wayland import InputConfig + +# Set xdg variables in Wayland to enable screensharing +if qtile.core.name == "wayland": + os.environ["XDG_SESSION_DESKTOP"] = "qtile:wlroots" + os.environ["XDG_CURRENT_DESKTOP"] = "qtile:wlroots" + +dgroups_key_binder = None +dgroups_app_rules = [] # type: list +follow_mouse_focus = True +bring_front_click = False +floats_kept_above = True +cursor_warp = False +auto_fullscreen = True +focus_on_window_activation = "smart" +reconfigure_screens = True + +# If things like steam games want to auto-minimize themselves when losing +# focus, should we respect this or not?from libqtile.backend.wayland import InputConfig +auto_minimize = True + +# When using the Wayland backend, this can be used to configure input devices. +wl_input_rules = { + "type:touchpad": InputConfig(tap=True, natural_scroll=True, dwt=True), +} + +# Cursor theme +wl_xcursor_theme = "Bibata-Modern-Classic" +wl_xcursor_size = 24 + +# Name of the window manager +wmname = "qtile" diff --git a/qtile/modules/__pycache__/get_theme.cpython-311.pyc b/qtile/modules/__pycache__/get_theme.cpython-311.pyc new file mode 100644 index 0000000..4ba3004 Binary files /dev/null and b/qtile/modules/__pycache__/get_theme.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/get_theme.cpython-312.pyc b/qtile/modules/__pycache__/get_theme.cpython-312.pyc new file mode 100644 index 0000000..eaded85 Binary files /dev/null and b/qtile/modules/__pycache__/get_theme.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/get_theme.cpython-314.pyc b/qtile/modules/__pycache__/get_theme.cpython-314.pyc new file mode 100644 index 0000000..b5bfcbe Binary files /dev/null and b/qtile/modules/__pycache__/get_theme.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/groups.cpython-311.pyc b/qtile/modules/__pycache__/groups.cpython-311.pyc new file mode 100644 index 0000000..fca7459 Binary files /dev/null and b/qtile/modules/__pycache__/groups.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/groups.cpython-312.pyc b/qtile/modules/__pycache__/groups.cpython-312.pyc new file mode 100644 index 0000000..189b0bd Binary files /dev/null and b/qtile/modules/__pycache__/groups.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/groups.cpython-314.pyc b/qtile/modules/__pycache__/groups.cpython-314.pyc new file mode 100644 index 0000000..7366883 Binary files /dev/null and b/qtile/modules/__pycache__/groups.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/hooks.cpython-311.pyc b/qtile/modules/__pycache__/hooks.cpython-311.pyc new file mode 100644 index 0000000..7326102 Binary files /dev/null and b/qtile/modules/__pycache__/hooks.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/hooks.cpython-312.pyc b/qtile/modules/__pycache__/hooks.cpython-312.pyc new file mode 100644 index 0000000..d9501b2 Binary files /dev/null and b/qtile/modules/__pycache__/hooks.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/hooks.cpython-314.pyc b/qtile/modules/__pycache__/hooks.cpython-314.pyc new file mode 100644 index 0000000..d0f8240 Binary files /dev/null and b/qtile/modules/__pycache__/hooks.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/keys.cpython-311.pyc b/qtile/modules/__pycache__/keys.cpython-311.pyc new file mode 100644 index 0000000..2296d4f Binary files /dev/null and b/qtile/modules/__pycache__/keys.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/keys.cpython-312.pyc b/qtile/modules/__pycache__/keys.cpython-312.pyc new file mode 100644 index 0000000..5d52c52 Binary files /dev/null and b/qtile/modules/__pycache__/keys.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/keys.cpython-314.pyc b/qtile/modules/__pycache__/keys.cpython-314.pyc new file mode 100644 index 0000000..5cee8b6 Binary files /dev/null and b/qtile/modules/__pycache__/keys.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/layouts.cpython-311.pyc b/qtile/modules/__pycache__/layouts.cpython-311.pyc new file mode 100644 index 0000000..f789a10 Binary files /dev/null and b/qtile/modules/__pycache__/layouts.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/layouts.cpython-312.pyc b/qtile/modules/__pycache__/layouts.cpython-312.pyc new file mode 100644 index 0000000..d020a84 Binary files /dev/null and b/qtile/modules/__pycache__/layouts.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/layouts.cpython-314.pyc b/qtile/modules/__pycache__/layouts.cpython-314.pyc new file mode 100644 index 0000000..6d4df02 Binary files /dev/null and b/qtile/modules/__pycache__/layouts.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/scratchpads.cpython-311.pyc b/qtile/modules/__pycache__/scratchpads.cpython-311.pyc new file mode 100644 index 0000000..9f29769 Binary files /dev/null and b/qtile/modules/__pycache__/scratchpads.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/scratchpads.cpython-312.pyc b/qtile/modules/__pycache__/scratchpads.cpython-312.pyc new file mode 100644 index 0000000..7209d68 Binary files /dev/null and b/qtile/modules/__pycache__/scratchpads.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/scratchpads.cpython-314.pyc b/qtile/modules/__pycache__/scratchpads.cpython-314.pyc new file mode 100644 index 0000000..5d31017 Binary files /dev/null and b/qtile/modules/__pycache__/scratchpads.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/screens.cpython-311.pyc b/qtile/modules/__pycache__/screens.cpython-311.pyc new file mode 100644 index 0000000..005c75d Binary files /dev/null and b/qtile/modules/__pycache__/screens.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/screens.cpython-312.pyc b/qtile/modules/__pycache__/screens.cpython-312.pyc new file mode 100644 index 0000000..3206e48 Binary files /dev/null and b/qtile/modules/__pycache__/screens.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/screens.cpython-314.pyc b/qtile/modules/__pycache__/screens.cpython-314.pyc new file mode 100644 index 0000000..fbc2ec1 Binary files /dev/null and b/qtile/modules/__pycache__/screens.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/wayland_widgets.cpython-311.pyc b/qtile/modules/__pycache__/wayland_widgets.cpython-311.pyc new file mode 100644 index 0000000..6cc0255 Binary files /dev/null and b/qtile/modules/__pycache__/wayland_widgets.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/widget_defaults.cpython-311.pyc b/qtile/modules/__pycache__/widget_defaults.cpython-311.pyc new file mode 100644 index 0000000..746b7c2 Binary files /dev/null and b/qtile/modules/__pycache__/widget_defaults.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/widget_defaults.cpython-312.pyc b/qtile/modules/__pycache__/widget_defaults.cpython-312.pyc new file mode 100644 index 0000000..2f86604 Binary files /dev/null and b/qtile/modules/__pycache__/widget_defaults.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/widget_defaults.cpython-314.pyc b/qtile/modules/__pycache__/widget_defaults.cpython-314.pyc new file mode 100644 index 0000000..0c75941 Binary files /dev/null and b/qtile/modules/__pycache__/widget_defaults.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/widgets.cpython-311.pyc b/qtile/modules/__pycache__/widgets.cpython-311.pyc new file mode 100644 index 0000000..98f114b Binary files /dev/null and b/qtile/modules/__pycache__/widgets.cpython-311.pyc differ diff --git a/qtile/modules/__pycache__/widgets.cpython-312.pyc b/qtile/modules/__pycache__/widgets.cpython-312.pyc new file mode 100644 index 0000000..1ef00df Binary files /dev/null and b/qtile/modules/__pycache__/widgets.cpython-312.pyc differ diff --git a/qtile/modules/__pycache__/widgets.cpython-314.pyc b/qtile/modules/__pycache__/widgets.cpython-314.pyc new file mode 100644 index 0000000..e6be6dd Binary files /dev/null and b/qtile/modules/__pycache__/widgets.cpython-314.pyc differ diff --git a/qtile/modules/__pycache__/x11_widgets.cpython-311.pyc b/qtile/modules/__pycache__/x11_widgets.cpython-311.pyc new file mode 100644 index 0000000..b4129c8 Binary files /dev/null and b/qtile/modules/__pycache__/x11_widgets.cpython-311.pyc differ diff --git a/qtile/modules/get_theme.py b/qtile/modules/get_theme.py new file mode 100644 index 0000000..110cffa --- /dev/null +++ b/qtile/modules/get_theme.py @@ -0,0 +1,11 @@ +import os +import json + +# Gets colors from wallust wallpaper +def get_colors(): + with open(f"{os.path.expanduser('~')}/.cache/qtile/colors.json") as f: + colors = json.load(f) + + return colors['colors'] + +colors = get_colors() diff --git a/qtile/modules/groups.py b/qtile/modules/groups.py new file mode 100644 index 0000000..ed95a32 --- /dev/null +++ b/qtile/modules/groups.py @@ -0,0 +1,19 @@ +from libqtile.config import Group + +# Create labels for groups and assign them a default layout. +groups = [] + +group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "minus", "equal", "y", "u"] + +group_labels = ["", "", "", "", "", "", "", "", "", "", "", "", "", ""] + +group_layouts = ["monadtall", "monadtall", "spiral", "monadtall", "monadwide", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"] + +# Add group names, labels, and default layouts to the groups object. +for i in range(len(group_names)): + groups.append( + Group( + name=group_names[i], + layout=group_layouts[i].lower(), + label=group_labels[i], + )) diff --git a/qtile/modules/hooks.py b/qtile/modules/hooks.py new file mode 100644 index 0000000..89f1213 --- /dev/null +++ b/qtile/modules/hooks.py @@ -0,0 +1,16 @@ +import os +import subprocess + +from libqtile import hook, qtile + +# Startup applications +@hook.subscribe.startup_once +def autostart(): + if qtile.core.name == "x11": + autostartscript = "~/.config/qtile/scripts/x11-autostart.sh" + elif qtile.core.name == "wayland": + autostartscript = "~/.config/qtile/scripts/wayland-autostart.sh" + + home = os.path.expanduser(autostartscript) + subprocess.Popen([home]) + \ No newline at end of file diff --git a/qtile/modules/keys.py b/qtile/modules/keys.py new file mode 100644 index 0000000..d4a816b --- /dev/null +++ b/qtile/modules/keys.py @@ -0,0 +1,233 @@ +from libqtile import qtile +from libqtile.config import Click, Drag, Key +from libqtile.lazy import lazy + +from .groups import groups + +mod = "mod4" +terminal = "ghostty" + +keys = [ + # Open terminal + Key([mod], "Return", lazy.spawn(terminal), + desc="Launch terminal"), + + # Qtile System Actions + Key([mod, "shift"], "q", lazy.shutdown(), + desc="Shutdown Qtile"), + + # Active Window Actions + Key([mod], "f", lazy.window.toggle_fullscreen(), + desc="Toggle window fullscreen"), + Key([mod], "q", lazy.window.kill(), + desc="Close active window"), + Key([mod, "control"], "l", + lazy.layout.grow_right(), + lazy.layout.grow(), + lazy.layout.increase_ratio(), + lazy.layout.delete(), + desc="Increase active window size." + ), + Key([mod, "control"], "Right", + lazy.layout.grow_right(), + lazy.layout.grow(), + lazy.layout.increase_ratio(), + lazy.layout.delete(), + desc="Increase active window size." + ), + Key([mod, "control"], "h", + lazy.layout.grow_left(), + lazy.layout.shrink(), + lazy.layout.decrease_ratio(), + lazy.layout.add(), + desc="Decrease active window size." + ), + Key([mod, "control"], "Left", + lazy.layout.grow_left(), + lazy.layout.shrink(), + lazy.layout.decrease_ratio(), + lazy.layout.add(), + desc="Decrease active window size." + ), + Key([mod, "control"], "k", + lazy.layout.grow_up(), + lazy.layout.grow(), + lazy.layout.decrease_nmaster(), + desc="Increase active window size." + ), + Key([mod, "control"], "Up", + lazy.layout.grow_up(), + lazy.layout.grow(), + lazy.layout.decrease_nmaster(), + desc="Increase active window size." + ), + Key([mod, "control"], "j", + lazy.layout.grow_down(), + lazy.layout.shrink(), + lazy.layout.increase_nmaster(), + desc="Decrease active window size." + ), + Key([mod, "control"], "Down", + lazy.layout.grow_down(), + lazy.layout.shrink(), + lazy.layout.increase_nmaster(), + desc="Decrease active window size." + ), + + # Window Focus (Arrows and Vim keys) + Key([mod], "Up", lazy.layout.up(), + desc="Change focus to window above."), + Key([mod], "Down", lazy.layout.down(), + desc="Change focus to window below."), + Key([mod], "Left", lazy.layout.left(), + desc="Change focus to window on the left."), + Key([mod], "Right", lazy.layout.right(), + desc="Change focus to window on the right."), + Key([mod], "k", lazy.layout.up(), + desc="Change focus to window above."), + Key([mod], "j", lazy.layout.down(), + desc="Change focus to window below."), + Key([mod], "h", lazy.layout.left(), + desc="Change focus to window on the left."), + Key([mod], "l", lazy.layout.right(), + desc="Change focus to window on the right."), + + # Move windows around MonadTall/MonadWide Layouts + Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), + desc="Shuffle window up."), + Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), + desc="Shuffle window down."), + Key([mod, "shift"], "Left", lazy.layout.swap_left(), + desc="Shuffle window left."), + Key([mod, "shift"], "Right", lazy.layout.swap_right(), + desc="Shuffle window right."), + Key([mod, "shift"], "k", lazy.layout.shuffle_up(), + desc="Shuffle window up."), + Key([mod, "shift"], "j", lazy.layout.shuffle_down(), + desc="Shuffle window down."), + Key([mod, "shift"], "h", lazy.layout.swap_left(), + desc="Shuffle window left."), + Key([mod, "shift"], "l", lazy.layout.swap_right(), + desc="Shuffle window right."), + + # Qtile Layout Actions + Key([mod], "r", lazy.layout.reset(), + desc="Reset the sizes of all window in group."), + Key([mod], "Tab", lazy.next_layout(), + desc="Switch to the next layout."), + Key([mod, "shift"], "f", lazy.layout.flip(), + desc="Flip layout for Monadtall/Monadwide"), + Key([mod, "shift"], "space", lazy.window.toggle_floating(), + desc="Toggle floating window."), + + # Switch focus to specific monitor (out of three) + Key([mod], "i", + lazy.to_screen(0), + desc='Keyboard focus to monitor 1'), + Key([mod], "o", + lazy.to_screen(1), + desc='Keyboard focus to monitor 2'), + Key([mod], "p", + lazy.to_screen(2), + desc='Keyboard focus to monitor 3'), + + # Switch focus of monitors + Key([mod], "period", + lazy.next_screen(), + desc='Move focus to next monitor'), + Key([mod], "comma", + lazy.prev_screen(), + desc='Move focus to prev monitor'), +] + +# Add group specific keybindings +for i in groups: + keys.extend([ + Key([mod], i.name, lazy.group[i.name].toscreen(), + desc="Mod + number to move to that group."), + Key(["mod1"], "Tab", lazy.screen.next_group(), + desc="Move to next group."), + Key(["mod1", "shift"], "Tab", lazy.screen.prev_group(), + desc="Move to previous group."), + Key([mod, "shift"], i.name, lazy.window.togroup(i.name), + desc="Move focused window to new group."), + ]) + +# Scratchpad keybindings +keys.extend([ + Key(["mod1"], "Return", lazy.group['scratchpad'].dropdown_toggle('term')), + Key(["mod1"], "v", lazy.group['scratchpad'].dropdown_toggle('volume')), + Key([mod], "a", lazy.group['scratchpad'].dropdown_toggle('angular')), + Key([mod], "n", lazy.group['scratchpad'].dropdown_toggle('notebook')), +]) + +# Drag floating layouts. +mouse = [ + Drag([mod], "Button1", lazy.window.set_position_floating(), + start=lazy.window.get_position()), + Drag([mod], "Button3", lazy.window.set_size_floating(), + start=lazy.window.get_size()), + Click([mod], "Button2", lazy.window.bring_to_front()) +] + +# Application keybindings +keys.extend([ + Key([mod, "shift"], "Return", lazy.spawn("ghostty"), + desc="Launch file browser"), + Key([mod], "Space", lazy.spawn("rofi -show drun"), + desc="Application launcher"), + Key([mod], "b", lazy.spawn("firefox"), + desc="Launch web browser"), + Key([mod], "e", lazy.spawn("nautilus"), + desc="Launch file browser"), + + + # Media Keys + Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03+"), + desc="Volume Up"), + Key([], "XF86AudioLowerVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03-"), + desc="Volume Down"), + Key([], "XF86AudioMute", lazy.spawn("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), + desc="Toggle Mute"), + Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause"), + desc="Play/Pause"), + Key([], "XF86AudioNext", lazy.spawn("playerctl next"), + desc="Next Song"), + Key([], "XF86AudioPrev", lazy.spawn("playerctl previous"), + desc="Previous Song"), + Key([], "XF86AudioStop", lazy.spawn("playerctl stop"), + desc="Stop music"), + Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set 5%+"), + desc="Increase brightness"), + Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-"), + desc="Decrease brightness"), +]) + +# Add X11-specific keybindings +if qtile.core.name == "x11": + keys.extend([ + Key([mod, "shift"], "r", lazy.restart(), + desc="Restart Qtile"), + Key([mod], "Escape", lazy.spawn("betterlockscreen -l"), + desc="Lock screen"), + Key([mod], "v", lazy.spawn("~/.config/qtile/scripts/greenclip.sh"), + desc="Clipboard Manager"), + Key([], "XF86TouchpadToggle", lazy.spawn("/home/wingej0/dotfiles/scripts/touchpad-toggle.sh"), + desc="Toggle Touchpad"), + ]) +# Add Wayland-specific keybindings +elif qtile.core.name == "wayland": + keys.extend([ + Key([mod, "shift"], "r", lazy.reload_config(), + desc="Reload Qtile config"), + Key([mod], "Escape", lazy.spawn("swaylock"), + desc="Lock screen"), + Key(["control", "mod1"], "delete", lazy.spawn("wlogout"), + desc="Launch powermenu"), + Key([mod], "v", lazy.spawn("~/.config/qtile/scripts/clipboard.sh"), + desc="Clipboard Manager"), + Key([mod], "print", lazy.spawn("~/.config/qtile/scripts/gif-recorder.sh"), + desc="Gif Recorder") + ]) + + diff --git a/qtile/modules/layouts.py b/qtile/modules/layouts.py new file mode 100644 index 0000000..c9fa993 --- /dev/null +++ b/qtile/modules/layouts.py @@ -0,0 +1,49 @@ +from .get_theme import colors + +from libqtile import layout +from libqtile.config import Match + +# Define layouts and layout themes +layout_theme = { + "margin":8, + "border_width": 4, + "border_focus": colors['color11'], + "border_normal": colors['color0'], +} + +layouts = [ + layout.Bsp(**layout_theme), + layout.MonadTall(**layout_theme), + layout.MonadWide(**layout_theme), + layout.RatioTile(**layout_theme), + layout.MonadThreeCol(**layout_theme), + layout.Tile(**layout_theme), + layout.Floating(**layout_theme), + layout.Max(**layout_theme), + layout.TreeTab(**layout_theme), + layout.Spiral( + main_pane_ratio = 0.70, + ratio = 0.52, + new_client_position = "bottom", + **layout_theme + ) +] + +floating_layout = layout.Floating( + float_rules=[ + # Run the utility of `xprop` to see the wm class and name of an X client. + *layout.Floating.default_float_rules, + Match(wm_class="confirmreset"), # gitk + Match(wm_class="makebranch"), # gitk + Match(wm_class="maketag"), # gitk + Match(wm_class="ssh-askpass"), # ssh-askpass + Match(title="branchdialog"), # gitk + Match(title="pinentry"), # GPG key password entry + Match(title="Mailspring"), + Match(func=lambda c: c.is_transient_for()), + ], + fullscreen_border_width = 0, + border_width = 4, + border_focus = colors['color11'], + border_normal = colors['color1'] +) diff --git a/qtile/modules/scratchpads.py b/qtile/modules/scratchpads.py new file mode 100644 index 0000000..16a9937 --- /dev/null +++ b/qtile/modules/scratchpads.py @@ -0,0 +1,11 @@ +from .groups import groups + +from libqtile.config import ScratchPad, DropDown + +# Define Scratchpads +groups.append(ScratchPad("scratchpad", [ + DropDown("term", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), + DropDown("volume", "pavucontrol", width=0.8, height=0.8, x=0.1, y=0.1, opacity=0.8), + DropDown("angular", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), + DropDown("notebook", "kitty", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1), +])) \ No newline at end of file diff --git a/qtile/modules/screens.py b/qtile/modules/screens.py new file mode 100644 index 0000000..36fbfce --- /dev/null +++ b/qtile/modules/screens.py @@ -0,0 +1,43 @@ +from .widgets import init_widgets + +from libqtile import bar +from libqtile.config import Screen + +screens = [ + # HDMI-A-1 + Screen( + top=bar.Bar( + widgets=init_widgets(1), + background='#0000003f', + margin=0, + size=30, + opacity=0.9 + ), + x=0 + ), + # DP-1 + Screen( + top=bar.Bar( + widgets=init_widgets(1), + background='#0000003f', + margin=0, + size=30, + opacity=0.9 + ), + x=1920 + + ), + # DP-2 + Screen( + top=bar.Bar( + widgets=init_widgets(1), + background='#0000003f', + margin=0, + size=30, + opacity=0.9 + ), + x=3840 + + + ), +] diff --git a/qtile/modules/widget_defaults.py b/qtile/modules/widget_defaults.py new file mode 100644 index 0000000..5f645dc --- /dev/null +++ b/qtile/modules/widget_defaults.py @@ -0,0 +1,6 @@ + +# Define Widgets +widget_defaults = dict( + font="Fira Code Nerd Font", + fontsize = 11, +) \ No newline at end of file diff --git a/qtile/modules/widgets.py b/qtile/modules/widgets.py new file mode 100644 index 0000000..6b09cfd --- /dev/null +++ b/qtile/modules/widgets.py @@ -0,0 +1,392 @@ +import os +import subprocess + +from libqtile import qtile +from libqtile.lazy import lazy +from qtile_extras import widget +from qtile_extras.widget.decorations import RectDecoration + +from .get_theme import colors +from .widget_defaults import widget_defaults + +dark_widgets = { + "decorations" : [ + RectDecoration( + colour = colors['color11'], + filled = True, + radius = 10, + padding_y = 4, + group = True + ) + ] +} + +light_widgets = { + "decorations" : [ + RectDecoration( + colour = colors['color15'], + filled = True, + radius = 10, + padding_y = 4, + group = True + ) + ] +} + +mid_widgets = { + "decorations" : [ + RectDecoration( + colour = colors['color1'], + filled = True, + radius = 10, + padding_y = 4, + group = True + ) + ] +} + +def init_widgets(monitor): + widgets_list = [ + widget.Sep( + linewidth = 0, + padding = 5 + ), + widget.Sep( + linewidth = 0, + padding = 10, + **dark_widgets + ), + widget.TextBox( + font="FontAwesome6Free", + fontsize=14, + foreground=colors['color15'], + text="", + **dark_widgets + ), + # qtile button + widget.TextBox( + font="Fira Code Nerd Font Bold", + fontsize = 12, + foreground=colors['color15'], + text="Qtile", + mouse_callbacks={ + 'Button1' : lazy.spawn('rofi -show drun'), + }, + **dark_widgets + ), + # separators with curved sections + widget.Sep( + linewidth = 0, + padding = 10, + **dark_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10, + ), + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + # memory icon + widget.TextBox( + text='', + font="FontAwesome6Free", + fontsize=12, + foreground=colors['color0'], + margin=0, + padding=5, + **light_widgets + ), + # memory percentage + widget.Memory( + foreground=colors['color0'], + format='{MemPercent}%', + measure_mem="M", + margin=0, + padding=0, + **widget_defaults, + **light_widgets + ), + # separator + widget.Sep( + foreground=colors['color0'], + padding=10, + size_percent=60, + **light_widgets + ), + # cpu icon + widget.TextBox( + text='', + font="FontAwesome6Free", + fontsize=12, + foreground=colors['color0'], + margin=0, + padding=5, + **light_widgets + ), + # cpu percentage + widget.CPU( + foreground=colors['color0'], + format='{load_percent}%', + margin=0, + padding=0, + **widget_defaults, + **light_widgets + ), + # separator + widget.Sep( + foreground=colors['color0'], + padding=10, + size_percent=60, + **light_widgets + ), + # temperature icon + widget.TextBox( + text='', + font="FontAwesome6Free", + fontsize=12, + foreground=colors['color0'], + padding=5, + **light_widgets + ), + # thermal sensor + widget.ThermalSensor( + foreground=colors['color0'], + **widget_defaults, + **light_widgets + ), + # separators to close module and open next + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + # sun icon + widget.TextBox( + text='', + font="FontAwesome6Free", + fontsize=12, + foreground=colors['color0'], + **light_widgets + ), + # brightness percentage + widget.GenPollText( + foreground=colors['color0'], + func=lambda: subprocess.check_output(f"{os.path.expanduser('~')}/.config/qtile/scripts/brightness.sh").decode("utf-8").strip(), + update_interval=30, + **widget_defaults, + **light_widgets + ), + # separator + widget.Sep( + foreground=colors['color0'], + padding=10, + size_percent=60, + **light_widgets + ), + # audio icon + widget.TextBox( + font="FontAwesome6Free", + fontsize=12, + foreground=colors['color0'], + text="", + **light_widgets + ), + # volume percentage + widget.Volume( + foreground=colors['color0'], + get_volume_command = f"{os.path.expanduser('~')}/.config/qtile/scripts/volume.sh", + **widget_defaults, + **light_widgets + ), + # close module, separator, open next module + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.Sep( + linewidth = 0, + padding = 10, + **mid_widgets + ), + # current layout icon + widget.CurrentLayoutIcon( + foreground=colors['color15'], + scale=0.50, + **mid_widgets + ), + # current layout + widget.CurrentLayout( + foreground=colors['color15'], + **widget_defaults, + **mid_widgets + ), + # separators + widget.Sep( + linewidth = 0, + padding = 10, + **mid_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + # groups/workspaces + widget.GroupBox( + active=colors['color15'], + borderwidth = 2, + foreground=colors['color15'], + disable_drag=True, + font="FontAwesome6Free", + fontsize=11, + hide_unused=False, + highlight_color=['#00000000', '#00000000'], + highlight_method="line", + inactive=colors['color0'], + this_current_screen_border=colors['color0'], + this_screen_border=colors['color15'], + other_current_screen_border=colors['color1'], + other_screen_border=colors['color0'], + urgent_method = "line", + use_mouse_wheel=False, + **dark_widgets + ), + # separator + widget.Sep( + linewidth = 0, + padding = 10, + **dark_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + # browser + widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn("firefox --new-window"), + }, + **light_widgets + ), + # filebrowser + widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn('nautilus'), + }, + **light_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10, + **light_widgets + ), + widget.Sep( + linewidth = 0, + padding = 10 + ), + widget.Sep( + linewidth = 0, + padding = 10, + **dark_widgets + ), + widget.Clock( + foreground=colors['color15'], + font="Fira Code Nerd Font Bold", + fontsize=12, + format=' %b %d | %I:%M %p', + mouse_callbacks={ + 'Button1' : lazy.spawn('wlogout'), + }, + **dark_widgets + ), + widget.Sep( + linewidth = 0, + padding = 15, + **dark_widgets + ), + widget.Sep( + linewidth = 0, + padding = 5 + ), + ] + + if qtile.core.name == "x11": + clipboard = widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/greenclip.sh"), + }, + **light_widgets + ) + + screenshot = widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn('flameshot launcher'), + }, + **light_widgets + ) + + elif qtile.core.name == "wayland": + clipboard = widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/clipboard.sh"), + }, + **light_widgets + ) + + screenshot = widget.TextBox( + foreground=colors['color0'], + font="FontAwesome6Free", + fontsize=12, + text='', + mouse_callbacks={ + 'Button1' : lazy.spawn(f"{os.path.expanduser('~')}/.config/qtile/scripts/grim.sh"), + }, + **light_widgets + ) + + #widgets_list.insert(50, clipboard) + #widgets_list.insert(51, screenshot) + + return widgets_list diff --git a/qtile/scripts/brightness.sh b/qtile/scripts/brightness.sh new file mode 100755 index 0000000..21a0e31 --- /dev/null +++ b/qtile/scripts/brightness.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +brightnessctl | awk '/Current/{print substr($NF, 2, length($NF) -2)}' diff --git a/qtile/scripts/clipboard.sh b/qtile/scripts/clipboard.sh new file mode 100755 index 0000000..49b8e73 --- /dev/null +++ b/qtile/scripts/clipboard.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +case $1 in + d) cliphist list | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi | cliphist delete + ;; + + w) if [ `echo -e "Clear\nCancel" | rofi -dmenu -config ~/.dotfiles/home/configs/rofi/config-short.rasi` == "Clear" ] ; then + cliphist wipe + fi + ;; + + *) cliphist list | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi | cliphist decode | wl-copy + ;; +esac diff --git a/qtile/scripts/get_updated.py b/qtile/scripts/get_updated.py new file mode 100755 index 0000000..3d5483a --- /dev/null +++ b/qtile/scripts/get_updated.py @@ -0,0 +1,19 @@ +#!/run/current-system/sw/bin/python +import os.path +from datetime import datetime + + +def get_last_updated(): + lock_file = f"{os.path.expanduser('~')}/.dotfiles/flake.lock" + updated = datetime.fromtimestamp(os.path.getmtime(lock_file)) + today = datetime.now() + last_updated = (today - updated).days + if last_updated == 1: + print(f'{last_updated} day') + else: + print(f'{last_updated} days') + + +if __name__ == '__main__': + get_last_updated() + diff --git a/qtile/scripts/gif-recorder.sh b/qtile/scripts/gif-recorder.sh new file mode 100755 index 0000000..3dda994 --- /dev/null +++ b/qtile/scripts/gif-recorder.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +# If an instance of wf-recorder is running under this user kill it with SIGINT and exit +pkill --euid "$USER" --signal SIGINT wf-recorder && exit + +# Define paths +DefaultSaveDir=$HOME'/Videos' +TmpPathPrefix='/tmp/gif-record' +TmpRecordPath=$TmpPathPrefix'-cap.mp4' +TmpPalettePath=$TmpPathPrefix'-palette.png' + +# Trap for cleanup on exit +OnExit() { + [[ -f $TmpRecordPath ]] && rm -f "$TmpRecordPath" + [[ -f $TmpPalettePath ]] && rm -f "$TmpPalettePath" +} +trap OnExit EXIT + +# Set umask so tmp files are only acessible to the user +umask 177 + +# Get selection and honor escape key +Coords=$(slurp) || exit + +# Capture video using slurp for screen area +# timeout and exit after 10 minutes as user has almost certainly forgotten it's running +timeout 600 wf-recorder -g "$Coords" -f "$TmpRecordPath" || exit + +# Get the filename from the user and honor cancel +SavePath=$( zenity \ + --file-selection \ + --save \ + --confirm-overwrite \ + --file-filter=*.gif \ + --filename="$DefaultSaveDir"'/.gif' \ +) || exit + +# Append .gif to the SavePath if it's missing +[[ $SavePath =~ \.gif$ ]] || SavePath+='.gif' + +# Produce a pallete from the video file +ffmpeg -i "$TmpRecordPath" -filter_complex "palettegen=stats_mode=full" "$TmpPalettePath" -y || exit + +# Return umask to default +umask 022 + +# Use pallete to produce a gif from the video file +ffmpeg -i "$TmpRecordPath" -i "$TmpPalettePath" -filter_complex "paletteuse=dither=sierra2_4a" "$SavePath" -y || exit diff --git a/qtile/scripts/greenclip.sh b/qtile/scripts/greenclip.sh new file mode 100755 index 0000000..e0e06a9 --- /dev/null +++ b/qtile/scripts/greenclip.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +rofi -modi "clipboard:greenclip print" -show clipboard -replace -config ~/.dotfiles/home/configs/rofi/config-cliphist.rasi -run-command '{cmd}' diff --git a/qtile/scripts/grim.sh b/qtile/scripts/grim.sh new file mode 100755 index 0000000..26ea104 --- /dev/null +++ b/qtile/scripts/grim.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +DIR="$HOME/Pictures/screenshots/" +NAME="screenshot_$(date +%d%m%Y_%H%M%S).png" + +option2="Selected area" +option3="Fullscreen (delay 3 sec)" + +options="$option2\n$option3" + +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/.dotfiles/home/configs/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") + +case $choice in + $option2) + grim -g "$(slurp)" - | swappy -f - + notify-send "Screenshot created" "Mode: Selected area" + ;; + $option3) + sleep 3 + grim - | swappy -f - + notify-send "Screenshot created" "Mode: Fullscreen" + ;; +esac diff --git a/qtile/scripts/power-management.sh b/qtile/scripts/power-management.sh new file mode 100755 index 0000000..644543e --- /dev/null +++ b/qtile/scripts/power-management.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +state=`cat /sys/class/power_supply/AC/online` + +if [ $state == "1" ] +then + echo $(system76-power charge-thresholds) + echo "" + echo "Select a Charge Threshold" + select threshold in "Full Charge" "Balanced" "Max Lifespan" "Quit" + do + case $threshold in + "Full Charge") + system76-power charge-thresholds --profile full_charge + break;; + "Balanced") + system76-power charge-thresholds --profile balanced + break;; + "Max Lifespan") + system76-power charge-thresholds --profile max_lifespan + break;; + "Quit") + echo "Closing" + break;; + *) + echo "Oops!";; + esac + done +else + echo $(system76-power profile | grep "Power Profile") + echo "" + echo "Select a Power Profile:" + select profile in Battery Balanced Performance Quit + do + case $profile in + "Battery") + system76-power profile battery + break;; + "Balanced") + system76-power profile balanced + break;; + "Performance") + system76-power profile performance + break;; + "Quit") + echo "Closing" + break;; + *) + echo "Oops!";; + esac + done +fi diff --git a/qtile/scripts/power-profile.sh b/qtile/scripts/power-profile.sh new file mode 100755 index 0000000..53c5f03 --- /dev/null +++ b/qtile/scripts/power-profile.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +state=`cat /sys/class/power_supply/AC/online` + +if [ $state == "1" ] +then + threshold=`system76-power charge-thresholds | awk '/Profile/{print $NF}'` + echo $threshold +else + profile=`system76-power profile | awk '/Profile/{print $NF}'` + echo \($profile\) +fi diff --git a/qtile/scripts/variety-swww.sh b/qtile/scripts/variety-swww.sh new file mode 100755 index 0000000..72946ef --- /dev/null +++ b/qtile/scripts/variety-swww.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +image=$1 + +# Create the color profile with pywal +wal -i $image + +# Copy image to the .cache +cp $image ~/.cache/current_wallpaper.jpg + +# Set the image as wallpaper using swww +swww img ~/.cache/current_wallpaper.jpg + +# Reload Qtile +qtile cmd-obj -o cmd -f reload_config + diff --git a/qtile/scripts/variety-wayland.sh b/qtile/scripts/variety-wayland.sh new file mode 100755 index 0000000..c83203d --- /dev/null +++ b/qtile/scripts/variety-wayland.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +image=$1 + +# Create the color profile with wallust +wallust run $image + +# Copy image to the .cache +cp $image ~/.cache/current_wallpaper.jpg + +# Set wallpaper in qtile +qtile cmd-obj -o cmd -f reload_config diff --git a/qtile/scripts/variety-x11.sh b/qtile/scripts/variety-x11.sh new file mode 100755 index 0000000..963bd41 --- /dev/null +++ b/qtile/scripts/variety-x11.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +image=$1 + +# Create the color profile with wallust +wallust run $image + +# Copy image to the .cache +cp $image ~/.cache/current_wallpaper.jpg + +# Set wallpaper in qtile +qtile cmd-obj -o cmd -f restart + +# Update betterlockscreen image +betterlockscreen -u ~/.cache/current_wallpaper.jpg diff --git a/qtile/scripts/volume.sh b/qtile/scripts/volume.sh new file mode 100755 index 0000000..cdedfdd --- /dev/null +++ b/qtile/scripts/volume.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +volume=`wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{v = $2; print (v*100)"%"}'` + +echo $volume diff --git a/qtile/scripts/wayland-autostart.sh b/qtile/scripts/wayland-autostart.sh new file mode 100755 index 0000000..6eba459 --- /dev/null +++ b/qtile/scripts/wayland-autostart.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & +awww-daemon & +dunst & + +wl-paste --type text --watch cliphist store & +wl-paste --type image --watch cliphist store & +awww img ~/.config/qtile/wallpaper.png & +wlr-randr --output DP-1 --left-of HDMI-A-1 & +wlr-randr --output DP-3 --right-of HDMI-A-1 & diff --git a/qtile/scripts/x11-autostart.sh b/qtile/scripts/x11-autostart.sh new file mode 100755 index 0000000..f2c3824 --- /dev/null +++ b/qtile/scripts/x11-autostart.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +function run { + if ! pgrep $1 ; + then + $@& + fi +} + +#starting utility applications at boot time +numlockx & +picom & +/nix/store/$(ls -la /nix/store | grep polkit-gnome | grep '^d' | awk '{print $9}')/libexec/polkit-gnome-authentication-agent-1 & +dunst & +greenclip daemon & +cp ~/.dotfiles/home/configs/qtile/scripts/variety-x11.sh ~/.config/variety/scripts/set_wallpaper & +variety diff --git a/qtile/wallpaper.png b/qtile/wallpaper.png new file mode 100755 index 0000000..823e15d Binary files /dev/null and b/qtile/wallpaper.png differ diff --git a/rofi/config-cliphist.rasi b/rofi/config-cliphist.rasi new file mode 100644 index 0000000..4cc92b6 --- /dev/null +++ b/rofi/config-cliphist.rasi @@ -0,0 +1,252 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "FiraCode Nerd Bold 10"; + show-icons: false; + icon-theme: "adwaita"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/rofi/colors-rofi-pywal" + +/* ---- Window ---- */ +window { + width: 400px; + x-offset: -14px; + y-offset: 35px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: 3px; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: northeast; + anchor: northeast; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: url("~/.cache/current_wallpaper.jpg", height); + children: ["listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "message", "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 2px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/rofi/config-screenshot.rasi b/rofi/config-screenshot.rasi new file mode 100644 index 0000000..5e5d28f --- /dev/null +++ b/rofi/config-screenshot.rasi @@ -0,0 +1,252 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Sans Bold 10"; + show-icons: false; + icon-theme: "kora"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/rofi/colors-rofi-pywal" + +/* ---- Window ---- */ +window { + width: 400px; + x-offset: -14px; + y-offset: 35px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: 3px; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: northeast; + anchor: northeast; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: url("~/.cache/current_wallpaper.jpg", height); + children: ["listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 2; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 2px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..cd97ce0 --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,252 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "FiraCode Nerd Bold 12"; + show-icons: true; + icon-theme: "adwaita"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + drun-display-format: "{name}"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/rofi/colors-rofi-pywal" + +/* ---- Window ---- */ +window { + width: 900px; + x-offset: 0px; + y-offset: 0px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: 3px; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: url("~/.cache/current_wallpaper.jpg", height); + children: ["imagebox","listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "message", "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 10px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 2px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/wallust/templates/colors-qtile.json b/wallust/templates/colors-qtile.json new file mode 100644 index 0000000..f65ed6e --- /dev/null +++ b/wallust/templates/colors-qtile.json @@ -0,0 +1,28 @@ +{ + "wallpaper": "/home/wingej0/.cache/current_wallpaper.jpg", + "alpha": "100", + + "special": { + "background": "{{ background }}", + "foreground": "{{ foreground }}", + "cursor": "{{ cursor }}" + }, + "colors": { + "color0": "{{ color0 }}", + "color1": "{{ color1 }}", + "color2": "{{ color2 }}", + "color3": "{{ color3 }}", + "color4": "{{ color4 }}", + "color5": "{{ color5 }}", + "color6": "{{ color6 }}", + "color7": "{{ color7 }}", + "color8": "{{ color8 }}", + "color9": "{{ color9 }}", + "color10": "{{ color10 }}", + "color11": "{{ color11 }}", + "color12": "{{ color12 }}", + "color13": "{{ color13 }}", + "color14": "{{ color14 }}", + "color15": "{{ color15 }}" + } +} diff --git a/wallust/templates/colors-rofi-pywal.rasi b/wallust/templates/colors-rofi-pywal.rasi new file mode 100644 index 0000000..71fdfd6 --- /dev/null +++ b/wallust/templates/colors-rofi-pywal.rasi @@ -0,0 +1,20 @@ +* { + background: rgba(0,0,1,0.5); + foreground: #FFFFFF; + color0: {{ color0 }}; + color1: {{ color1 }}; + color2: {{ color2 }}; + color3: {{ color3 }}; + color4: {{ color4 }}; + color5: {{ color5 }}; + color6: {{ color6 }}; + color7: {{ color7 }}; + color8: {{ color8 }}; + color9: {{ color9 }}; + color10: {{ color10 }}; + color11: {{ color11 }}; + color12: {{ color12 }}; + color13: {{ color13 }}; + color14: {{ color14 }}; + color15: {{ color15 }}; +} \ No newline at end of file diff --git a/wallust/templates/colors-wlogout.css b/wallust/templates/colors-wlogout.css new file mode 100644 index 0000000..2dafa88 --- /dev/null +++ b/wallust/templates/colors-wlogout.css @@ -0,0 +1,20 @@ +@define-color foreground {{ foreground }}; +@define-color background {{ background }}; +@define-color cursor {{ cursor }}; + +@define-color color0 {{ color0 }}; +@define-color color1 {{ color1 }}; +@define-color color2 {{ color2 }}; +@define-color color3 {{ color3 }}; +@define-color color4 {{ color4 }}; +@define-color color5 {{ color5 }}; +@define-color color6 {{ color6 }}; +@define-color color7 {{ color7 }}; +@define-color color8 {{ color8 }}; +@define-color color9 {{ color9 }}; +@define-color color10 {{ color10 }}; +@define-color color11 {{ color11 }}; +@define-color color12 {{ color12 }}; +@define-color color13 {{ color13 }}; +@define-color color14 {{ color14 }}; +@define-color color15 {{ color15 }}; \ No newline at end of file diff --git a/wallust/wallust.toml b/wallust/wallust.toml new file mode 100644 index 0000000..0e3d5b9 --- /dev/null +++ b/wallust/wallust.toml @@ -0,0 +1,117 @@ +# wallust 2.9.0-d.* +# -- global space -- # +# values below can be overwritten by command line flags + +# How the image is parse, in order to get the colors: +# * full - Read and return the whole image pixels more precision slower +# * resized - Resizes the image before parsing mantaining it s aspect ratio +# * wal - Uses image magick convert to generate the colors like pywal +# * thumb - Faster algo hardcoded to x no ratio respected +# * fastresize - A much faster resize algo that uses SIMD For some reason it fails on +# some images where resized doesn t for this reason it doesn t replace +# but rather it s a new option +# * kmeans - Kmeans is an algo that divides and picks pixels all around the image +# Requires more tweaking and more in depth testing but for the most part +# it just werks +backend = "full" + +# What color space to use to produce and select the most prominent colors: +# * lab - Uses Cie L a b color space +# * labmixed - Variant of lab that mixes the colors gathered if not enough colors it +# fallbacks to usual lab not recommended in small images +# * labfast - Variant of lab that avoids floating arithmetic thus faster operations but +# not that much precise result Images that work on lab labmixed could not +# have enough colors for labfast +color_space = "lab" + +# Difference between similar colors, used by the colorspace: +# 1 Not perceptible by human eyes. +# 1 - 2 Perceptible through close observation. +# 2 - 10 Perceptible at a glance. +# 11 - 49 Colors are more similar than opposite +# 100 Colors are exact opposite +threshold = 20 + +# NOTE: All palettes will fill 16 colors (from color0 to color15), 16 color +# variations are the 'ilusion' of more colors by opaquing color1 to color5. +# Use the most prominent colors in a way that makes sense, a scheme: +# * dark - dark colors dark background and light contrast +# * dark16 - Same as dark but uses the colors trick +# * darkcomp - This is a dark variant that changes all colors to it s +# complementary counterpart giving the feeling of a new palette but +# that still makes sense with the image provided +# * darkcomp16 - variation of the dark complementary variant +# * harddark - Same as dark with hard hue colors +# * harddark16 - Harddark with color variation +# * harddarkcomp - complementary colors variation of harddark scheme +# * harddarkcomp16 - complementary colors variation of harddark scheme +# * light - Light bg dark fg +# * light16 - Same as light but uses the color trick +# * lightcomp - complementary colors variation of light +# * lightcomp16 - complementary colors variation of light with the color variation +# * softdark - Variant of softlight uses the lightest colors and a dark background +# could be interpreted as dark inversed +# * softdark16 - softdark with color variation +# * softdarkcomp - complementary variation for softdark +# * softdarkcomp16 - complementary variation for softdark with the color variation +# * softlight - Light with soft pastel colors counterpart of harddark +# * softlight16 - softlight with color variation +# * softlightcomp - softlight with complementary colors +# * softlightcomp16 - softlight with complementary colors with colors +palette = "dark16" + +# This field chooses a method to use when the gathered colors aren't enough: +# * interpolation - (default) Tries to pick two colors and built gradients over them +# * complementary - Uses the complementary colors of two colors, or more (if needed), colors. +#generation = "complementary" + +# Ensures a "readable contrast" (OPTIONAL, disabled by default) +# Should only be enabled when you notice an unreadable contrast frequently happening +# with your images. The reference color for the contrast is the background color. +check_contrast = true + +# Color saturation, between [1% and 100%] (OPTIONAL, disabled by default) +# usually something higher than 50 increases the saturation and below +# decreases it (on a scheme with strong and vivid colors) +#saturation = 35 + +# Alpha value for templating, by default 100 (no other use whatsoever) +#alpha = 100 + +[templates] +# template: A relative path that points to a file where wallust.toml is located, usually at `~/.config/wallust/` +# target: Absolute path in which to place a file with generated templated values +# NOTE: prefer '' over "" for paths, avoids escaping. +#zathura = { template = 'zathura', target = '~/.config/zathura/zathurarc' } +qtile = { template = 'colors-qtile.json', target = '~/.cache/qtile/colors.json' } +rofi = { template = 'colors-rofi-pywal.rasi', target = '~/.cache/rofi/colors-rofi-pywal.rasi' } +wlogout = { template = 'colors-wlogout.css', target = '~/.cache/wlogout/colors-wlogout.css' } + +# OPTIONALLY It can accept `new_engine = true`: This "new engine" difers by using double brackets like `{{variable}}` +# instead of one like usual, which helps with file formats that use brackets like json. With the `new_engine` enabled +# you can escape and produce a literal `{{` by `{{{{}}`, and for `}}` you escape it with `{{}}}}`. +#dunst = { template = 'dunstconfig', target = '~/.config/dunst/dunstrc', new_engine = true } + +# template field can be express as `src` and target as `dst` for shorter naming: +#alacritty = { src = 'alacrittycfg', dst = '~/.config/alacritty/alacritty.toml' } +# As well as using dotted toml fields, both `alacritty` fields represent the same; +#alacritty.src = 'alacrittycfg' +#alacritty.dst = '~/.config/alacritty/alacritty.toml' + +# REMINDER Variables and methods that can be used with templating: +# wallpaper: The full path to the current wallpaper, colorscheme file or the name of the theme in use. +# backend: Current **backend** being used. +# colorspace: Current **colorspace** being used. +# palette: Current **palette** being used. +# alpha: Default to 100, can be modified in the config file or with `--alpha`/`-a`. +# alpha_dec: Instead of [0..=100], displays it from 0.00 to 1.00. +# var: Output the color in `hex`. +# var.rgb: Output the color in `rgb`. +# var.rgba: Output the color in `rgba`. +# var.xrgba: Output the color in `xrgb`. +# var.strip: Output the color in `hex` (without a `#`). +# var.red: Output the red value. +# var.green: Output the green value. +# var.blue: Output the blue value. +# +# Where `var` can be colors from `color0` to `color15`, `background`, `foreground` and `cursor`.