A slightly modified version of the script shared here: jakehilborn/displayplacer#137 (comment)
Adds the ability to both enable/disable monitors as well as list the available display_ids
A slightly modified version of the script shared here: jakehilborn/displayplacer#137 (comment)
Adds the ability to both enable/disable monitors as well as list the available display_ids
| # Usage: | |
| # ./spotify-artwork-downloader.sh <share_url> <share_url> <...> | |
| SHARE_URLS=$@ | |
| for URL in $SHARE_URLS | |
| do | |
| DATA=$(curl "https://open.spotify.com/oembed?url=$URL") | |
| THUMB_URL=$(echo $DATA | jq --raw-output '.thumbnail_url') | |
| TITLE=$(echo $DATA | jq --raw-output '.title') |
| Draw.loadPlugin(function(ui) { | |
| mxResources.parse('syntaxHighlighting=Highlight Syntax'); | |
| // Adds action | |
| ui.actions.addAction('syntaxHighlighting', function() { | |
| console.log('apply') | |
| }); | |
| }); |
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // choose either `'stable'` for receiving highly polished, | |
| // or `'canary'` for less polished but more frequent updates | |
| updateChannel: 'stable', | |
| { | |
| "last": "1.0.1", | |
| "source": "pth" | |
| } |
| backgroundColor: '#1E2127', | |
| foregroundColor: '#ABB2BF', | |
| colors: { | |
| black: '#1E2127', | |
| red: '#E06C75', | |
| green: '#98C379', | |
| yellow: '#D19A66', | |
| blue: '#61AFEF', | |
| magenta: '#C678DD', | |
| cyan: '#56B6C2', |
| # remove old node from raspberry pi | |
| sudo apt-get remove nodered -y | |
| sudo apt-get remove nodejs nodejs-legacy -y | |
| sudo apt-get remove npm -y # if you installed npm | |
| # update node (with n) | |
| sudo npm cache clean -f | |
| sudo npm install -g n | |
| sudo n stable |
| function validDate(date){ | |
| var re = /(.{2})\/(.{2})\/((.{4})|(.{2}))/; | |
| if (date.search(re) == -1){ | |
| return false; | |
| } | |
| var dt = date.split("/"); | |
| // month must be less than 13, greater than 0 | |
| var month = dt[0]; |
| ko.bindingHandlers.holdClick = { | |
| init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { | |
| var timeoutId = 0; | |
| var option = valueAccessor() || {}; | |
| $(element).mousedown(function () { | |
| timeoutId = setTimeout(option, 1000); | |
| }).bind('mouseup mouseleave', function () { | |
| clearTimeout(timeoutId); |
| function observifyArray(arr){ | |
| for(var i = 0; i < ko.unwrap(arr).length; i ++){ | |
| ko.unwrap(arr)[i] = observify(ko.unwrap(arr)[i]); | |
| } | |
| if (ko.isObservable(arr) && 'push' in arr){ | |
| return arr; | |
| } else { | |
| return ko.observableArray(arr); | |
| } | |
| } |