Kaynağa Gözat

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr 11 yıl önce
ebeveyn
işleme
18547fea23
3 değiştirilmiş dosya ile 59 ekleme ve 13 silme
  1. +35
    -12
      _keysnail.js
  2. +22
    -0
      bashrc
  3. +2
    -1
      profile

+ 35
- 12
_keysnail.js Dosyayı Görüntüle

@@ -248,6 +248,11 @@ plugins.options["twitter_client.use_jmp"] = true;
////////////////////////////////////////////
// my ext

ext.add("open-remote-init-file", function(ev, arg){
const URL = "https://raw.github.com/10sr/dotfiles/master/_keysnail.js";
window.openUILinkIn(URL, "tab");
}, "Open remote initialization file");

(function(){
function getOrganizer(){
// [How to call for Firefox bookmark dialog? - Stack Overflow]
@@ -518,6 +523,8 @@ ext.add("restart-firefox-add-menu", function(){
/////////////////////////////////////////
// feed url
(function(){
var feedhandler = "http://cloud.feedly.com/#subscription%2Ffeed%2F%s";

function getFeeds(){
const doc = content.document;

@@ -530,14 +537,18 @@ ext.add("restart-firefox-add-menu", function(){
"$1");
for (i = 0; i < feeds.length; i++)
if ( feeds[i][1].substr(0,1) == "/" ) feeds[i][1] = uh + feeds[i][1];
feeds.unshift([window.content.document.title,
window.content.location.href]);
// feeds.unshift([window.content.document.title,
// window.content.location.href]);

return feeds;
};

ext.add("copy-feed-url", function () {
var feeds = getFeeds();
if (! feeds.length) {
display.echoStatusBar("No feed found.");
return;
}
prompt.selector(
{
message : "Select Feed",
@@ -553,17 +564,29 @@ ext.add("restart-firefox-add-menu", function(){

ext.add("open-feed", function () {
var feeds = getFeeds();
prompt.selector(
{
message : "Select Feed",
collection : feeds,
callback : function (i) {
if (i >= 0) {
window.openUILinkIn(feeds[i][1], "tab");
}
if (! feeds.length) {
display.echoStatusBar("No feed found.");
return;
}
prompt.selector({
message : "Select Feed",
collection : feeds,
callback : function (i) {
if (i < 0) {
return;
}

var feedurl = feeds[i][1];
if (feedhandler) {
window.openUILinkIn(
feedhandler.replace("%s", feedurl),
"tab"
);
} else {
window.openUILinkIn(feedurl, "tab");
}
}
);
});
}, "Copy url or feed url of current page");
})();

@@ -712,7 +735,7 @@ key.suspendKey = "Not defined";


hook.setHook('KeyBoardQuit', function (aEvent) {
ext.exec("hide-sidebar");
// ext.exec("hide-sidebar");
let(elem = document.commandDispatcher.focusedElement) elem && elem.blur();
gBrowser.focus();
content.focus();


+ 22
- 0
bashrc Dosyayı Görüntüle

@@ -549,6 +549,28 @@ scr(){
__MY_SCRIPT=${_file} script ${_file} "$@"
}

dtscr(){
# dtscr <command ...>
if test -z "$1"
then
echo "dtscr: usage: dtscr <command ...>"
return 1
fi

local _cmdstr="`echo $@ | tr ' ' +`"
local _tformat="%Y%m%d-%H%M%S%z"
local _name="${pf}`date +${_tformat}`-${_cmdstr}"

local _scr_file="${HOME}/${_name}.script"

local _dt_dir="${TMP}/dtscr"
install -d "$_dt_dir"

dtach -n "${_dt_dir}/${_name}" script "${_scr_file_}" "$@"
# echo $_name
# echo $_file
}

mcrypt-stream(){
test $# -eq 2 || return 1
case $1 in


+ 2
- 1
profile Dosyayı Görüntüle

@@ -38,4 +38,5 @@ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$_python_pkg_conf"
#export MANPATH="`manpath`:$HOME/.local/share/man"

# in my environment powerdown does not work
type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10
test -z "$SSH_CONNECTION" && \
type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10

Yükleniyor…
İptal
Kaydet