Tsim cov ntaub ntawv browser rau Thunar nrog Zenity

 

Zaj lus no raug luam tawm ntev ntev los nyob hauv kuv cov blog qub txog Xfce, raws li lwm tsab xov xwm luam tawm hauv Phau Xubuntu blog thiab kuv tawm ntawm lawv no dua.

Yam peb tab tom yuav ua yog tsim cov ntaub ntawv tshawb rau Thunar Siv XivCov. Thawj yam peb yuav tsum tau ua yog nruab zenity:

$ sudo aptitude install zenity

Tom qab ntawd peb qhib lub davhlau ya nyob twg thiab muab tso rau:

$ mkdir ~/.bash-scripts/

Nyob rau hauv no txoj kev peb tsim ib cov lus qhia uas yuav muaj cov ntawv sau uas yuav ua rau kev ua nws tus kheej. Tam sim no peb tsim cov ntaub ntawv hu ua tshawb-rau-cov ntaub ntawv sab hauv raws li nram no:

mousepad ~/.bash-scripts/search-for-files

thiab peb muab tshuaj txhuam sab hauv:

#! / bin / bash # nrhiav-rau-cov ntaub ntawv # hloov daim duab no kom haum koj tus kheej - Kuv pom zenity tuag los ntawm txog 1000 qhov tshwm sim tab sis YMMV maxresults = 500 # dua, hloov txoj hauv kev rau lub icon kom haum koj tus kheej. Tab sis leej twg tsis nyiam tango? window_icon = "/ usr / share / icons / Tango / hloov tau / ua / search.svg" # cov ntawv no yuav ua haujlwm rau ib puag ncig uas muaj bash thiab zenity, yog li tus filemanager tsuas yog nqes rau koj! koj tuaj yeem ntxiv kev sib cav ntxiv rau txoj hlua ntev npaum li qhov kev sib cav zaum kawg yog txoj kev ntawm lub nplaub tshev koj qhib filemanager = "thunar" window_title = "Tshawb rau Cov Ntaub Ntawv" srcPath = "$ *" yog tias! [-d "$ srcPath"]; ces cd ~ / srcPath = `zenity --file-xaiv - phau ntawv qhia --title =" $ window_title - Saib hauv nplaub tshev "-window-icon =" $ window_icon "` fi yog [-d "$ srcPath"] ; tom qab ntawv fragment = `zenity --entry --title =" $ window_title - Npe muaj: "--window-icon =" $ window_icon "- ntsiab lus =" Tshawb cov hlua tsawg dua 2 cim raug tsis quav ntsej "` yog! [$ {# thooj} -lt 2]; tom qab ntawd (echo 10 O = $ IFS IFS = $ '\ n' cov ntawv = (`nrhiav" $ srcPath "-npe)" $ fragment * "-printf \"% Y \ "\ \"% f \ "\ \" % k \ KB \ "\ \"% t \ "\ \"% h \ "\\\ n | taub hau -n $ maxresults`) IFS = $ O ncha 100 xaiv =` eval zenity - npe --title = \ "$ {# ntaub ntawv [@]} Cov Ntaub Ntawv Pom - $ window_title \" --window-icon = "$ window_icon" --width = "600" - theight = "400" - ntsiab lus = \ "Tshawb cov txiaj ntsig : \ "--print-kem = 5 - kab sau \" hom \ "- kab ntawv \" Lub Npe \ "- xim kab \" Qhov loj \ "- xim kab \" Hnub hloov \ "- xim kab \" Kab \ "$ {files [@]}` yog [-e "$ xaiv"]; ces "$ filemanager" "$ xaiv"; fi) | zenity --progress --auto-kaw --pulsate --title = "Tshawb nrhiav ..." --window-icon = "$ window_icon" - ntsiab = "Tshawb rau \" $ fragment \ "" fi fi tawm

thiab peb muab nws tso cai ua tiav:

chmod a+x ~/.bash-scripts/search-for-files

Tam sim no peb ua tus thaub qab ntawm uca.xml ntawv:

$ sudo cp /etc/xdg/Thunar/uca.xml /etc/xdg/Thunar/uca.xml.old

uas peb yuav muab tso rau thaum xaus no:

<action>
<icon>/usr/share/icons/Tango/scalable/actions/search.svg</icon>
<name>Search for Files</name>
<command>bash ~/.bash-scripts/search-for-files %f</command>
<description>Search this folder for files</description>
<patterns>*</patterns>
<directories/>
</action>

