This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local bit = require "bit" | |
local termio = require "posix.termio" | |
local unistd = require "posix.unistd" | |
local inspect = require "inspect" | |
local t = termio.tcgetattr(unistd.STDIN_FILENO) | |
local o_vmin, o_vtime, o_lflag = t.cc[termio.VMIN], t.cc[termio.VTIME], t.lflag | |
io.stdout:write("Press any key... ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w, script_name = weechat, "hdata_test" | |
hdata = { | |
meta = { | |
__index = function (tb, name) | |
local var_type = tb._vars[name] | |
if not var_type then | |
return | |
end | |
if var_type == "hashtable" then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w = weechat | |
w.register("test", "singalaut", "0.1", "WTFPL", "", "", "") | |
function resize_bar_start_cb(_, _, tb) | |
local ptr_bar = w.bar_search(tb._bar_name) | |
if ptr_bar == "" then | |
return w.WEECHAT_RC_OK | |
end | |
-- bar_window is not bar with type window but an area of screen that is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w, script_name = weechat, "mpd_bar_item" | |
info = {} | |
function item_cb() | |
local symbols = { play = "▶", pause = "▮▮", stop = "■" } | |
info.playback_state = symbols[info["status.state"]] | |
local fmt = "MPD${color:bar_delim}: " | |
local flags = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name gfycat and gifv buffer bar | |
// @namespace https://github.com/tomoe-mami | |
// @version 0.3 | |
// @description buffer bar for gfycat and imgur's gifv | |
// @include /^https?://(www\.)?gfycat\.com/.+$/ | |
// @include /^https?://i\.imgur\.com/[^.]+\.gifv$/ | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Example usage: /eval -n ${info:time,%Y-%m-%d %H:%M:%S} | |
function info_cb(_, _, format) | |
return os.date(format) | |
end | |
if weechat.register("info_time", "singalaut", "0.1", "WTFPL", "Add ${info:time} variable to eval", "", "") then | |
weechat.hook_info( | |
"time", | |
"Gets current date and time info", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running 287 testsERROR: JavaScript error: simulation/components/GuiInterface.js line 379 | |
ReferenceError: IID_AlertRaiser is not defined | |
(-1,10)@simulation/components/GuiInterface.js:379 | |
()@simulation/components/tests/test_GuiInterface.js:421 | |
In TestComponentScripts::test_scripts: | |
../../../source/pch/test/../../../source/simulation2/components/tests/test_scripts.h:43: Error: Test failed: L"Running script simulation/components/tests/test_GuiInterface.js" | |
../../../source/pch/test/../../../source/simulation2/components/tests/test_scripts.h:43: Error: Assertion failed: scriptInterface.LoadScript(pathname, content) | |
............................................................................................................................................................................................ | |
.................................................................................................. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WIDTH=10 | |
HEIGHT=4 | |
LABEL="yes" # show filename under thumbnail | |
VIDEO="no" # don't show video thumbnail. only show generic icon | |
CHAR="." | |
if [ ! "$TERMINOLOGY" = "1" ]; then | |
echo "This script only works in Terminology" >&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WIDTH=6 | |
HEIGHT=3 | |
CHAR="#" | |
for FILENAME in $*; do | |
ABSPATH="$(realpath "$FILENAME")" | |
echo -ne "\e}it$CHAR$WIDTH;$HEIGHT;$ABSPATH\0" |
NewerOlder