diff options
author | 2015-12-14 11:25:31 -0500 | |
---|---|---|
committer | 2015-12-14 11:25:31 -0500 | |
commit | 2be742d02d8dd26e111713d9bb52cd240d7d630b (patch) | |
tree | 84a5091db97f6c14515ce871922c431c0fe9eaca /swaygrab/main.c | |
parent | Merge pull request #316 from Streetwalrus/fglrx (diff) | |
parent | Add bar id to debug logs (diff) | |
download | sway-2be742d02d8dd26e111713d9bb52cd240d7d630b.tar.gz sway-2be742d02d8dd26e111713d9bb52cd240d7d630b.tar.zst sway-2be742d02d8dd26e111713d9bb52cd240d7d630b.zip |
Merge pull request #314 from mikkeloscar/bar-id
Add initial support for custom bar-id
Diffstat (limited to 'swaygrab/main.c')
-rw-r--r-- | swaygrab/main.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/swaygrab/main.c b/swaygrab/main.c index 681a6da4..2c6cf2dd 100644 --- a/swaygrab/main.c +++ b/swaygrab/main.c | |||
@@ -8,21 +8,12 @@ | |||
8 | #include <time.h> | 8 | #include <time.h> |
9 | #include "log.h" | 9 | #include "log.h" |
10 | #include "ipc-client.h" | 10 | #include "ipc-client.h" |
11 | #include "util.h" | ||
11 | 12 | ||
12 | void sway_terminate(void) { | 13 | void sway_terminate(void) { |
13 | exit(EXIT_FAILURE); | 14 | exit(EXIT_FAILURE); |
14 | } | 15 | } |
15 | 16 | ||
16 | int numlen(int n) { | ||
17 | if (n >= 1000000) return 7; | ||
18 | if (n >= 100000) return 6; | ||
19 | if (n >= 10000) return 5; | ||
20 | if (n >= 1000) return 4; | ||
21 | if (n >= 100) return 3; | ||
22 | if (n >= 10) return 2; | ||
23 | return 1; | ||
24 | } | ||
25 | |||
26 | void grab_and_apply_magick(const char *file, const char *output, | 17 | void grab_and_apply_magick(const char *file, const char *output, |
27 | int socketfd, int raw) { | 18 | int socketfd, int raw) { |
28 | uint32_t len = strlen(output); | 19 | uint32_t len = strlen(output); |