Scudmenu -- A dmenu script for use with systemd --user

So a while ago I started using systemd --user to manage my session, and I was pretty happy with how it turned out. However, I use a tiling wm, and sometimes I just want to quickly start or stop something without opening a terminal (say I'm looking at my mail and want to quickly restart offlineimap). Suckless' dmenu program is great, and really good for starting programs in your path.
When I typed in
systemctl --user
that would clear out the completion and just leave it to me to know the units names and everything.
So, I created a script called scudmenu that I bound to a key in my window manager. It opens up two dmenu's in order: the first to get the operation you want to run, and the second to get the unit name.
It would look like this:
Action: [start] stop restart try-restar...
systemctl --user start [dbus] dwm i3...
giving me a nice overview of the units that I have. (the second one actually takes the name of the action you select and uses it for a title)
I've put together an AUR package, scudmenu-git, that will install this to your system. At the moment, there is no configuration and it depends on a specific font, but I will be adding configuration options (such as fonts, colors, and a terminal for the 'status' output) soon. Technically you can just say
font="some-font-*-*-*-*-..." scudmenu
at the moment, but that's a bit annoying.
Last edited by KaiSforza (2013-04-14 01:38:49)

You can see the setAttributes() method signature like so:
<cfset whitelist = CreateObject("java", "org.jsoup.safety.Whitelist")>
<cfdump var="#Whitelist.relaxed()#" />
If you run that you will see setAttributes() expects a string and a string array.
addAttributes(java.lang.String, java.lang.String[])
Given that, you need to do something like:
<cfscript> jsoup = CreateObject("java","org.jsoup.Jsoup"); whitelist = CreateObject("java", "org.jsoup.safety.Whitelist"); html="<div style='font-size:24pt;'>This is BIG text</div>. This is an unwanted script: <script>alert('Boo!')</script>.<br>"; myKeys=["style"]; sanitized = jsoup.clean(html, Whitelist.relaxed().addAttributes(":all" , JavaCast("string[]", myKeys))); WriteOutput("<textarea>#sanitized#</textarea>");</cfscript>

Similar Messages

  • Query or script for calls with federated users

    Hi all,
    Is there a query or script that can be run in SQL or Lync that gives us a report on calls between our Lync users and federated users?

    Hi,
    There is not native report to achieve this.
    If you want to write a query, the following table is helpful to you:
    http://technet.microsoft.com/en-us/library/gg398589.aspx
    http://technet.microsoft.com/en-us/library/gg412791.aspx
    http://technet.microsoft.com/en-us/library/gg412950.aspx
    Best Regards,
    Lisa Zheng
    Lisa Zheng
    TechNet Community Support

  • Open multiple PDFs in Photoshop at specific size for use with Actions

    I am having a bit of a roadblock with batch Automate in Photoshop. I'd like to open multiple PDFs at 630p x 630p, 72 dpi in greyscale. I have 2000 files to do this on. If files are already open, the rest of my action works, does a few things, then saves for web as PNG. It is just the open which is not working. It tries to give all files the same filename. Taking the filename out of the Action is not an option. Scan of msg boards say that this feature stopped working around CS3. Any ideas? Much appreciated.

    Open opens images the same size and resolution they are saved. If you want the images to be a particular size you need to do that in the action.
    If you download my crafting actions package.  You will find the there are over a dozen scripts I wrote to be used with in action.  One is a plugin script that would be particularly helpful to you to do the resize you want to do.  The first three steps would be Step 1 menu File>Automate>AspectRatioSelection....  You would set in a 1 to  1   Aspect ratio. Centered, rectangle. replace, selection and 0 feather. In its dialog.  Those settings will be recorded into the Actions step. Step 2 menu Image Crop. that will make you image square. Step 3 menu File>Automate>Fit Image...  In the Fit image dialog you would set 630 in the width and height fields.  These settings will be recorded into the actions step.    When the action is played no dialog will be displayed. The recorded settings will be used.
    Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    More then a dozen Scripts for use in actions
    Example
    Download

  • ISetup for use with Oracle Incentive Compensation (OIC)

    I have read conflicting reports as to whether or not iSetup would be available for use to migrate Compensation Plans (and all other OIC configurations) across instances of Oracle Apps eBusiness.
    Does anyone know if R12 (12.04) is capable of handling OIC migrations? Is there any documentation available as to how one would configure iSetup for use with OIC?
    Thanks in advance.

    Hi,
    This is Mugunthan from iSetup development. OIC is not covered as a part of standard selection sets shipped by Oracle. You may consider logging a SR (product code - 841) to get the coverage.
    If you already have java program/scripts that migrate OIC, then you can plugin them with iSetup. You can also write your own BC4J APIs for migration of OIC setups and register with iSetup.
    To know more about writing BC4J iSetup Fwk APIs, please log a SR.

  • HT204149 What is the maximum resolution available for use with the Apple Mini DisplayPort to Dual-Link DVI adapter?

    What is the maximum resolution available for use with the Apple Mini DisplayPort to Dual-Link DVI adapter?

    Hey guys,
    I found out an answer by myself...
    The missing link : the MacBook Pro needs to be powered... as in you need to plug the charger in...
    In conclusion, you simply plug everything, turn on the MacBook Pro, close the lid, and there you go !

  • How do I do this to use OVerdrive media on deviceThe Apple device must be formatted for use with Microsoft Windows.  The iTunes setting 'Manually manage music-' must be enabled for the device before you can complete the transfer.

    I cannot make these directions work
    I downloaded media on Overdrive MEdia on my PC
    I have the overdrive media ap on my I pod touch 4g
    this media is suppossed to be compatible w/I pd touch
    Notes on Transferring OverDrive MP3 Audiobooks…
    Most MP3 capable devices should play OverDrive MP3 Audiobooks.
    If you intend to transfer OverDrive MP3 Audiobooks to an Apple® device, note the following…
    iTunes® v9.0.2 (or newer) is required.
    The Apple device must be formatted for use with Microsoft® Windows®.
    The iTunes setting 'Manually manage music…' must be enabled for the device before you can complete the transfer. Adjust this setting in iTunes as follows…
    Connect the iPod® to your computer.
    If it does not launch automatically, open iTunes v9.0.2 (or newer).
    In iTunes, locate the device in the left vertical navigation panel (under heading 'DEVICES'), and click the device.
    The 'Summary' screen is displayed. 
    Place a checkmark next to 'Manually manage music…'.
    Click the 'Apply' button.
    The iTunes 'Summary' screen refreshes, and the changes are saved.
    If desired, close iTunes.
    Note that if an Apple device is connected to your computer, you can choose to simultaneously transfer a title to the iTunes Library and the Apple device. If you wish to only transfer a title to the iTunes Library, you must first disconnect the Apple device

    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities
    Also you said " I want to add them to my iCloud, and also back to my computer.   " Note that unless  subscribe to iTunes match, only iTunes purchases are stored in iCloud.
    Also,
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I have an external hard drive that was formatted by a PC and has files and directories etc. I want to format it and use it on my IMAC for backup but I can't seem to write to it nor can I delete current content. How do I initialize it for use with the MAC?

    I have an external hard drive that was formatted by a PC and has files and directories copied to it etc. I want to use it on my IMAC for backup. I see it on my my IMAC . I can open files etc.  But I can't seem to write to it nor can I delete current content. I don't care if I lose current content. How do I initialize it for use with the MAC?

    You can't write to it because it's formatted as NTFS which OS X will read but not write to. If you want to continue using the drive with both a PC and OS X you will need to download and install NTFS-3G so you can then write to it from your Mac. You can get NTFS-3G at:
    http://www.macupdate.com/app/mac/24481/ntfs-3g
    If you want to use the drive exclusively with your Mac then move the data off it and reformat it in Disk Utility (Applications - Utilities - Disk Utilities) as Mac OS Extended (Journaled.)

  • I have a company Ipad that belonged to a deceased employee. no access to his icloud or appleID. how can I restore it for use with a new apple ID

    I have a company Ipad that belonged to a deceased employee. no access to his icloud or appleID. how can I restore it for use with a new apple ID?
    The apple ID was his personal account and can no longer gain access. Im sure I can get purchase recipts from the accounting department if needed. I tried to put the Ipad in restore mode and used itunes to "recover" the ipad but it still wont let me in because he registered the device with the "lost iphone" feature or whatever that is.

    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818
    The Apple ID and Password that was Originally used to Activate the iDevice is required
    If you do not have that information you will not be able to use the Device.

  • HT3529 Is there a way to create, store and use preset messages for use with "Messages"?

    Is there a way to create, store and use preset messages for use with "Messages". I often have a recurrinig message to send, after a repeating event, and need to enter the same short message each time. It would be nice to have this short message stored and selectable so that I do not need to enter each time.

    found an answer that seems to work:
    https://discussions.apple.com/message/17997300#17997300

  • Can i buy an iPhone at a pawn shop and get it unlocked for use with Straight Talk wireless?

    Just wondering if I can buy a used iphone at a pawn shop or on ebay and get it unlocked for use with the prepaid Straight Talk wireless service? If so, how much would it cost to get it unlocked?

    PHones can only be unlocked from the carrier; if you're looking for an unlocked device I'd recommand buying it directly from Apple as that is the only way to promise it is, if you buy it second hand you may find it is locked to a carrier who doesn't support unlocking, or worst yet activation lock

  • Best drum loops for use with Logic? Ease of use, usability, etc.

    Hi,
    I have BFD2 but find it slow to load and sometimes clumsy auditioning loops within Logic. I love the Apple Loops library but I wondered if people are importing MIDI drum files for use with Logic. Do all drum files use the same MIDI mapping? If I drop a BFD2 loop into a Logic drum virtual instrument will it work? I bought a few packs from Groove Monkee but have yet to use them with Logic. I only use them within BFD2.
    I'm basically looking for a seamless way to stay within Logic to improve my workflow. It's taken me days sometimes to get a drum track right by going back and forth with BFD2. Is there a concept I'm missing that would make it easier?
    Thanks

    try Stylus RMX by Spectrasonics. http://www.youtube.com/watch?v=FlgP1q1HCj4

  • Unlocked old iPhone 3GS for use with pay as you go sim in the UK on vacation. O2 sim works while ph plugged in.  Unplugged, works short time and crashes.  Sometimes won't even re-boot.  Software on phone up to date as far as 3GS goes.

    I brought an old IPhone 3GS to the UK on vacation for use with sim card.  I had the phone unlocked with approval and instructions from ATT.  Store in the UK recommended O2 pay as you go sim which works as long as the phone remains plugged into the wall.  Once unplugged, it will work for a short time and then always crashes.  Sometimes it will re-boot and crash again and sometimes it will not re-boot at all.  One store told me to sync with itunes which I did on my Mac Book.  I don't know if the sim is defective or if the software of the 3GS is just not compatible with the sim when on the battery.  I have updated the software on the phone as far as it will go.  Any suggestions?  Maybe the phone is too old to use with the latest pay as you go sim cards.  I am disappointed that this phone has not been reliable as a pay as you go and I have had to purchase a UK phone here in order to have a reliable phone.

    There is nothing you can do. You bought an illegally unlocked phone off Ebay. A lot of sellers there will tell you it is unlocked but the first time you try to update the operating system it will put the lock back on to the carrier the phone was originally locked to. Sorry but unless the carrier it was locked to will unlock the phone I am afraid you have a very expensive paper weight now. You should have bought it from a reputable dealer instead of ebay.

  • Doesn't play songs, "itunes is not configured for use with mac-formatted"??

    Hi, new ipod shuffle. Seems to charge fine, all indicator lights function as expected. Everything looks fine in itunes. But it doesn't play songs. I have the most recent versions of itunes and the ipod software. Re-set, updated, and restored, nothing works. Even restored using the restore utility. Re-started computer. Checked for volume control. Won't play songs. Tried different file types. Songs play fine from itunes library and from the device's library within itunes. Tried different headphones. Hooked it up to computer speakers. Turning volume all the way up on device and speakers, heard some very faint rhythmic static, so my guess is the jack socket (or whatever you call it) is just messed up, but it seems weird that it can transfer power and data to the device but doesn't work for sound...
    The only other issues that have come up is that the drive disappears in explorer once it syncs with itunes. Other people who've noticed this seem to have completely different problems so I don't think it's related.
    Also, I have MacDrive on my computer. And when it starts up with the ipod plugged in, MacDrive offers the message "Itunes is not configured for use with Mac-formatted ipods." It offers to automatically reconfigure itunes so it can read mac-formatted ipods. Since I've restored the device, I don't see why formatting should be an issue so I say "no."
    Should I try letting macdrive do its format thing? Should I try formatting the ipod disk on the My Computer menu? Or should I just email apple and tell them the jack's busted?
    Thanks for any thoughts!

    Well, I have had my iPod for about 3 years, it is a 4th generation non-video 40 GB. One day it just stopped working, and now it does not play any songs. when I turn it on it makes this odd whirring sounds that computers make when they try really hard to do something. I cannot charge it, and it is not recognized by iTunes. Also when I turn it on, I get the apple.com/ipod/support (or whatever it is) screen. Needless to say, my warranty is expired, and so I cannot do anything for it except get a new battery, or buy a new one. Is there any way to fix this problem, or anyone out there who is experiencing the same thing?
    I'm having the exact same problem with my wife's iPod. However it will play about 3 seconds of a song and go onto the next song.
    If there is anyone out there that can help please do!
      Windows XP  

  • Can I activate ePrint on my HP Officejet Pro 8500 Premium printer for use with my smartphone​?

    Can I activate ePrint on my HP Officejet Pro 8500 Premium printer for use with my smartphone? Any instructions?

    Yes.  You can do that
    Just follow the instructions for the appropriate device on this HP web document. 
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Problem with Hp Photosmart D110a for use with iPad 3G

    I have just bought an HP Photosmart D110a for use with iPad 3G but this printer could not be connected to Internet, can anyone tell me what the problem is?

    Hi,
    Do you follow the setup guide ? What is the error ? Looks like your printer is not Airprint ready therfore you need to set it up for ePrint. 
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

Maybe you are looking for

  • ATT DSL won't connect to Remote Desktop Connection

    We have ATT DSL and it won't let me connect to my work computer remotely.  WHen I try to connect from other networks, it works which tells me that my computer is set up correctly, the VPN is set up correctly, and everything at work is set up correctl

  • Widget Meltdown

    Widget Meltdown! I did my weekly update for my Mac Mini G4 software from Apple. After the update, most of the Widgets do not fuction properly. Some do not work at all, others do not work if you flip them over, buttons are missing, they scroll off the

  • How to code the ejbCreate() method without initailizing primary key?

    Hi all, I've just started learning about EJBs, and now am at the stage of learning how to create, deploy and test a CMP Entity Bean. Ran into a problem which I'm hoping someone can help out with. I'm using SQL Server 2000 as my backend database, and

  • Price Updation of Finished Good

    Dear Experts, Can any one explain how the MAP of a material (SG/ SFG) whose price indicator is standard price gets calculated in system. I Have a material CLINKER with price indicator Standard Price and the price is fixed as 145. In MM03 the MAP of t

  • How to find dead tracks

    Hi, any way to locate dead, orphaned, tracks in our music library in itunes? I don't want to erase them, just locate them. Cheers M