Skip to content

Commit

Permalink
shy, cli: embed, display logo if terminal supports sixels
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Jun 12, 2024
1 parent f35ea7f commit 41a8725
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/images/shy.six
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
P0;0;0q"1;1;128;128#0;2;72;9;9#1;2;73;10;10#2;2;74;14;14#3;2;75;17;17#4;2;75;18;18#5;2;76;20;20#6;2;76;23;23#7;2;78;26;26#8;2;78;28;28#9;2;79;30;30#10;2;79;32;32#11;2;80;36;36#12;2;81;38;38#13;2;82;40;40#14;2;82;42;42#15;2;84;45;45#16;2;84;48;48#17;2;85;50;50#18;2;85;52;52#19;2;86;55;55#20;2;87;58;58#21;2;88;61;61#22;2;89;64;64#23;2;89;64;64#24;2;89;65;65#25;2;90;66;66#26;2;90;67;67#27;2;91;69;69#28;2;91;70;70#29;2;91;71;71#30;2;91;72;72#31;2;92;74;74#32;2;93;75;75#33;2;93;75;75#34;2;93;78;78#35;2;94;80;80#36;2;94;81;81#37;2;95;82;82#38;2;95;84;84#39;2;95;85;85#40;2;96;85;85#41;2;96;87;87#42;2;97;89;89#43;2;97;90;90#44;2;97;91;91#45;2;97;91;91#46;2;98;93;93#47;2;98;95;95#48;2;99;96;96#49;2;99;98;98#50;2;100;100;100#1!128~-!128~-!44~^~NNNFFFBBFB@@@BB@#5A#7A#10A!6?A!6?C#5C#27G#46?O#2G#6?O#22_#9_$#0!44?_?OO?GG?CC??AAA???!12@???AAA?CC?GG?O?_$#7!46?_#18_??O#33O#6G???C#11C!7?A!4?A#8?A!9?G#42??_$#2!48?O??G???C#44G#49G!7?C!4?C#47?C#6A#1@BB@@@FBBFFF^N~^!38~$#34!48?_!6?G#17??C#31?C#3A#42C#46C#48C!6?C!6?G#41G$#9!49?O#50___!5o!8w!4{!8w!4o___$#47!49?_#45??O#14G#21G!4?C#37?C#13!4?A??A#43???C#3A#31C!7?O$#14!67?AA#38!5?C#21?C#16C???G??O-#1!33~^^^FFBB@@#15A#35A#12@#27@#47!41?@?A#1@?BBBF^^^!29~$#0!33?_??G?C?A?@#26!45?@#10@#23A#0@??CG??_$#3!34?_!4?C?A?@#42!47?C??O#14O#19_$!35?_#45_!9?@#7!44?A#18C#2C???_$#9!36?O#50__oww{{{}}!40~}}{{wwo_#48_$#2!37?G#49O!5?A#31!48?G#8G$#30!37?O#14G#36G#16C#37C-#1!26~^NFBBB#14A#8@#32@#39!9?_!4?G#21G#5?G#29C#18C#11C#6C#2C#26A#19A#15A#10?!4A#11A#14A#17A#20A!4?C#2G??O#10O#23O#21?_#22!14?@#3@A#1@N^^!24~$#0!26?_OGC??@#42A#19!11?_#7_#1_?_o__wooow{!11w{w!4o___?_#25!17?A#0@A??_$#3!27?_?G#2C#19C#48C#45!13?O#26O#0_??OO?GGG??!11C??GGG?OO?_#24!19?C#2C#16O#9_$#4!28?O#50_oww{}!9~^^NNFFF!4B!7@!5?!6@!4BFFFNN^^!13~}{w_#45_$#29!28?_#28O#24G#49!17?G??C???A!6?@???@#28???A#3C#45A!8?O#20!18?G$#12!48?O??G!9?A#48?@@@#37!5?A#6C#13C#34?C??G#48G#49!20?O$#4!49?O#42??C#43???A#35A#46!18?C!6?_$#8!76?G!4?_$#18!77?G-#1!23~FFB#49C!7?_???C#2G!9?G!7?A#47?C#13?A!5?A#10A#6A#3A!7?O!9?O_#34!12?@#18A?_$#0!23?G#50_ow}!6~^^NFBB@@!6?___!4o!4Www!7{!5wooo__!8?@BFN^!11~}w_#0Co$#3!23?O#9G#15C#21A!8?_#3_#0_O?G?CAaPP?G?CC?AAA??!12@??AA?CC??O?@?A?CGO_#25O#42!13?CO$#18!23?_#33O#45G#2@#26@#31!8?O#7O??C#19A#5A?@!8?C!4?A#15???A???A#48?C#45C#1@B@@BBBNNN~}~{{wo_#27G#3!14?@#1BJN!21~$#41!37?G#1_oo{w{[MMNFFBBF@@@B@#16!5?AAA#38!4?C#27C#18C!4?O#34_!8?C#6!16?CO$#14!38?G!9?O#30O??G#42G!4?C#9!14?C!9?@#29@!5?_#20!13?G$#26!39?C#43A#38?@#17@??_!4?G#11??C!5?A#47!12?G#2C!9?A#15A#8C#5G$#4!45?_#3?O#8??G!8?A#35!14?G#17G#5G#10??_#49!5?@#42A$#37!47?_#46??O#49???G__?_?C#41!15?O$#19!55?C#26C#36C$#48!57?_-#1!19~NJA#7@#43@#49!5?_??A#48@!5?_o!6?A??@#5A#30@#15?@#12@!6?A#50@BF!13~}{wo!9?@F^!10~{#2@#1H^!19~$#0!19?oC@!9?_O???@_???A@_?O?G?CCC?!8A?CG_#19_#44!13?@#14@A#11C!8?A?_#49_#35!10?@#8A#0E_$#14!20?_!9?_!7?_!5?@#8G#25C#11C??A!7?@#14@#2?A#48@#6C#34C#30O#47!14?A#1@BBV^~~~}{sO#23O#47!11?A#17C#3O$#5!20?O#50_w}!5~^NF@!8?OGCCAB@@@#10!6?@@!6?G#46G!15?C#37G!8?@#7G#26!13?G#6_$#8!21?C#22A#39!7?O#6O#1_{}}}^^NF@??o_wo!4w}!9{woO#45!18?_!9?G#37!12?O$#21!21?G#45C#26!8?G#20C!8?_!7?A???@!6?@#35@#36?A#0!19?CG_???@AG_#43!13?_$#41!21?O#2!10?G??@!7?@#22G#37@#36??A#5!34?G#8_#6!5?@#22?C$#18!33?A#19@#17!4?O#16G#47G?G#49A#45C#20!37?O#47!8?A$#12!41?C#41C!8?@$#3!42?_!5?C$#6!42?A#10O$#34!42?O#27A-#1!18~P@#49C!6?OA#0wA???OC@_!4?@!20?oB#50_!18~w#1@r!5~}A#15o#50!11~#46_#7_#0~#1!19~$#0!18?M#5A#50w!6~N@#3C!7?O#43@#13A#15@#2!23?G#17@#20!18?@!9?C#47!11?@#8@$#2!18?_#11C#27@#45!6?_#20G!8?G#6!26?O#18A#39!18?A#4A!7?@#16G#48!11?Q#10Q$#19!19?G#42A#12!7?OA#1{~~~nB??w{}~}!20~NC#21C#49!18?C#11C#0K!5?@{#28A#49!11?K#11K$#26!19?O#6!8?_#31@!7?A#14!26?_#33G#18!19?G#40!8?@$#35!19?_#37!8?C#2?@!4?GA#46CA@#44!25?O#24!19?O$#11!35?O_#8@#29!47?_$#19!35?_#14C?C$#30!36?O$#34!36?G-#1!17~#0~#5@#41@#50!7~#23G#1}!5~{{!26~b@#26@#50!19~N!9?_!10~N#2_A$#6!18?A#45A#24!7?O#3@!5?B#5A#0!26?[#2_#34_#22!19?_#20C!8?A#31!10?_#7O#1c!20~$#8!18?c#47c#25!7?C#15!7?@#3!27?A#39A#42!19?O#1_b!5~NC#17@#45!10?O#15G#0W$#9!18?W#48W#29!7?_#6!35?S#43O#5!20?O#0[!5?oB#27C#22!11?C#5@$#31!27?A#8!35?G#45C#13!20?G#3!7?G#37G#34!11?A$#37!27?@#46!36?G#26!20?A#8!7?O#47O#41!11?@$#30!85?@#18!7?_-#1!17~}G#15O!8?C#1@N^!31~{wo__#15O#35O!5?_#21?_#49O?G#2O?C!8?@#50{!8~^F@#16@$#0!17?@o#22G#50^!6~{_#0EO_!31?BCGO?_#10?_#18_#26_#34_#36_#12???_#3_??G#18A#8@!6?O#47OA#42!8?_?A$#2!18?C!9?@G#5_#3!33?A#50@BFNNN!7^NNFFB#45@#5!7?G#10A#33@#6!9?_?A$!18?@_#45_!6?A#7A#12O#16!34?@#8C#7G#30G!8?_#37??O#0_??G?@!4?wA#21C!10?OC$#5!18?A#34C#36!7?@#31G#35_#33!35?A#38C#2O?_#48O#15!9?O#1_oo}}!4~FD#41G#45!10?G#1Os{!21~$#41!19?A#48!8?O#22!52?G#24C#7!8?_#46_#0!11?_GB$#46!19?@#8!84?G-#1!19~|oo#20O!8?A???O?_#8_#0!31?@@!5?@@!12?AGO?!4_?OGC@$!19?AG#50@F^!6~}wwo__#6O#2!36?@@@#3!15?@#5C!5?O?G#6C#3A$#2!20?C#49A!9?C#1@@BNF^N^^^!28~}}~}}}~}}!12~{o__!4?o_ow}!24~$#12!20?A#31C?_#22!6?@#2@A!6?_#19!52?A#50BFFNFFFB@#17@$#28!20?@#11G#3_#21!9?C#0AC?G?O?__#37!50?@#7G#30G!6?A$#47!22?G#3!10?C#10G#42?_#35!56?C#2O#9O#14O#11O#42G#20G#34C$#33!33?G#46O#48!60?G#49?G-#1!22~}{wooo#12O#5_#19_#42_#46!6?@#30@#16@#45A???C!5?G#3C#34G#29G#22G#17?G#11?G#8?G#6G!8?O#3O#30_#20_#15_#9_#5_$#0!22?@ACG??_#37O#7!11?@#2@???A!6?C#49!5?O#46?O#44O#5G#2G#33O#26O#21O#18O#14O#45?_#38_$#6!23?@?C#3G#21G#48G#33!13?A#0@@@??!4A!4?!7C!4?!5G??OOO??___$#36!24?@A#31C#20!16?A#12A#6A!5?C#39G#41!10?O#36O$#7!24?A#50@BFFN^^!6~}}}{{{!6w!9o!11_$#49!44?C#1?@B!4@BBFF!7BFFNN!5FN^NNN^~^^^!46~$#36!46?C#26C#19C!7?G$#14!49?C!8?G$#10!50?C!9?G!9?O$#48!50?G!9?O!9?_-#1!29~}~{}wwwowo___#6O#13O#20O#5?_#15?_#21_#41?_#46_#49_#48!22?@???A!5?G???_#6?_$#0!29?@?A?CC?G??OO?___#42?O#41!30?@???A#1@??B@BBFF^N^!34~$#6!31?@#20@#5A#50@@@BBBFFF!5N!6^!22~!4}!4{wwoo__#12O$#41!33?@#17A#2C!5?O???_#30!32?@#19@#11@!5?C#2C#49O#3G$#35!35?A#10C??G!7?_#5!33?@??A#24C#33?G#34?O$#48!36?A??C!7?O#25!34?A!8?_$#21!37?C#3G#19?G#33G???O!4?_#0!32?@@?A?C?G?O_$#37!38?C#45???G#14!40?A!4?G$#42!84?C-#1!39~^^^!4~}}}~}}{{{}}{!4w{ww!4owo__o_??_#6_#17_#36_#49_#39!10?@#12@#1@BFFn!29~$#0!39?_!6?@@@???AAA???!4C???!4G??OO??__#28O#44O#46!14?A#16A#17C#14G#0GO$#5!40?_#4_!9?@#8@#12@#18@#22@#31@#3A!6?C#7C!9?O#48!18?C#47G#42O#7O$#2!50?@#38!6?@#6A#10A#50!7@!5B!4FNNN^^^!10~}{wo_#26_$#45!58?@#48@#14A#19A#24A#2C#40A!5?C#8G#15G???O$#33!63?A#46?A!9?G$#11!66?C#16C#21C!4?G#2O$#49!66?A#31??C#4G#47C#35??G-#1!35~^F@??_w{^NFFBF!4@BFBBNNN!18~}}}{w{wO#8_#48!10?@#11@#1Ab!27~$#0!35?_GA@?OCB_OG?C?!4A??CC??O!18?@@?AC??_#24O#26!11?A#0@[$#3!36?O??_GA#9??_#40_#31O#29?G!5?G#16G#42O#18O#28_#3!21?@#14@#4A#50@@BF^!9~}w#6C$#12!36?_#50_WC!6?_!9o__#36!24?@#20A#48A?G#43!11?C#14G$#2!37?C!8?G#5??C#7C#47G#6C???G#15!27?CG#20!13?O$#15!37?G??C#11@#41!7?G#46G#45?G#3C!4?O_#46!25?C?_#28!11?_$#36!37?O#38_A#34@#39!12?G$#6!38?A#8@!5?O!5?C$#30!38?C#14O!7?G$#35!39?G#37A-#1!34~B@???@~~D#16A#35@#30!13?_#2_#1`z!24~@#9O#50F!10~#18_#1W!27~$#0!34?{!4?}??A#31C#16!15?O#0OC!24?}#10G#48W#24!10?O#0_$#3!35?A!6?W@#20!15?@#3G#11!26?_#49_#31!10?G#2F$#7!35?C??G#2???_#34_#36!15?G#5A#12!26?C#33!11?@$#11!35?g??_#39!4?G#42!15?A#6C#18!26?A#35!11?E$#12!35?O#50OB!6?}!13~^#45C#29!27?@$#46!36?CW#8O#40!4?O$#49!36?g_#9C$#23!36?@#48C#14A$#38!36?A#21?@-#1!34~{c!4?BFLS_#4O#16?_#41_#20!8?C#0CPO?!8_??OO?GGC?aOG?_OK@#15@#35!8?_#19OC#0G@$!34?BW_??@CGQgO_#25!11?G#1IMN~!8^~^NN^FFBF@`o~^NBA#22A#4!9?_#1os}!27~$#5!35?AO???G#21_#20?@C#29G#30!11?A#10@#18_#6_#2!10?_!6?_??D??_#27_#50_w!8~^F#6G#3A$#9!35?@#15G#50Nwo_???@FN^^!8~_#11O#6!13?_!8?A???O#40?C#43!9?G#37A#10@$#30!36?C#17_#19@#2A?O_???_#45!10?O#43_#12!14?_!5?C#8A#48!17?@$#42!36?A#40O#35A#14C#25O!5?O#47!10?@#22!16?_#5O?G?OG!5?C$#48!36?@#49?C#37G#8???A#3G#41!30?__!9?O$#45!44?A#16!31?O#17_!8?G$#36!77?O#26OG#18C$#20!78?G-#1!37~{wo_!4?B@ACECWKG!4OWw!6owwoooW[w[M[FFBF@#33C#2@#21@#48!4?_#5?_#10O???@$#0!37?ACGO_??@?ADAGGCOOGggg_!9?GGG__C?OAGGC?A@!9?_!4?@$#2!37?@#7A#50@BFM[Wwoo__??!4@!4B!10A!8?__oow{}!4~^^NFB@$#31!38?@#11CG#9O??A#19C???P#7O??_C#18?C#27?C#33C#35C#37CCC#13@!4?C???A#5A??O?G#8?C#36!9?O#45G??@$#40!39?A#43C#42G#5_???C?G#12??A???C#43!4?@#30@#3GG!7?C??_!7?A#1!10?ow{}}!30~$#23!42?@#3@!6?A#29_#21A!4?C#20!4?@#15@!4?@#19@!5?@!4?G#44G#14!11?G?A$#36!42?O#24_#49_!6?@???A#36!8?C#11@!9?_#6@#42_#17O#47!14?CA$#34!43?A#45C!5?_???A#34!10?C#12@#22C!4?A???_!6?A!6?_#15???C$#38!46?G?O?@#15?_#2C_!5?GG??GG#29C#14@#18C#8?C#38A!7?O$#16!47?G#6@#36!4?A#25!16?@#35@#45@#48@#40@$#47!70?A-#1!42~}~{w{ooo_o??_!5?@!6?@@!9?_??___ooww{{~}!36~$#0!42?@?AC?GG?O?__!7?!6@#35??A#5@!6?_#0?__?OO?G?C?A?@$#14!44?@!5?G??O??@_#4@#2@!9?@#10?@!4?_???O#3O!4?C?A#11@$#5!45?A#50@@BBBFF!4M!15[!4]!4NFFFBBB@@#34@$#37!45?@#18A?C#3G!5?_#8_@#40A#29_!8?A#43??_#37_!8?G#20G#9G#2G#14C#36A#15A$#6!47?C!4?O#45@#34@!4?A#37_#42_!8?A!6?O#19?O#47???C$#41!47?A#38?C!5?O#47OA#21???A!5?A!6?_$#49!50?C#26G!8?A#46?_!7?_#16?@??_$#43!52?G#24?O#20@??_!7?A#31!6?_!4?O!5?C$#19!62?A#48_!5?_?A!4?O???G$#18!63?AAA#25!7?@#39@$#49!64?!5_!6?@-#1!56~}}}~}!10{}}~~}}!51~$#0!56?@@@??!10A!4?@@$#2!60?@#5@!9?@#3@$#7!62?@!7?@$#9!63?@!5?@$#11!64?@@?@@$#12!66?@-#1!128~-!128B-\
6 changes: 6 additions & 0 deletions shy.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ module main

import os
import flag
import term
import shy.cli

const c_embedded_shy_sixel_logo = $embed_file('assets/images/shy.six')

fn main() {
// Run any sub-commands on the spot if found in args
cli.run_subcommand(os.args) or {
Expand All @@ -31,6 +34,9 @@ fn main() {
}

if opt.dump_usage {
if term.supports_sixel() {
println(c_embedded_shy_sixel_logo.to_bytes().bytestr())
}
println(fp.usage())
exit(0)
}
Expand Down

0 comments on commit 41a8725

Please sign in to comment.