GithubHelp home page GithubHelp logo

mastervolkov / scriptinator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tubbadu/scriptinator

0.0 0.0 0.0 566 KB

Behold! the Scriptinator! A plasmoid button to launch custom scripts on click and on mouse scroll, allowing you to change icon dynamically

QML 95.83% Shell 4.17%

scriptinator's Introduction

Scriptinator


install

to install just navigate to the downloaded Scriptinator folder and run

chmod +x install.sh
./install.sh

usage

add the plasmoid to the desktop or to a panel, then right click on it and select configure:

  • introduction:

    whenever a command is launched by the plasmoid, it searches the output of that command for a pattern like this:

    {PlasmoidIconStart}/home/path/to/icon.png{PlasmoidIconEnd}
    {PlasmoidTooltipStart}some text here{PlasmoidTooltipEnd} 
    

    and then, if found, changes his icon and/or tooltip to the specified new value.

    if no "formatted" output is returned, nothing is changed.

  • custom icon full path:

    the icon specified here will be set as icon as soon as Plasmashell starts.

    use the full icon, so don't do ~/icon.png and $HOME/icon.png as they may not work.

  • init script:

    this script will be run just once when the plasmashell is started, so it could be useful to dynamically set an icon or a tooltip. You can do this with:

    echo '{PlasmoidIconStart}/home/path/to/icon.png{PlasmoidIconEnd}'  
    echo '{PlasmoidTooltipStart}/home/path/to/icon.png{PlasmoidTooltipEnd}'  

    or by calling any script that return this string as an output (it could be not the only output).

    NOTE: the icon is not changed unless an output respecting this pattern is returned by a script launched by Scriptinator.

  • OnClick script, WheelUp script, WheelDown script:

    those script wil be run whenever you left-click or scroll up or down with the mouse overing onto the plasmoid. You can change the plasmoid icon as well, as explained above.

  • OnMouseOverScript:

    launches this command whenever the cursor comes over the widget. You may want to use this to change the tooltip.

  • Show Background:

    uncheck this to remove that black square around your widget.

    Use it only if you use transparenced icons, otherwhise it will be unuseful.

    NOTE! if this option is disabled and you accidentally set an icon to something that does not exist, the plasmoid will become completely invisible, so if you don't remember where was it placed you will lose it!

  • Show tooltip:

    if this is checked, overing the mouse onto the widget will display a tooltip containing the output of the last command run (including the seticon string), or a custom tooltip as explained below.

  • Use custom tooltip:

    check this if you want a custom tooltip (specified in the configuration of the plasmoid or set dynamically with a command).

    Note: you can use HTML formatting for the tooltip, such as <b>bold</b> and so on, but CSS won't work.

  • custom tooltip:

    specify here the custom tooltip. if the use custom tooltip option is disabled, this will not be shown (really strange, isn't it? XD)

  • custom height and width:

    if set to 0, the plasmoid will determine its size automatically; otherwise, it will set his size to the specified one.

    NOTE! you may set the height to a number and the width to 0 (or vice versa) to have one fixed dimension and an automatic one

NOTE! after changing preferences, if those doesn't apply immediately, just restart your session or launch plasmashell --replace in a terminal (or in krunner, better)


TODO

  • I dunno if something comes to my mind I'll write it here
  • add the double tooltip
  • add the {PlasmoidTextStart} feature
  • make the assigned shortcut work

scriptinator's People

Contributors

tubbadu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.