Prechádzať zdrojové kódy

Bunch of i3 and rofi improvements

Colin Powell 5 rokov pred
rodič
commit
ec8e9a2c03

+ 14 - 10
emacs/.config/doom/+org.el

@@ -4,6 +4,7 @@
 ;;; Commentary:
 ;;; Code:
 (setq +todo-file "~/org/inbox.org")
+(setq +project-file "~/org/projects.org")
 (setq +today-file "~/org/today.org")
 
 (after! org
@@ -51,8 +52,8 @@
                                           (tags "@book/NEXT") ; should generaly be pretty empty
                                           (tags "@work/NEXT")
                                           (tags "@home/NEXT")
-                                          (tags "@night/NEXT")
-                                          (tags "@selectp/NEXT")))
+                                          (tags "@farm/NEXT")
+                                          (tags "@town/NEXT")))
               ("R" "Weekly Review"
                 ((agenda "" ((org-agenda-span 7)))
                  (stuck "") ; review stuck projects as designated by org-stuck-projects
@@ -60,20 +61,18 @@
                  (todo "MAYBE") ; review someday/maybe items
                  (todo "WAITING")))) ; review waiting items
 
-        org-use-tag-inheritance t; bug in variable below, just turn 'em off
-        org-tags-exclude-from-injeritance '("PROJECT" "SPRINT") ; PROJECT should not be inheritable
+        ;;org-use-tag-inheritance t; bug in variable below, just turn 'em off
+        ;;org-tags-exclude-from-injeritance '("PROJECT" "SPRINT") ; PROJECT should not be inheritable
 
         org-stuck-projects
           '("+PROJECT/-MAYBE-DONE" ("TODO" "NEXT") nil "\\<IGNORE\\>")
 
-        org-tag-alist '(("PROJECT" . ?p)
-                        ("@home" . ?h)
-                        ("@night" . ?n)
-                        ("@selectp" . ?s)
+        org-tag-alist '(("@home" . ?h)
+                        ("@farm" . ?f)
+                        ("@town" . ?s)
                         ("@errand" . ?e)
-                        ("@read" . ?r)
                         ("@work" . ?w)
-                        ("@family" . ?f))
+                        ("@family" . ?m))
 
         org-modules '(org-drill
                       org-clock
@@ -105,6 +104,10 @@
   (interactive)
   "Opens the todo file"
   (find-file +todo-file))
