summaryrefslogtreecommitdiff
path: root/config/nvim-1/undo/%home%coast%Projects%pylua%dmenu.lua
blob: 745ec8dcfde15c3b09575ab51d687ab36f13d591 (plain)
ofshex dumpascii
0000 56 69 6d 9f 55 6e 44 6f e5 00 03 66 4a 42 fe 74 40 3a 98 a2 e7 e3 1a b5 50 16 d0 36 3c b4 d0 1d Vim.UnDo...fJB.t@:......P..6<...
0020 fb f3 f5 29 22 96 14 7d a1 ac dd 00 00 00 62 00 00 00 00 00 00 00 63 00 00 00 00 00 00 00 01 00 ...)"..}......b.......c.........
0040 00 00 03 00 00 00 00 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 00 69 a1 12 f1 04 01 00 00 00 .......................i........
0060 01 00 5f d0 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 .._.............................
0080 00 00 00 00 ff ff ff ff 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
01a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
01c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
01e0 00 00 00 00 00 00 69 a1 12 ef 04 01 00 00 00 00 00 f5 18 00 00 00 00 00 00 00 02 00 00 00 00 00 ......i.........................
0200 00 00 62 00 00 00 4a 2d 2d 20 4c 75 61 20 73 63 72 69 70 74 20 74 6f 20 6c 61 75 6e 63 68 20 61 ..b...J--.Lua.script.to.launch.a
0220 70 70 6c 69 63 61 74 69 6f 6e 73 20 75 73 69 6e 67 20 64 6d 65 6e 75 20 77 69 74 68 20 63 75 73 pplications.using.dmenu.with.cus
0240 74 6f 6d 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 00 00 00 00 00 00 00 1d 2d 2d 20 43 75 73 74 tom.configuration........--.Cust
0260 6f 6d 20 64 6d 65 6e 75 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 00 00 00 13 6c 6f 63 61 6c 20 om.dmenu.configuration....local.
0280 64 6d 65 6e 75 5f 63 6d 64 20 3d 20 7b 00 00 00 0d 09 22 64 6d 65 6e 75 5f 72 75 6e 22 2c 00 00 dmenu_cmd.=.{....."dmenu_run",..
02a0 00 07 09 22 2d 66 6e 22 2c 00 00 00 18 09 22 46 69 72 61 20 43 6f 64 65 2d 31 30 22 2c 20 2d 2d ..."-fn",....."Fira.Code-10",.--
02c0 20 66 6f 6e 74 00 00 00 07 09 22 2d 6e 62 22 2c 00 00 00 1c 09 22 23 31 65 31 65 31 65 22 2c 20 .font....."-nb",....."#1e1e1e",.
02e0 20 20 2d 2d 20 6e 6f 72 6d 62 67 63 6f 6c 6f 72 00 00 00 07 09 22 2d 6e 66 22 2c 00 00 00 1c 09 ..--.normbgcolor....."-nf",.....
0300 22 23 63 63 63 63 63 63 22 2c 20 20 20 2d 2d 20 6e 6f 72 6d 66 67 63 6f 6c 6f 72 00 00 00 07 09 "#cccccc",...--.normfgcolor.....
0320 22 2d 73 62 22 2c 00 00 00 1b 09 22 23 32 34 37 32 63 38 22 2c 20 20 20 2d 2d 20 73 65 6c 62 67 "-sb",....."#2472c8",...--.selbg
0340 63 6f 6c 6f 72 00 00 00 07 09 22 2d 73 66 22 2c 00 00 00 1b 09 22 23 65 35 65 35 65 35 22 2c 20 color....."-sf",....."#e5e5e5",.
0360 20 20 2d 2d 20 73 65 6c 66 67 63 6f 6c 6f 72 00 00 00 06 09 22 2d 6c 22 2c 00 00 00 2d 09 22 31 ..--.selfgcolor....."-l",...-."1
0380 30 22 2c 20 20 20 20 20 20 20 20 2d 2d 20 6e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 20 69 6e 0",........--.number.of.lines.in
03a0 20 74 68 65 20 64 6d 65 6e 75 00 00 00 01 7d 00 00 00 00 00 00 00 2d 2d 2d 20 46 75 6e 63 74 69 .the.dmenu....}.......---.Functi
03c0 6f 6e 20 74 6f 20 67 65 74 20 74 68 65 20 6c 69 73 74 20 6f 66 20 2e 64 65 73 6b 74 6f 70 20 66 on.to.get.the.list.of..desktop.f
03e0 69 6c 65 73 00 00 00 22 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 5f 64 65 73 6b 74 iles..."local.function.get_deskt
0400 6f 70 5f 66 69 6c 65 73 28 29 00 00 00 19 09 6c 6f 63 61 6c 20 64 65 73 6b 74 6f 70 5f 66 69 6c op_files().....local.desktop_fil
0420 65 73 20 3d 20 7b 7d 00 00 00 5e 09 6c 6f 63 61 6c 20 64 69 72 73 20 3d 20 7b 20 6f 73 2e 67 65 es.=.{}...^.local.dirs.=.{.os.ge
0440 74 65 6e 76 28 22 48 4f 4d 45 22 29 20 2e 2e 20 22 2f 2e 6c 6f 63 61 6c 2f 73 68 61 72 65 2f 61 tenv("HOME")...."/.local/share/a
0460 70 70 6c 69 63 61 74 69 6f 6e 73 22 2c 20 22 2f 75 73 72 2f 73 68 61 72 65 2f 61 70 70 6c 69 63 pplications",."/usr/share/applic
0480 61 74 69 6f 6e 73 22 20 7d 00 00 00 00 00 00 00 1e 09 66 6f 72 20 5f 2c 20 64 69 72 20 69 6e 20 ations".}.........for._,.dir.in.
04a0 69 70 61 69 72 73 28 64 69 72 73 29 20 64 6f 00 00 00 40 09 09 6c 6f 63 61 6c 20 70 66 69 6c 65 ipairs(dirs).do...@..local.pfile
04c0 20 3d 20 69 6f 2e 70 6f 70 65 6e 28 22 66 69 6e 64 20 22 20 2e 2e 20 64 69 72 20 2e 2e 20 27 20 .=.io.popen("find."....dir....'.
04e0 2d 6e 61 6d 65 20 22 2a 2e 64 65 73 6b 74 6f 70 22 27 29 00 00 00 1e 09 09 66 6f 72 20 66 69 6c -name."*.desktop"')......for.fil
0500 65 20 69 6e 20 70 66 69 6c 65 3a 6c 69 6e 65 73 28 29 20 64 6f 00 00 00 24 09 09 09 74 61 62 6c e.in.pfile:lines().do...$...tabl
0520 65 2e 69 6e 73 65 72 74 28 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 2c 20 66 69 6c 65 29 00 00 00 e.insert(desktop_files,.file)...
0540 05 09 09 65 6e 64 00 00 00 0f 09 09 70 66 69 6c 65 3a 63 6c 6f 73 65 28 29 00 00 00 04 09 65 6e ...end......pfile:close().....en
0560 64 00 00 00 00 00 00 00 15 09 72 65 74 75 72 6e 20 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 00 00 d.........return.desktop_files..
0580 00 03 65 6e 64 00 00 00 00 00 00 00 50 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 78 74 72 ..end.......P--.Function.to.extr
05a0 61 63 74 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 6e 61 6d 65 20 61 6e 64 20 65 78 65 act.the.application.name.and.exe
05c0 63 20 63 6f 6d 6d 61 6e 64 20 66 72 6f 6d 20 61 20 64 65 73 6b 74 6f 70 20 66 69 6c 65 00 00 00 c.command.from.a.desktop.file...
05e0 2e 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f .local.function.extract_info_fro
0600 6d 5f 64 65 73 6b 74 6f 70 28 66 69 6c 65 29 00 00 00 28 09 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 m_desktop(file)...(.local.app_na
0620 6d 65 2c 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 6e 69 6c 2c 20 6e 69 6c 00 00 00 00 00 me,.exec_command.=.nil,.nil.....
0640 00 00 1e 09 66 6f 72 20 6c 69 6e 65 20 69 6e 20 69 6f 2e 6c 69 6e 65 73 28 66 69 6c 65 29 20 64 ....for.line.in.io.lines(file).d
0660 6f 00 00 00 1e 09 09 69 66 20 6c 69 6e 65 3a 6d 61 74 63 68 28 22 5e 4e 61 6d 65 3d 22 29 20 74 o......if.line:match("^Name=").t
0680 68 65 6e 00 00 00 19 09 09 09 61 70 70 5f 6e 61 6d 65 20 3d 20 6c 69 6e 65 3a 73 75 62 28 36 29 hen.......app_name.=.line:sub(6)
06a0 00 00 00 22 09 09 65 6c 73 65 69 66 20 6c 69 6e 65 3a 6d 61 74 63 68 28 22 5e 45 78 65 63 3d 22 ..."..elseif.line:match("^Exec="
06c0 29 20 74 68 65 6e 00 00 00 1d 09 09 09 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 6c 69 6e 65 ).then.......exec_command.=.line
06e0 3a 73 75 62 28 36 29 00 00 00 05 09 09 65 6e 64 00 00 00 00 00 00 00 23 09 09 69 66 20 61 70 70 :sub(6)......end.......#..if.app
0700 5f 6e 61 6d 65 20 61 6e 64 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 00 00 08 09 _name.and.exec_command.then.....
0720 09 09 62 72 65 61 6b 00 00 00 05 09 09 65 6e 64 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 1e ..break......end.....end........
0740 09 72 65 74 75 72 6e 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 00 00 .return.app_name,.exec_command..
0760 00 03 65 6e 64 00 00 00 00 00 00 00 44 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 73 63 61 ..end.......D--.Function.to.esca
0780 70 65 20 73 70 65 63 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 28 73 70 61 63 65 73 2c 20 70 pe.special.characters.(spaces,.p
07a0 61 72 65 6e 74 68 65 73 65 73 2c 20 65 74 63 2e 29 00 00 00 31 6c 6f 63 61 6c 20 66 75 6e 63 74 arentheses,.etc.)...1local.funct
07c0 69 6f 6e 20 65 73 63 61 70 65 5f 73 70 65 63 69 61 6c 5f 63 68 61 72 61 63 74 65 72 73 28 63 6f ion.escape_special_characters(co
07e0 6d 6d 61 6e 64 29 00 00 00 36 09 2d 2d 20 45 73 63 61 70 65 20 73 70 61 63 65 73 20 61 6e 64 20 mmand)...6.--.Escape.spaces.and.
0800 70 61 72 65 6e 74 68 65 73 65 73 20 66 6f 72 20 70 72 6f 70 65 72 20 65 78 65 63 75 74 69 6f 6e parentheses.for.proper.execution
0820 00 00 00 2a 09 72 65 74 75 72 6e 20 63 6f 6d 6d 61 6e 64 3a 67 73 75 62 28 22 28 5b 25 73 25 28 ...*.return.command:gsub("([%s%(
0840 25 29 5d 29 22 2c 20 22 5c 5c 25 31 22 29 00 00 00 03 65 6e 64 00 00 00 00 00 00 00 2e 2d 2d 20 %)])",."\\%1")....end........--.
0860 46 75 6e 63 74 69 6f 6e 20 74 6f 20 72 75 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 Function.to.run.the.application.
0880 75 73 69 6e 67 20 64 6d 65 6e 75 00 00 00 23 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 6c 61 using.dmenu...#local.function.la
08a0 75 6e 63 68 5f 61 70 70 6c 69 63 61 74 69 6f 6e 28 29 00 00 00 2a 09 6c 6f 63 61 6c 20 64 65 73 unch_application()...*.local.des
08c0 6b 74 6f 70 5f 66 69 6c 65 73 20 3d 20 67 65 74 5f 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 28 29 ktop_files.=.get_desktop_files()
08e0 00 00 00 14 09 6c 6f 63 61 6c 20 61 70 70 5f 6c 69 73 74 20 3d 20 7b 7d 00 00 00 18 09 6c 6f 63 .....local.app_list.=.{}.....loc
0900 61 6c 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 20 3d 20 7b 7d 00 00 00 00 00 00 00 21 09 2d 2d 20 al.app_commands.=.{}.......!.--.
0920 47 61 74 68 65 72 20 61 70 70 20 6e 61 6d 65 73 20 61 6e 64 20 63 6f 6d 6d 61 6e 64 73 00 00 00 Gather.app.names.and.commands...
0940 28 09 66 6f 72 20 5f 2c 20 66 69 6c 65 20 69 6e 20 69 70 61 69 72 73 28 64 65 73 6b 74 6f 70 5f (.for._,.file.in.ipairs(desktop_
0960 66 69 6c 65 73 29 20 64 6f 00 00 00 40 09 09 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 6d 65 2c 20 65 files).do...@..local.app_name,.e
0980 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f 6d 5f xec_command.=.extract_info_from_
09a0 64 65 73 6b 74 6f 70 28 66 69 6c 65 29 00 00 00 23 09 09 69 66 20 61 70 70 5f 6e 61 6d 65 20 61 desktop(file)...#..if.app_name.a
09c0 6e 64 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 00 00 23 09 09 09 74 61 62 6c 65 nd.exec_command.then...#...table
09e0 2e 69 6e 73 65 72 74 28 61 70 70 5f 6c 69 73 74 2c 20 61 70 70 5f 6e 61 6d 65 29 00 00 00 28 09 .insert(app_list,.app_name)...(.
0a00 09 09 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 61 70 70 5f 6e 61 6d 65 5d 20 3d 20 65 78 65 63 5f ..app_commands[app_name].=.exec_
0a20 63 6f 6d 6d 61 6e 64 00 00 00 05 09 09 65 6e 64 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 17 command......end.....end........
0a40 09 69 66 20 23 61 70 70 5f 6c 69 73 74 20 3d 3d 20 30 20 74 68 65 6e 00 00 00 21 09 09 70 72 69 .if.#app_list.==.0.then...!..pri
0a60 6e 74 28 22 4e 6f 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 66 6f 75 6e 64 2e 22 29 00 00 00 08 nt("No.applications.found.")....
0a80 09 09 72 65 74 75 72 6e 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 35 09 2d 2d 20 4a 6f 69 6e ..return.....end.......5.--.Join
0aa0 20 74 68 65 20 61 70 70 20 6e 61 6d 65 73 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20 73 74 72 .the.app.names.into.a.single.str
0ac0 69 6e 67 20 66 6f 72 20 64 6d 65 6e 75 00 00 00 2a 09 6c 6f 63 61 6c 20 61 70 70 73 20 3d 20 74 ing.for.dmenu...*.local.apps.=.t
0ae0 61 62 6c 65 2e 63 6f 6e 63 61 74 28 61 70 70 5f 6c 69 73 74 2c 20 22 5c 6e 22 29 00 00 00 00 00 able.concat(app_list,."\n").....
0b00 00 00 26 09 2d 2d 20 55 73 65 20 64 6d 65 6e 75 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 ..&.--.Use.dmenu.to.select.an.ap
0b20 70 6c 69 63 61 74 69 6f 6e 00 00 00 51 09 6c 6f 63 61 6c 20 68 61 6e 64 6c 65 20 3d 20 69 6f 2e plication...Q.local.handle.=.io.
0b40 70 6f 70 65 6e 28 74 61 62 6c 65 2e 63 6f 6e 63 61 74 28 64 6d 65 6e 75 5f 63 6d 64 2c 20 22 20 popen(table.concat(dmenu_cmd,.".
0b60 22 29 20 2e 2e 20 22 20 3c 3c 3c 20 27 22 20 2e 2e 20 61 70 70 73 20 2e 2e 20 22 27 22 29 00 00 ")....".<<<.'"....apps...."'")..
0b80 00 37 09 6c 6f 63 61 6c 20 73 65 6c 65 63 74 65 64 5f 61 70 70 20 3d 20 68 61 6e 64 6c 65 3a 72 .7.local.selected_app.=.handle:r
0ba0 65 61 64 28 22 2a 61 22 29 3a 67 73 75 62 28 22 5c 6e 24 22 2c 20 22 22 29 00 00 00 0f 09 68 61 ead("*a"):gsub("\n$",."").....ha
0bc0 6e 64 6c 65 3a 63 6c 6f 73 65 28 29 00 00 00 00 00 00 00 3a 09 69 66 20 73 65 6c 65 63 74 65 64 ndle:close().......:.if.selected
0be0 5f 61 70 70 20 7e 3d 20 22 22 20 61 6e 64 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 73 65 6c 65 _app.~=."".and.app_commands[sele
0c00 63 74 65 64 5f 61 70 70 5d 20 74 68 65 6e 00 00 00 43 09 09 2d 2d 20 45 73 63 61 70 65 20 61 6e cted_app].then...C..--.Escape.an
0c20 79 20 73 70 65 63 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 69 6e 20 74 68 65 20 63 6f 6d 6d y.special.characters.in.the.comm
0c40 61 6e 64 20 62 65 66 6f 72 65 20 72 75 6e 6e 69 6e 67 20 69 74 00 00 00 4e 09 09 6c 6f 63 61 6c and.before.running.it...N..local
0c60 20 63 6f 6d 6d 61 6e 64 5f 74 6f 5f 72 75 6e 20 3d 20 65 73 63 61 70 65 5f 73 70 65 63 69 61 6c .command_to_run.=.escape_special
0c80 5f 63 68 61 72 61 63 74 65 72 73 28 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 73 65 6c 65 63 74 65 _characters(app_commands[selecte
0ca0 64 5f 61 70 70 5d 29 00 00 00 22 09 09 2d 2d 20 52 75 6e 20 74 68 65 20 63 6f 72 72 65 73 70 6f d_app])..."..--.Run.the.correspo
0cc0 6e 64 69 6e 67 20 63 6f 6d 6d 61 6e 64 00 00 00 1c 09 09 6f 73 2e 65 78 65 63 75 74 65 28 63 6f nding.command......os.execute(co
0ce0 6d 6d 61 6e 64 5f 74 6f 5f 72 75 6e 29 00 00 00 04 09 65 6e 64 00 00 00 03 65 6e 64 00 00 00 00 mmand_to_run).....end....end....
0d00 00 00 00 11 2d 2d 20 4d 61 69 6e 20 65 78 65 63 75 74 69 6f 6e 00 00 00 14 6c 61 75 6e 63 68 5f ....--.Main.execution....launch_
0d20 61 70 70 6c 69 63 61 74 69 6f 6e 28 29 35 81 f5 18 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00 application()5...............b..
0d40 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 0a 00 00 00 00 00 00 01 00 00 ................................
0d60 00 00 00 00 00 35 81 5f d0 00 00 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 .....5._........................
0d80 01 00 00 00 00 00 00 00 00 ff ff ff ff 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0da0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0dc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0de0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0e00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0e20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0e40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0e80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0ea0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0ec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0ee0 00 00 00 00 00 00 00 00 00 00 00 69 a1 12 f0 04 01 00 00 00 00 00 f5 18 00 00 00 00 00 00 00 00 ...........i....................
0f00 00 00 00 00 00 00 00 01 00 00 00 00 f5 18 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 35 81 ..............................5.
0f20 f5 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5b 00 00 00 14 00 00 00 00 00 ......................[.........
0f40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fd 0a 00 00 00 00 00 00 35 81 5f d0 00 00 00 02 00 00 ......................5._.......
0f60 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 5c 00 00 00 13 00 00 00 00 ff ff ff ff 00 01 .................\..............
0f80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
10a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
10c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 69 a1 12 f0 ............................i...
10e0 04 01 00 00 00 01 00 f5 18 00 00 00 62 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 f5 18 00 ............b...................
1100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00 00 4a 2d 2d 20 4c 75 61 20 73 63 72 69 70 74 ..............b...J--.Lua.script
1120 20 74 6f 20 6c 61 75 6e 63 68 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 75 73 69 6e 67 20 64 6d .to.launch.applications.using.dm
1140 65 6e 75 20 77 69 74 68 20 63 75 73 74 6f 6d 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 00 00 00 enu.with.custom.configuration...
1160 00 00 00 00 1d 2d 2d 20 43 75 73 74 6f 6d 20 64 6d 65 6e 75 20 63 6f 6e 66 69 67 75 72 61 74 69 .....--.Custom.dmenu.configurati
1180 6f 6e 00 00 00 13 6c 6f 63 61 6c 20 64 6d 65 6e 75 5f 63 6d 64 20 3d 20 7b 00 00 00 0d 09 22 64 on....local.dmenu_cmd.=.{....."d
11a0 6d 65 6e 75 5f 72 75 6e 22 2c 00 00 00 07 09 22 2d 66 6e 22 2c 00 00 00 18 09 22 46 69 72 61 20 menu_run",....."-fn",....."Fira.
11c0 43 6f 64 65 2d 31 30 22 2c 20 2d 2d 20 66 6f 6e 74 00 00 00 07 09 22 2d 6e 62 22 2c 00 00 00 1a Code-10",.--.font....."-nb",....
11e0 09 22 23 31 65 31 65 31 65 22 2c 20 2d 2d 20 6e 6f 72 6d 62 67 63 6f 6c 6f 72 00 00 00 07 09 22 ."#1e1e1e",.--.normbgcolor....."
1200 2d 6e 66 22 2c 00 00 00 1a 09 22 23 63 63 63 63 63 63 22 2c 20 2d 2d 20 6e 6f 72 6d 66 67 63 6f -nf",....."#cccccc",.--.normfgco
1220 6c 6f 72 00 00 00 07 09 22 2d 73 62 22 2c 00 00 00 19 09 22 23 32 34 37 32 63 38 22 2c 20 2d 2d lor....."-sb",....."#2472c8",.--
1240 20 73 65 6c 62 67 63 6f 6c 6f 72 00 00 00 07 09 22 2d 73 66 22 2c 00 00 00 19 09 22 23 65 35 65 .selbgcolor....."-sf",....."#e5e
1260 35 65 35 22 2c 20 2d 2d 20 73 65 6c 66 67 63 6f 6c 6f 72 00 00 00 06 09 22 2d 6c 22 2c 00 00 00 5e5",.--.selfgcolor....."-l",...
1280 26 09 22 31 30 22 2c 20 2d 2d 20 6e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 20 69 6e 20 74 68 &."10",.--.number.of.lines.in.th
12a0 65 20 64 6d 65 6e 75 00 00 00 01 7d 00 00 00 00 00 00 00 2d 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 e.dmenu....}.......---.Function.
12c0 74 6f 20 67 65 74 20 74 68 65 20 6c 69 73 74 20 6f 66 20 2e 64 65 73 6b 74 6f 70 20 66 69 6c 65 to.get.the.list.of..desktop.file
12e0 73 00 00 00 22 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 5f 64 65 73 6b 74 6f 70 5f s..."local.function.get_desktop_
1300 66 69 6c 65 73 28 29 00 00 00 19 09 6c 6f 63 61 6c 20 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 20 files().....local.desktop_files.
1320 3d 20 7b 7d 00 00 00 5e 09 6c 6f 63 61 6c 20 64 69 72 73 20 3d 20 7b 20 6f 73 2e 67 65 74 65 6e =.{}...^.local.dirs.=.{.os.geten
1340 76 28 22 48 4f 4d 45 22 29 20 2e 2e 20 22 2f 2e 6c 6f 63 61 6c 2f 73 68 61 72 65 2f 61 70 70 6c v("HOME")...."/.local/share/appl
1360 69 63 61 74 69 6f 6e 73 22 2c 20 22 2f 75 73 72 2f 73 68 61 72 65 2f 61 70 70 6c 69 63 61 74 69 ications",."/usr/share/applicati
1380 6f 6e 73 22 20 7d 00 00 00 00 00 00 00 1e 09 66 6f 72 20 5f 2c 20 64 69 72 20 69 6e 20 69 70 61 ons".}.........for._,.dir.in.ipa
13a0 69 72 73 28 64 69 72 73 29 20 64 6f 00 00 00 40 09 09 6c 6f 63 61 6c 20 70 66 69 6c 65 20 3d 20 irs(dirs).do...@..local.pfile.=.
13c0 69 6f 2e 70 6f 70 65 6e 28 22 66 69 6e 64 20 22 20 2e 2e 20 64 69 72 20 2e 2e 20 27 20 2d 6e 61 io.popen("find."....dir....'.-na
13e0 6d 65 20 22 2a 2e 64 65 73 6b 74 6f 70 22 27 29 00 00 00 1e 09 09 66 6f 72 20 66 69 6c 65 20 69 me."*.desktop"')......for.file.i
1400 6e 20 70 66 69 6c 65 3a 6c 69 6e 65 73 28 29 20 64 6f 00 00 00 24 09 09 09 74 61 62 6c 65 2e 69 n.pfile:lines().do...$...table.i
1420 6e 73 65 72 74 28 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 2c 20 66 69 6c 65 29 00 00 00 05 09 09 nsert(desktop_files,.file)......
1440 65 6e 64 00 00 00 0f 09 09 70 66 69 6c 65 3a 63 6c 6f 73 65 28 29 00 00 00 04 09 65 6e 64 00 00 end......pfile:close().....end..
1460 00 00 00 00 00 15 09 72 65 74 75 72 6e 20 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 00 00 00 03 65 .......return.desktop_files....e
1480 6e 64 00 00 00 00 00 00 00 50 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 78 74 72 61 63 74 nd.......P--.Function.to.extract
14a0 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 6e 61 6d 65 20 61 6e 64 20 65 78 65 63 20 63 .the.application.name.and.exec.c
14c0 6f 6d 6d 61 6e 64 20 66 72 6f 6d 20 61 20 64 65 73 6b 74 6f 70 20 66 69 6c 65 00 00 00 2e 6c 6f ommand.from.a.desktop.file....lo
14e0 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f 6d 5f 64 cal.function.extract_info_from_d
1500 65 73 6b 74 6f 70 28 66 69 6c 65 29 00 00 00 28 09 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 6d 65 2c esktop(file)...(.local.app_name,
1520 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 6e 69 6c 2c 20 6e 69 6c 00 00 00 00 00 00 00 1e .exec_command.=.nil,.nil........
1540 09 66 6f 72 20 6c 69 6e 65 20 69 6e 20 69 6f 2e 6c 69 6e 65 73 28 66 69 6c 65 29 20 64 6f 00 00 .for.line.in.io.lines(file).do..
1560 00 1e 09 09 69 66 20 6c 69 6e 65 3a 6d 61 74 63 68 28 22 5e 4e 61 6d 65 3d 22 29 20 74 68 65 6e ....if.line:match("^Name=").then
1580 00 00 00 19 09 09 09 61 70 70 5f 6e 61 6d 65 20 3d 20 6c 69 6e 65 3a 73 75 62 28 36 29 00 00 00 .......app_name.=.line:sub(6)...
15a0 22 09 09 65 6c 73 65 69 66 20 6c 69 6e 65 3a 6d 61 74 63 68 28 22 5e 45 78 65 63 3d 22 29 20 74 "..elseif.line:match("^Exec=").t
15c0 68 65 6e 00 00 00 1d 09 09 09 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 6c 69 6e 65 3a 73 75 hen.......exec_command.=.line:su
15e0 62 28 36 29 00 00 00 05 09 09 65 6e 64 00 00 00 00 00 00 00 23 09 09 69 66 20 61 70 70 5f 6e 61 b(6)......end.......#..if.app_na
1600 6d 65 20 61 6e 64 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 00 00 08 09 09 09 62 me.and.exec_command.then.......b
1620 72 65 61 6b 00 00 00 05 09 09 65 6e 64 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 1e 09 72 65 reak......end.....end.........re
1640 74 75 72 6e 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 00 00 00 03 65 turn.app_name,.exec_command....e
1660 6e 64 00 00 00 00 00 00 00 44 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 73 63 61 70 65 20 nd.......D--.Function.to.escape.
1680 73 70 65 63 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 28 73 70 61 63 65 73 2c 20 70 61 72 65 special.characters.(spaces,.pare
16a0 6e 74 68 65 73 65 73 2c 20 65 74 63 2e 29 00 00 00 31 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e ntheses,.etc.)...1local.function
16c0 20 65 73 63 61 70 65 5f 73 70 65 63 69 61 6c 5f 63 68 61 72 61 63 74 65 72 73 28 63 6f 6d 6d 61 .escape_special_characters(comma
16e0 6e 64 29 00 00 00 36 09 2d 2d 20 45 73 63 61 70 65 20 73 70 61 63 65 73 20 61 6e 64 20 70 61 72 nd)...6.--.Escape.spaces.and.par
1700 65 6e 74 68 65 73 65 73 20 66 6f 72 20 70 72 6f 70 65 72 20 65 78 65 63 75 74 69 6f 6e 00 00 00 entheses.for.proper.execution...
1720 2a 09 72 65 74 75 72 6e 20 63 6f 6d 6d 61 6e 64 3a 67 73 75 62 28 22 28 5b 25 73 25 28 25 29 5d *.return.command:gsub("([%s%(%)]
1740 29 22 2c 20 22 5c 5c 25 31 22 29 00 00 00 03 65 6e 64 00 00 00 00 00 00 00 2e 2d 2d 20 46 75 6e )",."\\%1")....end........--.Fun
1760 63 74 69 6f 6e 20 74 6f 20 72 75 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 75 73 69 ction.to.run.the.application.usi
1780 6e 67 20 64 6d 65 6e 75 00 00 00 23 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 6c 61 75 6e 63 ng.dmenu...#local.function.launc
17a0 68 5f 61 70 70 6c 69 63 61 74 69 6f 6e 28 29 00 00 00 2a 09 6c 6f 63 61 6c 20 64 65 73 6b 74 6f h_application()...*.local.deskto
17c0 70 5f 66 69 6c 65 73 20 3d 20 67 65 74 5f 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 28 29 00 00 00 p_files.=.get_desktop_files()...
17e0 14 09 6c 6f 63 61 6c 20 61 70 70 5f 6c 69 73 74 20 3d 20 7b 7d 00 00 00 18 09 6c 6f 63 61 6c 20 ..local.app_list.=.{}.....local.
1800 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 20 3d 20 7b 7d 00 00 00 00 00 00 00 21 09 2d 2d 20 47 61 74 app_commands.=.{}.......!.--.Gat
1820 68 65 72 20 61 70 70 20 6e 61 6d 65 73 20 61 6e 64 20 63 6f 6d 6d 61 6e 64 73 00 00 00 28 09 66 her.app.names.and.commands...(.f
1840 6f 72 20 5f 2c 20 66 69 6c 65 20 69 6e 20 69 70 61 69 72 73 28 64 65 73 6b 74 6f 70 5f 66 69 6c or._,.file.in.ipairs(desktop_fil
1860 65 73 29 20 64 6f 00 00 00 40 09 09 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 es).do...@..local.app_name,.exec
1880 5f 63 6f 6d 6d 61 6e 64 20 3d 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f 6d 5f 64 65 73 _command.=.extract_info_from_des
18a0 6b 74 6f 70 28 66 69 6c 65 29 00 00 00 23 09 09 69 66 20 61 70 70 5f 6e 61 6d 65 20 61 6e 64 20 ktop(file)...#..if.app_name.and.
18c0 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 00 00 23 09 09 09 74 61 62 6c 65 2e 69 6e exec_command.then...#...table.in
18e0 73 65 72 74 28 61 70 70 5f 6c 69 73 74 2c 20 61 70 70 5f 6e 61 6d 65 29 00 00 00 28 09 09 09 61 sert(app_list,.app_name)...(...a
1900 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 61 70 70 5f 6e 61 6d 65 5d 20 3d 20 65 78 65 63 5f 63 6f 6d pp_commands[app_name].=.exec_com
1920 6d 61 6e 64 00 00 00 05 09 09 65 6e 64 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 17 09 69 66 mand......end.....end.........if
1940 20 23 61 70 70 5f 6c 69 73 74 20 3d 3d 20 30 20 74 68 65 6e 00 00 00 21 09 09 70 72 69 6e 74 28 .#app_list.==.0.then...!..print(
1960 22 4e 6f 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 66 6f 75 6e 64 2e 22 29 00 00 00 08 09 09 72 "No.applications.found.")......r
1980 65 74 75 72 6e 00 00 00 04 09 65 6e 64 00 00 00 00 00 00 00 35 09 2d 2d 20 4a 6f 69 6e 20 74 68 eturn.....end.......5.--.Join.th
19a0 65 20 61 70 70 20 6e 61 6d 65 73 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20 73 74 72 69 6e 67 e.app.names.into.a.single.string
19c0 20 66 6f 72 20 64 6d 65 6e 75 00 00 00 2a 09 6c 6f 63 61 6c 20 61 70 70 73 20 3d 20 74 61 62 6c .for.dmenu...*.local.apps.=.tabl
19e0 65 2e 63 6f 6e 63 61 74 28 61 70 70 5f 6c 69 73 74 2c 20 22 5c 6e 22 29 00 00 00 00 00 00 00 26 e.concat(app_list,."\n").......&
1a00 09 2d 2d 20 55 73 65 20 64 6d 65 6e 75 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 70 6c 69 .--.Use.dmenu.to.select.an.appli
1a20 63 61 74 69 6f 6e 00 00 00 51 09 6c 6f 63 61 6c 20 68 61 6e 64 6c 65 20 3d 20 69 6f 2e 70 6f 70 cation...Q.local.handle.=.io.pop
1a40 65 6e 28 74 61 62 6c 65 2e 63 6f 6e 63 61 74 28 64 6d 65 6e 75 5f 63 6d 64 2c 20 22 20 22 29 20 en(table.concat(dmenu_cmd,.".").
1a60 2e 2e 20 22 20 3c 3c 3c 20 27 22 20 2e 2e 20 61 70 70 73 20 2e 2e 20 22 27 22 29 00 00 00 37 09 ...".<<<.'"....apps...."'")...7.
1a80 6c 6f 63 61 6c 20 73 65 6c 65 63 74 65 64 5f 61 70 70 20 3d 20 68 61 6e 64 6c 65 3a 72 65 61 64 local.selected_app.=.handle:read
1aa0 28 22 2a 61 22 29 3a 67 73 75 62 28 22 5c 6e 24 22 2c 20 22 22 29 00 00 00 0f 09 68 61 6e 64 6c ("*a"):gsub("\n$",."").....handl
1ac0 65 3a 63 6c 6f 73 65 28 29 00 00 00 00 00 00 00 3a 09 69 66 20 73 65 6c 65 63 74 65 64 5f 61 70 e:close().......:.if.selected_ap
1ae0 70 20 7e 3d 20 22 22 20 61 6e 64 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 73 65 6c 65 63 74 65 p.~=."".and.app_commands[selecte
1b00 64 5f 61 70 70 5d 20 74 68 65 6e 00 00 00 43 09 09 2d 2d 20 45 73 63 61 70 65 20 61 6e 79 20 73 d_app].then...C..--.Escape.any.s
1b20 70 65 63 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 pecial.characters.in.the.command
1b40 20 62 65 66 6f 72 65 20 72 75 6e 6e 69 6e 67 20 69 74 00 00 00 4e 09 09 6c 6f 63 61 6c 20 63 6f .before.running.it...N..local.co
1b60 6d 6d 61 6e 64 5f 74 6f 5f 72 75 6e 20 3d 20 65 73 63 61 70 65 5f 73 70 65 63 69 61 6c 5f 63 68 mmand_to_run.=.escape_special_ch
1b80 61 72 61 63 74 65 72 73 28 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 73 65 6c 65 63 74 65 64 5f 61 aracters(app_commands[selected_a
1ba0 70 70 5d 29 00 00 00 22 09 09 2d 2d 20 52 75 6e 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 pp])..."..--.Run.the.correspondi
1bc0 6e 67 20 63 6f 6d 6d 61 6e 64 00 00 00 1c 09 09 6f 73 2e 65 78 65 63 75 74 65 28 63 6f 6d 6d 61 ng.command......os.execute(comma
1be0 6e 64 5f 74 6f 5f 72 75 6e 29 00 00 00 04 09 65 6e 64 00 00 00 03 65 6e 64 00 00 00 00 00 00 00 nd_to_run).....end....end.......
1c00 11 2d 2d 20 4d 61 69 6e 20 65 78 65 63 75 74 69 6f 6e 00 00 00 14 6c 61 75 6e 63 68 5f 61 70 70 .--.Main.execution....launch_app
1c20 6c 69 63 61 74 69 6f 6e 28 29 f5 18 00 00 00 04 00 00 00 5f 00 00 00 5c 00 00 00 54 00 00 00 10 lication()........._...\...T....
1c40 20 20 20 20 22 64 6d 65 6e 75 5f 72 75 6e 22 2c 00 00 00 23 20 20 20 20 22 2d 66 6e 22 2c 20 22 ...."dmenu_run",...#...."-fn",."
1c60 46 69 72 61 20 43 6f 64 65 2d 31 30 22 2c 20 20 2d 2d 20 66 6f 6e 74 00 00 00 25 20 20 20 20 22 Fira.Code-10",..--.font...%...."
1c80 2d 6e 62 22 2c 20 22 23 31 65 31 65 31 65 22 2c 20 20 2d 2d 20 6e 6f 72 6d 62 67 63 6f 6c 6f 72 -nb",."#1e1e1e",..--.normbgcolor
1ca0 00 00 00 25 20 20 20 20 22 2d 6e 66 22 2c 20 22 23 63 63 63 63 63 63 22 2c 20 20 2d 2d 20 6e 6f ...%...."-nf",."#cccccc",..--.no
1cc0 72 6d 66 67 63 6f 6c 6f 72 00 00 00 24 20 20 20 20 22 2d 73 62 22 2c 20 22 23 32 34 37 32 63 38 rmfgcolor...$...."-sb",."#2472c8
1ce0 22 2c 20 20 2d 2d 20 73 65 6c 62 67 63 6f 6c 6f 72 00 00 00 24 20 20 20 20 22 2d 73 66 22 2c 20 ",..--.selbgcolor...$...."-sf",.
1d00 22 23 65 35 65 35 65 35 22 2c 20 20 2d 2d 20 73 65 6c 66 67 63 6f 6c 6f 72 00 00 00 2f 20 20 20 "#e5e5e5",..--.selfgcolor.../...
1d20 20 22 2d 6c 22 2c 20 22 31 30 22 20 20 2d 2d 20 6e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 20 ."-l",."10"..--.number.of.lines.
1d40 69 6e 20 74 68 65 20 64 6d 65 6e 75 00 00 00 01 7d 00 00 00 00 00 00 00 2d 2d 2d 20 46 75 6e 63 in.the.dmenu....}.......---.Func
1d60 74 69 6f 6e 20 74 6f 20 67 65 74 20 74 68 65 20 6c 69 73 74 20 6f 66 20 2e 64 65 73 6b 74 6f 70 tion.to.get.the.list.of..desktop
1d80 20 66 69 6c 65 73 00 00 00 22 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 5f 64 65 73 .files..."local.function.get_des
1da0 6b 74 6f 70 5f 66 69 6c 65 73 28 29 00 00 00 1c 20 20 20 20 6c 6f 63 61 6c 20 64 65 73 6b 74 6f ktop_files()........local.deskto
1dc0 70 5f 66 69 6c 65 73 20 3d 20 7b 7d 00 00 00 5f 20 20 20 20 6c 6f 63 61 6c 20 64 69 72 73 20 3d p_files.=.{}..._....local.dirs.=
1de0 20 7b 6f 73 2e 67 65 74 65 6e 76 28 22 48 4f 4d 45 22 29 20 2e 2e 20 22 2f 2e 6c 6f 63 61 6c 2f .{os.getenv("HOME")...."/.local/
1e00 73 68 61 72 65 2f 61 70 70 6c 69 63 61 74 69 6f 6e 73 22 2c 20 22 2f 75 73 72 2f 73 68 61 72 65 share/applications",."/usr/share
1e20 2f 61 70 70 6c 69 63 61 74 69 6f 6e 73 22 7d 00 00 00 04 20 20 20 20 00 00 00 21 20 20 20 20 66 /applications"}...........!....f
1e40 6f 72 20 5f 2c 20 64 69 72 20 69 6e 20 69 70 61 69 72 73 28 64 69 72 73 29 20 64 6f 00 00 00 46 or._,.dir.in.ipairs(dirs).do...F
1e60 20 20 20 20 20 20 20 20 6c 6f 63 61 6c 20 70 66 69 6c 65 20 3d 20 69 6f 2e 70 6f 70 65 6e 28 27 ........local.pfile.=.io.popen('
1e80 66 69 6e 64 20 27 20 2e 2e 20 64 69 72 20 2e 2e 20 27 20 2d 6e 61 6d 65 20 22 2a 2e 64 65 73 6b find.'....dir....'.-name."*.desk
1ea0 74 6f 70 22 27 29 00 00 00 24 20 20 20 20 20 20 20 20 66 6f 72 20 66 69 6c 65 20 69 6e 20 70 66 top"')...$........for.file.in.pf
1ec0 69 6c 65 3a 6c 69 6e 65 73 28 29 20 64 6f 00 00 00 2d 20 20 20 20 20 20 20 20 20 20 20 20 74 61 ile:lines().do...-............ta
1ee0 62 6c 65 2e 69 6e 73 65 72 74 28 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 2c 20 66 69 6c 65 29 00 ble.insert(desktop_files,.file).
1f00 00 00 0b 20 20 20 20 20 20 20 20 65 6e 64 00 00 00 15 20 20 20 20 20 20 20 20 70 66 69 6c 65 3a ...........end............pfile:
1f20 63 6c 6f 73 65 28 29 00 00 00 07 20 20 20 20 65 6e 64 00 00 00 00 00 00 00 18 20 20 20 20 72 65 close()........end............re
1f40 74 75 72 6e 20 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 00 00 00 03 65 6e 64 00 00 00 00 00 00 00 turn.desktop_files....end.......
1f60 50 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 78 74 72 61 63 74 20 74 68 65 20 61 70 70 6c P--.Function.to.extract.the.appl
1f80 69 63 61 74 69 6f 6e 20 6e 61 6d 65 20 61 6e 64 20 65 78 65 63 20 63 6f 6d 6d 61 6e 64 20 66 72 ication.name.and.exec.command.fr
1fa0 6f 6d 20 61 20 64 65 73 6b 74 6f 70 20 66 69 6c 65 00 00 00 2e 6c 6f 63 61 6c 20 66 75 6e 63 74 om.a.desktop.file....local.funct
1fc0 69 6f 6e 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f 6d 5f 64 65 73 6b 74 6f 70 28 66 69 ion.extract_info_from_desktop(fi
1fe0 6c 65 29 00 00 00 2b 20 20 20 20 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 5f le)...+....local.app_name,.exec_
2000 63 6f 6d 6d 61 6e 64 20 3d 20 6e 69 6c 2c 20 6e 69 6c 00 00 00 00 00 00 00 21 20 20 20 20 66 6f command.=.nil,.nil.......!....fo
2020 72 20 6c 69 6e 65 20 69 6e 20 69 6f 2e 6c 69 6e 65 73 28 66 69 6c 65 29 20 64 6f 00 00 00 24 20 r.line.in.io.lines(file).do...$.
2040 20 20 20 20 20 20 20 69 66 20 6c 69 6e 65 3a 6d 61 74 63 68 28 22 5e 4e 61 6d 65 3d 22 29 20 74 .......if.line:match("^Name=").t
2060 68 65 6e 00 00 00 22 20 20 20 20 20 20 20 20 20 20 20 20 61 70 70 5f 6e 61 6d 65 20 3d 20 6c 69 hen..."............app_name.=.li
2080 6e 65 3a 73 75 62 28 36 29 00 00 00 28 20 20 20 20 20 20 20 20 65 6c 73 65 69 66 20 6c 69 6e 65 ne:sub(6)...(........elseif.line
20a0 3a 6d 61 74 63 68 28 22 5e 45 78 65 63 3d 22 29 20 74 68 65 6e 00 00 00 26 20 20 20 20 20 20 20 :match("^Exec=").then...&.......
20c0 20 20 20 20 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 3d 20 6c 69 6e 65 3a 73 75 62 28 36 29 00 .....exec_command.=.line:sub(6).
20e0 00 00 0b 20 20 20 20 20 20 20 20 65 6e 64 00 00 00 00 00 00 00 29 20 20 20 20 20 20 20 20 69 66 ...........end.......)........if
2100 20 61 70 70 5f 6e 61 6d 65 20 61 6e 64 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 .app_name.and.exec_command.then.
2120 00 00 11 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 00 00 00 0b 20 20 20 20 20 20 20 20 ...............break............
2140 65 6e 64 00 00 00 07 20 20 20 20 65 6e 64 00 00 00 00 00 00 00 21 20 20 20 20 72 65 74 75 72 6e end........end.......!....return
2160 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 00 00 00 03 65 6e 64 00 00 .app_name,.exec_command....end..
2180 00 00 00 00 00 44 2d 2d 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 65 73 63 61 70 65 20 73 70 65 63 .....D--.Function.to.escape.spec
21a0 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 28 73 70 61 63 65 73 2c 20 70 61 72 65 6e 74 68 65 ial.characters.(spaces,.parenthe
21c0 73 65 73 2c 20 65 74 63 2e 29 00 00 00 31 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 65 73 63 ses,.etc.)...1local.function.esc
21e0 61 70 65 5f 73 70 65 63 69 61 6c 5f 63 68 61 72 61 63 74 65 72 73 28 63 6f 6d 6d 61 6e 64 29 00 ape_special_characters(command).
2200 00 00 39 20 20 20 20 2d 2d 20 45 73 63 61 70 65 20 73 70 61 63 65 73 20 61 6e 64 20 70 61 72 65 ..9....--.Escape.spaces.and.pare
2220 6e 74 68 65 73 65 73 20 66 6f 72 20 70 72 6f 70 65 72 20 65 78 65 63 75 74 69 6f 6e 00 00 00 2d ntheses.for.proper.execution...-
2240 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6d 6d 61 6e 64 3a 67 73 75 62 28 22 28 5b 25 73 25 28 25 ....return.command:gsub("([%s%(%
2260 29 5d 29 22 2c 20 22 5c 5c 25 31 22 29 00 00 00 03 65 6e 64 00 00 00 00 00 00 00 2e 2d 2d 20 46 )])",."\\%1")....end........--.F
2280 75 6e 63 74 69 6f 6e 20 74 6f 20 72 75 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 75 unction.to.run.the.application.u
22a0 73 69 6e 67 20 64 6d 65 6e 75 00 00 00 23 6c 6f 63 61 6c 20 66 75 6e 63 74 69 6f 6e 20 6c 61 75 sing.dmenu...#local.function.lau
22c0 6e 63 68 5f 61 70 70 6c 69 63 61 74 69 6f 6e 28 29 00 00 00 2d 20 20 20 20 6c 6f 63 61 6c 20 64 nch_application()...-....local.d
22e0 65 73 6b 74 6f 70 5f 66 69 6c 65 73 20 3d 20 67 65 74 5f 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 esktop_files.=.get_desktop_files
2300 28 29 00 00 00 17 20 20 20 20 6c 6f 63 61 6c 20 61 70 70 5f 6c 69 73 74 20 3d 20 7b 7d 00 00 00 ()........local.app_list.=.{}...
2320 1b 20 20 20 20 6c 6f 63 61 6c 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 20 3d 20 7b 7d 00 00 00 00 .....local.app_commands.=.{}....
2340 00 00 00 24 20 20 20 20 2d 2d 20 47 61 74 68 65 72 20 61 70 70 20 6e 61 6d 65 73 20 61 6e 64 20 ...$....--.Gather.app.names.and.
2360 63 6f 6d 6d 61 6e 64 73 00 00 00 2b 20 20 20 20 66 6f 72 20 5f 2c 20 66 69 6c 65 20 69 6e 20 69 commands...+....for._,.file.in.i
2380 70 61 69 72 73 28 64 65 73 6b 74 6f 70 5f 66 69 6c 65 73 29 20 64 6f 00 00 00 46 20 20 20 20 20 pairs(desktop_files).do...F.....
23a0 20 20 20 6c 6f 63 61 6c 20 61 70 70 5f 6e 61 6d 65 2c 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 20 ...local.app_name,.exec_command.
23c0 3d 20 65 78 74 72 61 63 74 5f 69 6e 66 6f 5f 66 72 6f 6d 5f 64 65 73 6b 74 6f 70 28 66 69 6c 65 =.extract_info_from_desktop(file
23e0 29 00 00 00 29 20 20 20 20 20 20 20 20 69 66 20 61 70 70 5f 6e 61 6d 65 20 61 6e 64 20 65 78 65 )...)........if.app_name.and.exe
2400 63 5f 63 6f 6d 6d 61 6e 64 20 74 68 65 6e 00 00 00 2c 20 20 20 20 20 20 20 20 20 20 20 20 74 61 c_command.then...,............ta
2420 62 6c 65 2e 69 6e 73 65 72 74 28 61 70 70 5f 6c 69 73 74 2c 20 61 70 70 5f 6e 61 6d 65 29 00 00 ble.insert(app_list,.app_name)..
2440 00 31 20 20 20 20 20 20 20 20 20 20 20 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 61 70 70 5f 6e .1............app_commands[app_n
2460 61 6d 65 5d 20 3d 20 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 00 00 00 0b 20 20 20 20 20 20 20 20 65 ame].=.exec_command............e
2480 6e 64 00 00 00 07 20 20 20 20 65 6e 64 00 00 00 00 00 00 00 1a 20 20 20 20 69 66 20 23 61 70 70 nd........end............if.#app
24a0 5f 6c 69 73 74 20 3d 3d 20 30 20 74 68 65 6e 00 00 00 27 20 20 20 20 20 20 20 20 70 72 69 6e 74 _list.==.0.then...'........print
24c0 28 22 4e 6f 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 66 6f 75 6e 64 2e 22 29 00 00 00 0e 20 20 ("No.applications.found.")......
24e0 20 20 20 20 20 20 72 65 74 75 72 6e 00 00 00 07 20 20 20 20 65 6e 64 00 00 00 00 00 00 00 38 20 ......return........end.......8.
2500 20 20 20 2d 2d 20 4a 6f 69 6e 20 74 68 65 20 61 70 70 20 6e 61 6d 65 73 20 69 6e 74 6f 20 61 20 ...--.Join.the.app.names.into.a.
2520 73 69 6e 67 6c 65 20 73 74 72 69 6e 67 20 66 6f 72 20 64 6d 65 6e 75 00 00 00 2d 20 20 20 20 6c single.string.for.dmenu...-....l
2540 6f 63 61 6c 20 61 70 70 73 20 3d 20 74 61 62 6c 65 2e 63 6f 6e 63 61 74 28 61 70 70 5f 6c 69 73 ocal.apps.=.table.concat(app_lis
2560 74 2c 20 22 5c 6e 22 29 00 00 00 00 00 00 00 29 20 20 20 20 2d 2d 20 55 73 65 20 64 6d 65 6e 75 t,."\n").......)....--.Use.dmenu
2580 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 00 00 00 54 20 20 20 .to.select.an.application...T...
25a0 20 6c 6f 63 61 6c 20 68 61 6e 64 6c 65 20 3d 20 69 6f 2e 70 6f 70 65 6e 28 74 61 62 6c 65 2e 63 .local.handle.=.io.popen(table.c
25c0 6f 6e 63 61 74 28 64 6d 65 6e 75 5f 63 6d 64 2c 20 22 20 22 29 20 2e 2e 20 22 20 3c 3c 3c 20 27 oncat(dmenu_cmd,.".")....".<<<.'
25e0 22 20 2e 2e 20 61 70 70 73 20 2e 2e 20 22 27 22 29 00 00 00 3a 20 20 20 20 6c 6f 63 61 6c 20 73 "....apps...."'")...:....local.s
2600 65 6c 65 63 74 65 64 5f 61 70 70 20 3d 20 68 61 6e 64 6c 65 3a 72 65 61 64 28 22 2a 61 22 29 3a elected_app.=.handle:read("*a"):
2620 67 73 75 62 28 22 5c 6e 24 22 2c 20 22 22 29 00 00 00 12 20 20 20 20 68 61 6e 64 6c 65 3a 63 6c gsub("\n$",."")........handle:cl
2640 6f 73 65 28 29 00 00 00 00 00 00 00 3d 20 20 20 20 69 66 20 73 65 6c 65 63 74 65 64 5f 61 70 70 ose().......=....if.selected_app
2660 20 7e 3d 20 22 22 20 61 6e 64 20 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 5b 73 65 6c 65 63 74 65 64 .~=."".and.app_commands[selected
2680 5f 61 70 70 5d 20 74 68 65 6e 00 00 00 49 20 20 20 20 20 20 20 20 2d 2d 20 45 73 63 61 70 65 20 _app].then...I........--.Escape.
26a0 61 6e 79 20 73 70 65 63 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 69 6e 20 74 68 65 20 63 6f any.special.characters.in.the.co
26c0 6d 6d 61 6e 64 20 62 65 66 6f 72 65 20 72 75 6e 6e 69 6e 67 20 69 74 00 00 00 54 20 20 20 20 20 mmand.before.running.it...T.....
26e0 20 20 20 6c 6f 63 61 6c 20 63 6f 6d 6d 61 6e 64 5f 74 6f 5f 72 75 6e 20 3d 20 65 73 63 61 70 65 ...local.command_to_run.=.escape
2700 5f 73 70 65 63 69 61 6c 5f 63 68 61 72 61 63 74 65 72 73 28 61 70 70 5f 63 6f 6d 6d 61 6e 64 73 _special_characters(app_commands
2720 5b 73 65 6c 65 63 74 65 64 5f 61 70 70 5d 29 00 00 00 28 20 20 20 20 20 20 20 20 2d 2d 20 52 75 [selected_app])...(........--.Ru
2740 6e 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63 6f 6d 6d 61 6e 64 00 00 00 22 20 n.the.corresponding.command...".
2760 20 20 20 20 20 20 20 6f 73 2e 65 78 65 63 75 74 65 28 63 6f 6d 6d 61 6e 64 5f 74 6f 5f 72 75 6e .......os.execute(command_to_run
2780 29 00 00 00 07 20 20 20 20 65 6e 64 35 81 f5 18 00 00 00 00 04 00 00 00 00 00 00 00 53 00 00 00 )........end5...............S...
27a0 04 00 00 00 59 00 00 00 01 00 00 00 7e 00 00 00 00 00 00 00 50 0a 00 00 00 00 00 00 47 09 00 00 ....Y.......~.......P.......G...
27c0 00 00 00 00 f5 18 00 00 00 00 00 00 00 00 00 00 00 00 61 00 00 00 14 00 00 00 62 00 00 00 00 00 ..................a.......b.....
27e0 00 00 00 00 00 00 00 00 00 00 f4 09 00 00 00 00 00 00 04 0a 00 00 00 00 00 00 f5 18 00 00 00 00 ................................
2800 62 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 0a 00 00 00 00 00 00 b...............................
2820 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 35 81 e7 aa ................5...