refactoring and adding bitwarden menu and some other keybindings
This commit is contained in:
		
							parent
							
								
									eb085ccf54
								
							
						
					
					
						commit
						fcedf34dc8
					
				
					 8 changed files with 47 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -20,6 +20,7 @@
 | 
			
		|||
;; my splits
 | 
			
		||||
(local rules (require "rules"))
 | 
			
		||||
(local keybindings (require "keybindings"))
 | 
			
		||||
;; (local notifications (require "notifications"))
 | 
			
		||||
 | 
			
		||||
;; Error handling
 | 
			
		||||
;; Check if awesome encountered an error during startup and fell back to
 | 
			
		||||
| 
						 | 
				
			
			@ -63,7 +64,7 @@
 | 
			
		|||
(local alt "Mod1")
 | 
			
		||||
 | 
			
		||||
;; Set hostname so that we can utilize specific features on different machines
 | 
			
		||||
(var laptop true )
 | 
			
		||||
(var laptop false )
 | 
			
		||||
(awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
 | 
			
		||||
                                       (if (= "chris-linuxlaptop\n" stdout)
 | 
			
		||||
                                           (set laptop true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,6 +14,10 @@
 | 
			
		|||
    (let [cb (or ?callback (fn [] nil))]
 | 
			
		||||
      (awful.spawn.easy_async_with_shell "pamixer --get-volume-human" cb)))
 | 
			
		||||
 | 
			
		||||
(if (= "chris-linuxlaptop" (awful.spawn "hostname"))
 | 
			
		||||
    (global bwmenu "bwmenu -- -config /home/chris/.dotfiles/rofi/launchers-git/laptop.rasi")
 | 
			
		||||
    (global bwmenu "bwmenu -- -config /home/chris/.dotfiles/rofi/launchers-git/desktop.rasi"))
 | 
			
		||||
 | 
			
		||||
(local keybindings
 | 
			
		||||
       {
 | 
			
		||||
        :globalkeys (gears.table.join
 | 
			
		||||
| 
						 | 
				
			
			@ -109,10 +113,10 @@
 | 
			
		|||
                     ;; Programs
 | 
			
		||||
                     (awful.key [ modkey ] "d" (fn [] (awful.spawn "emacsclient -c -e '(dired-jump)'"))
 | 
			
		||||
                                {:description "launch dired in new emacs frame" :group "apps" })
 | 
			
		||||
                     (awful.key [ modkey ] "x" (fn [] (awful.spawn "emacsclient -c -e '(+org-capture/open-frame)'"))
 | 
			
		||||
                     (awful.key [ modkey ] "x" (fn [] (awful.spawn "org-capture"))
 | 
			
		||||
                                {:description "launch scratchpad in new emacs frame" :group "apps" })
 | 
			
		||||
                     (awful.key [ modkey alt ] "m" (fn [] (awful.spawn "emacsclient -c -e '(org-roam-capture)'"))
 | 
			
		||||
                                {:description "launch scratchpad in new emacs frame" :group "apps" })
 | 
			
		||||
                                {:description "launch org-roam-capture in new emacs frame" :group "apps" })
 | 
			
		||||
                     (awful.key [ modkey shift ] "x" (fn [] (awful.spawn "emacsclient -c -e '(doom/switch-to-scratch-buffer)'"))
 | 
			
		||||
                                {:description "launch scratchpad in new emacs frame" :group "apps" })
 | 
			
		||||
                     (awful.key [ modkey ] "i" (fn [] (awful.spawn "emacsclient -c -e '(mu4e)'"))
 | 
			
		||||
| 
						 | 
				
			
			@ -126,8 +130,10 @@
 | 
			
		|||
                                {:description "launch rofi" :group "launcher"})
 | 
			
		||||
                     (awful.key [modkey] "w" (fn [] (awful.spawn "/home/chris/.dotfiles/rofi/launchers-git/windows.sh"))
 | 
			
		||||
                                {:description "launch rofi window switcher" :group "launcher"})
 | 
			
		||||
                     (awful.key [modkey] "b" (fn [] (awful.spawn "bwmenu"))
 | 
			
		||||
                     (awful.key [modkey] "b" (fn [] (awful.spawn bwmenu))
 | 
			
		||||
                                {:description "launch rofi bitwarden selector" :group "launcher"})
 | 
			
		||||
                     (awful.key [modkey] "y" (fn [] (awful.spawn "yt -r"))
 | 
			
		||||
                                {:description "search youtube" :group "launcher"})
 | 
			
		||||
                     ;; audio
 | 
			
		||||
                     (awful.key [modkey] "a" (fn [] (awful.spawn "alacritty -d 80 14 --class pulsemixer -e pulsemixer"))
 | 
			
		||||
                                {:description "launch pulsemixer" :group "audio"})
 | 
			
		||||
| 
						 | 
				
			
			@ -143,6 +149,16 @@
 | 
			
		|||
                     (awful.key [] "XF86Launch8" (fn [] (awful.spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle")
 | 
			
		||||
                                                     (awful.spawn "paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga"))
 | 
			
		||||
                                {:description "Mute microphone" :group "audio"})
 | 
			
		||||
                     (awful.key [modkey] "]" (fn [] (awful.spawn "mpvc -x 0.10"))
 | 
			
		||||
                                {:description "MPV speed up by .10" :group "audio"})
 | 
			
		||||
                     (awful.key [modkey] "[" (fn [] (awful.spawn "mpvc -x -0.10"))
 | 
			
		||||
                                {:description "MPV slow down by .10" :group "audio"})
 | 
			
		||||
                     (awful.key [modkey] "=" (fn [] (awful.spawn "mpvc -X 1.95"))
 | 
			
		||||
                                {:description "MPV set to 2x speed" :group "audio"})
 | 
			
		||||
                     (awful.key [modkey shift] "0" (fn [] (awful.spawn "mpvc -t 10"))
 | 
			
		||||
                                {:description "MPV seek forward 10 sec" :group "audio"})
 | 
			
		||||
                     (awful.key [modkey shift] "9" (fn [] (awful.spawn "mpvc -t -20"))
 | 
			
		||||
                                {:description "MPV seek backward 20 sec" :group "audio"})
 | 
			
		||||
 | 
			
		||||
                     ;; Because I don't know much fennel yet I'm doing each one individually
 | 
			
		||||
                     ;; View tags only.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,6 +104,21 @@
 | 
			
		|||
                            :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
			
		||||
                            }
 | 
			
		||||
               }
 | 
			
		||||
              {
 | 
			
		||||
               :rule_any {
 | 
			
		||||
                          :class [
 | 
			
		||||
                                  "fp64"
 | 
			
		||||
                                  ]
 | 
			
		||||
                          :instance [
 | 
			
		||||
                                     "fp64"
 | 
			
		||||
                                     ]
 | 
			
		||||
                          }
 | 
			
		||||
               :properties {
 | 
			
		||||
                            :fullscreen true
 | 
			
		||||
                            :raise true
 | 
			
		||||
                            :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
			
		||||
                            }
 | 
			
		||||
               }
 | 
			
		||||
              ])
 | 
			
		||||
 | 
			
		||||
rules
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@ af=scaletempo2
 | 
			
		|||
speed=1.95
 | 
			
		||||
autofit=70%
 | 
			
		||||
geometry=50%:50%
 | 
			
		||||
input-ipc-server="/tmp/mpvsocket"
 | 
			
		||||
 | 
			
		||||
[ytdl]
 | 
			
		||||
ytdl-format="bestvideo[height<=720]+bestaudio/best"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,7 @@
 | 
			
		|||
## Documentation:
 | 
			
		||||
##   qute://help/configuring.html
 | 
			
		||||
##   qute://help/settings.html
 | 
			
		||||
import glob
 | 
			
		||||
 | 
			
		||||
## This is here so configs done via the GUI are still loaded.
 | 
			
		||||
## Remove it to not load settings done via the GUI.
 | 
			
		||||
| 
						 | 
				
			
			@ -1037,7 +1038,7 @@ c.content.headers.do_not_track = True
 | 
			
		|||
 | 
			
		||||
## Enable host blocking.
 | 
			
		||||
## Type: Bool
 | 
			
		||||
# c.content.host_blocking.enabled = True
 | 
			
		||||
c.content.host_blocking.enabled = False
 | 
			
		||||
 | 
			
		||||
## List of URLs of lists which contain hosts to block.  The file can be
 | 
			
		||||
## in one of the following formats:  - An `/etc/hosts`-like file - One
 | 
			
		||||
| 
						 | 
				
			
			@ -1228,7 +1229,8 @@ c.content.headers.do_not_track = True
 | 
			
		|||
 | 
			
		||||
## List of user stylesheet filenames to use.
 | 
			
		||||
## Type: List of File, or File
 | 
			
		||||
# c.content.user_stylesheets = []
 | 
			
		||||
# or if you have a directory with .user.css files:
 | 
			
		||||
c.content.user_stylesheets = glob.glob('./css*.user.css')
 | 
			
		||||
 | 
			
		||||
## Enable WebGL.
 | 
			
		||||
## Type: Bool
 | 
			
		||||
| 
						 | 
				
			
			@ -2426,7 +2428,7 @@ config.bind('o', 'set-cmd-text -s :open')
 | 
			
		|||
## Bindings for MPV and YTDL
 | 
			
		||||
config.bind('v', 'hint links spawn --detach mpv --force-window yes {hint-url}')
 | 
			
		||||
config.bind('gv', 'spawn --detach mpv --force-window yes {url}')
 | 
			
		||||
config.bind('gc', 'spawn org-capture {url}')
 | 
			
		||||
config.bind('gc', 'spawn org-capture "{url}"')
 | 
			
		||||
config.bind('gV', 'hint links spawn alacritty -e youtube-dl -o ~/Videos/%(title)s.%(ext)s {hint-url}')
 | 
			
		||||
 | 
			
		||||
## Bindings for MPV and YTDL
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
[FileDialog]
 | 
			
		||||
history=file:///home/chris/storage/digikam/Photos/Phone Camera/2020/11, file:///home/chris/Pictures, file:///home/chris/storage/digikam/Photos/Phone Camera/2020/08, file:///home/chris/Videos
 | 
			
		||||
lastVisited=file:///home/chris/Videos
 | 
			
		||||
history=file:///home/chris/Pictures, file:///home/chris/storage/digikam/Photos/Phone Camera/2020/08, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/Downloads/Takeout/Contacts/All Contacts
 | 
			
		||||
lastVisited=file:///home/chris/Downloads/Takeout/Contacts/All Contacts
 | 
			
		||||
qtVersion=5.15.2
 | 
			
		||||
shortcuts=file:, file:///home/chris
 | 
			
		||||
sidebarWidth=116
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,3 +14,5 @@ bw https://bitwarden.tfcconnection.org/#/
 | 
			
		|||
coin https://www.coinbase.com/dashboard
 | 
			
		||||
remind https://www.remind.com/classes/4223h9
 | 
			
		||||
admin https://admin.microsoft.com/AdminPortal/Home#/homepage
 | 
			
		||||
jelly https://jellyf.hopto.org/web/index.html#!/home.html
 | 
			
		||||
st http://127.0.0.1:8384/#
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,3 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
transmission-remote 192.168.1.35 -a "$@" && notify-send "  Transmission On Server" "Torrent added"
 | 
			
		||||
transmission-remote 192.168.1.7 -a "$@" && notify-send "  Transmission On Server" "Torrent added"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue