green7ea / sesame Goto Github PK
View Code? Open in Web Editor NEWAn xdg-open alternative
License: MIT License
An xdg-open alternative
License: MIT License
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/main.rs:28:42
stack backtrace:
0: 0x55d83057ee8c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfc5562b857b66e6f
1: 0x55d83059d66c - core::fmt::write::h24186d266310419e
2: 0x55d83057c225 - std::io::Write::write_fmt::h0e44a9f353693d62
3: 0x55d8305805e0 - std::panicking::default_hook::{{closure}}::h8f97c47e59937350
4: 0x55d830580195 - std::panicking::default_hook::hd9058771ff5abe01
5: 0x55d830580c94 - std::panicking::rust_panic_with_hook::hb70728eea3baae52
6: 0x55d830580742 - std::panicking::begin_panic_handler::{{closure}}::h2823cc7456997e5f
7: 0x55d83057f334 - std::sys_common::backtrace::__rust_end_short_backtrace::h42b68d6af28a9116
8: 0x55d8305806d9 - rust_begin_unwind
9: 0x55d830554f71 - core::panicking::panic_fmt::h3c14cb0d93e12e49
10: 0x55d830554ebd - core::panicking::panic::h185c5c029d8dec35
11: 0x55d830559182 - sesame::main::h78042742f96d4bcb
12: 0x55d830558663 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf14b2c858444e85e
13: 0x55d830562d29 - std::rt::lang_start::{{closure}}::h0dbec686b15a4323
14: 0x55d83057eb1b - std::rt::lang_start_internal::h862596d9d4ca440d
15: 0x55d830559532 - main
16: 0x7f87c37f62fc - <unknown>
17: 0x7f87c37f63a8 - __libc_start_main
18: 0x55d8305556f1 - _start
19: 0x0 - <unknown>
> /usr/bin/env
ALACRITTY_LOG=/tmp/Alacritty-25438.log
ALACRITTY_SOCKET=/run/user/1000/Alacritty-wayland-0-25438.sock
COLORTERM=truecolor
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/gconf /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-kHJrKOQF20,guid=1845fdd4b24c2706f35431d861e7b83c
EDITOR=/bin/nano
GCC_SPECS=
GSETTINGS_BACKEND=dconf
HOME=/home/massimo
HUSHLOGIN=FALSE
INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.1/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.37_p1/info:/usr/share/info
LANG=en_US.utf8
LESS=-R -M --shift 5
LESSOPEN=|lesspipe %s
LOGNAME=massimo
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01
;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35
:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.
yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
MAIL=/var/mail/massimo
MANPAGER=manpager
MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.1/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.37_p1/man:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/13/share/man
MOTD_SHOWN=pam
MOZ_GMP_PATH=/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed
OLDPWD=/home/massimo
PAGER=/usr/bin/less
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/13/bin:/home/massimo/.local/bin/:/home/massimo/.local/bin/
PWD=/home/massimo
SHELL=/bin/zsh
SHLVL=4
TERM=tmux-256color
TERM_PROGRAM=tmux
TERM_PROGRAM_VERSION=3.2a
TMUX=/tmp/tmux-1000/default,26324,51
TMUX_PANE=%68
TMUX_PLUGIN_MANAGER_PATH=/home/massimo/.tmux/plugins/
USER=massimo
WAYLAND_DISPLAY=wayland-0
WLR_NO_HARDWARE_CURSORS=1
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_ID=2
XDG_SESSION_TYPE=wayland
XDG_VTNR=1
ZSH=/home/massimo/.oh-my-zsh
_=/usr/bin/env
P9K_TTY=old
_P9K_TTY=/dev/pts/46
P9K_SSH=0
I would like for the ability to use environmental variables in my sesame config:
[
{
"protocol": {
"http,https": [
{
"contains": ["youtube.com/watch?", "youtu.be/?"],
"use": "$PLAYER"
},
"$BROWSER"
]
}
},
{
"mime": {
"image": "$VIEWER",
"video": "$PLAYER",
"audio": ["$PLAYER", "--player-operation-mode=pseudo-gui", "--script-opts=osc-visibility=always"],
"application/pdf": "$READER"
}
},
["$TERMINAL", "-e", "vi"]
]
But there is a problem: The environmental variables don't work because they are wrapped in quotes:
/usr/bin/env: ‘$TERMINAL’: No such file or directory
This is because it is running /usr/bin/env '$TERMINAL'
instead of '/usr/bin/env $TERMINAL'.
When a file I want to open with sesame does not have an extension or mime type, it is usually a shell script and I want to open it with my text editor. This happens when I try to run sesame file
:
file (ext: file, proto: -, mime: -)
I would like for an option to run silently. Maybe -s
and --silent
. It should prevent the messages from appearing in the terminal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.