uebersicht icon indicating copy to clipboard operation
uebersicht copied to clipboard

refreshing specific widget ids only works with coffee files and not jsx ones

Open zzzeyez opened this issue 4 years ago • 3 comments

this is the case with all of my widgets. i even made two versions of the same plugin to test it — one in coffeescript, and the other in javascript. issue persists

i'm refreshing them like so:

# this refreshes the widget correctly
osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "landscape-landscape-coffee"'

# while this does not
osascript -e 'tell application id "tracesOf.Uebersicht" to refresh widget id "landscape-landscape-jsx"'

neither of these are giving me any output in the terminal. however, the javascript file (which does not refresh) gives me this in the debug console:

23-24-28

for reference, here are landscape.coffee and landscape.jsx (respectively):

refreshFrequency: false

render: () ->
  return '''
    <link rel="stylesheet" type="text/css" href="/landscape/landscape.css" />
	<div class="screen">
        <div class="landscape">
        <ul>
          <li class="ls1"></li>
          <li class="ls2"></li>
          <li class="ls3"></li>
        </ul>
      </div>
    </div>
  '''
import { run } from 'uebersicht'

const refreshFrequency = false;

function createSpace(ws) {
	run(`/usr/local/bin/yabai -m space --focus ${ws} && /usr/local/bin/landscape`)
}

const render = () => {
	return (
	<div class="screen">
		<link rel="stylesheet" type="text/css" href="/landscape/landscape.css" />
		<div class="landscape">
			<ul>
				<li class="ls1" onClick={function() { createSpace(1) } }></li>
				<li class="ls2" onClick={function() { createSpace(2) } }></li>
				<li class="ls3" onClick={function() { createSpace(3) } }></li>
				<li class="ls4" onClick={function() { createSpace(4) } }></li>
			</ul>
		</div>
	</div>
	)
};

export { refreshFrequency, render };

zzzeyez avatar Dec 18 '20 06:12 zzzeyez

looks like a bug!

felixhageloh avatar Dec 30 '20 12:12 felixhageloh

Also noticed this (inability to refresh a widget using Applescript).

prurph avatar Aug 30 '22 16:08 prurph

For what it's worth, I'm able to refresh and individual widgets without issue, and am writing them using .jsx files.

I'm on MacOS Ventura13.2.1 (22D68), and using Ubersicht 1.6.

schickm avatar Mar 14 '23 15:03 schickm