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
' そ | |
, こ | |
. し | |
p て | |
y ょ | |
f つ | |
g ん | |
c い | |
r の | |
l り |
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 wezterm = require 'wezterm'; | |
return { | |
font = wezterm.font("HackGen35 Console"), | |
font_size = 15, | |
font_hinting = None, | |
keys = { | |
{ key = "j", mods = "CTRL|SHIFT", action = wezterm.action.Nop }, | |
{ key = ";", mods = "CTRL|SHIFT", action = wezterm.action.Nop }, | |
{ key = "=", mods = "CMD", action = wezterm.action.IncreaseFontSize }, |
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
# https://dev.mikutter.hachune.net/issues/1309 の、core/plugin/gui/timeline.rb へのパッチが必要。 | |
# Usage: Plugin.call(:local_search, ":don:") | |
Plugin.create(:local_search) do | |
on_local_search do |keyword| | |
ms = Plugin::GUI::Timeline.cuscaded.values.flat_map {|tl| tl.to_a }.uniq {|m| m.uri } | |
found = ms.select {|m| m.description.include? keyword } | |
Plugin.call(:open_smartthread, found) | |
end | |
# commandもあるとよいね |
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
ArgumentError invalid byte sequence in UTF-8 | |
{MIKUTTER_DIR}/core/utils.rb:410:in `split' | |
{MIKUTTER_DIR}/core/utils.rb:410:in `get_index_from_byte' | |
{MIKUTTER_DIR}/core/mui/cairo_miracle_painter.rb:295:in `main_pos_to_index_forclick' | |
{MIKUTTER_DIR}/core/lib/uithreadonly.rb:22:in `block (2 levels) in singleton class' | |
{MIKUTTER_DIR}/core/mui/cairo_miracle_painter.rb:185:in `point_moved' | |
{MIKUTTER_DIR}/core/lib/uithreadonly.rb:22:in `block (2 levels) in singleton class' | |
{MIKUTTER_DIR}/core/mui/cairo_cell_renderer_message.rb:184:in `block in event_hooks' | |
{MIKUTTER_DIR}/core/mui/gtk_extension.rb:35:in `block in safety_signal_connect' | |
{MIKUTTER_DIR}/core/mui/cairo_cell_renderer_message.rb:73:in `signal_emit' |
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
ArgumentError string contains null byte | |
{MIKUTTER_DIR}/vendor/bundle/ruby/2.6.0/gems/gobject-introspection-3.3.0/lib/gobject-introspection/loader.rb:587:in `invoke' | |
{MIKUTTER_DIR}/vendor/bundle/ruby/2.6.0/gems/gobject-introspection-3.3.0/lib/gobject-introspection/loader.rb:587:in `block in define_method' | |
{MIKUTTER_DIR}/vendor/bundle/ruby/2.6.0/gems/pango-3.3.0/lib/pango/layout.rb:31:in `set_text' | |
{MIKUTTER_DIR}/core/mui/cairo_sub_parts_message_base.rb:340:in `main_message' | |
{MIKUTTER_DIR}/core/lib/uithreadonly.rb:22:in `block (2 levels) in singleton class' | |
{MIKUTTER_DIR}/core/mui/cairo_sub_parts_message_base.rb:263:in `main_message_height' | |
{MIKUTTER_DIR}/core/lib/uithreadonly.rb:22:in `block (2 levels) in singleton class' | |
{MIKUTTER_DIR}/core/mui/cairo_sub_parts_message_base.rb:260:in `message_height' | |
{MIKUTTER_DIR}/core/lib/uithreadonly.rb:22:in `block (2 levels) in singleton class' |
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
NoMethodError undefined method `messages' for nil:NilClass | |
{MIKUTTER_DIR}/core/plugin/command/command.rb:135:in `block (2 levels) in <top (required)>' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:196:in `block in initialize' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:187:in `each' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:187:in `map' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:187:in `initialize' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:139:in `new' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:139:in `command_box' | |
{MIKUTTER_DIR}/core/plugin/shortcutkey/shortcutkey_listview.rb:105:in `popup_input_window' | |
{MIKUTTER_DIR}/core/mui/gtk_crud.rb:154:in `record_create' |
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
tl_slug = :extract_1234567890 | |
keyword = 'foo' | |
inner_tl = Plugin[:gtk].widgetof(Plugin::GUI::Timeline.cuscaded[tl_slug]) | |
target_path = nil | |
inner_tl.model.each do |model, path, iter| | |
desc = iter[Gtk::TimeLine::InnerTL::MESSAGE].description | |
if desc.scan(keyword).size > 0 | |
target_path = path | |
break |
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
Plugin.create(:photo_support) do | |
amazon_json_regex = %r!'colorImages': { 'initial': (\[.*MAIN.*\])!.freeze | |
defimageopener('Amazon', %r<\Ahttps?://www\.amazon\.(?:co\.jp|com)/(?:.*/)?(?:dp/|gp/product/)[0-9A-Za-z_]+>) do |url| | |
html = HTTPClient.new.get_content(url, [], [['User-Agent', 'mikutter']]) | |
m = amazon_json_regex.match(html) | |
next nil unless m | |
arr = JSON.parse(m[1], symbolize_names: true) | |
main = arr.find {|v| v[:variant] == "MAIN" } | |
open(main[:large]) # :hiRes, :thumb, :large, :lowRes (all variations might be nullable). :main is an array containing other variations of [{url => [width, height]}] | |
end |
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
Plugin.create(:extract_load_more) do | |
def tl_uris | |
@tl_uris ||= Hash.new # timeline_slug -> datasource_slug -> URI -> time | |
end | |
tl_uris | |
def extract_tabs | |
Plugin[:extract].extract_tabs | |
end |
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
Plugin.create(:timeline_dam) do | |
UserConfig[:timeline_dam_criteria] ||= 80 | |
unless Gtk::TimeLine.method_defined?(:timeline_dam_original_add) | |
class Gtk::TimeLine | |
alias :timeline_dam_original_add :_add | |
def _add(message) | |
@timeline_max ||= UserConfig[:timeline_max] | |
criteria = UserConfig[:timeline_dam_criteria] / 100.0 | |
if @tl.vadjustment.value < criteria |
NewerOlder