Difference between pages "Package:Dwm" and "Template:DisplayBuilds"

(Difference between pages)
(Updated to reflect changes in dwm ebuilds)
 
 
Line 1: Line 1:
{{Ebuild
+
<includeonly>
|Summary=<code>dwm</code> is extremely fast and lightweight window manager. It manages windows in tiled, floating and monocle layouts.
+
{{#get_web_data:url=http://build.funtoo.org/index.xml|format=xml|use xpath|data=build=/subarches/subarch[@name='{{#var:subarch}}']/build[@id='{{{1}}}']/@build,variant=/subarches/subarch[@name='{{#var:subarch}}']/build[@id='{{{1}}}']/@variant,latest=/subarches/subarch[@name='{{#var:subarch}}']/build[@id='{{{1}}}']/@latest,path=/subarches/subarch[@name='{{#var:subarch}}']/build[@id='{{{1}}}']/@path,download=/subarches/subarch[@name='{{#var:subarch}}']/build[@id='{{{1}}}']/@download}}
|CatPkg=x11-wm/dwm
+
<tr>
|Maintainer=Causes,
+
<td>{{#external_value:build}}</td>
|Homepage=http://dwm.suckless.org/
+
<td>{{#vardefine:v|{{#external_value:variant}}}}{{#if:{{#var:v}}|{{#var:v}}|<span style="color: #888;">standard</span>}}</td>
}}
+
<td>{{#external_value:latest}}</td>
== Installation ==
+
<td>Download from: '''[http://ftp.osuosl.org/pub/funtoo{{#external_value:download}} osuosl.org]''' '''[http://build.funtoo.org{{#external_value:download}} funtoo.org]'''</td>
 
+
<td>Browse mirror: [http://ftp.osuosl.org/pub/funtoo{{#external_value:path}} osuosl.org] [http://build.funtoo.org{{#external_value:path}} funtoo.org]</td>
Program launcher is needed to run programs from dwm. You can choose dmenu or rofi.
+
</tr>
{{file|name=/etc/portage/make.conf|desc=Set dmenu USE-flag|body=
+
</includeonly>
USE="$USE dmenu"
+
}}
+
<console>
+
###i## emerge -av dwm
+
</console>
+
 
+
== Configuration ==
+
 
+
dwm is configured by editing <code>/etc/portage/savedconfig/x11-wm/dwm-6.0</code> and rebuilding dwm.
+
 
+
Enable savedconfig.
+
{{file|name=/etc/portage/package.use|lang=|desc=|body=
+
x11-wm/dwm savedconfig
+
}}
+
 
+
Edit configuration file.
+
<console>
+
###i## nano /etc/portage/savedconfig/x11-wm/dwm-6.0
+
</console>
+
 
+
Rebuild dwm.
+
<console>
+
###i## emerge dwm
+
</console>
+
 
+
== Basic usage ==
+
{|class="table table-striped"
+
|| Shortcut || Description
+
|-
+
|| <code>Alt</code> || META
+
|-
+
|| <code>META+p</code> || Run program with dmenu
+
|-
+
|| <code>META+3</code> || Move to tag number 3
+
|-
+
|| <code>META+j / k</code> || Move to next / previous client
+
|-
+
|| <code>META+i / d</code> || Increase / decrease master clients
+
|-
+
|| <code>META+Enter</code> || Move client to master area
+
|-
+
|| <code>META+h / l</code> || Resize master area
+
|-
+
|| <code>META+t / f / m</code> || Switch to title / floating / monocle layout
+
|-
+
|| <code>shift+META+c</code> || Kill client
+
|-
+
|| <code>shift+META+3</code> || Move client to tag 3
+
|-
+
|| <code>shift+META+Enter</code> || Run terminal
+
|-
+
|| <code>shift+META+q</code> || Quit dwm
+
|}
+
 
+
== Patching ==
+
Patches in <code>/etc/portage/patches/x11-wm/dwm</code> gets applied when emerging dwm. Patches has to have .patch file extension.
+
<console>
+
###i## mkdir -p /etc/portage/patches/x11-wm/dwm
+
###i## cd /etc/portage/patches/x11-wm/dwm
+
###i## wget -O dwm-6.0-pertag.patch http://dwm.suckless.org/patches/dwm-6.0-pertag.diff
+
</console>
+
 
+
Rebuild dwm.
+
<console>
+
###i## emerge dwm
+
</console>
+
 
+
== Customize statusbar ==
+
dwm has statusbar that can be customized with <code>xsetroot</code>. You can run xsetroot from <code>~/.xinitrc</code>.
+
You can start dwm by configuring <code>~/.xinitrc</code> and running <code>startx</code>.
+
{{file|name=~/.xinitrc|lang=|desc=|body=
+
ifname="wlan0"
+
interval=5
+
 
+
rxs=0
+
txs=0
+
 
+
while true; do
+
        temp="$(cat /sys/class/thermal/thermal_zone1/temp {{!}} cut -b1,2)C"
+
        load="$(cat /proc/loadavg {{!}} cut -d " " -f 1)"
+
        bandwidth="${rxs}KiB/s ${txs}KiB/s"
+
        batusage="$(cat /sys/class/power_supply/BAT0/capacity)%"
+
        batstatus="$(cat /sys/class/power_supply/BAT0/status)"
+
        date="$(date +"%a %d.%m %H:%M")"
+
 
+
        xsetroot -name "$temp $load {{!}} $bandwidth {{!}} $batusage $batstatus {{!}} $date"
+
 
+
        rx1=$(cat /sys/class/net/$ifname/statistics/rx_bytes)
+
        tx1=$(cat /sys/class/net/$ifname/statistics/tx_bytes)
+
        sleep $interval
+
        rx2=$(cat /sys/class/net/$ifname/statistics/rx_bytes)
+
        tx2=$(cat /sys/class/net/$ifname/statistics/tx_bytes)
+
        rxs=$(expr $rx2 - $rx1)
+
        txs=$(expr $tx2 - $tx1)
+
        rxs=$(expr $rxs / $interval)
+
        txs=$(expr $txs / $interval)
+
        rxs=$(expr $rxs / 1024)
+
        txs=$(expr $txs / 1024)
+
done &
+
 
+
exec dwm
+
}}
+
 
+
 
+
== Starting ==
+
You can start dwm by configuring <code>~/.xinitrc</code> and running <code>startx</code>.
+
{{file|name=~/.xinitrc|lang=|desc=|body=
+
exec dwm
+
}}
+
 
+
<console>
+
$##i## startx
+
</console>
+
 
+
To autostart dwm on login see [[Getty as display manager]].
+
{{EbuildFooter}}
+

Revision as of 04:19, January 15, 2015