DK Window Manager

Pretty good, got a 4 point medium size.

1 Like

Good deal. Glad y’all got something to eat on.

You know it, gonna hang for a couple weeks then gonna butcher it.

1 Like

They’re so much better when the weather permits it.

@natemaia you were right, the latest commits fixed the wierd *now “win” bug where it had that non-unicode character trailing. Everything on status is working really good now too. One thing I’ve noticed though and it’s kind of a nuance. If you close a window. It’s title is still left in “type=win”. So you’d expect it to dissapear from an output be it a terminal mostly in testing purposes and a bar or something in other purposes. But it doesn’t. It’s kind of hard to see from a terminal because a closed window title falls back to the terminal’s title and erases it on the same workspace but if it’s in a workspace without any other windows it persists.

Like I said it’s a nuance because ws and layout always have data but win is one that can have nothing at times.

Hope that makes sense, don’t know if it’s even something that can be addressed but if so it’s probably minor.

Good find, I didn’t think of that one but it’s an easy fix with the way things are set up.

It should be fixed with the latest commit.

Cool, yeah that fixed it.

1 Like

DK has been working really solid lately as of latest commit sitting on master. Just reporting in.


I have managed to pipe conkybar into lemonbar. Also removed lemonbar and replaced with lemonbar-xft so the xft fonts work. Just need to get the workspace numbers to show. ?

Conky has a workspace variable. Have you tried that in your conkyrc?

In the “/docs/scripts” folder for dk (if you cloned the git repo) there is a bar script for lemonbar. You can see how workspaces were done for that. I think there is also just a script that you may be able to call from conky.


Thanks for the info works fine but still lots of fun yet.

Trying to change to work like the below works, but I only see three workspace’s this is running with conky | lemonbar.

I prefer the workspace numbering and the underline below plus the layout mode also clickable.

# shellcheck disable=SC2059,SC2064,SC2086

# simple lightweight lemonbar script for use with dk


# xft fonts
font0="Source Code Pro Bold:pixelsize=12"
font1="NotoSansMono Nerd Font:pixelsize=13"
font2="Font Awesome 5 Free:pixelsize=10"

# xft fonts
# font0="monospace:pixelsize=24"
# font1="Font Awesome 5 Brands:pixelsize=20"
# font2="icomoon:pixelsize=18"
# font3="Anonymice Nerd Font Mono:pixelsize=18"


# mimic dwm style layout symbols
typeset -A layouts=(

	typeset f='' b='' u='' wm='' layout='' s="$separator"

	while read -r line; do
		case $line in
			A*) title="${line#?}" ;;
			L*) l="${line#?}"; layout="${layouts[$l]}" ;;
				wm='' IFS=':'
				set -- ${line#?}
				while (( $# > 0 )); do
					case $item in
						A*) f="$highlight" b="$bg" u="$highlight" ;; # occupied   - focused
						a*) f="$fg" b="$bg" u="$highlight" ;;        # occupied   - unfocused
						I*) f="$highlight" b="$bg" u="$fg" ;;        # unoccupied - focused
						i*) f="$fg" b="$bg" u="$fg" ;;               # unoccupied - unfocused
					wm="$wm%{F$f}%{B$b}%{+u}%{U$u}%{A:dkcmd ws $name:} $name %{A}%{-u}%{B-}%{F-}"
		printf "%s\n" "%{l}$wm $seperator $layout%{c}"

# kill the process and cleanup if we exit or get killed
trap "trap - TERM; kill 0; rm -f '$fifo'" INT TERM QUIT EXIT

# make the fifo
[ -e "$fifo" ] && rm "$fifo"
mkfifo "$fifo"

# here we dump info into the FIFO, order does not matter things are parsed
# out using the first character of the line. Click commands for left button
# can be added by passing an argument containing the command (like volume below)
dkcmd status type=bar > "$fifo" &

# run the pipeline
if [[ $1 == '-b' ]]; then
	parsefifo < "$fifo" | lemonbar -b -a 32 -u $underline -B "$bg" -F "$fg" -f "$font0" -f "$font1" -f "$font2" -f "$font3" | sh
	parsefifo < "$fifo" | lemonbar -a 32 -u $underline -B "$bg" -F "$fg" -f "$font0" -f "$font1" -f "$font2" -f "$font3" | sh

# vim:ft=sh:fdm=marker:fmr={,}

Also can’t seem to get nerd fonts to work font awesome works fine. Both are installed…

I also fixed alfa by moving compton up in the autostart list.

conky | lemonbar -g x24 -B "#00000000" -F "#A0A0A0" -f "Source Code Pro Bold:size=10" -f 'Font Awesome 5 Free:size=10' -f 'Font Awesome 5 Brands:size=10' -f 'Font Awesome 5 Free Solid:size=10' &
compton --config ~/.config/dk/compton.conf &
nitrogen --restore &
dunst &
nm-applet &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

If you want a hand getting that working just let me know, I’m not very familiar with using conky for status bars but I know my way around dk status and shell scripts.

Thanks for replying

I have a few questions about different things but will just stick with the bar & error log for now. Don’t worry about the conky side of things I can deal with that.