Tam sim no qhov peb tshuav yog qhib Thunar » Kho kom raug » Teeb tsa kev cai ua thiab peb tsim ib lub tshiab. Thiab peb sau rau hauv qab no:

Hauv tab Pib:
Lub Npe: Tshawb cav
Kev piav qhia: Tshawb cav
Hais kom ua: bash ~ / .bash-scripts / search-for-files% f
Icon: Peb xaiv ib qho uas peb nyiam tshaj plaws.

Tseem tshuav zoo li no:

Tam sim no nyob rau hauv lub tab Tej yam xwm txheej zoo li cov teb nram qab no:
Qauv Qauv Ntawv: *
Yog tias xaiv muaj: Cov npe.

Thiab nws zoo li no:

Tam sim no nyob rau hauv Thunar Thaum peb qhib lub ntawv qhia zaub mov nrog txoj nyem, cov kev xaiv tshawb tsis tshwm:

Thiab yog tias peb nyem rau ntawm nws, lub qhov rai yuav tshwm sim qhov uas peb tuaj yeem ntxig cov txheej txheem tshawb:

Thaum peb pib tshawb nrhiav peb yuav pom qee yam zoo li no:

thiab thaum kawg qhov tshwm sim ntawm nws:

Yog tias peb nyem ob npaug ntawm qhov tshwm sim, lub qhov rai ntawm Thunar nrog cov nplaub tshev uas cov ntaub ntawv nyob. Ua li no peb muab peb lub desktop ua ntau lub zog Xfce.


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

9 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm. Yuav tsum tau teb cov cim nrog *

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   alez said

    Dab tsi yog qhov nyuaj! Hehe, ntawm no koj muaj lwm txoj hauv kev kom ua tiav tej yam zoo sib xws uas yooj yim rau kuv.
    http://marksnotebook.com/ubuntu/how-add-built-search-thunar-using-catfish
    Nrog lub fuss ntawm Kev sib sau thiab Gnome3 ntau tus neeg mus rau Xfce thiab pib pom qhov zoo ntawm Thunar ... Txaus, qhov program ntawd tsis txaus ntseeg. Ua tsaug ntau rau cov blog, Kuv ua raws nws tsis tu ncua txawm tias nws yog thawj zaug kuv tshaj tawm.

    1.    elav <° Linux said

      Txais tos alez:
      Hahaha nws tsis nyuaj, nws yooj yim heev. Nws yog qhov tseeb hais tias nrog CatFish peb tuaj yeem muaj lub cuab yeej tshawb nrhiav muaj zog, tab sis tsis muaj dab tsi, tsawg kawg Kuv tsis siv nws vim nws yog ib qho tsis tshua muaj npe thov rau nruab 😀

  2.   Oscar said

    Tsaug elav, tuto zoo heev, Kuv yuav txuag nws nrog qhov koj tau tshaj tawm, Kuv xav tias XFCE muaj ntau lub neej yav tom ntej ua lwm txoj, uas yog, ntev npaum li nws tsis khiav qus hauv Ram noj.

  3.   leodelacruz said

    Zoo heev, yuav tsum sim nws 😉

  4.   xaib said

    Kuv tsis nkag siab lus Spanish, tab sis kuv nkag siab bash.
    Kuv pib siv qhov qub. Kuv khaws ntau lub sijhawm ua tsaug rau koj cov cai.
    Ua tsaug rau koj. Ua tsaug rau koj. Merci de Fabkis.

  5.   Luis said

    Nws muaj teeb meem loj nrog tsab ntawv no ...

    Yog tias koj ua qhov kev tshawb fawb rau qee yam uas tsis muaj nyob tom qab ntawd lub tshuab tshawb xyuas nyob rau hauv lub voj mus ib txhis thiab tib txoj kev los kaw nws yog los ntawm kev tua tus txheej txheem.

    1.    Alexander Morales said

      Kuv xav hais tias kev daws teeb meem nyob rau hauv cov ntaub ntawv uas yuav yog los ua qhov yog tias qhov ntawd siv tau yog tias tsis muaj cov ntaub ntawv ua ntej, thiab yog tias muaj ib qho uas tshawb nrhiav, 😀

  6.   Raúl said

    Ua tsaug ntau ntau, nws yeej mus ntev heev thiab txawm tias tsim dua lwm qhov ntxiv rau hnub tsis xws luag.

  7.   Victor said

    Kuv pom nws zoo heev. siv heev. Ua tsaug ntau.