Code Monkey home page Code Monkey logo

dwm's Introduction

DWM - Dynamic Window Manager

dwm is an extremely fast, small and dynamic window manager for X.

This repository exists as my fork of dwm (currently just 6.1), and as such has references and links to my own config.

CAVEAT EMPTOR

Requirements

I mostly use Arch Linux, as such package names/file paths will be tied to Arch’s. If you wish to fork this, it should be quite simple to get working.

Dependencies

The following packages are needed to build:

  • libx11
  • libxft
  • libxinerama

A full running version also depends on the following packages:

  • xorg-xsetroot (for status and dwm needs it)
  • xorg-setxkbmap (for startup)
  • xorg-xset (for startup)
  • nitrogen (setting wallpaper)
  • network-manager-applet (network management)
  • dunst (notification daemon)
  • picom (compositor)
  • gnome-screensaver (for screen lock)

And for the status:

  • sysstat
  • acpi

Installation

You might have to modify config.mk to match any local changes (although I haven’t had to). This is also currently where the theme flags are specified.

After making any changes, run sudo make install clean to install dwm and create a dwm.desktop file for working with login managers.

Running DWM

This dwm setup depends on a number of other utilities which get run from the Startup and Status scripts.

It also assumes it’s being run through a login manager, but passing the Startup script to xinit should work.

Customisation

For simplicity, my dwm.c is already patched with everything in patches/ but all the ordered patches should apply from a base 6.1.

There also exists a number of themes (shown below)

assets/nord.pngassets/gruvbox.pngassets/solarized_dark.pngassets/solarized_light.png
Nord (-DNORD)Gruvbox (-DGRUVBOX)Solarized Dark (-DSOLARIZED_DARK)Solarized Light (-DSOLARIZED_LIGHT)

Which can be displayed with the associated flag in config.mk. All included themes also styles clients appropriately, as well as dmenu.

Adding a theme

If you wish to contribute your own theme, add an appropriate #IFDEF THEMENAME block in config.h to specify the colours, and further down for dmenu.

You also need to adjust the block in dwm.c within updatesystray to specify the background.

Status

The status area is a simple script with a number of functions, currently just CPU, RAM, time, speaker status and battery (unless full).

It relies on xsetroot to echo a large formatted string. I accept that this isn’t the best way to write this however programmers are lazy.

Screen Locking

I use gdm as my login manager because it’s simple, clean and it just works.

Along with the below config, closing the lid locks and suspends the computer.

/etc/systemd/logind.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore

dwm's People

Contributors

anydot avatar cls avatar elken avatar ericpruitt avatar garbeam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.