Forum › Forums › General › Tips and Tricks › spaceFM custom dialogs
- This topic has 11 replies, 5 voices, and was last updated Jan 15-9:02 pm by sleekmason.
-
AuthorPosts
-
December 20, 2020 at 4:49 am #47820
Anonymous
http://ignorantguru.github.io/spacefm/spacefm-manual-en.html#dialog
https://github.com/IgnorantGuru/spacefm-plugins/wiki#ig-example-application
https://github.com/IgnorantGuru/spacefm-plugins/blob/master/ig-example-app

spacefm -g --label "\n đ´" --title "potato" \ --hbox --icon dialog-password --button ok \ --button "maybe" --button "three blind mice" \ --label "it's\ta\tsafe\t\t" --vbox \ --icon weather-few-clouds --vbox \ --label " berry pie\nclue" \ --input --viewer --scroll ~/.bash_historyDecember 20, 2020 at 9:12 am #47821Memberex_Koo
::Thanks skidoo
The plugin that I would like to install is https://github.com/IgnorantGuru/spacefm-plugins/tree/master/ig-spacetv/pkg but it just won’t install or more likely I don’t know how to install it.
December 20, 2020 at 10:26 am #47822MemberPPC
::Thanks skidoo
The plugin that I would like to install is https://github.com/IgnorantGuru/spacefm-plugins/tree/master/ig-spacetv/pkg but it just wonât install or more likely I donât know how to install it.
I extend SpaceFM capabilities a lot – It’s extremely modular…
Easy way to use that amazing little script:
1- Go to https://raw.githubusercontent.com/IgnorantGuru/spacefm-plugins/master/ig-spacetv/src/cstm_325c1cf6/spacetv.sh and copy the script’s text
2- Open a text editor (like geany), paste all the text you just copied and save it as “spacetv.sh” anywhere you want, like your home folder, for example
3- Navigate to that script’s location and make it executable (select it, “CTRL+P”, make sure to check the “execute” box, click ok)
4- You can now run that script (ex: ./spacetv.sh [full/path/to/movie.mp4] ). But you want to run it from SpaceFM. I do it this way:
1- In SpaceFM, right click a file of the kind you want to be associated with the script (ex: a MP4 file) > “Open” > “Choose” > in “command”, in the bottom, write:
/full/path/to/spacetv.sh %F
Make sure to tick the box “set as default…”2- click any mp4 file – it will start playing in full screen. If you exit and click the same file, it will start from exactly where you were watching it…
3- Optionally you can add a “tool” in the menu, calling it (for example) “Continue last movie”, and associate it with the command “~/spacetv.sh” (or the full path to your script) , this way you won’t even have to search for the last movies location in your drive…
enjoy,
P.
- This reply was modified 2 years, 4 months ago by PPC.
- This reply was modified 2 years, 4 months ago by PPC.
December 21, 2020 at 10:02 am #47887Memberex_Koo
::PPC Thanks so much for the info I would never got there without your advice..
Easy way to use that amazing little script:
1- Go to https://raw.githubusercontent.com/IgnorantGuru/spacefm-plugins/master/ig-spacetv/src/cstm_325c1cf6/spacetv.sh and copy the scriptâs text
2- Open a text editor (like geany), paste all the text you just copied and save it as âspacetv.shâ anywhere you want, like your home folder, for example
3- Navigate to that scriptâs location and make it executable (select it, âCTRL+Pâ, make sure to check the âexecuteâ box, click ok)
4- You can now run that script (ex: ./spacetv.sh [full/path/to/movie.mp4] ). But you want to run it from SpaceFM. I do it this way:
1- In SpaceFM, right click a file of the kind you want to be associated with the script (ex: a MP4 file) > âOpenâ > âChooseâ > in âcommandâ, in the bottom, write:
/full/path/to/spacetv.sh %F
Make sure to tick the box âset as defaultâŚâ2- click any mp4 file â it will start playing in full screen. If you exit and click the same file, it will start from exactly where you were watching itâŚ
3- Optionally you can add a âtoolâ in the menu, calling it (for example) âContinue last movieâ, and associate it with the command â~/spacetv.shâ (or the full path to your script) , this way you wonât even have to search for the last movies location in your driveâŚ
enjoy,
P.
- This reply was modified 2 years, 4 months ago by ex_Koo.
January 15, 2021 at 1:40 pm #49905MemberRobin
::Just found that thread. This is really great! Thank you very much for sharing it, skidoo! Really amazing, I’ll probably make use of the functionality while creating graphical user interface for the script I’m about to write. I’ll still have to decide whether rather to use yad or to use this spaceFM.
RobinWindows is like a submarine. Open a window and serious problems will start.
January 15, 2021 at 3:35 pm #49908Member
sleekmason
::Thank you for finding this thread @Robin:)
I’ve never really messed with Spacefm before and think it is pretty cool! Looks super customizable.
I am wanting to add items to the right-click menu. Specifically:
urxvt --hold -e ls -AghS --color %F— When added to tools works fine from the tools menu, but how to add items to the right-click menu?
A hint that may help, but I can’t seem to enter properly is from:
https://wiki.archlinux.org/index.php/SpaceFMMIME Type equals true File Is Dir equals true File Is Text equals trueWhen entering in the context menu, anything I enter in the field shows up with: “MIME type begins with” appearing before the text.
Not sure if getting this correct will allow for the right-click action, but getting it wrong will remove it from the tools menu, lol.
*edit may have found the answer…
– Custom actions > Right click in SpaceFM > In the active context menu right click again and note the options > then left click and the configuration dialog opens.
Hard to find but it’s there. right-click, then DOUBLE right-click again on “NEW”, then left-click on Command. whew!
- This reply was modified 2 years, 3 months ago by sleekmason.
January 15, 2021 at 4:03 pm #49910MemberPPC
::I am wanting to add items to the right-click menu. Specifically:
urxvt –hold -e ls -AghS –color %F
â When added to tools works fine from the tools menu, but how to add items to the right-click menu?
Easy: right click inside SpaceFM main window, where files are shown. On that menu, hover the mouse pointer above “Actions” and right click again. select the “+ New” … and select to add a “command”… Enter the command “name”, then, on the second window, the command itself (the “urxvt …” command)
You can also adapt that and place .desktop files on the SpaceFM toolbar (I placed the mount android device script, and my mount cloud drive scripts there)P.
January 15, 2021 at 4:18 pm #49913Member
sleekmason
::I am wanting to add items to the right-click menu. Specifically:
urxvt âhold -e ls -AghS âcolor %F
â When added to tools works fine from the tools menu, but how to add items to the right-click menu?
Easy: right click inside SpaceFM main window, where files are shown. On that menu, hover the mouse pointer above âActionsâ and right click again. select the â+ Newâ ⌠and select to add a âcommandâ⌠Enter the command ânameâ, then, on the second window, the command itself (the âurxvt âŚâ command)
You can also adapt that and place .desktop files on the SpaceFM toolbar (I placed the mount android device script, and my mount cloud drive scripts there)P.
Thank you for your reply:)
Amazingly simple! I like Spacefm. Currently using both Thunar and Pcmanfm depending on use, and Spacefm looks closer to what I need. Don’t know why I haven’t messed with it before now. Think I may have installed it a few years back and didn’t like the default or something? anyway, glad to try it out again from a new perspective.
The spacetv plugin looks intriguing too.January 15, 2021 at 6:59 pm #49919Member
sleekmason
::Well, slightly stumped.
I am trying to get a simple “Open Terminal Here” working with:
urxvt -w %fThis will open a terminal in $HOME, but when I right-click on a file and Open In Terminal, it only opens an instance in $HOME and not the clicked file. Mime type inode/directory.
This is not a problem with two other commands that use urxvt as the terminal. Everything else is converting over nicely. Any ideas?
January 15, 2021 at 7:37 pm #49923Anonymous
::Not specific to spaceFM, every terminal emulator seems to have quirks regarding how it expects (demands) arguments to be passed to it.
I’m not a regular user of urxvtpqrs, so I peeked at its manpage.
Per the manpage, -w expects an accompanying value.
Maybe your post just contains a typo, but it seems to amount to “dear urxvtpqrs, I want you to display a border, sized %filename pixels wide”Also, not specific to spaceFM (or, perhaps it is ~~ check your config) and not specific to launching any particular command… bear in mind that the launching app probably does not know, does not check, does not care which command processor shell (sh, vs ash dash bash zsh, et al) it is passing the launchstring to. If appropriate, your launchstring should explicitly request bash -c ‘blahblah’ (Appropriate, as in, when your launching syntax contains bash-isms.)
January 15, 2021 at 7:58 pm #49925Member
sleekmason
::Not specific to spaceFM, every terminal emulator seems to have quirks regarding how it expects (demands) arguments to be passed to it.
Iâm not a regular user of urxvtpqrs, so I peeked at its manpage.
Per the manpage, -w expects an accompanying value.
Maybe your post just contains a typo, but it seems to amount to âdear urxvtpqrs, I want you to display a border, sized %filename pixels wideâAlso, not specific to spaceFM (or, perhaps it is ~~ check your config) and not specific to launching any particular command⌠bear in mind that the launching app probably does not know, does not check, does not care which command processor shell (sh, vs ash dash bash zsh, et al) it is passing the launchstring to. If appropriate, your launchstring should explicitly request bash -c âblahblahâ (Appropriate, as in, when your launching syntax contains bash-isms.)
Yes, it is a weird one. Somehow the -w applies to the filemanager, not urxvt. Seems the expected format layout is wrong?
This holds true for thunar and pcmanfm as well, where the line above works as expected.
EDIT* Does NOT work in thunar. Works fine in Pcmanfm. For thunar use:
exo-open --working-directory %f --launch TerminalEmulatorBut, I may not have a “real?” problem at all. I found after entering a sub directory (rather than just clicking on it), the action works as expected, opening in the current directory.
Might just be I don’t get to right-click on the file itself. I can live with that if this is the case.
*Edit – on further thought , it really should allow for it.
The ls command works as expected, as does this,
urxvt -e ncdu -rr %f
So even opening a separate program, both work as expected when right-clicking on a file. Why won’t the terminal itself?- This reply was modified 2 years, 3 months ago by sleekmason.
- This reply was modified 2 years, 3 months ago by sleekmason.
January 15, 2021 at 9:02 pm #49935Member
sleekmason
::This command works to set “Open Terminal Here”
exo-open --working-directory %f --launch TerminalEmulatorSpacefm is an awesome file manager:)
-
AuthorPosts
- You must be logged in to reply to this topic.