add(debug) lld debugger with Xephyr
This commit is contained in:
parent
a0a8250d14
commit
57724c340d
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lua-local",
|
||||
"request": "launch",
|
||||
"name": "Debug with Xephyr",
|
||||
"program": {
|
||||
"command": "${workspaceFolder}/start-xephyr.sh"
|
||||
},
|
||||
"args": [
|
||||
"/usr/bin/Xephyr",
|
||||
"/usr/bin/awesome",
|
||||
"${workspaceFolder}/init.lua",
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
4
init.lua
4
init.lua
|
@ -1,5 +1,9 @@
|
|||
-- awesome_mode: api-level=4:screen=on
|
||||
|
||||
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
|
||||
require("lldebugger").start()
|
||||
end
|
||||
|
||||
-- If LuaRocks is installed, make sure that packages installed through it are
|
||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||
pcall(require, 'luarocks.loader')
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
xephyr=$1
|
||||
awesome=$2
|
||||
rc_file=$3
|
||||
|
||||
# Check for the first free $DISPLAY
|
||||
for ((i=1;;i++)); do
|
||||
if [[ ! -f "/tmp/.X${i}-lock" ]]; then
|
||||
D=$i;
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
|
||||
# Start Xephyr
|
||||
$xephyr :$D -name xephyr_$D -ac -br -noreset -screen 1600x900 >/dev/null 2>&1 &
|
||||
sleep 1
|
||||
|
||||
# Start Awesome
|
||||
DISPLAY=:$D.0 $awesome \
|
||||
--config $rc_file
|
Loading…
Reference in New Issue