#!/usr/bin/perl local $/; $DATA=`xclip -o`; if($DATA!~/http/) { $DATA=`xclip -o -sel clipboard`; } # suffix $DATA=~s%\?(utm|aff|algo)_.+$|\?(fb|g)clid.+$|\?(mb|gps-id|spm|gmpage|token|srcSns|reason|sd|nbt|isPreviewActive|requestId|_gl)=.+$%# %gm; $DATA=~s%&(af)=.+$%# %gm; $DATA=~s%(html|\d)\?(s[cp]m|ws_ab_test|s|mall_\S+|aff_\S+|af|traffic_\S+|dp|from|source)=.+$%$1# %gm; # prefix $DATA=~s%(https?://)www(\.facebook)%${1}m${2}%gm; $DATA=~s%(https?://)ru(\.aliexpress)%${1}www${2}%gm; $DATA=~s%(https?://)aliexpress\.ru/%${1}www.aliexpress.com/${2}%gm; $DATA=~s%^\s+|\s+$%%gm; # trim space # add suffix $DATA=~s%(https?://www\.instructables\.com/.+/)\s*$%${1}?ALLSTEPS%gm if $DATA!~/ALLSTEPS\s*$/; # olx image # https://ireland.apollo.olxcdn.com/v1/files/2byao84luvzj-UA/image;s=1000x700 $DATA=~s%/image;s=[0-9x]+%/image;s=5000x5000%; $DATA.="#"; $DATA=~s/^(.+?)#.*$/${1}# /; open($out, '|-', 'xclip -i') && do { print $out $DATA; close $out; }; open($out, '|-', 'xclip -i -sel clipboard') && do { print $out $DATA; close $out; }; $SPEAKER='/dev/speaker'; if(-w $SPEAKER && open(S,'+>',$SPEAKER)) { print S 'a64'; close S; } =devfs [devfsrules_my=7] add path 'da*' unhide add path 'usb/*' mode 0660 add path 'speaker' mode 0660 [system=10] add path 'usb/*' mode 0660 group operator =cut