You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# wmenu
2
-
A [dmenu](https://tools.suckless.org/dmenu/) clone for windows operating system written with pure win32 API.
2
+
A [dmenu](https://tools.suckless.org/dmenu/) clone for the Windows operating system written with pure win32 API.
3
3
4
-
It's a hybrid gui/terminal win32 application inspired by dmenu from suckless. But it's more than dmenu. It's better to see wmenu as "a GUI echo" utility.
4
+
wmenu is a hybrid GUI/terminal application inspired by [dmenu](https://tools.suckless.org/dmenu/). But it's more than that. It's better to see wmenu as "a GUI echo" utility.
5
5
6
-
If you pass it a list of items to it via: `-elements` option, wmenu shows you a ComboBox and and you're able to select one of them. After that, it echos back that item on your terminal.
6
+
If you pass a list of items to it via: `-elements` option, wmenu shows you a ComboBox and and you're able to select one of them. After that, it echos back that item on your terminal.
7
7
8
8
If you omit `-elements`, wmenu starts acting like a GUI TextBox. Now you can type something and by pressing ENTER, it will echo the content of TextBox on the screen.
9
9
@@ -21,32 +21,35 @@ If you omit `-elements`, wmenu starts acting like a GUI TextBox. Now you can typ
21
21
# Why?
22
22
1. The main reason is that: I missed my Linux workflow.
23
23
24
-
When I met dmenu for the first time, I said to myself: "this simple tool can change your workflow", And surprisingly it did!
25
-
I started to use dmenu to automate almost everything in my computer.
24
+
When I met dmenu for the first time, I said to myself: "This simple tool can change my workflow completely", And surprisingly it did!
25
+
I started to use dmenu to automate almost everything in my machine.
26
26
From searching through applications, managing software(installing/deleting/updating), running custom scripts, browsing through my favorite directories, playing music, etc...
27
27
28
-
But the problem is that dmenu uses Xlib under the hood which is not available on windows. There are some hacky ways like compiling dmenu using cygwin, but.. no.. I didn't like that way.
28
+
But the problem is that dmenu uses Xlib under the hood which is not available on Windows. There are some hacky ways like compiling dmenu using Cygwin, but.. no. I didn't like those ways.
29
29
30
30
So I started from scratch to clone dmenu using win32 API, without any emulation. This is how wmenu was born :)
31
31
32
-
2. The second reason is that I wanted to encourage other people to challenge their habits.
33
-
Microsoft tried so hard during last years(And they are trying right now more than before) to force people to use their operating system in a specific way.
34
-
They pay huge money to their engineers to make for you a __default__ environment.
35
-
They always wanted you to follow their rules and tools. They think instead of you. And they design the house for you.
36
-
37
-
But hey, it's the computer world. No one can't tell you __HOW__ you can use your computer.
32
+
2. The second reason is that I wanted to encourage people to challenge their habits. (even if you are a programmer or not.)
33
+
Microsoft tried so hard during the last years(And they are trying now more than before) to force people to use Windows in a specific way.
34
+
They pay huge amounts of money to engineers to create a palace!(__default__ environment)
35
+
In the end, you will become a good user(follower!) But man! it's the computer world. No one can tell you __HOW__ you can use your computer.
38
36
39
37
# Prerequisites
40
38
- MSVC
41
39
42
40
# How use it?
43
-
Sicne wmenu uses WINDOWS subsystem when compiling, you can't use stdout directly.
41
+
Since wmenu uses the WINDOWS subsystem when compiling, you can't use stdout directly.
42
+
43
+
So you should pipe it with `more` command:
44
+
45
+
`wmenu.exe -elements "wmenu,dmenu,dwm" | more`
46
+
47
+
Or if you want to use a specific delimiter:
44
48
45
-
So you should start wmenu like this in your terminal/scripts:
For more information about how using wmenu and it's options:
52
+
For more information about how using wmenu:
50
53
`wmenu.exe -help | more`
51
54
52
55
# Usage
@@ -76,10 +79,9 @@ You can use [clavier+](https://github.com/guilryder/clavier-plus) to bind it to
76
79
As i said, i [use](https://github.com/LinArcX/winconf/tree/master/wmenu) wmenu for almost anything. Enjoy hacking your workflow :)
77
80
78
81
# Philosophy behind code structure
79
-
1. I intentionally changed/removed some policies that are common in the UNIX world (you can see them in most Linux apps like dmenu).
80
-
2. I don't like passing a list of elements by piping(something used in suckless dmenu). Instead, I prefer to __explicitly__ pass them via `-elmenets` option.
82
+
1. I intentionally changed/removed some policies that are common in the UNIX world (you can see them in most Linux software like dmenu).
83
+
2. I don't like passing a list of elements by piping(something used in suckless dmenu). Instead, I prefer to __explicitly__ pass them via `-elements` option.
81
84
3. I'm not a big fan of having two kinds of option names(short names like `-e` and long ones like `--elements`). Instead, I prefer to use full and descriptive names. (`-elements`)
82
-
4. I prefer __modularity__ and __readability__ over minimality. Consequently, I don't care about the line of codes!
Copy file name to clipboardExpand all lines: sources/commandLine/commandLine.cpp
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -104,19 +104,19 @@ void CommandLine::help()
104
104
105
105
printf("DESCRIPTION\n");
106
106
printf("\twmenu is a hybrid gui/terminal win32 application inspired by dmenu from suckless.\n\\
107
-
\tBut it is more than dmenu. It's better to see wmenu as \"a GUI echo\" utility.\n\n\\
108
-
\tIf you pass it a list of items to it via: `-elements` option, \n\\
109
-
\twmenu shows you a ComboBox and and you are able to select one of them. After that, it echos back that item on your terminal.\n\n\\
107
+
\tBut it is more than dmenu. It's better to see it as \"a GUI echo\" utility.\n\n\\
108
+
\tIf you pass it a list of items via: `-elements` option, \n\\
109
+
\twmenu shows you a ComboBox and and can choose one of the items from the list. After that, it echos back that item on your terminal.\n\n\\
110
110
\tIf you omit `-elements`, wmenu starts acting like a GUI TextBox.\n\\
111
111
\tNow you can type something and by pressing ENTER, it will echo the content of TextBox on the screen.\n\\
112
112
\n\n");
113
113
114
114
printf("OPTIONS\n");
115
115
printf("\t -elements\n");
116
-
printf("\t\tWith this option, you can pass a list of semicolon-separated items to wmenu. example: `wmenu -elements \"foo;bar;baRR;BAr;For;Foo;FOOO;BAZZ\"`\n\n");
116
+
printf("\t\tWith this option, you can pass a list of comma-separated items to wmenu. example: `wmenu -elements \"foo,bar,baRR,BAr,For,Foo,FOOO,BAZZ\"`\n\n");
117
117
118
118
printf("\t -element-delimiter\n");
119
-
printf("\t\tSpecify what character to seperate the elements from each other.[valid delimiters: , ; : - _ | And SPACE] If the option is ommited, wmenu will use \",\" by default\
119
+
printf("\t\tSpecify which character to seperate the elements from each other.[valid delimiters: , ; : - _ | And SPACE] If the option is ommited, wmenu will use \",\" by default\
0 commit comments