You are not logged in.
Thanks for the quick replies guys.
Bohoomil - this is the approach I was thinking about. I was going to use xrandr to get the resolutions and calculate the centre in a wrapper script, but I'm not sure how the script would know which monitor the xterm window will be displayed on.
JokerBoy - I was initially hoping to avoid patching dwm.c, but its probably not a bad idea for me to start looking at this. So I think I'll try out your patch. Multumesc!
Offline
@madders: or you can try pygtk-shutdown from AUR.
Offline
Just a suggestion, you can also use dmenu
#!/bin/sh
if [ -f $HOME/.dmenurc ]; then
. $HOME/.dmenurc
else
DMENU='dmenu -i'
fi
cmd=$(echo -e "shutdown\nreboot\nlock" | $DMENU)
case $cmd in
shutdown)
sudo shutdown -h now
;;
reboot)
sudo shutdown -r now
;;
lock)
slock
;;
esac
Then I bound this script with the following in the config.h
...
static const char *dmenupowerbutton[] = { "dmenu-powerbutton", NULL };
...
{ 0, 0x1008ff2a, spawn, {.v = dmenupowerbutton } },
This keycode appeared on the Macbook Pro I used to use, but it also works on my new netbook, so it probably works everywhere
Last edited by Army (2012-04-02 19:24:01)
Offline
Thanks for the other suggestions.
@OK100 - I installed this, but it's not really the look I was after, and there were quite a few gtk dependencies I had to install. Also, my issue really was around displaying the shutdown window centered, which this doesn't address. But thanks for the suggestion - it's still good to know about it.
@Army - Using dmenu is a great idea, I hadn't thought about that option. But even so I'm gonna stick with the window for now since I spent a while getting it to look right. The keycode works for my shutdown button too - so thank you for sharing that - it's ideal. In my script I've used ConsoleKit and dbus to trigger the shutdown/restart (I added suspend and hibernate too), but I think I'm going to go back to using sudo shutdown like your script - it's much simpler - then I can uninstall ConsoleKit.
@JokerBoy - I got your patch working perfectly. It works great with multiple monitors too. I had to patch it manually because it looks like it has dependencies on some of your other patches. Your other patches look really useful too though, so I think I'll be borrowing a few of those too :-) I'm guessing that the numbering of each diff file is for the dependencies?
Offline
subscribed
Offline
Just a suggestion, you can also use dmenu
#!/bin/sh if [ -f $HOME/.dmenurc ]; then . $HOME/.dmenurc else DMENU='dmenu -i' fi cmd=$(echo -e "shutdown\nreboot\nlock" | $DMENU) case $cmd in shutdown) sudo shutdown -h now ;; reboot) sudo shutdown -r now ;; lock) slock ;; esac
Then I bound this script with the following in the config.h
... static const char *dmenupowerbutton[] = { "dmenu-powerbutton", NULL }; ... { 0, 0x1008ff2a, spawn, {.v = dmenupowerbutton } },
This keycode appeared on the Macbook Pro I used to use, but it also works on my new netbook, so it probably works everywhere
Nice script, thanks!
I replaced pygtk-shutdown with this.
Offline
@JokerBoy - I got your patch working perfectly. It works great with multiple monitors too. I had to patch it manually because it looks like it has dependencies on some of your other patches. Your other patches look really useful too though, so I think I'll be borrowing a few of those too :-) I'm guessing that the numbering of each diff file is for the dependencies?
I know it does I was using a dual-monitor setup till a few days ago.. The numbering is for keeping track in which order they can be applied. Cu placere.
Last edited by JokerBoy (2012-04-03 08:35:32)
Arch64/DWM || My Dropbox referral link
Offline
Hey I'm trying to bind Mod + Tab to go to the next tag, and Mod + Tilde to go to the previous tag, but now that I think about it, I'm going about this the wrong way.
I've heard that tags are used differently than workspaces, and I read an article shared on this thread, but I still don't understand the workflow of pulling in tags and sending them out again, vs simply switching to # tag.
Can someone enlighten me?
Offline
Hey I'm trying to bind Mod + Tab to go to the next tag, and Mod + Tilde to go to the previous tag, but now that I think about it, I'm going about this the wrong way.
The cycle patch does this.
I've heard that tags are used differently than workspaces, and I read an article shared on this thread, but I still don't understand the workflow of pulling in tags and sending them out again, vs simply switching to # tag.
Can someone enlighten me?
Just forget the workspace analogy and think in terms of pulling sets of different apps into view at any one time. I work from my first tag "base" and if I want to check mail, I just pull in that tag, do what I need and then togle it back out of view. Same with the other tags.
The one hack I would like to see to make this work seamlessly for me is to be able to pull the new tag to master, rather than into the stack.
Offline
I've heard that tags are used differently than workspaces, and I read an article shared on this thread, but I still don't understand the workflow of pulling in tags and sending them out again, vs simply switching to # tag.
Can someone enlighten me?
I think switching 'view' and 'toggleview' makes life easier.
https://bbs.archlinux.org/viewtopic.php … 3#p1055143
Offline
wolfcore wrote:Hey I'm trying to bind Mod + Tab to go to the next tag, and Mod + Tilde to go to the previous tag, but now that I think about it, I'm going about this the wrong way.
The cycle patch does this.
I've heard that tags are used differently than workspaces, and I read an article shared on this thread, but I still don't understand the workflow of pulling in tags and sending them out again, vs simply switching to # tag.
Can someone enlighten me?
Just forget the workspace analogy and think in terms of pulling sets of different apps into view at any one time. I work from my first tag "base" and if I want to check mail, I just pull in that tag, do what I need and then togle it back out of view. Same with the other tags.
The one hack I would like to see to make this work seamlessly for me is to be able to pull the new tag to master, rather than into the stack.
wolfcore wrote:I've heard that tags are used differently than workspaces, and I read an article shared on this thread, but I still don't understand the workflow of pulling in tags and sending them out again, vs simply switching to # tag.
Can someone enlighten me?
I think switching 'view' and 'toggleview' makes life easier.
https://bbs.archlinux.org/viewtopic.php … 3#p1055143
Thanks guys, I've switched view with toggleview, although to me it would seem better to switch view with toggleview, and then view with tag?
Like this:
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
Seems like I use tag much less than view, and shift is more comfortable to press
Anyways... I like this new workflow. Spins like a dream.
Edit: now that I think about it...
Last edited by wolfcore (2012-04-05 05:14:46)
Offline
Hello,
Somehow I can not get DWM to start after (succesfully) having applied statuscolor patch. There are no errors during patching and no errors uring compiling, but when X starts with my DWM session, no bar is showing and none of my keybindings work. All I see is my dzen2 and conky. I start DWM with a startdwm script as found in the Wiki but there is nothing at all in the ~/.dwm.log file.
Here's my config.h and statuscolor patch
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Hello,
Somehow I can not get DWM to start after (succesfully) having applied statuscolor patch. There are no errors during patching and no errors uring compiling, but when X starts with my DWM session, no bar is showing and none of my keybindings work. All I see is my dzen2 and conky. I start DWM with a startdwm script as found in the Wiki but there is nothing at all in the ~/.dwm.log file.
Here's my config.h and statuscolor patch
The config.h needs to reflect the changes too. It looks like the patch you're using only patches dwm.c. You can try jasonwryan's statuscolors patch, http://beta.intuxication.org/jasonwryan … s-6.0.diff . It includes the config.h part. It uses 9 colors.
edit:spelling(your -> you're, dooh)
Last edited by stlarch (2012-04-05 22:21:03)
Offline
Unia wrote:Hello,
Somehow I can not get DWM to start after (succesfully) having applied statuscolor patch. There are no errors during patching and no errors uring compiling, but when X starts with my DWM session, no bar is showing and none of my keybindings work. All I see is my dzen2 and conky. I start DWM with a startdwm script as found in the Wiki but there is nothing at all in the ~/.dwm.log file.
Here's my config.h and statuscolor patch
The config.h needs to reflect the changes too. It looks like the patch your using only patches dwm.c. You can try jasonwryan's statuscolors patch, http://beta.intuxication.org/jasonwryan … s-6.0.diff . It includes the config.h part. It uses 9 colors.
I took the config.h and patch from OK100's GitHub, but after his patch didn't work I picked Jokerboy's. They both patched without errors, so I don't think/suspect anything is wrong with either the patch or the config.h. You have more experience than I have though, so I'll try JWR's now
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
How can I check if there are any clients associated with a tag? I want to have a keybinding that either opens a program in a specified tag if there is no program with that tag, or execs toggleview to that tag if the program is already running.
Offline
The config.h needs to reflect the changes too. It looks like the patch you're using only patches dwm.c. You can try jasonwryan's statuscolors patch, http://beta.intuxication.org/jasonwryan … s-6.0.diff . It includes the config.h part. It uses 9 colors.
edit:spelling(your -> you're, dooh)
Thanks for your help! I realised what I was doing wrong and now it all works just fine
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
is there a way i can move a floating window behind one that is maximized? It seems that even if focus is on a window in the background and there is a non-tiled window open, it has to be open in the forground.
Thanks for any tips.
Offline
skrite, I asked for this on the mailing list a few weeks ago, here's a patch which shows you how it's done. I actually use this one and like it a lot.
diff -paur dwm.old/dwm.c dwm.new/dwm.c
--- dwm.old/dwm.c 2012-03-31 21:33:15.129154942 +0200
+++ dwm.new/dwm.c 2012-03-31 21:34:13.809628624 +0200
@@ -1443,13 +1443,12 @@ restack(Monitor *m) {
drawbar(m);
if(!m->sel)
return;
- if(m->sel->isfloating || !m->lt[m->sellt]->arrange)
- XRaiseWindow(dpy, m->sel->win);
+ XRaiseWindow(dpy, m->sel->win);
if(m->lt[m->sellt]->arrange) {
wc.stack_mode = Below;
wc.sibling = m->barwin;
for(c = m->stack; c; c = c->snext)
- if(!c->isfloating && ISVISIBLE(c)) {
+ if(c != m->sel && !c->isfloating && ISVISIBLE(c)) {
XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
wc.sibling = c->win;
}
Offline
Army: wow, thanks, that worked perfectly.
Offline
I just switched over from xmonad to dwm. I'm loving it so far.
I have yet to catch up on this thread; I'm up to page 16 and I plan to skim it all for good ideas, but I have one "patch" of my own which isn't worth a patch file but I like:
Make the layout symbol (or icon, thanks to termsyn font) a different color (with colorstatus patch) by changing line 472 of dwm.c in function drawbar
drawtext(m->ltsymbol, dc.colors[4], False); // changed [4] from [0]
This may seem simple, but as I had to look for the right line to change, this might speed/ease the process for someone else.
EDIT: It's line 472 after the color status patch has been applied to an otherwise "vanilla" dwm 6.0
AFTER-THOUGHT: If others find this useful, and given this line is already changed by the color status patch, perhaps the patched line could be adjusted to include a constant that would be placed in the config.h. In other words
dwm.c
drawtext(m->ltsymbol, dc.colors[LAYOUT_SYM_COLOR], False);
config.h
#define LAYOUT_SYM_COLOR 0
Last edited by Trilby (2012-04-07 02:12:52)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
REQUEST: hide unfocused windows in monocle layout
Coming from xmonad this is a behavior I took for granted. In dwm's monocle mode if I have a semi-transparent terminal ("true" transparency w/ xcompmgr) focused in monocle mode, I end up seeing other clients behind the terminal rather than the desktop.
While I know I could switch to pseudo-transparency, it ends up a bit choppy and ugly (when urxvt is resized it takes a moment to redraw the background).
If anyone has already implemented this please let me know. Alternately if you know a good place to start, hints would be appreciated. Otherwise, when I get some time, my plan is to look at the transparency patch to get hints on where to start. I figure this is a good start as if I can get dwm to set all non-focused clients to fully transparent in moncle mode only I'd have the behavior I want.
Last edited by Trilby (2012-04-07 20:10:26)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@Trilby
Make the layout symbol (or icon, thanks to termsyn font) a different color (with colorstatus patch) by changing line 472 of dwm.c in function drawbar
I created two patches for this
+
bg color
fg color
symbolcolor.diff (colored layout symbol)
https://github.com/ivoarch/dwm-patches/ … color.diff
dwm-6.0-xbm_layout_icons.plus.diff (based on "ok100" patch) + colored layout symbol and icons
https://github.com/ivoarch/dwm-patches/ … .plus.diff
For use with statuscolor.patch
just replace;
dc.norm , dc.sel
whit
dc.colors[0] dc.colors[1]
Last edited by ivoarch (2012-04-08 18:27:14)
Offline
I need some help "creating" a patch. In the March screenshot thread, I saw a scrot of Kaptenen's DWM which had colors bars on the tags instead of the squares. He linked me to a January screenshot topic post that explained how to do so and so I am getting those bits together in a patch. The first half works, but the second doesn't. As soon as I add the ltcol stuff, I get
dwm.c:773:9: fout: ‘ltcol’ undeclared (first use in this function)
dwm.c:773:9: note: each undeclared identifier is reported only once for each function it appears in
How can I solve that? Here's my working patch so far: http://pastebin.com/Uvep94he
And here's what it has to be: http://pastebin.com/5JyfDZbx
PS: Also, with the working one, I get
dwm.c: In functie ‘drawbar’:
dwm.c:769:2: let op: impliciete declaratie van functie ‘drawborder’ [-Wimplicit-function-declaration]
dwm.c: Op bovenste niveau:
dwm.c:823:1: let op: conflicting types for ‘drawborder’ [enabled by default]
dwm.c:769:2: note: previous implicit declaration of ‘drawborder’ was here
Although it does built, I'd like to get rid of those messages. Do I have to declare a function somewhere? How?
Thanks in advance guys!
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Offline
@Unia
Try so
Hm, I took the parts from that patch that mine didn't have and integrated them, but now the lines above tag names look "off center" in regarding to the tag names. You can see here in the scrot:
The only part I didn't integrate from yours is the last, because I couldn't find any lines in my dwm.c that looked like that. Perhaps this is the cause?
EDIT: I took a second look, and it's not the lines that're off - it's the tag names. Without the patch, there's a little whitespace between the left edge of my screen and the first tag name. With the patch, there's none. Here's a normal one to compare:
Last edited by Unia (2012-04-08 20:00:26)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline