A talifi na gaba zamuyi duba ne ga wata hanyar amfani mai suna Undistract-me. Wannan rubutun mu zai nuna gargadi lokacin da aka kammala umarnin cewa muna gudana a cikin m. Wannan na iya zama mai amfani yayin ƙaddamar da umarni zamu fara aiki akan wani abu. Tare da shi ba za mu buƙaci bincika tashar don ci gaba da ganin ko umurnin ya cika ko a'a ba. Mai amfani da Undistract-me zai sanar da mu lokacin da dogon aiki ya cika. Zai yi aiki akan Arch Linux, Debian, Ubuntu da sauran abubuwan banbanci.
Wannan mai amfani zai zo da sauki lokacin da ba'a horanta yadda zai iya zama ya zauna yana kallon umarnin da yake gudana ba. Rubutun mu yana nuna saurin akan tebur lokacin da umarni masu tsayi suka gama, don mu iya amfani da lokacinmu fiye da kallon tashar kawai yayin da umarnin suka kai ƙarshen.
Shigar Kasa-ni
Undistract-ni shine akwai a cikin tsoffin wuraren ajiyar Debian da ire-irensu, kamar Ubuntu. Na gwada shi a kan Ubuntu 17.10. Duk wanda yake so ya iya tuntubar lambar tushe ta wannan rubutun a shafin ta GitHub na aikin.
Don ƙara shi a cikin tsarinku, duk abin da za ku yi shi ne gudanar da umarni mai zuwa a cikin m (Ctrl + Alt T) don shigar da shi:
sudo apt install undistract-me
Lokacin da aka gama shigarwa, a cikin wannan tashar, gudanar da umarni mai zuwa zuwa kara "undistract-me" a cikin bash dinka:
echo 'source /etc/profile.d/undistract-me.sh' >> ~/.bashrc
A madadin, zaku iya gudanar da wannan umarnin don ƙara shi zuwa Bash ɗinku:
echo "source /usr/share/undistract-me/long-running.bash\nnotify_when_long_running_commands_finish_install" >> .bashrc
Finalmente sabunta canje-canje yana gudana a cikin wannan tashar:
source ~/.bashrc
Sanya Undistract-me
Canja lokaci don sanarwa
Ta hanyar tsoho, Undistract-me zaiyi la’akari da duk wani umarni da zai dauki sama da daƙiƙa 10 don kammala shi azaman umarni mai ɗorewa. Amma wannan za'a iya canzawa. Ana iya canza wannan tazarar lokacin ta hanyar tace fayil ɗin /usr/share/undistract-ni/dogon gudu.bash.
sudo nano /usr/share/undistract-me/long-running.bash
A cikin fayil ɗin dole ne mu sami canji "LONG_RUNNING_COMMAND_TIMEOUT" da kuma canza tsoho (sakan 10) don wani darajar da kuka zaba. Sannan adana kuma rufe fayil din. Kar ka manta da sabunta canje-canje ta hanyar aiwatar da umarnin:
source ~/.bashrc
Sanarwa / Kashe sanarwar don wasu umarni
Bugu da kari, za mu iya dakatar da sanarwar wasu umarni na musamman. Don yin haka, dole ne mu bincika mai canzawa "LONG_RUNNING_IGNORE_LIST" kuma ƙara da yayi umarni da a raba shi da sarari.
Enable / Kashe Window na Aiki mai Aiki
Ta tsohuwa, za a nuna sanarwar ne kawai idan taga mai aiki ba taga wacce ake aiwatar da umarnin ba ne. Wannan yana nufin cewa za mu karɓi sanarwar ne kawai idan umarnin yana gudana a cikin taga ta bango. Idan an zartar da umarnin a cikin taga mai aiki, ba za a nuna sanarwar ba. Idan muna son yin wannan banbancin, zamu iya daidaitawa IGNORE_WINDOW_CHECK. Zamu zabi 1 don tsallake binciken taga.
Sanar da sanarwar sauti
Sauran yanayin fasalin Undistract-ni shine zaka iya saita sanarwar sauti tare da sanarwar gani lokacin da aka kammala umarni. Ta hanyar tsoho, zai kawai aika sanarwar gani. Kuna iya canza wannan ɗabi'ar ta saita mai canzawa UDM_PLAY_SOUND en lambar nonzero Akan layi. Koyaya, tsarin mu na Ubuntu dole ne ya sami abubuwan amfani - kayan aiki y sauti-taken-sakewa shigar don kunna wannan aikin.
Ka tuna cewa dole ne ka aiwatar da umarni mai zuwa don sabunta canje-canjen da aka yi:
source ~/.bashrc
Gwaji Kasa-ni
Lokaci don bincika idan wannan yana aiki da gaske kuma bari mu gani idan an nuna sanarwar lokacin da umarnin m na dogon lokaci ya cika. Yanzu gudu duk wani umarni daya dauki sama da dakika 10 ko tsayin lokacin da kuka ayyana daidaitaccen-tsari.
Don wannan misalin, Ina kawai layin ping ɗaya daga cikin magudanar kan hanyar sadarwarmu takamaiman adadin lokuta. Wannan umarnin ya ɗauki kimanin daƙiƙa 25 don kammalawa. Bayan kammala umarnin, sai na sami sanarwar da ke tafe akan tebur.
Ka tuna cewa rubutun Undistract-me ne kawai ke bayar da rahoto idan umarnin da aka bashi ya ɗauki sama da daƙiƙa 10 don kammalawa kuma tashar da take gudana ba taga mai aiki bace. Idan umurnin ya kammala a ƙasa da dakika 10, ba za a sanar da kai ba. Tabbas, zaku iya canza wannan saitin tazarar lokacin kamar yadda na bayyana a sashin Saituna.
Na ga wannan kayan aiki yana da matukar amfani ga duk waɗanda muke aiki a tashar. Kuma kasancewa mai sauƙin amfani da girkawa, ina tsammanin abu ne da bai kamata a rasa kowace kwamfuta ba.
Wannan yana da shi na farko kuma yana da kyau