Skip to content

Commit 1584020

Browse files
committed
clean old stuff
1 parent 1732464 commit 1584020

File tree

2 files changed

+10
-86
lines changed

2 files changed

+10
-86
lines changed

README.md

+4-52
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ Just edit the "config.h" file. Save and
1010
sudo make clean install
1111
```
1212

13-
###A notification panel
14-
One thing you miss sorely in dwm is a notification panel. Rather than creating one (which is invariably going to be only static), you can use gnome-panel with dwm by setting its float value correctly.
15-
16-
Also added the keybinding MOD+g to open gnome-panel. Just add the following lines:
17-
18-
```
19-
static const char *gpcmd[] = { "gnome-panel", NULL };
20-
21-
//later add this row in the keys section
22-
{ MODKEY, XK_g, spawn, {.v = gpcmd } },
23-
```
24-
2513
###Anything you need is a few keys away
2614

2715
I almost always need Firefox. So,
@@ -35,59 +23,23 @@ static const char *ffcmd[] = { "firefox", NULL };
3523

3624
You get the idea. Just make sure no key binding clashes occur.
3725

38-
###Suspend with lock
39-
Putting the computer in sleep mode is essential for me. However it needs to come with screen locking for safety. Here is my hack for this need.
40-
41-
For putting to sleep, I am using "pm-utils". For screenlock "slock" from suckless.
42-
43-
Create a bash script as follows:
44-
```
45-
sudo pm-suspend ; slock
46-
```
47-
and put it in /usr/local/bin.
48-
49-
You should be able to see the script in dmenu.You can also map it to some keys as done before.
50-
51-
However there is a catch. As it stands we need to enter password for sudo which cannot be done as the command is not being execute in a terminal. The workaround is to add an entry in the sudoers file.
52-
53-
[Source](http://sohcahtoa.org.uk/pages/linux-dwm-window-manager-on-debian.html) for some of my info.
54-
55-
Open the file using:
56-
```
57-
sudo visudo
58-
```
59-
60-
Don't let the name fool you, the editor is not vi/vim, it is nano.
61-
Add an entry as given in the linked article or google. In the command alias section create an alias to /usr/sbin/pm-suspend.
62-
63-
Also, when you wake the computer from sleep, the screen is shown for a couple of seconds after which the slock kicks in. Also if you are using slock, there is no prompt for a password. It is just a black screen that turn blue as you start typing your password.
64-
6526
### Terminal(s)
6627

6728
So terminals are something I need aplenty.
6829

6930
Current keybindings:
7031

71-
Alt + Shift + <Enter> -- gnome-terminal / konsole
72-
Alt + Shift + t -- xterm under tabbed
73-
Alt + Shift + x -- xfce4-terminal
7432
Alt + Shift + u -- urxvt
7533

76-
Adds easy keybindings for xterm. Note that xterm has not concepts of tabs (like in gnome-terminal) so I bound it with tabbed , another suckless product that provides tabbing feature to X based applications.
77-
78-
Though the above feature exists, I have moved to using tmux more often than not, so I am not really using this anymore.
34+
urxvt with tmux is the only thing I am using these days.
7935

8036
Terminals had a problem of empty spaces around them. This has now been solved.
8137

82-
###Wishlist or TODO
38+
###Dropdown terminal
8339

84-
* Remap terminal to some easy key (say Windows/Command).
85-
* Remap dmenu to the menu key.
86-
* Both the above depends on getting the X key code for the respective keys.
87-
* Getter a better solution to the sleeplock hack.
88-
* In general organize keybindings for applications vs dwm-related stuff.
89-
* Modify xterm-tabbed key bindings to shadow gnome-defaults.
40+
See [this](https://github.com/noctuid/tdrop) for an awesome terminal independent drop down setup. I use it with urxvt + tmux, which gives me everything needed.
9041

9142
###See also
9243
My original [source](http://holymonkey.com/dwm-with-gnome-guide.html) of the gnome-panel idea.
9344
The keybindings [source](http://srobb.net/dwm.html).
45+
Some tutorials [here](http://forums.debian.net/viewtopic.php?f=16&t=65110) and elsewhere.

config.h

+6-34
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ static const Rule rules[] = {
2020
/* class instance title tags mask isfloating monitor */
2121
{ "Gimp", NULL, NULL, 0, True, -1 },
2222
{ "Firefox", NULL, NULL, 1 << 0, False, -1 },
23-
{ "Konqueror", NULL, NULL, 1 << 0, False, -1 },
24-
{ "Gnome-panel", NULL, NULL, 1 << 0, True, -1 },
2523
};
2624

2725
/* layout(s) */
@@ -53,46 +51,20 @@ static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor,
5351

5452
// misc
5553
static const char *ffcmd[] = { "firefox", NULL };
56-
static const char *utermcmd[] = { "urxvt", NULL };
54+
static const char *termcmd[] = { "urxvt", NULL };
5755

58-
// gnome specific commands
59-
static const char *termcmd[] = { "gnome-terminal", NULL };
60-
static const char *gpcmd[] = { "gnome-panel", NULL };
61-
62-
// dwm specific tools
63-
//xterm with tabbed (from suckless)
64-
static const char *termcmd2[] = { "tabbed", "-c", "xterm", "-into", NULL };
65-
//custom sleep
66-
static const char *sleepcmd[] = { "dwm-sleep.sh", NULL };
67-
68-
// on moving to KDE
69-
static const char *krcmd[] = { "konqueror", NULL };
70-
static const char *ktermcmd[] = { "konsole", NULL };
71-
72-
// for XFCE4 based items
73-
static const char *xfcetermcmd[] = { "xfce4-terminal", NULL };
74-
75-
// not working : abandoned for now
76-
//static const char *nmappletcmd[] = { "nm-applet", NULL };
56+
// dropdown terminal with tmux - https://github.com/noctuid/tdrop
57+
static const char *termdropcmd[] = { "tdrop", "-a", "-s", "dropdown", "urxvt", NULL };
7758

7859
// note that konsole and gnome-terminal are mapped to the same key
7960
static Key keys[] = {
8061
/* modifier key function argument */
8162
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
8263
//misc
8364
{ MODKEY|ShiftMask, XK_f, spawn, {.v = ffcmd } },
84-
{ MODKEY|ShiftMask, XK_u, spawn, {.v = utermcmd } },
85-
//gnome specific
86-
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
87-
{ MODKEY, XK_g, spawn, {.v = gpcmd } },
88-
//dwm specific
89-
{ MODKEY|ShiftMask, XK_t, spawn, {.v = termcmd2 } },
90-
{ MODKEY|ShiftMask, XK_s, spawn, {.v = sleepcmd } },
91-
//kde specific
92-
{ MODKEY|ShiftMask, XK_k, spawn, {.v = krcmd } },
93-
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = ktermcmd } },
94-
//xfce4 specific
95-
{ MODKEY|ShiftMask, XK_x, spawn, {.v = xfcetermcmd } },
65+
{ MODKEY|ShiftMask, XK_u, spawn, {.v = termcmd } },
66+
// drop down terminal
67+
{ MODKEY, XK_o, spawn, {.v = termdropcmd } },
9668
//others
9769
{ MODKEY, XK_b, togglebar, {0} },
9870
{ MODKEY, XK_j, focusstack, {.i = +1 } },

0 commit comments

Comments
 (0)