d can work with dxhd

monkyyy crazymonkyyy at gmail.com
Sat Mar 30 21:38:05 UTC 2024


https://github.com/dakyskye/dxhd

dxhd.sh
```
#!/home/monkyyy/dshell
# super + shift + {a,b}
executeShell("zenity --info --text={hello,bye}");
```

dshell.d
```d
import std;
void main(){
	auto f=File(".local/temp.d","w");
	f.writeln("import std;");
	f.writeln("void main(string[] input){");
	foreach(a;stdin.byLineCopy){
		f.writeln(a);
	}
	f.writeln("}");
	f.close;
	executeShell("dmd -run .local/temp.d");
}
```

super+shift+a opens a popup thats says hello
super+shift+b opens a popup thats says bye

its a bit slow, rdmd didnt work
you could probaly make dshell able to run 1 off commands skipping 
the whole prosess or maybe add more hooks idk
any trivial ideas for improving this


More information about the Digitalmars-d mailing list