xaizek / euclid-wm (License: BSD 3-Clause) (since 2018-12-07)
A minimalist, tiling window manager for X11 that seeks to allow easy management of numerous windows entirely from the keyboard.
Commit b6f51937de323a7f080e72a5c4c9ee0b88c65464

added working handlers
Author: wmdiem
Author date (UTC): 2014-02-16 17:10
Committer name: wmdiem
Committer date (UTC): 2014-02-16 17:10
Parent(s): ac72e96996a18540aa4eb9436c664554980b88ac
Signing key:
Tree: 3d29ea0a39fb7d95d942f3e2becf33319166086c
File Lines added Lines deleted
handlers/c.sh 52 7
handlers/default.sh 20 4
File handlers/c.sh changed (mode: 100644) (index dab13e2..c2a286f)
1 #! /bin/sh
1 #! /bin/bash
2 2
3 #this is a test scripts
4 A=`echo $@ | bc -l`
5 if [ $A ]
6 then
7 echo $A
8 fi
3 #this is a test script
4 #if [ -e ~/.cache/euclid-menu/handlers/c.cache ]
5 # then
6 # echo -e "`cat ~/.cache/euclid-menu/handlers/c.cache`\n"
7 #fi
8 while read line
9 do
10 # if we get an empty line show history if it exists
11 if [[ "$(echo "$line" | tr -d ' ')" == "" ]]
12 then
13 if [[ -e ~/.cache/euclid-menu/handlers/c.cache ]]
14 then
9 15
16 echo -e "`cat ~/.cache/euclid-menu/handlers/c.cache`\n\n"
17 else
18 echo -e "\n\n"
19 fi
20
21 #otherwise try to calcuate if possible, as long as we aren't getting an exec
22 elif [[ "$(echo $line | grep "exec")" == "" ]]
23 then
24 A=`echo "$line" | tr -d ' ' | bc -l`
25 if [ $A ] ;
26 then
27 echo -e "$A\n\n"
28
29 #update history file
30 rm ~/.cache/euclid-menu/handlers/c.cache.tmp
31 #the awk one-liner magically removes duplicates without sorting, by treating the current line as an index
32 cat ~/.cache/euclid-menu/handlers/c.cache | awk '!a[$0]++' > ~/.cache/euclid-menu/handlers/c.cache.tmp
33 echo -e "$line = $A \t($line)" > ~/.cache/euclid-menu/handlers/c.cache
34 sed -n "1,99 p" ~/.cache/euclid-menu/handlers/c.cache.tmp >>~/.cache/euclid-menu/handlers/c.cache
35
36 # echo -e "$line = $A \t($line)" >> ~/.cache/euclid-menu/handlers/c.cache
37 # echo "\n"
38
39 else
40 #check whether anything in history matches:
41 #need to escape *
42 grep $(echo "$line" | tr -d ' ' | sed 's/\*/\\*/g') ~/.cache/euclid-menu/handlers/c.cache
43
44
45 echo -e "\n"
46
47 fi
48 fi
49 done
50
51 #trim history file
52
53
54 #[[ $(cat ~/.cache/euclid-menu/handlers/c.cache | wc -l) -gt 100 ]] && sed -i "1,100 d" ~/.cache/euclid-menu/handlers/c.cache
File handlers/default.sh changed (mode: 100644) (index c36a808..985faf8)
1 if [ $1 ]
1 #!/bin/bash
2 2
3 then
4 3
5 echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 -executable -printf '%P\n' | sort -u | grep -i $1
4 while read line
5
6 do
7 if [ "$line" = "" ];
6 8
9 then
10 echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 -executable -printf '%P\n' | sort -u
11 #ls /usr/bin | sort
12 echo -e "\n"
13
14 elif [[ $line == exe* ]];
15
16 then
17 exec ${line:5:${#line}-5};
18
19
7 20 else else
8 21
9 echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 -executable -printf '%P\n' | sort -u
22 #ls /usr/bin | grep "$line"
23 echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 -executable -printf '%P\n' | sort -u | grep -i $line
24 echo -e "\n"
10 25
11 26 fi fi
27 done
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/euclid-wm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/euclid-wm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master