+(defun +open-projects-file ()
+  (interactive)
+  "Opens the projects file"
+  (find-file +project-file))
 (defun +open-today-file ()
   (interactive)
   "Opens the today file"
@@ -113,6 +116,7 @@
 (map!
  :leader
    :desc "Open inbox" "I" #'+open-todo-file
+   :desc "Open inbox" "P" #'+open-projects-file
    :desc "Open today" "T" #'+open-today-file)
 
 (defun +show-agenda ()

+ 0 - 3
fish/.config/fish/functions/fish_prompt.fish

@@ -181,9 +181,6 @@ function fish_prompt -d "Write out the left prompt of the syl20bnr theme"
     set ps_end $ps_end$ps_end
   end
   # last status give the color of the right arrows at the end of the prompt
-  if set -q VIRTUAL_ENV
-      echo -n -s (set_color -b blue white) "[" (basename "$VIRTUAL_ENV") "]" (set_color normal) " "
-  end
   if test $last_status -ne 0 
     set ps_end $colnormal$colbred$ps_end
   else

+ 3 - 0
fish/.config/fish/functions/nc.fish

@@ -0,0 +1,3 @@
+function nc
+	nmcli device wifi connect $argv
+end

+ 5 - 4
i3/.config/compton/compton.conf

@@ -40,10 +40,11 @@ blur-background-exclude = [
 	"window_type = 'desktop'",
 	"_GTK_FRAME_EXTENTS@:c"
 ];
-opacity-rule = [
-    "90:class_g = 'kitty'",
-    "95:class_g = 'Firefox'"
-];
+
+#opacity-rule = [
+#    "90:class_g = 'kitty'",
+#    "95:class_g = 'Firefox'"
+#];
 
 # Fading
 fading = true;

+ 3 - 1
i3/.config/i3/config

@@ -30,7 +30,9 @@ font pango:DejaVu Sans Mono 8
 
 # Use Mouse+$mod to drag floating windows to their wanted position
 floating_modifier $mod
-exec feh --bg-scale ~/.config/i3/background.png
+
+# Set our background
+exec ~/var/documents/scripts/changepaper.sh
 
 #exec --no-startup-id betterlockscreen -w
 #bindsym $mod+shift+x exec --no-startup-id betterlockscreen -l dimblur

+ 9 - 9
rofi/.config/rofi/config

@@ -21,13 +21,13 @@ rofi.modi:                           window,run,ssh,combi
 ! "Always show number of lines" Set from: Default
 ! rofi.fixed-num-lines:                true
 ! "Whether to load and show icons" Set from: Default
-! rofi.show-icons:                     false
+! rofi.show-icons:                     true
 ! "Terminal to use" Set from: Default
- rofi.terminal:                       termite
+rofi.terminal:                       kitty
 ! "Ssh client to use" Set from: Default
-rofi.ssh-client:                     mosh
+rofi.ssh-client:                     ssh
 ! "Ssh command to execute" Set from: Default
-rofi.ssh-command:                    {terminal} -e "{ssh-client} {host}"
+rofi.ssh-command:                    {terminal} -e {ssh-client} {host}
 ! "Run command to execute" Set from: Default
 ! rofi.run-command:                    {cmd}
 ! "Command to get extra run targets" Set from: Default
@@ -47,25 +47,25 @@ rofi.ssh-command:                    {terminal} -e "{ssh-client} {host}"
 ! "Use sorting" Set from: Default
 ! rofi.sort:                           false
 ! "Use levenshtein sorting also for fuzzy matching" Set from: Default
-! rofi.levenshtein-sort:               false
+! rofi.levenshtein-sort:               true
 ! "Set case-sensitivity" Set from: Default
 ! rofi.case-sensitive:                 false
 ! "Cycle through the results list" Set from: Default
 ! rofi.cycle:                          true
 ! "Enable sidebar-mode" Set from: Default
-! rofi.sidebar-mode:                   false
+! rofi.sidebar-mode:                   true
 ! "Row height (in chars)" Set from: Default
 ! rofi.eh:                             1
 ! "Enable auto select mode" Set from: Default
 ! rofi.auto-select:                    false
 ! "Parse hosts file for ssh mode" Set from: Default
-! rofi.parse-hosts:                    false
+! rofi.parse-hosts:                    true
 ! "Parse known_hosts file for ssh mode" Set from: Default
 ! rofi.parse-known-hosts:              true
 ! "Set the modi to combine in combi mode" Set from: Default
 rofi.combi-modi:                     window,drun,ssh
 ! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default
-! rofi.matching:                       normal
+! rofi.matching:                       fuzzy
 ! "Tokenize input string" Set from: Default
 ! rofi.tokenize:                       true
 ! "Monitor id to show on" Set from: Default
@@ -101,7 +101,7 @@ rofi.combi-modi:                     window,drun,ssh
 ! "Indicate how it match by underlining it." Set from: Default
 ! rofi.show-match:                     true
 ! "New style theme file" Set from: Default
-rofi.theme:                          solarized
+rofi.theme:                          Monokai
 ! "Color scheme for normal row" Set from: Default
 ! rofi.color-normal:                   
 ! "Color scheme for urgent row" Set from: Default

+ 1 - 4
screenlayout/.screenlayout/three.sh

@@ -1,5 +1,2 @@
 #!/bin/sh
-xrandr --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2 --mode 1920x1080 --pos 3840x0 --rotate normal
-setxkbmap -option caps:escape &
-xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics ClickPad" 0 &
-xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 &
+xrandr --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --mode 1920x1080 --pos 3840x0 --rotate normal --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2 --mode 1920x1080 --pos 1920x0 --rotate normal

+ 2 - 0
screenlayout/.screenlayout/townhall.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2 --mode 1680x1050 --pos 1920x0 --rotate left

+ 10 - 0
ssh/.ssh/config

@@ -9,3 +9,13 @@ Host *
 
 Host sdf.org
   User secstate
+
+Host rhea.unbl.ink
+
+Host dione.local
+
+Host mimas.local
+
+Host iapetus.local
+
+Host pandora.unbl.ink

+ 2 - 2
systemd/.config/systemd/user/changepaper.timer

@@ -6,8 +6,8 @@ RefuseManualStop=no
 [Timer]
 Persistent=false
 OnBootSec=5min
-OnUnitActiveSec=24h
-Unite=changepaper.service
+OnUnitActiveSec=12h
+Unit=changepaper.service
 
 [Install]
 WantedBy=default.target

+ 102 - 0
tridactyl/.config/tridactyl/tridactylrc

@@ -0,0 +1,102 @@
+" bovine3dom's dogfood
+
+" Provided only as an example.
+" Do not install/run without reading through as you may be surprised by some
+" of the settings.
+
+" May require the latest beta builds.
+
+" Move this to $XDG_CONFIG_DIR/tridactyl/tridactylrc (that's
+" ~/.config/tridactyl/tridactylrc to mere mortals) or ~/.tridactylrc and
+" install the native messenger (:installnative in Tridactyl). Run :source to
+" get it in the browser, or just restart.
+
+" NB: If you want "vim-like" behaviour where removing a line from
+" here makes the setting disappear, uncomment the line below.
+
+"sanitise tridactyllocal tridactylsync
+
+"
+" Binds
+"
+
+" Comment toggler for Reddit and Hacker News
+bind ;c hint -c [class*="expand"],[class="togg"]
+
+" GitHub pull request checkout command to clipboard (only works if you're a collaborator or above)
+bind yp composite js document.getElementById("clone-help-step-1").textContent.replace("git checkout -b", "git checkout -B").replace("git pull ", "git fetch ") + "git reset --hard " + document.getElementById("clone-help-step-1").textContent.split(" ")[3].replace("-","/") | yank
+
+" Git{Hub,Lab} git clone via SSH yank
+bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank
+
+" I like wikiwand but I don't like the way it changes URLs
+bindurl wikiwand.com yy composite js document.location.href.replace("wikiwand.com/en","wikipedia.org/wiki") | clipboard yank
+
+" Make gu take you back to subreddit from comments
+bindurl reddit.com gu urlparent 4
+
+" Only hint search results on Google
+bindurl www.google.com f hint -Jc .rc > .r > a
+bindurl www.google.com F hint -Jtc .rc>.r>a
+
+" Allow Ctrl-a to select all in the commandline
+unbind --mode=ex <C-a>
+
+" Allow Ctrl-c to copy in the commandline
+unbind --mode=ex <C-c>
+
+" Handy multiwindow/multitasking binds
+bind gd tabdetach
+bind gD composite tabduplicate | tabdetach
+
+" Make yy use canonical / short links on the 5 websites that support them
+bind yy clipboard yankshort
+
+" Stupid workaround to let hint -; be used with composite which steals semi-colons
+command hint_focus hint -;
+
+" Open right click menu on links
+bind ;C composite hint_focus; !s xdotool key Menu
+
+" Julia docs' built in search is bad
+set searchurls.julia https://www.google.com/search?q=site:http://docs.julialang.org/en/v1.0%20
+
+"
+" Misc settings
+"
+
+" set editorcmd to suckless terminal, or use the defaults on other platforms
+js tri.browserBg.runtime.getPlatformInfo().then(os=>{const editorcmd = os.os=="linux" ? "st vim" : "auto"; tri.config.set("editorcmd", editorcmd)})
+
+" set profile dir on Windows
+jsb browser.runtime.getPlatformInfo().then(os=>{const profiledir = os.os=="win" ? "C:\\Users\\olie\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\gwm76nmk.default" : "auto"; tri.config.set("profiledir", profiledir)})
+
+" Sane hinting mode
+set hintfiltermode vimperator-reflow
+set hintnames numeric
+
+set searchurls.unblink https://search.unbl.ink/?q=
+set searchengine unblink
+
+
+" Defaults to 300ms but I'm a 'move fast and close the wrong tabs' kinda chap
+set hintdelay 100
+
+" Make Tridactyl work on more sites at the expense of some security
+set csp clobber
+fixamo_quiet
+
+" Make quickmarks for the sane Tridactyl issue view
+quickmark t https://github.com/tridactyl/tridactyl/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+
+
+"
+" URL redirects
+"
+
+" New reddit is bad
+autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
+" Mosquito nets won't make themselves
+autocmd DocStart ^http(s?)://www.amazon.co.uk js tri.excmds.urlmodify("-t", "www", "smile")
+
+" This will have to do until someone writes us a nice syntax file :)
+" vim: set filetype=vim: