Patched DWM Flexipatch Build

- Wrote entire dwm-flexipatch build as org document
- Moved README and README.md into README.org
- Setup keybindings, colors, etc. for dwm-flexipatch
This commit is contained in:
Sravan Balaji
2021-06-15 21:05:31 -04:00
parent a42a81a711
commit 56537aa159
11 changed files with 8263 additions and 2261 deletions

View File

@@ -16,9 +16,9 @@ endif
options: options:
@echo dwm build options: @echo dwm build options:
@echo "CFLAGS = ${CFLAGS}" @echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}" @echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}" @echo "CC = ${CC}"
.c.o: .c.o:
${CC} -c ${CFLAGS} $< ${CC} -c ${CFLAGS} $<
@@ -42,6 +42,8 @@ endif
clean: clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
rm -f dwm-msg rm -f dwm-msg
rm -f config.h
rm -f patches.h
dist: clean dist: clean
mkdir -p dwm-${VERSION} mkdir -p dwm-${VERSION}
@@ -57,7 +59,7 @@ install: all
ifdef YAJLLIBS ifdef YAJLLIBS
cp -f dwm-msg ${DESTDIR}${PREFIX}/bin cp -f dwm-msg ${DESTDIR}${PREFIX}/bin
endif endif
#cp -f patch/dwmc ${DESTDIR}${PREFIX}/bin cp -f patch/dwmc ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
ifdef YAJLLIBS ifdef YAJLLIBS
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-msg chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-msg

48
README
View File

@@ -1,48 +0,0 @@
dwm - dynamic window manager
============================
dwm is an extremely fast, small, and dynamic window manager for X.
Requirements
------------
In order to build dwm you need the Xlib header files.
Installation
------------
Edit config.mk to match your local setup (dwm is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install dwm (if
necessary as root):
make clean install
Running dwm
-----------
Add the following line to your .xinitrc to start dwm using startx:
exec dwm
In order to connect dwm to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec dwm
(This will start dwm on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dwm
Configuration
-------------
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.

6025
README.org Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -39,14 +39,14 @@ FREETYPEINC = /usr/include/freetype2
#PANGOLIB = `pkg-config --libs xft pango pangoxft` #PANGOLIB = `pkg-config --libs xft pango pangoxft`
# Uncomment for the ipc patch / IPC_PATCH # Uncomment for the ipc patch / IPC_PATCH
#YAJLLIBS = -lyajl YAJLLIBS = -lyajl
#YAJLINC = -I/usr/include/yajl YAJLINC = -I/usr/include/yajl
# Uncomment this for the rounded corners patch / ROUNDED_CORNERS_PATCH # Uncomment this for the rounded corners patch / ROUNDED_CORNERS_PATCH
#XEXTLIB = -lXext #XEXTLIB = -lXext
# Uncomment this for the swallow patch / SWALLOW_PATCH # Uncomment this for the swallow patch / SWALLOW_PATCH
#XCBLIBS = -lX11-xcb -lxcb -lxcb-res XCBLIBS = -lX11-xcb -lxcb -lxcb-res
# This is needed for the winicon patch / BAR_WINICON_PATCH # This is needed for the winicon patch / BAR_WINICON_PATCH
#IMLIB2LIBS = -lImlib2 #IMLIB2LIBS = -lImlib2

File diff suppressed because it is too large Load Diff

791
polybar/config.ini Normal file
View File

@@ -0,0 +1,791 @@
[colors]
dark-gray = ${xrdb:background:#282A36}
light-gray = ${xrdb:color8:#4D4D4D}
lighter-gray = ${xrdb:color7:#BFBFBF}
white = ${xrdb:foreground:#F8F8F2}
purple = ${xrdb:color4:#BD93F9}
blue = ${xrdb:color6:#8BE9FD}
red = ${xrdb:color1:#FF5555}
pink = ${xrdb:color5:#FF79C6}
yellow = ${xrdb:color3:#F1FA8C}
green = ${xrdb:color2:#50FA7B}
orange = ${xrdb:color16:#FFB86C}
background = ${self.dark-gray}
background-alt = ${self.light-gray}
foreground = ${self.white}
foreground-alt = ${self.lighter-gray}
primary = ${self.purple}
secondary = ${self.blue}
alert = ${self.red}
; left
powermenu = ${self.blue}
dwm-focused-foreground = ${self.background}
dwm-focused-background = ${self.primary}
dwm-unfocused-foreground = ${self.background}
dwm-unfocused-background = ${self.pink}
dwm-visible-foreground = ${self.background}
dwm-visible-background = ${self.secondary}
dwm-urgent-foreground = ${self.foreground}
dwm-urgent-background = ${self.alert}
dwm-empty-foreground = ${self.foreground}
dwm-empty-background = ${self.background}
media-playing = ${self.green}
; center
date = ${self.blue}
time = ${self.yellow}
; right
kernel = ${self.purple}
cpu = ${self.yellow}
memory = ${self.pink}
filesystem = ${self.blue}
dunst-notification-status = ${self.red}
[sizes]
bar-height = ${xrdb:polybar.bar-height:25}
module-margin = ${xrdb:polybar.module-margin:2}
module-padding = ${xrdb:polybar.module-padding:2}
tray-maxsize = ${xrdb:polybar.tray-maxsize:15}
tray-scale = ${xrdb:polybar.tray-scale:1}
maxlen = ${xrdb:polybar.maxlen:50}
[intervals]
cpu = 1
date = 1
time = 1
filesystem = 900
memory = 1
media-playing = 1
dunst-notification-status = 1
kernel = 86400
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
[bar/mybar]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
; If no monitor is given, the primary monitor is used if it exists
monitor = ${env:MONITOR}
; Use the specified monitor as a fallback if the main one is not found.
; monitor-fallback =
; Require the monitor to be in connected state
; XRandR sometimes reports my monitor as being disconnected (when in use)
monitor-strict = false
; Use fuzzy matching for monitors (only ignores dashes -)
; Useful when monitors are named differently with different drivers.
monitor-exact = true
; Tell the Window Manager not to configure the window.
; Use this to detach the bar if your WM is locking its size/position.
; Note: With this most WMs will no longer reserve space for
; the bar and it will overlap other windows. You need to configure
; your WM to add a gap where the bar will be placed.
override-redirect = false
; Put the bar at the bottom of the screen
bottom = false
; Prefer fixed center position for the `modules-center` block.
; The center block will stay in the middle of the bar whenever
; possible. It can still be pushed around if other blocks need
; more space.
; When false, the center block is centered in the space between
; the left and right block.
fixed-center = true
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
width = 100%
height = ${sizes.bar-height}
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in an offset in the x or y direction
; of 50% minus 10 pixels
offset-x = 0
offset-y = 0
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${colors.background}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${colors.foreground}
; Background gradient (vertical steps)
; background-[0-9]+ = #aarrggbb
; background-0 =
; Value used for drawing rounded corners
; Note: This shouldn't be used together with border-size because the border
; doesn't get rounded. For this to work you may also need to enable
; pseudo-transparency or use a compositor like compton.
; Individual top/bottom values can be defined using:
; radius-{top,bottom}
radius = 0.0
; Under-/overline pixel size and argb color
; Individual values can be defined using:
; {overline,underline}-size
; {overline,underline}-color
line-size = 0
line-color = #f00
; Values applied to all borders
; Individual side values can be defined using:
; border-{left,top,right,bottom}-size
; border-{left,top,right,bottom}-color
; The top and bottom borders are added to the bar height, so the effective
; window height is:
; height + border-top-size + border-bottom-size
; Meanwhile the effective window width is defined entirely by the width key and
; the border is placed within this area. So you effectively only have the
; following horizontal space on the bar:
; width - border-right-size - border-left-size
; border-size can be defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in 50% minus 10 pixels. The percentage is relative
; to the monitor width or height depending on the border direction.
; border-size =
; border-color =
; Number of spaces to add at the beginning/end of the bar
; Individual side values can be defined using:
; padding-{left,right}
padding-right = ${self.module-margin}
; Number of spaces to add before/after each module
; Individual side values can be defined using:
; module-margin-{left,right}
module-margin = ${sizes.module-margin}
; Fonts are defined using <font-name>;<vertical-offset>
; Font names are specified using a fontconfig pattern.
; font-0 = NotoSans-Regular:size=8;2
; font-1 = MaterialIcons:size=10
; font-2 = Termsynu:size=8;-1
; font-3 = FontAwesome:size=10
; See the Fonts wiki page for more details
font-0 = "NotoSans Nerd Font:size=11;3"
font-1 = "FiraCode Nerd Font:size=11;3"
font-2 = "Droid Sans Mono:size=11;3"
font-3 = "IPAPGothic:size=11;3"
; Modules are added to one of the available blocks
; modules-left = cpu ram
; modules-center = xwindow xbacklight
; modules-right = ipc clock
modules-left = powermenu dwm media-playing
modules-center = date time
modules-right = kernel cpu memory filesystem dunst-notification-status
; The separator will be inserted between the output of each module
separator = " "
; This value is used to add extra spacing between elements
; @deprecated: This parameter will be removed in an upcoming version
; spacing = 0
; Opacity value between 0.0 and 1.0 used on fade in/out
dim-value = 1.0
; Value to be used to set the WM_NAME atom
; If the value is empty or undefined, the atom value
; will be created from the following template: polybar-[BAR]_[MONITOR]
; NOTE: The placeholders are not available for custom values
; wm-name =
; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale = en_US.utf8
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
tray-position = ${env:TRAY_POS}
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = false
; Tray icon max size
tray-maxsize = ${sizes.tray-maxsize}
; DEPRECATED! Since 3.3.0 the tray always uses pseudo-transparency
; Enable pseudo transparency
; Will automatically be enabled if a fully transparent
; background color is defined using `tray-background`
; tray-transparent = false
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
tray-background = ${colors.background}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = ${self.module-margin}
; Scale factor for tray clients
tray-scale = ${sizes.tray-scale}
; Restack the bar window. Fixes the issue where the
; bar is being drawn on top of fullscreen windows.
;
; Currently supported options:
; generic (works in xmonad, may work with other WMs)
; bspwm
; i3 (requires: `override-redirect = true`)
; wm-restack = generic
; Set a DPI values used when rendering text
; This only affects scalable fonts
; Set this to 0 to let polybar calculate the dpi from the screen size.
; dpi =
dpi-x = ${xrdb:dpi}
dpi-y = ${xrdb:dpi}
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
; click-left =
; click-middle =
; click-right =
; scroll-up =
; scroll-down =
; double-click-left =
; double-click-middle =
; double-click-right =
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-click = pointer
cursor-scroll = ns-resize
[module/powermenu]
type = custom/text
content = " "
; "content" has the same properties as "format-NAME"
; content-background = #000
content-foreground = ${colors.powermenu}
content-padding = ${bar/mybar.module-margin}
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
; click-left = notify-send left
; click-middle = notify-send middle
; click-right = notify-send right
click-left = "rofi -show combi"
click-right = "/home/sravan/.scripts/control-center.sh --rofi"
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
; scroll-up = notify-send scroll up
; scroll-down = notify-send scroll down
[module/dwm]
type = internal/dwm
; format = <label-tags> <label-layout> <label-floating> <label-title>
format = <label-tags> <label-layout>
; Path to dwm socket (default: /tmp/dwm.sock)
; socket-path = /tmp/dwm.sock
; Left-click to view tag, right-click to toggle tag view
enable-tags-click = true
; Scroll to cycle between available tags
enable-tags-scroll = true
; If true and enable-tags-scroll = true, scrolling will view all tags regardless if occupied
tags-scroll-empty = true
; If true and enable-tags-scroll = true, scrolling will cycle through tags backwards
tags-scroll-reverse = true
; If true and enable-tags-scroll = true, wrap active tag when scrolling
tags-scroll-wrap = true
; Left-click to set secondary layout, right-click to switch to previous layout
enable-layout-click = true
; Scroll to cycle between available layouts
enable-layout-scroll = true
; Wrap when scrolling and reaching beginning/end of layouts
layout-scroll-wrap = true
; Reverse scroll direction
layout-scroll-reverse = true
; If enable-layout-click = true, clicking the layout symbol will switch to this layout
secondary-layout-symbol = [M]
; Separator in between shown tags
; label-separator = |
; Title of currently focused window
; Available tokens:
; %title%
label-title = %title%
label-title-padding = ${sizes.module-padding}
label-title-foreground = ${colors.foreground}
label-title-maxlen = ${sizes.maxlen}
; Symbol of current layout
; Available tokens:
; %symbol%
label-layout = %symbol%
label-layout-foreground = ${colors.foreground}
label-layout-background = ${colors.background-alt}
label-layout-underline = ${colors.background-alt}
label-layout-padding = ${sizes.module-padding}
; Text to show when currently focused window is floating
label-floating = (F)
; States: focused, unfocused, visible, urgent, empty
; Available tokens:
; %name%
; focused = Selected tag on focused monitor
label-focused = %name%
label-focused-foreground = ${colors.dwm-focused-foreground}
label-focused-background = ${colors.dwm-focused-background}
label-focused-underline = ${colors.dwm-focused-background}
label-focused-padding = ${sizes.module-padding}
; unfocused = Unselected tag on unselected monitor
label-unfocused = %name%
label-unfocused-foreground = ${colors.dwm-unfocused-foreground}
label-unfocused-background = ${colors.dwm-unfocused-background}
label-unfocused-underline = ${colors.dwm-unfocused-background}
label-unfocused-padding = ${sizes.module-padding}
; visible = Unselected tag, but occupied tag on any monitor
label-visible = %name%
label-visible-foreground = ${colors.dwm-visible-foreground}
label-visible-background = ${colors.dwm-visible-background}
label-visible-underline = ${colors.dwm-visible-background}
label-visible-padding = ${sizes.module-padding}
; urgent = Unselected tag with window that has urgency hint set
label-urgent = %name%
label-urgent-foreground = ${colors.dwm-urgent-foreground}
label-urgent-background = ${colors.dwm-urgent-background}
label-urgent-underline = ${colors.dwm-urgent-background}
label-urgent-padding = ${sizes.module-padding}
; empty = Unselected and unoccupied tag
; This can be set to an empty string to hide empty tags
label-empty = %name%
label-empty-foreground = ${colors.dwm-empty-foreground}
label-empty-background = ${colors.dwm-empty-background}
label-empty-underline = ${colors.dwm-empty-background}
label-empty-padding = ${sizes.module-padding}
[module/media-playing]
type = custom/script
; Available tokens:
; %counter%
; Command to be executed (using "/bin/sh -c [command]")
exec = ~/.config/dwm-flexipatch/polybar/scripts/get-media-playing.sh
; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
; exec-if = pgrep -x myservice
; Will the script output continous content?
; Default: false
tail = false
; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`)
interval = ${intervals.media-playing}
; Available tags:
; <output> - deprecated
; <label> (default)
format = <label>
; format-background = ${colors.background}
; format-foreground =
; format-padding = 4
; Available tokens:
; %output%
; Default: %output%
label = %output%
label-foreground = ${colors.media-playing}
label-maxlen = ${sizes.maxlen}
; Available tokens:
; %counter%
; %pid%
;
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
click-left = "/home/sravan/.scripts/playerctl.sh --play-pause"
; click-middle = echo middle %counter%
click-right = "/home/sravan/.scripts/playerctl.sh --change"
; double-click-left = echo double left %counter%
; double-click-middle = echo double middle %counter%
; double-click-right = echo double right %counter%
; Available tokens:
; %counter%
; %pid%
;
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
scroll-up = "/home/sravan/.scripts/playerctl.sh --next"
scroll-down = "/home/sravan/.scripts/playerctl.sh --prev"
[module/date]
type = internal/date
; Seconds to sleep between updates
; Default: 1.0
interval = ${intervals.date}
; See "https://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = %a %x
; Optional time format
; time = %X
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
date-alt = %A, %B %d, %Y
; time-alt = %H:%M:%S
; Available tags:
; <label> (default)
format = <label>
; Available tokens:
; %date%
; %time%
; Default: %date%
label = " %date%"
; label-font = 3
label-foreground = ${colors.date}
[module/time]
type = internal/date
; Seconds to sleep between updates
; Default: 1.0
interval = ${intervals.time}
; See "https://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; date = %a %x
; Optional time format
time = %X
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
; date-alt = %A, %B %d, %Y
time-alt = UTC%z (%Z)
; Available tags:
; <label> (default)
format = <label>
; Available tokens:
; %date%
; %time%
; Default: %date%
label = " %time%"
; label-font = 3
label-foreground = ${colors.time}
[module/kernel]
type = custom/script
; Available tokens:
; %counter%
; Command to be executed (using "/bin/sh -c [command]")
exec = echo " $(uname -r)"
; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
; exec-if = pgrep -x myservice
; Will the script output continous content?
; Default: false
tail = false
; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`)
interval = ${intervals.kernel}
; Available tags:
; <output> - deprecated
; <label> (default)
format = <label>
format-background = ${colors.background}
format-foreground = ${colors.kernel}
; format-padding = 4
; Available tokens:
; %output%
; Default: %output%
label = %output%
; Available tokens:
; %counter%
; %pid%
;
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
; click-left = echo left %counter%
; click-middle = echo middle %counter%
; click-right = echo right %counter%
; double-click-left = echo double left %counter%
; double-click-middle = echo double middle %counter%
; double-click-right = echo double right %counter%
; Available tokens:
; %counter%
; %pid%
;
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
; scroll-up = echo scroll up %counter%
; scroll-down = echo scroll down %counter%
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = ${intervals.cpu}
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
format = %{A3:alacritty -e bpytop &:} <label> %{A}
; Available tokens:
; %percentage% (default) - total cpu load averaged over all cores
; %percentage-sum% - Cumulative load on all cores
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label =  %percentage%%
label-foreground = ${colors.cpu}
; Spacing between individual per-core ramps
ramp-coreload-spacing = 1
ramp-coreload-0 =
ramp-coreload-1 =
ramp-coreload-2 =
ramp-coreload-3 =
ramp-coreload-4 =
ramp-coreload-5 =
ramp-coreload-6 =
ramp-coreload-7 =
ramp-coreload-foreground = ${colors.cpu}
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = ${intervals.memory}
; Available tags:
; <label> (default)
; <bar-used>
; <bar-free>
; <ramp-used>
; <ramp-free>
; <bar-swap-used>
; <bar-swap-free>
; <ramp-swap-used>
; <ramp-swap-free>
format = %{A3:alacritty -e bpytop &:} <label> %{A}
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
; %percentage_swap_used%
; %percentage_swap_free%
; %mb_swap_total%
; %mb_swap_free%
; %mb_swap_used%
; %gb_swap_total%
; %gb_swap_free%
; %gb_swap_used%
label =  %percentage_used%%
label-foreground = ${colors.memory}
; Only applies if <bar-used> is used
bar-used-indicator =
bar-used-width = 50
bar-used-foreground-0 = #55aa55
bar-used-foreground-1 = #557755
bar-used-foreground-2 = #f5a70a
bar-used-foreground-3 = #ff5555
bar-used-fill =
bar-used-empty =
bar-used-empty-foreground = #444444
; Only applies if <ramp-used> is used
ramp-used-0 =
ramp-used-1 =
ramp-used-2 =
ramp-used-3 =
ramp-used-4 =
ramp-used-5 =
ramp-used-6 =
ramp-used-7 =
ramp-used-foreground = ${colors.memory}
; Only applies if <ramp-free> is used
ramp-free-0 =
ramp-free-1 =
ramp-free-2 =
ramp-free-3 =
ramp-free-4 =
ramp-free-5 =
ramp-free-6 =
ramp-free-7 =
ramp-free-foreground = ${colors.memory}
[module/filesystem]
type = internal/fs
; Mountpoints to display
mount-0 = /home
; Seconds to sleep between updates
; Default: 30
interval = ${intervals.filesystem}
; Display fixed precision values
; Default: false
fixed-values = true
; Spacing between entries
; Default: 2
spacing = ${bar/mybar.module-margin}
; Available tags:
; <label-mounted> (default)
; <bar-free>
; <bar-used>
; <ramp-capacity>
format-mounted = %{A3:filelight &:} <label-mounted> %{A}
; Available tags:
; <label-unmounted> (default)
format-unmounted = %{A3:gnome-disks &:} <label-unmounted> %{A}
; Available tokens:
; %mountpoint%
; %type%
; %fsname%
; %percentage_free%
; %percentage_used%
; %total%
; %free%
; %used%
; Default: %mountpoint% %percentage_free%%
label-mounted =  %percentage_used%%
label-mounted-foreground = ${colors.filesystem}
; Available tokens:
; %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = %mountpoint% is not mounted
label-unmounted-foreground = ${colors.filesystem}
[module/dunst-notification-status]
type = custom/script
; Available tokens:
; %counter%
; Command to be executed (using "/bin/sh -c [command]")
exec = ~/.config/dwm-flexipatch/polybar/scripts/dunst-notification-status.sh
; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
; exec-if = pgrep -x myservice
; Will the script output continous content?
; Default: false
tail = false
; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`)
interval = ${intervals.dunst-notification-status}
; Available tags:
; <output> - deprecated
; <label> (default)
format = <label>
; format-background = ${colors.background}
; format-foreground =
; format-padding = 4
; Available tokens:
; %output%
; Default: %output%
label = %output%
label-foreground = ${colors.dunst-notification-status}
; label-maxlen =
; Available tokens:
; %counter%
; %pid%
;
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
click-left = "/home/sravan/.scripts/dunst.sh --dnd"
; click-middle = echo middle %counter%
click-right = "/home/sravan/.scripts/dunst.sh --history"
; double-click-left = echo double left %counter%
; double-click-middle = echo double middle %counter%
; double-click-right = echo double right %counter%
; Available tokens:
; %counter%
; %pid%
;
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
; scroll-up =
; scroll-down =

35
polybar/launch.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
BAR="mybar"
CONFIG="~/.config/dwm-flexipatch/polybar/config.ini"
NUM_MONITORS=0
CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1)
TRAY_POS="right"
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
rm /tmp/polybar.pids
sleep 1
for m in $CONNECTED_MONITORS; do
let "NUM_MONITORS+=1"
done
if [ $NUM_MONITORS == 1 ]; then
# Launch on only monitor w/ systray
MONITOR=$CONNECTED_MONITORS TRAY_POS=$TRAY_POS polybar --reload -c $CONFIG $BAR &
else
PRIMARY=$(xrandr --query | grep " connected" | grep "primary" | cut -d" " -f1)
OTHERS=$(xrandr --query | grep " connected" | grep -v "primary" | cut -d" " -f1)
# Launch on primary monitor w/ systray
MONITOR=$PRIMARY TRAY_POS=$TRAY_POS polybar --reload -c $CONFIG $BAR &
sleep 1
# Launch on all other monitors w/o systray
for m in $OTHERS; do
MONITOR=$m TRAY_POS=none polybar --reload -c $CONFIG $BAR &
done
fi
echo "$!" >>/tmp/polybar.pids

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Check if dunst is running
if pgrep -x "dunst" > /dev/null
then
is_paused=$(dunstctl is-paused)
if [[ $is_paused == 'false' ]]; then
status_icon=" on"
elif [[ $is_paused == 'true' ]]; then
status_icon=" off"
fi
else
status_icon=" off"
fi
echo $status_icon

View File

@@ -0,0 +1,18 @@
#!/bin/bash
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
echo " N/A"
else
artist=$(playerctl --player=playerctld metadata --format '{{ artist }}')
title=$(playerctl --player=playerctld metadata --format '{{ title }}')
status=$(playerctl --player=playerctld metadata --format '{{ status }}')
if [[ $status == "Paused" ]]; then
status_icon=" "
elif [[ $status == "Playing" ]]; then
status_icon=" "
fi
echo "$status_icon $artist - $title"
fi

View File

@@ -0,0 +1,23 @@
#!/bin/bash
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$((updates_arch + updates_aur))
# if [ "$updates" -gt 0 ]; then
# echo "# $updates"
# else
# echo ""
# fi
echo "$updates"