Something I don’t understand about the bar and workspace numbers, if just run lemonbar with conky no workspace numbers show in the bar at all. So to me the workspace numbers are handled by dkrc file so why are no numbers showing.

Now as seen below if I change the workspace numbers in dkrc file to icons and add ${exec ~/.config/dk/scripts/} to my conky so I can see the spacenumbers both the icons and numbers show.

Why are the numbers not showing from the dkrc file in the first place with out using the file.


This is with out changing the ws=1 name= to and icon just leaving it as a 1 .

dkcmd set \
		ws=1  name="" \
		ws=2  name="" \
		ws=3  name="3" \
		ws=4  name="4" \
		ws=5  name="5" \
		ws=6  name="6" 
conky.config = {
	out_to_x = false,
    out_to_console = true,
    own_window = false,
    own_window_argb_visual = true,
    override_utf8_locale = true,
    update_interval = 1,
    use_xft = true,
    use_spacer = "left",
    color1 = '#00CC33',


conky.text = [[
 %{l} ${if_mpd_playing} ${mpd_smart 50}  ${mpd_elapsed} / ${mpd_length} ${else} ${mpd_status} ${endif} %{c} ${exec ~/.config/dk/scripts/} %{r}  ${cpu cpu0}%${hwmon 1 temp 1}° |  ${mem} / ${memmax} |  /: ${fs_used /}  ${fs_size /}  ~:   ${fs_used /home/}  ${fs_size /home/} |  ${hwmon 1  fan 1} rpm  ${hwmon 1  fan 2} rpm |  ${totalup enp4s0}  ${totaldown enp4s0} | ${time %A %d/%m/%y}   ${time %I:%M %p}



Just for a bit more confusion by me only here my dk log file.

WARNING: Setting geometry in section global doesn't exist
WARNING: Setting notification_height in section global doesn't exist
WARNING: Setting conky in section global doesn't exist
WARNING: Setting startup_notification in section global doesn't exist
WARNING: Setting verbosity in section global doesn't exist
WARNING: Section shortcuts is deprecated.
Acting on notifications has been moved to its own utility. For more information, see the manual for dunstctl.
Ignoring this section.
Another composite manager is already running
CRITICAL: [src/dbus.c:dbus_cb_name_lost:1027] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'dunst' with PID '20923'.
Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
The program 'nitrogen' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 348 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

You have a really good WM here and I like it a lot.

As for it just works if set up right with conky | lemonbar but just a couple things.

If try and run from conky like no conky is seen only the workspace numbers.
To fix this I run the from dkrc file ~/.config/dk/scripts/ the file is edited as above no changers.
The icons unlike above if use icons for ws=1 name=“1” no icons or number is shown just a blank space.
Kitty transparency is not working or very hit your miss. Alacritty and st transparency works just fine.

None of those errors are from dk, you know because it would have dk: error: some message.

When you set the workspace name via dkcmd set ws=N name="something" it sets the ewmh workspace name (_NET_DESKTOP_NAMES[N]), this may not be reflected in the example scripts, sometimes it could be the name, others the number/index. If you want one or the other it would be best to specify. The status output will give you both so it’s just a matter of parsing out which you want. A simple way to get the desktop names would be using xprop

xprop -root -notype _NET_DESKTOP_NAMES

# or cleaned up further
xprop -root -notype _NET_DESKTOP_NAMES | sed 's/_NET_DESKTOP_NAMES = //; s/",\?//g'

Which should give you something like

1 2 3 4 5 6 7 8 9 10

You can see that after I run your ws name command

Using the same xprop command from above I get

  3 4 5 6 7 8 9 10

I suggest starting your own script from scratch and just sit in a terminal for a while trying to parse it out into what you want. It’s easy enough

dkcmd status type=ws num=1

Then you can google around and pipe it into other programs to clean it up.

Show workspaces on seperate lines

dkcmd status type=full num=1 | sed -n '/^workspaces:/,/^$/p' | tail -n11 | awk '{print $1}'

or modified to show on one line

awk '/^workspaces:/ {sub(/^workspaces: /, ""); gsub(/:\w* /, " "); gsub(/:\w*$/, ""); print}' <(dkcmd status type=full num=1)

The example scripts are by no means meant to be perfect or even what anyone wants/needs, they’re just show examples of how to parse dkcmd output and use/display it.


Thanks You so much.

I have always been scared of lemonbar mainly because of the way the module code is written as I know nothing about coding, but in the last few days I have learnt how powerful lemon is and the magic of the pipe.

With other bars they can’t add anything to the conkybar it is like you have a bar and you have a conky script thats it, but lemon can control and also add features the conky script, that itself is awesome too me.

I now have full transparency back with kitty I need to be careful where I place the autostarts in the dkrc, as I never will use .xintirc or .xprofile for autostarts as it interferes with other WM’s they must be interdependent of each other.

One thing I ended the nitrogen errors with paru -R seems fixed now. :see_no_evil: feh --bg-scale ~/Pictures/ArchLabs/AL_TILES.png :smiley:

Thanks for updating to script and your reply post this will be a great help too me.

Running dk on my laptop, not fully setup yet but I am getting the hang of it. Have added a blog post on my website

Running tint2 at the moment but am going to look at other lighter panels.


@mrgreen , nice to see you here. DK should be a nice fit in ArchBang.