diff --git a/.config/dwb/default/custom_keys b/.config/dwb/default/custom_keys index 4c4ced79..1e60370a 100644 --- a/.config/dwb/default/custom_keys +++ b/.config/dwb/default/custom_keys @@ -1,2 +1,2 @@ }:exja (function(){var e=document.querySelector("[rel='next']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\bnext\b|^>$|^(>>|»)$|^(>|»)|(>|»)$|\bmore\b)/i)>-1){location=e.href; break;}} location.href=location.href.replace(/(\d+)([^\/\d]*)$/, function(a,b,c){return ++b+c})}})(); -{:exja (function(){var e=document.querySelector("[rel='prev']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\b(prev|previous)\b|^<$|^(<<|«)$|^(<|«)|(<|«)$)/i)>-1){location=e.href;break;}} location.href=location.href.replace(/(\d+)([^\/\d]*)$/, function(a,b,c){return --b+c})}})(); \ No newline at end of file +{:exja (function(){var e=document.querySelector("[rel='prev']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\b(prev|previous)\b|^<$|^(<<|«)$|^(<|«)|(<|«)$)/i)>-1){location=e.href;break;}} location.href=location.href.replace(/(\d+)([^\/\d]*)$/, function(a,b,c){return --b+c})}})(); diff --git a/.config/dwb/userscripts/startup-noautoreload.js b/.config/dwb/userscripts/startup-noautoreload.js deleted file mode 100644 index 9a837b21..00000000 --- a/.config/dwb/userscripts/startup-noautoreload.js +++ /dev/null @@ -1,13 +0,0 @@ -//!javascript - -// Prevents previously-opened tabs from reloading all at once after a restart. - -execute("set load-on-focus true"); - -var sigId = signals.connect("navigation", function(wv) { - if (wv == tabs.current) - { - execute("set load-on-focus false"); - signals.disconnect(sigId); - } -}); \ No newline at end of file diff --git a/.config/ranger/commands.py b/.config/ranger/commands.py index 41fcf55e..f79e8b33 100644 --- a/.config/ranger/commands.py +++ b/.config/ranger/commands.py @@ -93,22 +93,25 @@ class extracthere(Command): obj.signal_bind('after', refresh) self.fm.loader.add(obj) - class mkcd(Command): - def execute(self): - """ Create folder and cd to it """ + """ + :mkcd + + Creates a directory with the name and enters it. + """ def execute(self): - from os.path import join, expanduser, lexists + from os.path import join, expanduser, lexists, basename from os import mkdir dirname = join(self.fm.thisdir.path, expanduser(self.rest(1))) if not lexists(dirname): mkdir(dirname) + + if self.rest(1).startswith('.') and not self.fm.settings['show_hidden']: + self.fm.cd(dirname) + else: + self.fm.thisdir.load_content(schedule=False) + self.fm.execute_console('scout -ae ^{}$'.format(self.rest(1))) else: self.fm.notify("file/directory exists!", bad=True) - - self.fm.cd(dirname) - - def tab(self): - return self._tab_directory_content()