[solved]Need help with a bash script for MOC conky artwork.
I need some help with a bash script for displaying artwork from MOC.
Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
mocp -Q %file
gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last '/'?)
A point in the right direction would be appreciated.
thanks, d
Last edited by dgz (2013-08-29 21:24:28)
Xyne wrote:
You should also quote the variables and output in double quotes to make the code robust, e.g.
filename="$(mocp -Q %file)"
dirname="${filename%/*}"
cp "$dirname"/front.jpg ~/backup/art.jpg
Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
thanks for the tip.
here it is, anyhow:
#!/bin/bash
filename=$(mocp -Q %file)
dirname=${filename%/*}
cp ${dirname}/front.jpg ~/backup/art.jpg
then in conky:
$alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
thanks for the help.
Last edited by dgz (2013-08-29 21:26:32)
Similar Messages
-
[SOLVED] Need help with simple a script.
Hello, Iam searching for a small script that sorts my folders in alphabetical order.
I want the script to create folder from A to Z and then move every folder that begins with A into the A folder etc etc..
I really hope anyone understands what im searching for here.
Last edited by nikihr (2009-09-01 20:25:33)scragar wrote:
brisbin33 wrote:
be careful, mv $I* will pick up your freshly created directory too;
i'd `mkdir ./sorted/$I` instead, then `mv ./sorted/* ./ && rm -r ./sorted` at the end.
you could also use
find ./ -maxdepth 1 -iname "$I*" -exec mv {} ./sorted/ \;
to do the actual move*
*note: untested .
While my `mv` code will throw an error the error will not stop the moving of the files, you'll just get 26 messages about being unable to move the directory to itself. I could probably find a way to avoid this that doesn't require the use of find(which I personally dislike) or a second dir, probably just using a file prefix like "_" or something. It would only be a small edit:
#!/bin/bash
for I in {a..z}; do
echo "Moving $I";
mkdir "_$I";
echo "mv $I* \"$(echo $I | tr [:lower:] [:upper:])\"* _$I/";
# mv $I* "$(echo $I | tr [:lower:] [:upper:])"* "_$I/";
mv "_$I" $I
done
well, i have to politely disagree: one, invoking find once is much better IMHO than mv with tr in a subshell. and two, my ./sorted/ idea adds one additional mv command and one additional rm command where you're _$I suggestion added 26 additional mv commands.... just sayin'
but we could also paint the bikeshed blue. .
anyways, i think the OP's got more than he bargained for, hopefully we'll see a [SOLVED] on this one soon. -
[SOLVED] Need help with rEFInd boot entry for rsync backup
I made a successful backup my arch install to an other internal SSD disk (from my HDD).
But now I can't figure out how to make a boot entry for this drive. The wiki only mentions GRUB, which I do not use.
This is the fstab for my HDD:
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda5
UUID=c1822e3c-e037-4445-bdd8-b71778237dee / ext4 rw,relatime,data=ordered 0 1
# /dev/sda2 LABEL=SYSTEM_DRV
UUID=D2DF-9F74 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
And this is the fstab on my SSD which I edited:
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb1
UUID=c61a1301-4728-465d-b40b-bde5e084eb50 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda2 LABEL=SYSTEM_DRV
UUID=D2DF-9F74 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
But I'm not sure about the /boot entry, do I need something else here?
Afterward I tried updating rEFInd by reinstalling using refind-install, but that did not work.
ps. I dual boot with Windows.
Last edited by Devenda (2014-08-18 07:58:07)I also tried adding the menu entry manually by editing refind.conf but that didn't work. I got:
Invalid loader file!
Error: Not Found while loading vmlinuz-linux
Here is some additional info:
refind.conf:
menuentry "SSD Arch Linux" {
icon /EFI/refind/icons/os_arch.png
volume "ArchSSD"
loader /boot/vmlinuz-linux
initrd /boot/initramfs-linux.img
options "root=/dev/sdb1 ro"
I hope this helps.
blkid
/dev/sda1: LABEL="WINRE_DRV" UUID="7C2ADD1D2ADCD4EC" TYPE="ntfs" PARTUUID="b7137819-2ca6-40fb-9167-b73ac37d8d96"
/dev/sda2: LABEL="SYSTEM_DRV" UUID="D2DF-9F74" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="9c77b526-730f-42f9-9904-f9a31b205687"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="f4d5275b-24c1-4847-b937-345bc23bec89"
/dev/sda4: LABEL="Windows 8" UUID="38D6E449D6E408C8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d777a359-f42c-4629-a07c-cc55316352fe"
/dev/sda5: UUID="c1822e3c-e037-4445-bdd8-b71778237dee" TYPE="ext4" PARTUUID="3d282004-2515-4630-b82e-35ed7f707b89"
/dev/sda6: UUID="F80680CC06808D76" TYPE="ntfs" PARTUUID="575bc623-c7f1-44da-a79e-220ce3c98d9b"
/dev/sda7: LABEL="Lenovo_Recovery" UUID="0898D76B98D75632" TYPE="ntfs" PARTUUID="99bfc6d6-1b71-46d1-887e-2f7e65e3eab1"
/dev/sdb1: LABEL="ArchSSD" UUID="c61a1301-4728-465d-b40b-bde5e084eb50" TYPE="ext4" PARTUUID="e87704a5-01"
lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs WINRE_DRV 7C2ADD1D2ADCD4EC
├─sda2 vfat SYSTEM_DRV D2DF-9F74 /boot
├─sda3
├─sda4 ntfs Windows 8 38D6E449D6E408C8
├─sda5 ext4 c1822e3c-e037-4445-bdd8-b71778237dee /
├─sda6 ntfs F80680CC06808D76
└─sda7 ntfs Lenovo_Recovery 0898D76B98D75632
sdb
└─sdb1 ext4 ArchSSD c61a1301-4728-465d-b40b-bde5e084eb50
sr0
boot tree
/boot
├── BOOT
│ └── boot.sdi
├── BOOTSECT.BAK
├── EFI
│ ├── Boot
│ │ ├── bootx64.efi
│ │ ├── LenovoBT.EFI
│ │ ├── License.txt
│ │ └── ReadMe.txt
│ ├── gummiboot
│ │ └── gummibootx64.efi
│ ├── Lenovo
│ │ └── Boot
│ │ ├── BCD
│ │ ├── BCD.LOG
│ │ ├── BCD.LOG1
│ │ ├── BCD.LOG2
│ │ ├── bg-BG
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── bootmgfw.efi
│ │ ├── bootmgr.efi
│ │ ├── BOOTSTAT.DAT
│ │ ├── boot.stl
│ │ ├── cs-CZ
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── da-DK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── de-DE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── el-GR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── en-GB
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── en-US
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── es-ES
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── et-EE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── fi-FI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── Fonts
│ │ │ ├── chs_boot.ttf
│ │ │ ├── cht_boot.ttf
│ │ │ ├── jpn_boot.ttf
│ │ │ ├── kor_boot.ttf
│ │ │ ├── malgun_boot.ttf
│ │ │ ├── malgunn_boot.ttf
│ │ │ ├── meiryo_boot.ttf
│ │ │ ├── meiryon_boot.ttf
│ │ │ ├── msjh_boot.ttf
│ │ │ ├── msjhn_boot.ttf
│ │ │ ├── msyh_boot.ttf
│ │ │ ├── msyhn_boot.ttf
│ │ │ ├── segmono_boot.ttf
│ │ │ ├── segoen_slboot.ttf
│ │ │ ├── segoe_slboot.ttf
│ │ │ └── wgl4_boot.ttf
│ │ ├── fr-FR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── hr-HR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── hu-HU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── it-IT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── ja-JP
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── ko-KR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── lt-LT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── lv-LV
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── memtest.efi
│ │ ├── nb-NO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── nl-NL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pl-PL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-BR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-PT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── qps-ploc
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── Resources
│ │ │ ├── bootres.dll
│ │ │ └── en-US
│ │ │ └── bootres.dll.mui
│ │ ├── ro-RO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── ru-RU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── sk-SK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sl-SI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sr-Latn-CS
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sv-SE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── tr-TR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── uk-UA
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── zh-CN
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── zh-HK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ └── zh-TW
│ │ ├── bootmgfw.efi.mui
│ │ ├── bootmgr.efi.mui
│ │ └── memtest.efi.mui
│ ├── Microsoft
│ │ └── Boot
│ │ ├── BCD
│ │ ├── BCD.LOG
│ │ ├── BCD.LOG1
│ │ ├── BCD.LOG2
│ │ ├── bg-BG
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── bootmgfw.efi
│ │ ├── bootmgr.efi
│ │ ├── BOOTSTAT.DAT
│ │ ├── boot.stl
│ │ ├── cs-CZ
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── da-DK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── de-DE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── el-GR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── en-GB
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── en-US
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── es-ES
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── et-EE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── fi-FI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── Fonts
│ │ │ ├── chs_boot.ttf
│ │ │ ├── cht_boot.ttf
│ │ │ ├── jpn_boot.ttf
│ │ │ ├── kor_boot.ttf
│ │ │ ├── malgun_boot.ttf
│ │ │ ├── malgunn_boot.ttf
│ │ │ ├── meiryo_boot.ttf
│ │ │ ├── meiryon_boot.ttf
│ │ │ ├── msjh_boot.ttf
│ │ │ ├── msjhn_boot.ttf
│ │ │ ├── msyh_boot.ttf
│ │ │ ├── msyhn_boot.ttf
│ │ │ ├── segmono_boot.ttf
│ │ │ ├── segoen_slboot.ttf
│ │ │ ├── segoe_slboot.ttf
│ │ │ └── wgl4_boot.ttf
│ │ ├── fr-FR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── hr-HR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── hu-HU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── it-IT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── ja-JP
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── ko-KR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── lt-LT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── lv-LV
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── memtest.efi
│ │ ├── nb-NO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── nl-NL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pl-PL
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-BR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── pt-PT
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── qps-ploc
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── Resources
│ │ │ ├── bootres.dll
│ │ │ ├── en-US
│ │ │ │ └── bootres.dll.mui
│ │ │ └── nl-NL
│ │ │ └── bootres.dll.mui
│ │ ├── ro-RO
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── ru-RU
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── sk-SK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sl-SI
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sr-Latn-CS
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sr-Latn-RS
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── sv-SE
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── tr-TR
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── uk-UA
│ │ │ ├── bootmgfw.efi.mui
│ │ │ └── bootmgr.efi.mui
│ │ ├── zh-CN
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ ├── zh-HK
│ │ │ ├── bootmgfw.efi.mui
│ │ │ ├── bootmgr.efi.mui
│ │ │ └── memtest.efi.mui
│ │ └── zh-TW
│ │ ├── bootmgfw.efi.mui
│ │ ├── bootmgr.efi.mui
│ │ └── memtest.efi.mui
│ ├── refind
│ │ ├── icons
│ │ │ ├── arrow_left.png
│ │ │ ├── arrow_right.png
│ │ │ ├── boot_linux.png
│ │ │ ├── boot_win.png
│ │ │ ├── func_about.png
│ │ │ ├── func_exit.png
│ │ │ ├── func_firmware.png
│ │ │ ├── func_reset.png
│ │ │ ├── func_shutdown.png
│ │ │ ├── os_altlinux.png
│ │ │ ├── os_arch.png
│ │ │ ├── os_centos.png
│ │ │ ├── os_chrome.png
│ │ │ ├── os_clover.png
│ │ │ ├── os_debian.png
│ │ │ ├── os_ecomstation.png
│ │ │ ├── os_fatdog.png
│ │ │ ├── os_fedora.png
│ │ │ ├── os_freebsd.png
│ │ │ ├── os_freedos.png
│ │ │ ├── os_funtoo.png
│ │ │ ├── os_gentoo.png
│ │ │ ├── os_gummiboot.png
│ │ │ ├── os_haiku.png
│ │ │ ├── os_hwtest.png
│ │ │ ├── os_kubuntu.png
│ │ │ ├── os_legacy.png
│ │ │ ├── os_linuxmint.png
│ │ │ ├── os_linux.png
│ │ │ ├── os_lubuntu.png
│ │ │ ├── os_mac.png
│ │ │ ├── os_mageia.png
│ │ │ ├── os_mandriva.png
│ │ │ ├── os_manjaro.png
│ │ │ ├── os_mythbuntu.png
│ │ │ ├── os_netbsd.png
│ │ │ ├── os_openbsd.png
│ │ │ ├── os_opensuse.png
│ │ │ ├── os_redhat.png
│ │ │ ├── os_refind.png
│ │ │ ├── os_refit.png
│ │ │ ├── os_slackware.png
│ │ │ ├── os_suse.png
│ │ │ ├── os_ubuntu.png
│ │ │ ├── os_unknown.png
│ │ │ ├── os_win.png
│ │ │ ├── tool_apple_rescue.png
│ │ │ ├── tool_memtest.png
│ │ │ ├── tool_mok_tool.png
│ │ │ ├── tool_part.png
│ │ │ ├── tool_shell.png
│ │ │ ├── tool_windows_rescue.png
│ │ │ ├── transparent.png
│ │ │ ├── vol_external.png
│ │ │ ├── vol_internal.png
│ │ │ └── vol_optical.png
│ │ ├── icons-backup
│ │ │ ├── arrow_left.png
│ │ │ ├── arrow_right.png
│ │ │ ├── boot_linux.png
│ │ │ ├── boot_win.png
│ │ │ ├── func_about.png
│ │ │ ├── func_exit.png
│ │ │ ├── func_firmware.png
│ │ │ ├── func_reset.png
│ │ │ ├── func_shutdown.png
│ │ │ ├── os_altlinux.png
│ │ │ ├── os_arch.png
│ │ │ ├── os_centos.png
│ │ │ ├── os_chrome.png
│ │ │ ├── os_clover.png
│ │ │ ├── os_debian.png
│ │ │ ├── os_ecomstation.png
│ │ │ ├── os_fatdog.png
│ │ │ ├── os_fedora.png
│ │ │ ├── os_freebsd.png
│ │ │ ├── os_freedos.png
│ │ │ ├── os_funtoo.png
│ │ │ ├── os_gentoo.png
│ │ │ ├── os_gummiboot.png
│ │ │ ├── os_haiku.png
│ │ │ ├── os_hwtest.png
│ │ │ ├── os_kubuntu.png
│ │ │ ├── os_legacy.png
│ │ │ ├── os_linuxmint.png
│ │ │ ├── os_linux.png
│ │ │ ├── os_lubuntu.png
│ │ │ ├── os_mac.png
│ │ │ ├── os_mageia.png
│ │ │ ├── os_mandriva.png
│ │ │ ├── os_manjaro.png
│ │ │ ├── os_mythbuntu.png
│ │ │ ├── os_netbsd.png
│ │ │ ├── os_openbsd.png
│ │ │ ├── os_opensuse.png
│ │ │ ├── os_redhat.png
│ │ │ ├── os_refind.png
│ │ │ ├── os_refit.png
│ │ │ ├── os_slackware.png
│ │ │ ├── os_suse.png
│ │ │ ├── os_ubuntu.png
│ │ │ ├── os_unknown.png
│ │ │ ├── os_win.png
│ │ │ ├── tool_apple_rescue.png
│ │ │ ├── tool_memtest.png
│ │ │ ├── tool_mok_tool.png
│ │ │ ├── tool_part.png
│ │ │ ├── tool_shell.png
│ │ │ ├── tool_windows_rescue.png
│ │ │ ├── transparent.png
│ │ │ ├── vol_external.png
│ │ │ ├── vol_internal.png
│ │ │ └── vol_optical.png
│ │ ├── keys
│ │ │ ├── altlinux.cer
│ │ │ ├── canonical-uefi-ca.der
│ │ │ ├── fedora-ca.cer
│ │ │ ├── openSUSE-UEFI-CA-Certificate.cer
│ │ │ ├── refind.cer
│ │ │ └── SLES-UEFI-CA-Certificate.cer
│ │ ├── refind.conf
│ │ ├── refind.conf.old
│ │ ├── refind.conf-sample
│ │ └── refind_x64.efi
│ └── tools
├── grub
│ ├── grub.cfg
│ └── grub.cfg.example
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── loader
│ ├── entries
│ │ └── arch.conf
│ └── loader.conf
├── refind_linux.conf
└── vmlinuz-linux
refind_linux.conf
"Boot with standard options" "ro root=UUID=c1822e3c-e037-4445-bdd8-b71778237dee quiet "
"Boot to single-user mode" "ro root=UUID=c1822e3c-e037-4445-bdd8-b71778237dee quiet single"
"Boot with minimal options" "ro root=UUID=c1822e3c-e037-4445-bdd8-b71778237dee" -
Need help with a activation code for Adobe Acrobat X Standard for my PC, Don't have older Version of Adobe Acrobat 9, 8 or 7.
You don't need to install the older version, you only need the serial number from your original purchase. If you don't have them to hand, did you register? If so, they should be in your Adobe account. If not you really need to contact Adobe, though it isn't clear they will be able to do anything without some proof of purchase etc.
-
I think I need help with driver (software) settings for D110a
I think I need help with driver (software) settings for D110a all-in-one
Product: D110a all-in-one
OS: Windows XP Professional
Error messages: None
Changes before problem appeared: None--new installation
The quality of photo images (mostly JPG files) in printouts is awful even though the files display beautifully on the PC screen. I am using
IrfanView software for displaying/printing. As far as I can tell, IrfanView is not the problem.
When I print the same images on a Deskjet 5150 attached to a different PC also running XP Pro and IrfanView, the quality of the printouts is at
least acceptable, Some would probably say good or very good.
It's dificult to explain in words the problem with the printouts. A picture of really pretty vegetables (squashes, tomatoes, watermelon, etc) comes
out much too red. Moreover, the red, which appears shaded on the screen, seems to be all one shade in the D110a printouts.
Something similar happens to a view of a huge tree in full leaf. On screen, there are subtle variations in the "greenness" of the leaves. In the
printout, all green is the same shade. In the same printout, the trunk of the tree is all a single shade of grey. It isn;t even obvious that the
trunk is a round, solid object.
I liken the effect to audio that disappears entirely when you lower the volume and gets clipped into square waves in even moderately loud passages.
I don't know whether the D110a driver software permits adjusting the parameters that appear to be set incorrectly, and if adjustments are possible,
how I would identify which parameters to adjust, how I would access them, or how I would adjust them. I'm hoping that someone can help. Thanks.
I forgot to mention that I have used the diagnostic application and it tells me that there are no problems.
e-mail me at [email protected]brazzmonkey wrote:
Hi everyone,
I noticed the following message when network starts on my gateway
Warning: This functionality is deprecated.
Please refer to /etc/rc.conf on how to define a single wired
connection, or use a utility such as netcfg.
Then I realized the way network settings should be written in rc.conf has changed. But I can't figure out how this should be done.
Currently, my set up is the following (old way):
INTERFACES=(eth0 eth1)
eth0="dhcp"
eth1="eth1 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255"
ROUTES=(!gateway)
eth0 is on DHCP because the IP is dynamically assigned my ISP.
eth1 has a fix IP because it's on the LAN side.
No problem to use DHCP on eth0 with the new settings.
But for eth1, I don't know what I am supposed to write for gateway.
Wiki isn't clear on that one either, and it looks like many articles still refer to the old way.
Any guidance appreciated, thanks.
brazzmonkey,
you can't define 2 interfaces the old way (even though I saw some tricky workaround somewhere in the forums).
Use, f.e., netcfg:
Comment your old lines.
In /etc/rc.conf insert:
NETWORKS=(Eth0-dhcp Eth1-static)
DAEMONS=(..... !network @net-profiles ....)
In /etc/network.d create 2 files:
First one is named Eth0-dhcp.
Contents:
CONNECTION="ethernet"
DESCRIPTION="Whatever text"
INTERFACE=eth0
HOSTNAME="your hostname"
IP="dhcp"
DHCP_TIMEOUT=15
Second one is named Eth1-static.
Contents:
CONNECTION='ethernet'
DESCRIPTION='whatver'
INTERFACE='eth1'
HOSTNAME='hname'
IP='static'
ADDR='192.168.0.10'
GATEWAY='192.168.0.1' # your gateway IP
DNS=('192.168.0.1') # your DNS server
The names Eth0-dhcp and Eth1-static are not magic. They just must be the same in rc.conf and in /etc/network.d.
Hope it helps.
mektub
PS: netcfg must be installed.
Last edited by Mektub (2011-07-20 14:07:05) -
I need help with downgradeing my ios for my ipod touch 4th gen
i need help with downgradeing my ios for my ipod touch 4th gen
As has alwys been the case, you cannot go back.
Sorry -
Need help making a simple script for my webcam
Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
tell application "CamTwist" to activate
delay 10
tell application "Photo Booth" to activate
that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
tell application "System Events"
tell application "CamTwist" to activate
delay 0.5
--Press command+b which is a user defined hot key to load webcam
key code 11 using command down
end tell
delay 0.5
tell application "Photo Booth" to activate
My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone. -
[SOLVED]Need help with dwm...
Hi,
I need help with dwm.I want to apply only 2 patches but everytime when i try i get error... I need xft or pango patch and systray patch.Please help.
Thanks.
Last edited by grobar87 (2013-06-01 13:49:55)[dejan@archtop dwm-6.0]$ patch < 00-dwm-6.0-buildflags.diff
patching file config.mk
[dejan@archtop dwm-6.0]$ patch < dwm-6.0-xft.diff
patching file dwm.c
[dejan@archtop dwm-6.0]$ patch < 02-dwm-6.0-systray.diff
patching file dwm.c
[dejan@archtop dwm-6.0]$ sudo make clean install
[sudo] password for dejan:
cleaning
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -DVERSION="6.0" -DXINERAMA -DXFT
LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama -L/usr/X11R6/lib -lXft
CC = cc
creating config.h from config.def.h
CC dwm.c
dwm.c: In function ‘keypress’:
dwm.c:1062:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]
CC -o dwm
installing executable file to /usr/local/bin
installing manual page to /usr/local/share/man/man1
[dejan@archtop dwm-6.0]$
And here is my config.h:
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "Ohsnap";
static const char normbordercolor[] = "#444444";
static const char normbgcolor[] = "#222222";
static const char normfgcolor[] = "#bbbbbb";
static const char selbordercolor[] = "#005577";
static const char selbgcolor[] = "#005577";
static const char selfgcolor[] = "#eeeeee";
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const Bool showsystray = True; /* False means no systray */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Firefox", NULL, NULL, 1 << 8, False, -1 },
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "uxterm", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
/* button definitions */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} }, -
[SOLVED] Need help with setting up X
Hello guys am new to the forum and this is my first post here. I am in need of a little help.
Need help with X configuration. It starts like this, I installed xorg-server , xorg-utils, xorg-server-utils. When I tried installed xorg-init it says no package, anyway I ignored and moved on.
Now I installed regular mesa stuff and installed xf86-video-ati driver for my HD4250 graphics adapter. with libgl and ati-dri (I have old arch wiki print so it mentioned to install those while newer doesn't list some stuff)
Now the problem is that Xorg -configure doesn't work with newer X and nor the packages has generated /etc/X11/xorg.conf file.
Anyway I created the file manually and added each and every section as mentioned in the "old" guide that I have.
I even added a /etc/X11/xorg.conf.d/20-radeon.conf file for my graphics card with the content as
Section "Device"
Identifire "r"
Driver "radeon"
EndSection
After manually creating all such files I installed x-term, xclock and twm. But when I tried to start X by startx or Xinit it says command not found. Add to that a simple X shows couple of errors.
Please see the errors here Paste #399362 | LodgeIt!
Some more questions : My old guide mentioned to install HAL while newer guide on the net mention DBUS. Though I have added DBUS to be on the safe side but why not HAL ? Is it because of Udev ?
So please help me getting X up and running.
Regards
Last edited by Shashwat (2011-06-04 09:47:47)Ok I sorted out the misprints in the file and installed xinit but still can't get it to work.
1. There are few errors in xorg.conf that I cannot make it out.
2. The X output says no screen found. ?
http://paste.pocoo.org/show/399383/
Now when I add EndSection at the last its says invalid parameter and when I remove it, I get an error "No EndSection, EOF missing"
Kind of bugging
Please do help. -
Help with first Adobe Script for AE?
Hey,
I'm trying to create a script that will allow me to set a certain number of layer markers at an even interval to mark out a song. Could someone help me troubleshoot this script? I've been working on it for ages now, and I'm about to snap. I've basically gone from HTML and CSS, to javascript and Adobe scripting in the past few hours, and I cannot figure this out for the life of me.
I want to create a dialog with two fields, the number of markers to place, and the tempo of the song. Tempo is pretty simple, its just the number of beats per minute. The script is meant to start at a marker that I have already placed, and set a new marker at incrementing times. Its mainly to help me see what I'm trying to animate too, even if the beat is a little hard to pick up every once in a while.
Also, is there a better way to do this? This script will help me in the long run because I will need to do this pretty often, but I'm wondering if there was something that I could not find online that would have saved me these hours of brain-jumbling?
Thank you very much for any help you can offer.
// Neo_Add_MultiMarkers.jsx
//jasondrey13
//2009-10-26
//Adds multiple markers to the selected layer.
// This script prompts for a certain number of layer markers to add to the selected audio layer,
//and an optional "frames between" to set the number of frames that should be skipped before placing the next marker
// It presents a UI with two text entry areas: a Markers box for the
// number of markers to add and a Frames Between box for the number of frames to space between added markers.
// When the user clicks the Add Markers button,
// A button labeled "?" provides a brief explanation.
function Neo_Add_MultiMarkers(thisObj)
// set vars
var scriptName = "Neoarx: Add Multiple Markers";
var numberOfMarkers = "0";
var tempo = "0";
// This function is called when the Find All button is clicked.
// It changes which layers are selected by deselecting layers that are not text layers
// or do not contain the Find Text string. Only text layers containing the Find Text string
// will remain selected.
function onAddMarkers()
// Start an undo group. By using this with an endUndoGroup(), you
// allow users to undo the whole script with one undo operation.
app.beginUndoGroup("Add Multiple Markers");
// Get the active composition.
var activeItem = app.project.activeItem;
if (activeItem != null && (activeItem instanceof CompItem)){
// Check each selected layer in the active composition.
var activeComp = activeItem;
var layers = activeComp.selectedLayers;
var markers = layers.property("marker");
//parse ints
numberOfMarkers = parseInt (numberOfMarkers);
tempo = parseInt (tempo);
// Show a message and return if there is no value specified in the Markers box.
if (numberOfMarkers < 1 || tempo < 1) {
alert("Each box can take only positive values over 1. The selection was not changed.", scriptName);
return;
if (markers.numKeys < 1)
alert('Please set a marker where you would like me to begin.');
return;
var beginTime = markers.keyTime( 1 );
var count = 1;
var currentTime = beginTime;
var addPer = tempo/60;
while(numberOfMarkers < count)
markers.setValueAtTime(currentTime, MarkerValue(count));
currentTime = currentTime + addPer;
if (count==numberOfMarkers) {
alert('finished!');
return;
else{
count++;
app.endUndoGroup();
// Called when the Markers Text string is edited
function onMarkersStringChanged()
numberOfMarkers = this.text;
// Called when the Frames Text string is edited
function onFramesStringChanged()
tempo = this.text;
// Called when the "?" button is clicked
function onShowHelp()
alert(scriptName + ":\n" +
"This script displays a palette with controls for adding a given number of markers starting at a pre-placed marker, each separated by an amount of time determined from the inputted Beats Per Minute (Tempo).\n" +
"It is designed to mark out the even beat of a song for easier editing.\n" +
"\n" +
"Type the number of Markers you would like to add to the currently selected layer. Type the tempo of your song (beats per minute).\n" +
"\n" +
"Note: This version of the script requires After Effects CS3 or later. It can be used as a dockable panel by placing the script in a ScriptUI Panels subfolder of the Scripts folder, and then choosing this script from the Window menu.\n", scriptName);
// main:
if (parseFloat(app.version) < 8)
alert("This script requires After Effects CS3 or later.", scriptName);
return;
else
// Create and show a floating palette
var my_palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", scriptName, undefined, {resizeable:true});
if (my_palette != null)
var res =
"group { \
orientation:'column', alignment:['fill','fill'], alignChildren:['left','top'], spacing:5, margins:[0,0,0,0], \
markersRow: Group { \
alignment:['fill','top'], \
markersStr: StaticText { text:'Markers:', alignment:['left','center'] }, \
markersEditText: EditText { text:'0', characters:10, alignment:['fill','center'] }, \
FramesRow: Group { \
alignment:['fill','top'], \
FramesStr: StaticText { text:'Tempo:', alignment:['left','center'] }, \
FramesEditText: EditText { text:'140', characters:10, alignment:['fill','center'] }, \
cmds: Group { \
alignment:['fill','top'], \
addMarkersButton: Button { text:'Add Markers', alignment:['fill','center'] }, \
helpButton: Button { text:'?', alignment:['right','center'], preferredSize:[25,20] }, \
my_palette.margins = [10,10,10,10];
my_palette.grp = my_palette.add(res);
// Workaround to ensure the editext text color is black, even at darker UI brightness levels
var winGfx = my_palette.graphics;
var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
my_palette.grp.markersRow.markersEditText.graphics.foregroundColor = darkColorBrush;
my_palette.grp.FramesRow.FramesEditText.graphics.foregroundColor = darkColorBrush;
my_palette.grp.markersRow.markersStr.preferredSize.width = my_palette.grp.FramesRow.FramesStr.preferredSize.width;
my_palette.grp.markersRow.markersEditText.onChange = my_palette.grp.markersRow.markersEditText.onChanging = onMarkersStringChanged;
my_palette.grp.FramesRow.FramesEditText.onChange = my_palette.grp.FramesRow.FramesEditText.onChanging = onFramesStringChanged;
my_palette.grp.cmds.addMarkersButton.onClick = onAddMarkers;
my_palette.grp.cmds.helpButton.onClick = onShowHelp;
my_palette.layout.layout(true);
my_palette.layout.resize();
my_palette.onResizing = my_palette.onResize = function () {this.layout.resize();}
if (my_palette instanceof Window) {
my_palette.center();
my_palette.show();
} else {
my_palette.layout.layout(true);
else {
alert("Could not open the user interface.", scriptName);
Neo_Add_MultiMarkers(this);You should ask such questions over at AEnhancers. I had a quick look at your code but could not find anything obvious, so it may relate to where and when you execute certain functions and how they are nested, I just don't have the time to do a deeper study.
Mylenium -
Need help with a basic script to resize image then resize the canvas
I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
I have the below script so far, but I am not certain of how to input the variables / paramters
doc = app.activeDocument;
if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
When I run this script, I get the following error:
Error 1245: Illegal argument - argument 4
- Enumerated value expected
Line: 5
if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
Any help would be appreciated!
Thanks,
BrianI know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI print.
To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera. I wrote a Plugin script a couple years ago that could help you do a centered crop. You could do the whole process by recording a simple Photoshop action that uses two Plugin Scripts only four steps would be needed.
Step 1 Menu File>Automate>AspectRatioSelection (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center, Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
Step 2 Menu Image>Crop
Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels. Adobe Fit Image Plugin Script always uses BICUBIC resampling. I have a modified version of Fit Image that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
The Plugin Script are included in my crafting actions package:
http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
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. This file has some additional comments I inserted describing how the actions work.
12 Scripts for actions
My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html -
Hi i need help with getting my homework for school
im in a nine week class that ends tommorw and need help go\etting my program working properly these are the requirements ofr the assignments:
Modify the Inventory Program by adding a button to the GUI that allows the user to move
to the first item, the previous item, the next item, and the last item in the inventory. If the
first item is displayed and the user clicks on the Previous button, the last item should
display. If the last item is displayed and the user clicks on the Next button, the first item
should display.
· Add a company logo to the GUI using Java graphics classes.
Modify the Inventory Program to include an Add button, a Delete button, and a Modifybutton on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item. Add a Save button to the GUI that saves the inventory to a C:\data\inventory.dat file. Use exception handling to create the directory and file if necessary. Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that products information in the GUI. Post final .class and .java files as an attachment.
this is what i have there are three java files im puttong in here
first is the panel frame
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Component;
import javax.swing.SwingConstants;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JList;
import java.util.*;
import java.text.NumberFormat;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.net.URL;
import java.io.*;
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.NumberFormat;
public class PanelFrame extends JFrame
private JPanel buttonJPanel; // panel to hold buttons
private JButton buttons[]; // array of buttons
private JLabel label1; // JLabel iventory number
private JLabel label2; // JLabel product name
private JLabel label3; // JLabel product price
private JLabel label4; // JLabel product in stock
private String p_ProductName; // private variable for the employee name.
private int p_UnitCount; // private variable for the hours worked.
private double p_UnitPrice; // private variable for the hourly wage.
private int p_ItemNumber; // private inventory number
//create inventory object
Inventory myInventory = new Inventory ();
// no-argument constructor
public PanelFrame()
super( "Panel Demo" );
//Add items to the inventory within the Invntory
myInventory.addItem(new productinfo(1,"Html a Begginers Guide",14,29.99));
myInventory.addItem(new productinfo(2,"Html 4 for Dummies",6,29.99));
myInventory.addItem(new productinfo(3,"Visio Step by Step",7,24.99));
myInventory.addItem(new productinfo(4,"APA Publication Manual",14,47.99));
myInventory.addItem(new productinfo(5,"The Gregg Reference Manual",14,37.56));
setLayout( new FlowLayout() ); // set frame layout
// JLabel constructor with a string argument
label1 = new JLabel( "Inventory Number:%s: %d\n ",p_ItemNumber );
label1.setToolTipText( "This is Inventory number" );
add( label1 ); // add label1 to JFrame
label2 = new JLabel( "\n\nProduct Name: %s: %s\n", p_ProductName);
label2.setToolTipText( "This is Product Name" );
add( label2 ); // add label1 to JFrame
label3 = new JLabel( "\n\nPrice : %s:$%.2f\n",p_UnitPrice );
label3.setToolTipText( "This is product Price");
add( label3 ); // add label1 to JFrame
label4 = new JLabel( "\n\nQuanity %s: %d\n",p_UnitCount);
label4.setToolTipText( "This is Quanity in stock: " );
add( label4 ); // add label1 to JFrame
buttons = new JButton[ 4 ]; // create buttons array
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout( 1, buttons.length ) );
String names[] = { "First", "Previous", "Next", "Last" };
JButton buttons[] = new JButton[ names.length ];
// create and add buttons
for ( int count = 0; count < buttons.length; count++ )
buttons[ count ] = new JButton( names[ count ] );
buttonJPanel.add( buttons[ count ] ); // add button to panel
} // end for
// setup the logo for the GUI ...image needs to be in same directory as source code
URL url = this.getClass().getResource("book103.gif");
Image img = Toolkit.getDefaultToolkit().getImage(url);
// scale the image so that it'll fit in the GUI
Image scaledImage = img.getScaledInstance(100, 100, Image.SCALE_AREA_AVERAGING);
// create a JLabel with the image as the label's Icon
Icon logoIcon = new ImageIcon(scaledImage);
JLabel companyLogoLabel = new JLabel(logoIcon);
companyLogoLabel.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
// add the logo to the GUI
getContentPane().add(companyLogoLabel, BorderLayout.WEST);
add( buttonJPanel, BorderLayout.SOUTH ); // add panel to JFrame
} // end PanelFrame constructor
} // end class PanelFramethis is the original part again with the code tag added
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Component;
import javax.swing.SwingConstants;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JList;
import java.util.;
import java.text.NumberFormat;
import javax.swing.;
import java.awt.;
import java.awt.event.;
import java.net.URL;
import java.io.*;
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.NumberFormat;
public class PanelFrame extends JFrame
private JPanel buttonJPanel; // panel to hold buttons
private JButton buttons[]; // array of buttons
private JLabel label1; // JLabel iventory number
private JLabel label2; // JLabel product name
private JLabel label3; // JLabel product price
private JLabel label4; // JLabel product in stock
private String p_ProductName; // private variable for the employee name.
private int p_UnitCount; // private variable for the hours worked.
private double p_UnitPrice; // private variable for the hourly wage.
private int p_ItemNumber; // private inventory number
//create inventory object
Inventory myInventory = new Inventory ();
// no-argument constructor
public PanelFrame()
super( "Panel Demo" );
//Add items to the inventory within the Invntory
myInventory.addItem(new productinfo(1,"Html a Begginers Guide",14,29.99));
myInventory.addItem(new productinfo(2,"Html 4 for Dummies",6,29.99));
myInventory.addItem(new productinfo(3,"Visio Step by Step",7,24.99));
myInventory.addItem(new productinfo(4,"APA Publication Manual",14,47.99));
myInventory.addItem(new productinfo(5,"The Gregg Reference Manual",14,37.56));
setLayout( new FlowLayout() ); // set frame layout
// JLabel constructor with a string argument
label1 = new JLabel( "Inventory Number:%s: %d\n ",p_ItemNumber );
label1.setToolTipText( "This is Inventory number" );
add( label1 ); // add label1 to JFrame
label2 = new JLabel( "\n\nProduct Name: %s: %s\n", p_ProductName);
label2.setToolTipText( "This is Product Name" );
add( label2 ); // add label1 to JFrame
label3 = new JLabel( "\n\nPrice : %s:$%.2f\n",p_UnitPrice );
label3.setToolTipText( "This is product Price");
add( label3 ); // add label1 to JFrame
label4 = new JLabel( "\n\nQuanity %s: %d\n",p_UnitCount);
label4.setToolTipText( "This is Quanity in stock: " );
add( label4 ); // add label1 to JFrame
buttons = new JButton[ 4 ]; // create buttons array
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout( 1, buttons.length ) );
String names[] = { "First", "Previous", "Next", "Last" };
JButton buttons[] = new JButton[ names.length ];
// create and add buttons
for ( int count = 0; count < buttons.length; count++ )
buttons[ count ] = new JButton( names[ count ] );
buttonJPanel.add( buttons[ count ] ); // add button to panel
} // end for
// setup the logo for the GUI ...image needs to be in same directory as source code
URL url = this.getClass().getResource("book103.gif");
Image img = Toolkit.getDefaultToolkit().getImage(url);
// scale the image so that it'll fit in the GUI
Image scaledImage = img.getScaledInstance(100, 100, Image.SCALE_AREA_AVERAGING);
// create a JLabel with the image as the label's Icon
Icon logoIcon = new ImageIcon(scaledImage);
JLabel companyLogoLabel = new JLabel(logoIcon);
companyLogoLabel.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
// add the logo to the GUI
getContentPane().add(companyLogoLabel, BorderLayout.WEST);
add( buttonJPanel, BorderLayout.SOUTH ); // add panel to JFrame
} // end PanelFrame constructor
} // end class PanelFrame -
Help with a startup script for monitorix
How can I deal with a perl script that doesn't acknowledge a query for pidof?
$ ps aux | grep monitorix
root 1089 0.0 1.2 16280 6556 ? Ss 09:54 0:00 /usr/bin/monitorix -c /etc/monitorix.conf
So it's running... but I can't find it with pidof:
$ pidof /usr/bin/monitorix
Here is the /etc/rc.d/monitorix I've been using but that doesn't stop the program (since it has no PID).
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/monitorix`
MARGS="-c /etc/monitorix.conf"
case "$1" in
start)
stat_busy "Starting Monitorix"
if [ -z "$PID" ]; then
/usr/bin/monitorix $MARGS
fi
if [ ! -z "$PID" -o $? -gt 0 ]; then
stat_fail
else
PID=`pidof -o %PPID /usr/bin/monitorix`
echo $PID > /var/run/monitorix.pid
add_daemon monitorix
stat_done
fi
stop)
stat_busy "Stopping Monitorix"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon monitorix
else
rm_daemon monitorix
stat_done
fi
restart)
$0 stop
sleep 1
$0 start
echo "usage: $0 {start|stop|restart}"
esacAccording to the man page, the -p flag will let you generate a PID file.
You have a few logical errors in your rc.d script and a syntax error (double else in stop). I've been using a template similar to the below in cleaning up a few of the packages I maintain...
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
pidfile=/run/monitorix.pid
if [[ -r $pidfile ]]; then
read -r PID < "$pidfile"
if [[ ! -d /proc/$PID ]]; then
# stale pidfile
unset PID
rm -f "$pidfile"
fi
fi
args=(-c /etc/monitorix.conf -p "$pidfile")
case "$1" in
start)
stat_busy "Starting Monitorix"
if [[ -z $PID ]] && /usr/bin/monitorix "${args[@]}"; then
add_daemon monitorix
stat_done
else
stat_fail
exit 1
fi
stop)
stat_busy "Stopping Monitorix"
if [[ $PID ]] && kill $PID &> /dev/null; then
rm_daemon monitorix
stat_done
else
stat_fail
exit 1
fi
restart)
$0 stop
sleep 1
$0 start
echo "usage: $0 {start|stop|restart}"
esac
please also fix the PKGBUILD:
install=('readme.install')
This is not valid, and pacman 4 will not let you declare install as an array.
Last edited by falconindy (2011-09-25 15:05:02) -
Need help with output type EDI for ERS
All,
I want to be able to run and ERS settlement and have the invoices created sent via EDI/XML to the supplier. I have several questions on the set up.
1) I have output type ERS6 which is defined as ERS EDI. I assume because it does not start with Z* this is SAP standard, so I shouldn't have to modify any of this.
2) I've added my supplier to this output type.
3) I assume I need to create a partner profile for this supplier? If so can someone tell me the message type to use?
Is there any set up I'm missing in this process? I've executed ERS but do not get an idoc and I'm fairly certain it's because I haven't done the partner profile set-up.
Thanks for your help.
SandraHi,
You don't have to modify thise setup unless you have any customized requirement.
You are missing partner profile setup.Carry out the setup and run MRRL tcode to create the idocs
Enter the following values using tcode WE20.
Field Value
Message type GSVERF
Partner type LI (vendor)
Partner function LF (vendor)
Port SUBSYSTEM ( Port to your middleware)
Output mode such as Collect IDocs
Basic type GSVERF01
Application MR
Output type ERS6 or the type you have defined
Regards,
Karuna -
Need help with simple python script (renaming and moving folder)
I have this script for use with sabnzbd, what it does is rename all folders in the desired directory, replacing any spaces with dots (example: Movie 2011 HD -> Movie.2011.HD).
#!/usr/bin/env python2
workdir = '/media/stuff/movies' #### CHANGE this line to your movie directory
for path, dirnames, filenames in os.walk(workdir):
print "path:", path
for dirname in dirnames:
if dirname.find(' ') > -1 :
# Yes, a space in the directory name, so replace it:
newname = dirname.replace(' ','.')
fulldirname = path + '/' + dirname
fullnewname = path + '/' + newname
print "Rename" , fulldirname, " ", fullnewname
os.rename(fulldirname, fullnewname)
What I would like it to do is 1. rename only the movie I run the script on (instead of /media/stuff/movies as above, the entire movie folder), and then 2. move the movie into /media/stuff/movies. Or vice versa! (I'd just prefer not to have it run on the entire movie directory).
Appreciate any help!Just my two cents:
I would not use walkdir but as usual a combination of find and python.
A simplified version of the script could look like this:
#!/usr/bin/python
# -*- coding: utf8 -*-
import os, shutil
# Define target dir
target_dir = "/media/stuff/movies/"
# Loop through all found files
for source_file in os.popen ("find ."):
# Remove \n
source_file = source_file[:-1]
extension = source_file[-3:]
# Only process video files
if (extension == 'mkv') or (extension == 'avi') or (extension == 'mp4'):
target_file = source_file.split('/')
target = target_file[len(target_file)-1]
target = target.replace(' ','.')
shutil.copy (source_file, targetdir + target)
Of course you might first want to print out instead of really copy files.
Maybe you are looking for
-
CS5 photoshop proof table naming display
in CS5 photoshop, any customized and saved Prooftable no longer displays the proof table name in the file header when said proof table is active... NOW only the Profile used within the proof table is displayed. Where we work we have a variety of proo
-
Password visibility in communication channel
Dear experts, is it possible to show the passwords stored in the communication channels? As the XI access is limited to employees who have the right to see the access data for the other systems, it would be useful to see the passwords in the communic
-
Can the trial version of Director 12 publish iOS app for in-house distribution?
Can the trial version of Director 12 publish iOS app for in-house distribution? What about the purchased version, any limitation on the type of distribution? I am getting the "Publishing to iOS appstore is not allowed for this movie. Click on "More I
-
Button to show images side-by-side missing from Photoshop CS6 toolbar
In Photoshop CS6, a very important button is missing from the toolbar - the one to show two images side-by-side or above-and-below, and multiple images in other arrangements. I need this button - it's an important part of my. (BTW, the button is st
-
I can't install any app from apple store. The install button is not working now. Before it was working perfectly had installed many app and I had purchased many app from i-store