Compare commits

..
1 Commits
Author SHA1 Message Date
JosephFerano 36092c1c4c Emacs: Add book org-capture template and global keybinding 2023-08-25 20:14:29 +07:00
47 changed files with 1026 additions and 3679 deletions

No files matched your search

-20
View File
@@ -1,20 +0,0 @@
output HDMI-A-0
off
output DisplayPort-0
off
output DisplayPort-1
off
output eDP
crtc 0
mode 1920x1200
pos 0x0
primary
rate 120.00
x-prop-colorspace Default
x-prop-max_bpc 16
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree auto
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0
-1
View File
@@ -1 +0,0 @@
eDP 00ffffffffffff004d101e1500000000311e0104a51d127807de50a3544c99260f505400000001010101010101010101010101010101ed7b80a070b047403020360020b410000018f73d80a070b047403020360020b410000018000000fd003078999920010a202020202020000000fc004c513133344e314a5735320a20000a
-31
View File
@@ -1,31 +0,0 @@
output DisplayPort-0
off
output DisplayPort-1
off
output eDP
crtc 0
mode 1920x1200
pos 0x0
primary
rate 120.00
x-prop-colorspace Default
x-prop-max_bpc 16
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree auto
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0
output HDMI-A-0
crtc 1
mode 1920x1080
pos 1920x0
rate 60.00
x-prop-colorspace Default
x-prop-max_bpc 16
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree auto
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0
-2
View File
@@ -1,2 +0,0 @@
HDMI-A-0 00ffffffffffff0005e30122a28e0000291d010380301b782a7771a359539e260f5054bfef00d1c0b30095008180814081c001010101023a801871382d40582c4500dc0c1100001e000000ff004755574b414841303336353134000000fc0032324231570a20202020202020000000fd00324c1e5311000a20202020202001f802031ef14b101f051404130312021101230907078301000065030c0010008c0ad08a20e02d10103e9600dc0c11000018011d007251d01e206e285500dc0c1100001e8c0ad08a20e02d10103e9600dc0c110000188c0ad090204031200c405500dc0c110000180000000000000000000000000000000000000000000000000049
eDP 00ffffffffffff004d101e1500000000311e0104a51d127807de50a3544c99260f505400000001010101010101010101010101010101ed7b80a070b047403020360020b410000018f73d80a070b047403020360020b410000018000000fd003078999920010a202020202020000000fc004c513133344e314a5735320a20000a
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/bash
/home/joe/.local/bin/qtile cmd-obj -o "cmd" -f "reload_config"
notify-send "Switched profile" -t 2000
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

-197
View File
@@ -1,197 +0,0 @@
;; mu4e thread fast folding -*- lexical-binding: t; -*-
;; This file is not part of GNU Emacs.
;;
;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>
(require 'mu4e)
(defun mu4e-fast-folding-info (msg)
(let* ((thread (mu4e-message-field msg :meta))
(prefix (mu4e~headers-thread-prefix thread))
(unread (memq 'unread (mu4e-message-field msg :flags))))
(concat
(if (= (length prefix) 0) " " " ") ;; Normal space vs Non-breaking space
(if unread "•" " ")))) ;; Specific character to later detect unread
(add-to-list 'mu4e-header-info-custom
'(:fast-folding . (:name "fast-folding"
:shortname ""
:function mu4e-fast-folding-info)))
(setq mu4e-headers-fields '((:fast-folding . 2)
(:human-date . 12)
(:flags . 6)
(:mailing-list . 10)
(:from . 22)
(:subject)))
(defun mu4e-fast-folding-is-unfolded-child ()
"Check if the line at point is an unfolded thread child.
This is detected by the presence of non-breaking space."
(interactive)
(save-excursion
(beginning-of-line)
(and (not (mu4e-fast-folding-is-folded-children))
(search-forward " " (line-end-position) t))))
(defun mu4e-fast-folding-is-folded-children ()
"Check if the line at point is a folded thread.
This is detected by the presence of an overlay with value 'overlay."
(interactive)
(save-excursion
(beginning-of-line)
(let ((overlays (overlays-at (point)))
(found nil))
(while overlays
(if (overlay-get (car overlays) 'overlay)
(setq found t))
(setq overlays (cdr overlays)))
found)))
(defun mu4e-fast-folding-is-root ()
"Check if the line at point is a thread root."
(interactive)
(and (not (mu4e-fast-folding-is-unfolded-child))
(not (mu4e-fast-folding-is-folded-children))))
(defun mu4e-fast-folding-is-unread ()
"Check if the line at point is an unread message."
(save-excursion
(beginning-of-line)
(search-forward "•" (line-end-position) t)))
(defun mu4e-fast-folding-thread-toggle ()
"Toggle thread at point."
(interactive)
(save-excursion
(beginning-of-line)
(if (mu4e-fast-folding-is-root)
(forward-line))
(cond ((mu4e-fast-folding-is-folded-children)
(mu4e-fast-folding-thread-unfold))
((mu4e-fast-folding-is-unfolded-child)
(mu4e-fast-folding-thread-fold)))))
(defun mu4e-fast-folding-thread-unfold ()
"Unfold thread at point."
(interactive)
(if (mu4e-fast-folding-is-root)
(forward-line))
(let ((overlays (overlays-at (point))))
(while overlays
(let ((overlay (car overlays)))
(if (overlay-get overlay 'overlay)
(delete-overlay (overlay-get overlay 'overlay))))
(setq overlays (cdr overlays)))))
(defun mu4e-fast-folding-thread-fold ()
"Fold thread at point."
(interactive)
;; Move to thread start
(beginning-of-line)
(while (and (> (point) (point-min))
(mu4e-fast-folding-is-unfolded-child))
(forward-line -1))
(forward-line +1)
;; Hide all children, count them and count unread
(beginning-of-line)
(let ((start (point))
(end (+ (point) 1))
(unread 0)
(count 0))
(while (and (< (point) (point-max))
(mu4e-fast-folding-is-unfolded-child))
;; Count unread
(beginning-of-line)
(if (mu4e-fast-folding-is-unread)
(setq unread (+ unread 1)))
;; Count thread
(setq count (+ count 1))
;; Set new end for the overlay
(setq end (+ (line-end-position) 1))
(forward-line +1)
(beginning-of-line))
;; Add overlay
(let* ((overlay (make-overlay start (- end 1)))
(face (if (> unread 0) 'mu4e-unread-face 'mu4e-system-face))
(text (if (> unread 0)
(format "   --- %d hidden messages (%d unread) ---   " count unread)
(format "   --- %d hidden messages ---   " count))))
;; No overlay if only 1 child
(when (> count 1)
(overlay-put overlay 'display (propertize text 'face face))
(overlay-put overlay 'overlay overlay)))))
(defun mu4e-fast-folding-thread-fold-all ()
"Fold all threads independently of their current state."
(interactive)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(mu4e-fast-folding-thread-fold)
(forward-line))))
(defun mu4e-fast-folding-thread-unfold-all ()
"Unfold all threads, independently of their current state."
(interactive)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(mu4e-fast-folding-thread-unfold)
(forward-line))))
(defvar mu4e-fast-folding-thread-folding-state nil
"Global folding state")
(defun mu4e-fast-folding-thread-toggle-all ()
"Toggle global folding state."
(interactive)
(when mu4e-headers-include-related
(setq mu4e-fast-folding-thread-folding-state
(not mu4e-fast-folding-thread-folding-state))
(mu4e-fast-folding-thread-apply-folding)))
(defun mu4e-fast-folding-thread-apply-folding ()
"Apply folding according to the global folding state."
(interactive)
(if mu4e-fast-folding-thread-folding-state
(mu4e-fast-folding-thread-fold-all)
(mu4e-fast-folding-thread-unfold-all)))
(add-hook 'mu4e-headers-found-hook
#'mu4e-fast-folding-thread-fold-all)
-382
View File
@@ -1,382 +0,0 @@
;;; mu4e-thread-folding.el --- Thread folding support for mu4e -*- lexical-binding: t -*-
;; Copyright (C) 2021 Nicolas P. Rougier
;;
;; Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Homepage: https://github.com/rougier/mu4e-thread-folding
;; Keywords: mail
;; Version: 0.2
;; Package-Requires: ((emacs "26.1"))
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; mu4e-thread-folding.el is a small library to enable threads folding in
;; mu4e. This works by using overlays with an invisible property and
;; setting hooks at the right place. It is possible to configure colors
;; to better highlight a thread and also to have a prefix string
;; indicating if a thread is folded or not. Note that when a thread is
;; folded, any unread child remains visible.
;; Usage:
;; The prefix string is displayed over the header line and it is thus
;; recommended to have an empty field at the start of an header line.
;; Have a look at ~mu4e-headers-fields~.
;;
;; (require 'mu4e-thread-folding)
;; (add-to-list 'mu4e-header-info-custom
;; '(:empty . (:name "Empty"
;; :shortname ""
;; :function (lambda (msg) " "))))
;; (setq mu4e-headers-fields '((:empty . 2)
;; (:human-date . 12)
;; (:flags . 6)
;; (:mailing-list . 10)
;; (:from . 22)
;; (:subject . nil)))
;;; Code:
(require 'mu4e)
(defvar mu4e-thread-folding-mode nil)
(defvar mu4e-headers--folded-items nil)
(defgroup mu4e-thread-folding '()
"Group for mu4e thread folding options"
:group 'mu4e)
(defface mu4e-thread-folding-root-unfolded-face
`((t :inherit 'default))
"Face for the root node thread when it is unfolded."
:group 'mu4e-thread-folding)
(defface mu4e-thread-folding-root-folded-face
`((t :inherit 'default))
"Face for the root node of a thread when it is folded."
:group 'mu4e-thread-folding)
(defface mu4e-thread-folding-child-face
`((t :inherit 'default))
"Face for a thread when it is unfolded (child node)"
:group 'mu4e-thread-folding)
(defface mu4e-thread-folding-root-prefix-face
`((t :inherit default))
"Face for the root node thread when it is unfolded."
:group 'mu4e-thread-folding)
(defcustom mu4e-thread-folding-default-view 'folded
"Initial folding status ('folded or 'unfolded)."
:type 'string
:group 'mu4e-thread-folding)
(defcustom mu4e-thread-folding-root-unfolded-prefix-string
"[%2d] ▾"
"Prefix for the root node thread when it is unfolded."
:type 'string
:group 'mu4e-thread-folding)
(defcustom mu4e-thread-folding-root-folded-prefix-string
"[%2d] ▸"
"Prefix for the root node (when folded)"
:type 'string
:group 'mu4e-thread-folding)
(defcustom mu4e-thread-folding-child-prefix-string
" "
"Prefix for a child node."
:type 'string
:group 'mu4e-thread-folding)
(defvar mu4e-thread-folding-all-folded nil
"Record whether last fold-all state was folded.")
(defun mu4e-headers-get-thread-id (msg)
"Retrieve the thread-id of a msg.
This uses the mu4e private API and this might break in future releases."
(mu4e~headers-get-thread-info msg 'thread-id))
(defun mu4e-headers-mark-threads (&optional no-reset)
"Mark line in headers view with various information contained in overlays."
(when (and (get-buffer "*mu4e-headers*") mu4e-headers-show-threads)
(with-current-buffer "*mu4e-headers*"
(setq-local line-move-visual t
line-move-ignore-invisible t)
;; turn on minor mode for key bindings
(unless mu4e-thread-folding-mode (mu4e-thread-folding-mode 1))
;; Remove all overlays
(cl-loop with names = '(thread-child thread-root root-prefix)
for ov being the overlays
when (cl-loop for name in names
thereis (overlay-get ov name))
do (delete-overlay ov))
(unless no-reset (setq mu4e-headers--folded-items nil))
(setq-local left-margin-width 1)
(if (get-buffer-window "*mu4e-headers*")
(set-window-margins (get-buffer-window "*mu4e-headers*")
(max (length mu4e-thread-folding-root-folded-prefix-string)
(length mu4e-thread-folding-root-unfolded-prefix-string))))
(let ((overlay-priority -60)
(folded (string= mu4e-thread-folding-default-view 'folded))
(child-face 'mu4e-thread-folding-child-face)
(children-number 1)
(root-id nil)
(root-overlay nil)
(root-unread-child nil)
docid-overlay
(root-folded-face 'mu4e-thread-folding-root-folded-face)
(root-unfolded-face 'mu4e-thread-folding-root-unfolded-face)
(root-folded-prefix mu4e-thread-folding-root-folded-prefix-string)
(root-unfolded-prefix mu4e-thread-folding-root-unfolded-prefix-string))
;; store initial folded state
(setq mu4e-thread-folding-all-folded folded)
(setq-local buffer-invisibility-spec '(docid t))
;; Iterate over each header
(mu4e-headers-for-each
(lambda (msg)
(let* ((docid (mu4e-message-field msg :docid))
(docid-pos (cons (mu4e~headers-goto-docid docid)
(mu4e~headers-goto-docid docid t)))
(id (mu4e-headers-get-thread-id msg))
(flagged (member 'flagged (mu4e-message-field msg :flags)))
(unread (member 'unread (mu4e-message-field msg :flags)))
(child-overlay (make-overlay
(line-beginning-position)
(+ 1 (line-end-position)))))
;; (setq folded (or (and (member id mu4e-headers--folded-items) t)
;; mu4e-thread-folding-all-folded))
(setq folded (member id mu4e-headers--folded-items))
;; We mark the root thread if and only if there's child
(if (string= root-id id)
(progn
(setq children-number (+ children-number 1))
;; unread-child indicates that there's at least one unread child
(setq root-unread-child (or root-unread-child unread))
;; Child
(when (and (not unread) (not flagged))
(overlay-put child-overlay 'face child-face))
(overlay-put child-overlay 'invisible (and folded (not unread)))
(overlay-put child-overlay 'priority overlay-priority)
(overlay-put child-overlay 'unread unread)
(overlay-put child-overlay 'thread-child t)
(overlay-put child-overlay 'thread-id id)
;; Root
(overlay-put
root-overlay 'face (if (or root-unread-child (not folded))
root-unfolded-face
root-folded-face))
(overlay-put root-overlay 'thread-root t)
(overlay-put root-overlay 'thread-id id)
(overlay-put root-overlay 'folded folded)
(overlay-put root-overlay 'priority overlay-priority)
(overlay-put root-overlay 'invisible 'root)
(overlay-put root-overlay 'prefix-docid docid-overlay)
(overlay-put
docid-overlay 'before-string
(propertize
" " 'display
`((margin left-margin)
,(propertize
(if (or root-unread-child (not folded))
(format root-unfolded-prefix children-number)
(format root-folded-prefix children-number))
'face 'mu4e-thread-folding-root-prefix-face))))
(overlay-put docid-overlay 'invisible 'docid)
(overlay-put docid-overlay 'priority 1)
(overlay-put docid-overlay 'root-prefix t))
;; Else, set the new root (this relies on default message order in header's view)
(progn
(if (> children-number 1)
(overlay-put root-overlay 'children-number children-number))
(setq root-id id
root-unread-child nil
children-number 1
root-overlay (make-overlay
(line-beginning-position)
(1+ (line-end-position)))
docid-overlay (make-overlay
(car docid-pos)
(cdr docid-pos))))))))))))
(defun mu4e-headers-mark-threads-no-reset ()
"Same as `mu4e-headers-mark-threads' but don't reset `mu4e-headers--folded-items'."
(mu4e-headers-mark-threads 'no-reset))
(defun mu4e-headers-overlay-set-visibility (value &optional thread-id)
"Set the invisible property for all thread children or only the ones matching thread-id.
Unread message are not folded."
(when (and (get-buffer "*mu4e-headers*") mu4e-headers-show-threads)
(with-current-buffer "*mu4e-headers*"
(unless thread-id
(setq mu4e-thread-folding-all-folded value))
(save-excursion
(goto-char (point-min))
(let ((root-overlay nil)
(child-overlay nil)
(root-folded-face 'mu4e-thread-folding-root-folded-face)
(root-unfolded-face 'mu4e-thread-folding-root-unfolded-face)
(root-folded-prefix mu4e-thread-folding-root-folded-prefix-string)
(root-unfolded-prefix mu4e-thread-folding-root-unfolded-prefix-string))
(mu4e-headers-for-each
(lambda (_msg)
(let (local-child-overlay local-root-overlay)
(cl-loop for ov in (overlays-in (point-at-bol) (point-at-eol))
when (overlay-get ov 'thread-child)
do (setq local-child-overlay ov)
when (overlay-get ov 'thread-root)
do (setq local-root-overlay ov))
;; Child
(when local-child-overlay
(let ((id (overlay-get local-child-overlay 'thread-id))
(unread (overlay-get local-child-overlay 'unread)))
(setq child-overlay local-child-overlay)
(when (or (not thread-id) (string= id thread-id))
(if (and root-overlay unread)
(overlay-put root-overlay 'face root-unfolded-face)
(overlay-put child-overlay 'invisible value)))))
;; Root
(when local-root-overlay
(let ((children-number (or (overlay-get local-root-overlay 'children-number) 1))
(id (overlay-get local-root-overlay 'thread-id)))
(setq root-overlay local-root-overlay)
(when (or (not thread-id) (string= id thread-id))
(if (and (overlay-get root-overlay 'folded) (null value))
(setq mu4e-headers--folded-items
(delete id mu4e-headers--folded-items))
(push id mu4e-headers--folded-items))
(overlay-put root-overlay 'folded value)
(overlay-put
(overlay-get root-overlay 'prefix-docid) 'before-string
(propertize
" " 'display
`((margin left-margin)
,(propertize
(if value
(format root-folded-prefix children-number)
(format root-unfolded-prefix children-number))
'face 'mu4e-thread-folding-root-prefix-face))))
(overlay-put
root-overlay 'face (if value
root-folded-face
root-unfolded-face)))))
;; Not a root, not a child, we reset the root overlay
(when (and (not local-child-overlay) (not local-root-overlay))
(setq root-overlay nil))))))))))
(defun mu4e-headers-get-overlay (prop &optional index)
"Get overlay at point having the PROP property"
(let* ((index (or index 0))
(overlays (overlays-at (+ (point) index)))
found)
(while (and overlays (not found))
(let ((overlay (car overlays)))
(if (overlay-get overlay prop)
(setq found overlay)))
(setq overlays (cdr overlays)))
found))
(defun mu4e-headers-toggle-at-point ()
"Toggle visibility of the thread at point"
(interactive)
(when (get-buffer "*mu4e-headers*")
(with-current-buffer "*mu4e-headers*"
(catch 'break
(while (and (not (mu4e-headers--toggle-internal))
(not (bobp)))
(forward-line -1))))))
(defun mu4e-headers--toggle-internal ()
"Toggle visibility of the thread at point"
(let (child-overlay root-overlay)
(cl-loop for ov in (overlays-in (point-at-bol) (point-at-eol))
when (overlay-get ov 'thread-child)
return (setq child-overlay ov)
when (overlay-get ov 'thread-root)
return (setq root-overlay ov))
(cond (root-overlay
(let ((id (overlay-get root-overlay 'thread-id))
(folded (overlay-get root-overlay 'folded)))
(mu4e-headers-overlay-set-visibility (not folded) id)
(throw 'break t)))
((not child-overlay)
(throw 'break t)))))
(defun mu4e-headers-toggle-fold-all ()
"Toggle between all threads unfolded and all threads folded."
(interactive)
(mu4e-headers-overlay-set-visibility
(not mu4e-thread-folding-all-folded)))
(defun mu4e-headers-fold-all ()
"Fold all threads"
(interactive)
(mu4e-headers-overlay-set-visibility t))
(defun mu4e-headers-unfold-all ()
"Unfold all threads"
(interactive)
(mu4e-headers-overlay-set-visibility nil))
(defun mu4e-headers-fold-at-point ()
"Fold current thread at point"
(interactive)
(if (get-buffer "*mu4e-headers*")
(with-current-buffer "*mu4e-headers*"
(let ((overlay (mu4e-headers-get-overlay 'thread-id)))
(mu4e-headers-overlay-set-visibility t (overlay-get overlay 'thread-id))))))
(defun mu4e-headers-unfold-at-point ()
"Unfold current thread at point"
(interactive)
(if (get-buffer "*mu4e-headers*")
(with-current-buffer "*mu4e-headers*"
(let ((overlay (mu4e-headers-get-overlay 'thread-id)))
(mu4e-headers-overlay-set-visibility nil (overlay-get overlay 'thread-id))))))
(defvar mu4e-thread-folding-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map mu4e-headers-mode-map)
(define-key map (kbd "TAB") 'mu4e-headers-toggle-at-point)
(define-key map (kbd "<backtab>") 'mu4e-headers-toggle-fold-all)
map))
;; Install hooks
(defun mu4e-thread-folding-load ()
"Install hooks."
(add-hook 'mu4e-index-updated-hook #'mu4e-headers-mark-threads)
(add-hook 'mu4e-headers-found-hook #'mu4e-headers-mark-threads)
(add-hook 'mu4e-view-mode-hook 'mu4e-headers-mark-threads-no-reset))
;;;###autoload
(define-minor-mode mu4e-thread-folding-mode
"Minor mode for folding threads in mu4e-headers view."
:group 'mu4e-thread-folding
:lighter " Threads"
(if mu4e-thread-folding-mode
(mu4e-thread-folding-load)
(remove-hook 'mu4e-index-updated-hook #'mu4e-headers-mark-threads)
(remove-hook 'mu4e-headers-found-hook #'mu4e-headers-mark-threads)
(remove-hook 'mu4e-view-mode-hook 'mu4e-headers-mark-threads-no-reset)))
(provide 'mu4e-thread-folding)
;;; mu4e-thread-folding.el ends here
-133
View File
@@ -1,133 +0,0 @@
;;; welcome.el --- A dashboard that welcomes you! -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Joseph Ferano
;; Author: Joseph Ferano <joseph@ferano.io>
;; Keywords: init, welcome, dashboard, startup
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Something something minimalism and dasboards
;;; Code:
;; (require 'dashboard)
;; (defun dashboard-center-text (start end)
;; "Center the text between START and END."
;; (save-excursion
;; (goto-char start)
;; (let ((width 0))
;; (while (< (point) end)
;; (let* ((line-str (buffer-substring (line-beginning-position) (line-end-position)))
;; (line-length (dashboard-str-len line-str)))
;; (setq width (max width line-length)))
;; (forward-line 1))
;; (let ((prefix (propertize " " 'display `(space . (:align-to (- center ,(/ width 2)))))))
;; (add-text-properties start end `(line-prefix ,prefix indent-prefix ,prefix))))))
;; (defun dashboard-insert-center (&rest strings)
;; "Insert STRINGS in the center of the buffer."
;; (let ((start (point)))
;; (apply #'insert strings)
;; (dashboard-center-text start (point))))
(defvar welcome-load-project-map (make-sparse-keymap)
"High precedence keymap.")
(defun welcome--open-project ()
"Open the directory at point in dired."
(interactive)
(let ((path (file-truename (substring-no-properties
(thing-at-point 'filename)))))
(project-switch-project path)))
;; (evil-define-key 'normal 'joe/welcome-load-project-map (kbd "RET") #'joe/welcome-open-project)
;;
;; Look into (text-property-search-forward)
;; (text-property-search-backward)
;;
(defun welcome--load-bookmarks ()
(with-temp-buffer
(if (file-exists-p bookmark-file)
(progn
(insert-file-contents bookmark-file)
(goto-char (point-min))
(let ((bmarks (read (current-buffer))))
(mapcar (lambda (bm) (cons (car bm) (cdr (nth 1 bm)))) bmarks)))
(list '("No Bookmarks")))))
(defun welcome--load-projects ()
(with-temp-buffer
(insert-file-contents project-list-file)
(goto-char (point-min))
(let ((contents (apply #'append (read (current-buffer)))))
(if contents
(seq-subseq contents 0 (min (length contents) 4))
"No Projects"))))
(defun welcome--recent-files ()
(with-temp-buffer
(insert-file-contents recentf-save-file)
(goto-char (point-min))
(let ((contents (apply #'append (read (current-buffer)))))
(if contents
(seq-subseq contents 0 (min (length contents) 8))
"No Recent Files"))))
(defun welcome--recent-files ()
(if recentf-list
(seq-subseq recentf-list 0 (min (length recentf-list) 8))
"No Recent Files"))
(defun welcome--render-dash ()
"Show Welcome buffer"
(with-current-buffer (get-buffer-create "*Welcome*")
(buffer-size)
(erase-buffer)
(goto-char (point-min))
(insert-image (create-image (expand-file-name "Emacs@256.png" user-emacs-directory)))
(insert "\n\n\n")
(insert "Welcome to Emacs!\n\n")
;; (dashboard-insert-center "testing this thing out\n\n")
(let* ((time-str (emacs-init-time))
(time (string-to-number (car (split-string time-str)))))
(insert (format "It took %.3f seconds to start up\n\n" time)))
(insert "Happy hacking!\n\n")
(insert "Projects:\n")
(dolist (proj (welcome--load-projects))
(insert (format "\t%s\n" proj)))
(insert "\nRecent Files:\n")
(dolist (file (welcome--recent-files))
(insert (format "\t%s\n" file)))
(insert "\nBookmarks:\n")
(dolist (bmark (welcome--load-bookmarks))
(insert (format "\t%s - %s\n" (car bmark) (cdr bmark))))
;; (insert (propertize (format "\t%s\n" proj) :keymap joe/welcome-load-project-map)))
(setq cursor-type nil)
(switch-to-buffer (current-buffer))
(goto-char 86)
(display-line-numbers-mode 0)
(olivetti-mode)
(read-only-mode +1)
(current-buffer)))
(setq initial-buffer-choice #'welcome--render-dash)
(provide 'welcome)
;;; welcome.el ends here
+943 -1333
View File
File diff suppressed because it is too large. Load diff
@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: Debug.Break() (Unity)
# key: db
# --
Debug.Break();$0
@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: Debug.Log() (Unity)
# key: dl
# --
Debug.Log($0);
@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: Unity Awake
# key: awa
# --
void Awake()
{
$0
}
@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: Unity OnDestroy
# key: des
# --
void OnDestroy()
{
$0
}
@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: Unity Serializable class
# key: serc
# --
[Serializable]
public class ${1:className}
{
public $0
}
@@ -1,4 +0,0 @@
# key: sf
# name: Unity SerializeField
# --
[SerializeField] private $0
@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: Unity Update
# key: upd
# --
void Update()
{
$0
}
@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: csharp foreach
# key: fore
# --
foreach (var ${1:item} in ${2:list})
{
$0
}
@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: for (int i)
# key: fori
# --
for (int i = 0; i < $1; i++)
{
$0
}
@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: for (int j)
# key: forj
# --
for (int j = 0; i < $1; j++)
{
$0
}
-588
View File
@@ -1,588 +0,0 @@
# docker.fish - docker completions for fish shell
#
# This file is generated by gen_docker_fish_completions.py from:
# https://github.com/barnybug/docker-fish-completion
#
# To install the completions:
# mkdir -p ~/.config/fish/completions
# cp docker.fish ~/.config/fish/completions
#
# Completion supported:
# - parameters
# - commands
# - containers
# - images
# - repositories
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs network pause port ps pull push rename restart rm rmi run save search start stop tag top trust unpause version wait stats
return 1
end
end
return 0
end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select
case running
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case stopped
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case all
docker ps -a --no-trunc --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
end
end
function __fish_print_docker_networks --description 'Print a list of docker networks'
docker network ls --format "{{.ID}}\n{{.Name}}" | tr ',' '\n'
end
function __fish_docker_no_subcommand_trust --description 'Test if docker has yet to be given the trust subcommand'
if __fish_seen_subcommand_from trust
for i in (commandline -opc)
if contains -- $i inspect key revoke sign signer
return 1
end
end
return 0
end
return 1
end
function __fish_docker_subcommand_path --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if not contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_docker_subcommand_path_without --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_print_docker_images --description 'Print a list of docker images'
docker images --format "{{.Repository}}:{{.Tag}}" | command grep -v '<none>'
end
function __fish_print_docker_repositories --description 'Print a list of docker repositories'
docker images --format "{{.Repository}}" | command grep -v '<none>' | command sort | command uniq
end
# common options
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the Engine API. Default is cors disabled"
complete -c docker -f -n '__fish_docker_no_subcommand' -s b -l bridge -d 'Attach containers to a pre-existing network bridge'
complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR notation address for the network bridge's IP, not compatible with -b"
complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-opt -d 'Force Docker to use specific DNS options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set runtime execution options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s g -l graph -d 'Path to use as the root of the Docker runtime'
complete -c docker -f -n '__fish_docker_no_subcommand' -s H -l host -d 'The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.'
complete -c docker -f -n '__fish_docker_no_subcommand' -s h -l help -d 'Print usage'
complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Allow unrestricted inter-container and Docker daemon host communication'
complete -c docker -f -n '__fish_docker_no_subcommand' -l insecure-registry -d 'Enable insecure communication with specified registries (no certificate verification for HTTPS and enable HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip -d 'Default IP address to use when binding container ports'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-forward -d 'Enable net.ipv4.ip_forward and IPv6 forwarding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your existing IPv6 configuration when using Router Advertisement.'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-masq -d "Enable IP masquerading for bridge's IP range"
complete -c docker -f -n '__fish_docker_no_subcommand' -l iptables -d "Enable Docker's addition of iptables rules"
complete -c docker -f -n '__fish_docker_no_subcommand' -l ipv6 -d 'Enable IPv6 networking'
complete -c docker -f -n '__fish_docker_no_subcommand' -s l -l log-level -d 'Set the logging level ("debug", "info", "warn", "error", "fatal")'
complete -c docker -f -n '__fish_docker_no_subcommand' -l label -d 'Set key=value labels to the daemon (displayed in `docker info`)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l mtu -d 'Set the containers network MTU'
complete -c docker -f -n '__fish_docker_no_subcommand' -s p -l pidfile -d 'Path to use for daemon PID file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l registry-mirror -d 'Specify a preferred registry mirror'
complete -c docker -f -n '__fish_docker_no_subcommand' -s s -l storage-driver -d 'Force the Docker runtime to use a specific storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l selinux-enabled -d 'Enable selinux support. SELinux does not presently support the BTRFS storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l storage-opt -d 'Set storage driver options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tls -d 'Use TLS; implied by --tlsverify'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscacert -d 'Trust only remotes providing a certificate signed by the CA given here'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscert -d 'Path to TLS certificate file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlskey -d 'Path to TLS key file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlsverify -d 'Use TLS and verify the remote (daemon: verify client, client: verify daemon)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s v -l version -d 'Print version information and quit'
# subcommands
# attach
complete -c docker -f -n '__fish_docker_no_subcommand' -a attach -d 'Attach local standard input, output, and error streams to a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container"
# build
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l build-arg -d 'Set build-time variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cache-from -d 'Images to consider as cache sources'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l compress -d 'Compress the build context using gzip'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-period -d 'Limit the CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-quota -d 'Limit the CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s f -l file -d "Name of the Dockerfile (Default is ‘PATH/Dockerfile’)"
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l force-rm -d 'Always remove intermediate containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l iddfile -d 'Write the image ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l label -d 'Set metadata for an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l memory-swap -d 'Swap limit equal to memory plus swap: ‘-1’ to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l network -d 'Set the networking mode for the RUN instructions during build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l pull -d 'Always attempt to pull a newer version of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the build output and print image ID on success'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l security-opt -d 'Security options'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s t -l tag -d 'Name and optionally a tag in the ‘name:tag’ format'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l target -d 'Set the target build stage to build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l ulimit -d 'Ulimit options'
# commit
complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes"
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s a -l author -d 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s m -l message -d 'Commit message'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s p -l pause -d 'Pause container during commit'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container"
# cp
complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d "Copy files/folders between a container and the local filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s a -l archive -d 'Archive mode (copy all uid/gid information)'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s L -l follow-link -d 'Always follow symbol link in SRC_PATH'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print usage'
# create
complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l annotation -d 'Add an annotation to the container (passed through to the OCI runtime)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight -d 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight-device -d 'Block IO weight (relative device weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cgroupns -d 'Cgroup namespace mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-count -d 'CPU count (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-percent -d 'CPU percent (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-period -d 'Limit CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-quota -d 'Limit CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-period -d 'Limit CPU real-time period in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-runtime -d 'Limit CPU real-time runtime in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpus -d 'Number of CPUs'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-bps -d 'Limit read rate (bytes per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-iops -d 'Limit read rate (IO per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-bps -d 'Limit write rate (bytes per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-iops -d 'Limit write rate (IO per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-opt -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-option -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-search -d 'Set custom DNS search domains'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l expose -d 'Expose a port or a range of ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to join'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-cmd -d 'Command to run to check health'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-interval -d 'Time between running the check (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-retries -d 'Consecutive failures needed to report unhealthy'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-start-period -d 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-timeout -d 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l init -d 'Run an init inside the container that forwards signals and reaps processes'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxbandwidth -d 'Maximum IO bandwidth limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxiops -d 'Maximum IOps limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip -d 'IPv4 address (e.g., 172.30.100.104)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip6 -d 'IPv6 address (e.g., 2001:db8::33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ipc -d 'IPC mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l kernel-memory -d 'Kernel memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s l -l label -d 'Set meta data on a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l label-file -d 'Read in a line delimited file of labels'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link -d 'Add link to another container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link-local-ip -d 'Container IPv4/IPv6 link-local addresses'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-driver -d 'Logging driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-opt -d 'Log driver options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-reservation -d 'Memory soft limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swap -d 'Swap limit equal to memory plus swap: ‘-1’ to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swappiness -d 'Tune container memory swappiness (0 to 100)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net -l network -d 'Connect a container to a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net-alias -l network-alias -d 'Add network-scoped alias for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l no-healthcheck -d 'Disable any container-specified HEALTHCHECK'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-kill-disable -d 'Disable OOM Killer'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-score-adj -d 'Tune host’s OOM preferences (-1000 to 1000)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pid -d 'PID namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pids-limit -d 'Tune container pids limit (set -1 for unlimited )'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s p -l publish -d "Publish a container’s port(s) to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s P -l publish-all -d 'Publish all exposed ports to random ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l restart -d 'Restart policy to apply when a container exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l rm -d 'Automatically remove the container when it exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l runtime -d 'Runtime to use for this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-signal -d 'Signal to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-timeout -d 'Timeout (in seconds) to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l storage-opt -d 'Storage driver options for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l sysctl -d 'Sysctl options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l tmpfs -d 'Mount a tmpfs directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ulimit -d 'Ulimit options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d ' Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l userns -d 'User namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l uts -d 'UTS namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volume-driver -d 'Optional volume driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_images)' -d "Image"
# diff
complete -c docker -f -n '__fish_docker_no_subcommand' -a diff -d "Inspect changes on a container's filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -a '(__fish_print_docker_containers all)' -d "Container"
# events
complete -c docker -f -n '__fish_docker_no_subcommand' -a events -d 'Get real time events from the server'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -s f -l filter -d "Filter output based on conditions provided"
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l format -d 'Format the output using the given Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l since -d 'Show all events created since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l until -d 'Stream events until this timestamp'
# exec
complete -c docker -f -n '__fish_docker_no_subcommand' -a exec -d 'Execute a command in a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s d -l detach -d 'Detached mode: run command in the background'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l privileged -d 'Give extended privileges to the command'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s u -l user -d 'Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_containers running)' -d "Container"
# export
complete -c docker -f -n '__fish_docker_no_subcommand' -a export -d 'Stream the contents of a container as a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -s o -l output -d 'Write to a file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -a '(__fish_print_docker_containers all)' -d "Container"
# history
complete -c docker -f -n '__fish_docker_no_subcommand' -a history -d 'Show the history of an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l format -d 'Format the output using the given Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s H -l human -d 'Print sizes and dates in human readable format'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s q -l quiet -d 'Only show image IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_print_docker_images)' -d "Image"
# images
complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate images)'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l digests -d 'Show digests'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d 'Filter output based on conditions provided'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l format -d 'Format the output using the given Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s q -l quiet -d 'Only show image IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -a '(__fish_print_docker_repositories)' -d "Repository"
# import
complete -c docker -f -n '__fish_docker_no_subcommand' -a import -d 'Create a new filesystem image from the contents of a tarball'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s m -l message -d 'Set commit message for imported image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -l help -d 'Print usage'
# info
complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -l help -d 'Print usage'
# inspect
complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s f -l format -d 'Format the output using the given go template.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s s -l size -d 'Display total file sizes if the type is container.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l type -d 'Return JSON for specified type'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_containers all)' -d "Container"
# kill
complete -c docker -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -s s -l signal -d 'Signal to send to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_containers running)' -d "Container"
# load
complete -c docker -f -n '__fish_docker_no_subcommand' -a load -d 'Load an image from a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s i -l input -d 'Read from a tar archive file, instead of STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s q -l quiet -d 'Suppress the load output'
# login
complete -c docker -f -n '__fish_docker_no_subcommand' -a login -d 'Log in to a registry'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s p -l password -d 'Password'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l password-stdin -d 'Take the password from stdin'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s u -l username -d 'Username'
# logout
complete -c docker -f -n '__fish_docker_no_subcommand' -a logout -d 'Log out from a registry'
# logs
complete -c docker -f -n '__fish_docker_no_subcommand' -a logs -d 'Fetch the logs of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s f -l follow -d 'Follow log output'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s t -l timestamps -d 'Show timestamps'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l since -d 'Show logs since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s n -l tail -d 'Output the specified number of lines at the end of logs (defaults to all logs)'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_containers running)' -d "Container"
# network
complete -c docker -f -n '__fish_docker_no_subcommand' -a network -d 'Manage networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a connect -d 'Connect a container to a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a create -d 'Create a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a disconnect -d 'Disconnect a container from a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a inspect -d 'Display detailed information on one or more networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a ls -d 'List networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a prune -d 'Remove all unused networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a rm -d 'Remove one or more networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from network rm' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network connect' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network disconnect' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network inspect' -a '(__fish_print_docker_networks)' -d "Network"
# port
complete -c docker -f -n '__fish_docker_no_subcommand' -a port -d 'Lookup the public-facing port that is NAT-ed to PRIVATE_PORT'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_containers running)' -d "Container"
# pause
complete -c docker -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause all processes within a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from pause' -a '(__fish_print_docker_containers running)' -d "Container"
# ps
complete -c docker -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s a -l all -d 'Show all containers. Only running containers are shown by default.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l before -d 'Show only container created before Id or Name, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s f -l filter -d 'Provide filter values. Valid filters:'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s l -l latest -d 'Show only the latest created container, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s n -d 'Show n last created containers, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s q -l quiet -d 'Only display container IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s s -l size -d 'Display total file sizes'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l since -d 'Show only containers created since Id or Name, include non-running ones.'
# pull
complete -c docker -f -n '__fish_docker_no_subcommand' -a pull -d 'Download an image from a registry'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -s a -l all-tags -d 'Download all tagged images in the repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_repositories)' -d "Repository"
# push
complete -c docker -f -n '__fish_docker_no_subcommand' -a push -d 'Upload an image to a registry'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_repositories)' -d "Repository"
# rename
complete -c docker -f -n '__fish_docker_no_subcommand' -a rename -d 'Rename an existing container'
# restart
complete -c docker -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -s t -l time -d 'Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_containers running)' -d "Container"
# rm
complete -c docker -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove one or more containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -d 'Force the removal of a running container (uses SIGKILL)'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s l -l link -d 'Remove the specified link and not the underlying container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s v -l volumes -d 'Remove anonymous volumes associated with the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_containers stopped)' -d "Container"
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -a '(__fish_print_docker_containers all)' -d "Container"
# rmi
complete -c docker -f -n '__fish_docker_no_subcommand' -a rmi -d 'Remove one or more images'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -s f -l force -d 'Force removal of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l no-prune -d 'Do not delete untagged parents'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -a '(__fish_print_docker_images)' -d "Image"
# run
complete -c docker -f -n '__fish_docker_no_subcommand' -a run -d 'Create and run a new container from an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l annotation -d 'Add an annotation to the container (passed through to the OCI runtime)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cgroupns -d 'Cgroup namespace mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s d -l detach -d 'Detached mode: run the container in the background and print the new container ID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list (e.g. --device-cgroup-rule="c 13:37 rwm")'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l expose -d 'Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to run as'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l ipc -d 'Default is to create a private IPC namespace (POSIX SysV IPC) for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l link -d 'Add link to another container in the form of <name|id>:alias'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s m -l memory -d 'Memory limit (format: <number>[<unit>], where unit = b, k, m or g)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l memory-swap -d "Total memory usage (memory + swap), set '-1' to disable swap (format: <number>[<unit>], where unit = b, k, m or g)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l net -d 'Set the Network mode for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s P -l publish-all -d 'Publish all exposed ports to random ports on the host interfaces'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s p -l publish -d "Publish a container's port to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l pid -d 'Default is to create a private PID namespace for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l restart -d 'Restart policy to apply when a container exits (no, on-failure[:max-retry], always)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l rm -d 'Automatically remove the container when it exits (incompatible with -d)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l sig-proxy -d 'Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l stop-signal -d 'Signal to kill a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l tmpfs -d 'Mount tmpfs on a directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_images)' -d "Image"
# save
complete -c docker -f -n '__fish_docker_no_subcommand' -a save -d 'Save an image to a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -s o -l output -d 'Write to an file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -a '(__fish_print_docker_images)' -d "Image"
# search
complete -c docker -f -n '__fish_docker_no_subcommand' -a search -d 'Search for an image on the registry (defaults to the Docker Hub)'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l automated -d 'Only show automated builds'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -s s -l stars -d 'Only displays with at least x stars'
# start
complete -c docker -f -n '__fish_docker_no_subcommand' -a start -d 'Start a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s a -l attach -d "Attach container's STDOUT and STDERR and forward all signals to the process"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s i -l interactive -d "Attach container's STDIN"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -a '(__fish_print_docker_containers stopped)' -d "Container"
# stats
complete -c docker -f -n '__fish_docker_no_subcommand' -a stats -d "Display a live stream of one or more containers' resource usage statistics"
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l no-stream -d 'Disable streaming stats and only pull the first result'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -a '(__fish_print_docker_containers running)' -d "Container"
# stop
complete -c docker -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -s t -l time -d 'Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_containers running)' -d "Container"
# tag
complete -c docker -f -n '__fish_docker_no_subcommand' -a tag -d 'Tag an image into a repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -s f -l force -d 'Force'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -l help -d 'Print usage'
# top
complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Lookup the running processes of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container"
#trust
complete -c docker -f -n '__fish_docker_no_subcommand' -a trust -d 'Manage trust on Docker images'
complete -c docker -A -f -n '__fish_seen_subcommand_from trust' -l help -d 'Print usage'
#trust inspect
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a inspect -d 'Return low-level information about keys and signatures'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust inspect' -l pretty -d 'Print the information in a human friendly format'
#trust key
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a key -d 'Manage keys for signing Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a generate -d 'Generate and load a signing key-pair'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l dir -d 'Directory to generate key in, defaults to current directory'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a load -d 'Load a private key file for signing'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l name -d 'Name for the loaded key (default "signer")'
#trust revoke
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a revoke -d 'Remove trust for an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust revoke' -s y -l yes -d 'Do not prompt for confirmation'
#trust sign
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a sign -d 'Sign an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust sign' -l local -d 'Sign a locally tagged image'
#trust signer
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a signer -d 'Manage entities who can sign Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a add -d 'Add a signer'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a remove -d 'remove a signer'
# unpause
complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause a paused container'
complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container"
# version
complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -l help -d 'Print usage'
# wait
complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -a '(__fish_print_docker_containers running)' -d "Container"
+3 -7
View File
@@ -15,20 +15,16 @@ complete -f -c exercism -n "__fish_seen_subcommand_from download" -s u -l uuid -
# Help # Help
complete -f -c exercism -n "__fish_use_subcommand" -a "help" -d "Shows a list of commands or help for one command" complete -f -c exercism -n "__fish_use_subcommand" -a "help" -d "Shows a list of commands or help for one command"
complete -f -c exercism -n "__fish_seen_subcommand_from help" -a "configure download help open submit test troubleshoot upgrade version workspace" complete -f -c exercism -n "__fish_seen_subcommand_from help" -a "configure download help open submit troubleshoot upgrade version workspace"
# Open # Open
complete -f -c exercism -n "__fish_use_subcommand" -a "open" -d "Opens a browser to exercism.org for the specified submission." complete -f -c exercism -n "__fish_use_subcommand" -a "open" -d "Opens a browser to exercism.io for the specified submission."
complete -f -c exercism -n "__fish_seen_subcommand_from open" -s h -l help -d "help for open" complete -f -c exercism -n "__fish_seen_subcommand_from open" -s h -l help -d "help for open"
# Submit # Submit
complete -f -c exercism -n "__fish_use_subcommand" -a "submit" -d "Submits a new iteration to a problem on exercism.org." complete -f -c exercism -n "__fish_use_subcommand" -a "submit" -d "Submits a new iteration to a problem on exercism.io."
complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for submit" complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for submit"
# Test
complete -f -c exercism -n "__fish_use_subcommand" -a "test" -d "Run the exercise's tests."
complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for test"
# Troubleshoot # Troubleshoot
complete -f -c exercism -n "__fish_use_subcommand" -a "troubleshoot" -d "Outputs useful debug information." complete -f -c exercism -n "__fish_use_subcommand" -a "troubleshoot" -d "Outputs useful debug information."
complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s f -l full-api-key -d "display full API key (censored by default)" complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s f -l full-api-key -d "display full API key (censored by default)"
+3 -13
View File
@@ -1,3 +1,6 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
set -gx XDG_CONFIG_HOME /home/joe/.config set -gx XDG_CONFIG_HOME /home/joe/.config
set -gx XDG_DATA_HOME /home/joe/.local/share set -gx XDG_DATA_HOME /home/joe/.local/share
set -gx XDG_CACHE_HOME /home/joe/.cache set -gx XDG_CACHE_HOME /home/joe/.cache
@@ -70,16 +73,3 @@ function fish_prompt --description 'Write out the prompt; do not replace this. I
printf "%b" (string join " \n" (vterm_old_fish_prompt)) printf "%b" (string join " \n" (vterm_old_fish_prompt))
vterm_prompt_end vterm_prompt_end
end end
fish_ssh_agent
# The next line updates PATH for the Google Cloud SDK.
# if [ -f '/home/joe/Downloads/google-cloud-sdk/path.fish.inc' ]; . '/home/joe/Downloads/google-cloud-sdk/path.fish.inc'; end
# opam configuration
# source /home/joe/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
if test -e "/home/joe/Repositories/emsdk/emsdk_env.fish"
source "/home/joe/Repositories/emsdk/emsdk_env.fish"
set -gx EMSDK_QUIET 1
end
alias claude="/home/joe/.claude/local/claude"
+2 -1
View File
@@ -1 +1,2 @@
ankitsumitg/docker-fish-completions jorgebucaran/fisher
sei40kr/fish-ranger-cd
+3 -11
View File
@@ -1,23 +1,15 @@
# This file contains fish universal variable definitions. # This file contains fish universal variable definitions.
# VERSION: 3.0 # VERSION: 3.0
SETUVAR --export ANDROID_AVD_HOME:/home/joe/\x2econfig/\x2eandroid/avd
SETUVAR --export ANDROID_HOME:/home/joe/Android/Sdk/
SETUVAR --export CARGO_HOME:/home/joe/\x2elocal/share/bin/cargo/ SETUVAR --export CARGO_HOME:/home/joe/\x2elocal/share/bin/cargo/
SETUVAR EDITOR:hx SETUVAR EDITOR:hx
SETUVAR --export LC_COLLATE:C SETUVAR --export LC_COLLATE:C
SETUVAR --export --path LD_LIBRARY_PATH:/usr/local/lib SETUVAR --export --path LD_LIBRARY_PATH:/usr/local/lib
SETUVAR --export NDK_HOME:/home/joe/Android/Sdk/ndk/29\x2e0\x2e13599879/
SETUVAR --export PYENV_ROOT:/home/joe/\x2epyenv
SETUVAR --export PYTHONSTARTUP:/etc/python/pythonrc SETUVAR --export PYTHONSTARTUP:/etc/python/pythonrc
SETUVAR --export RUSTUP_HOME:/home/joe/\x2elocal/share/rustup/ SETUVAR --export RUSTUP_HOME:/home/joe/\x2elocal/share/rustup/
SETUVAR SSH_AUTH_SOCK:/run/user/1000/ssh\x2dagent\x2esocket
SETUVAR WINEPREFIX:/home/joe/\x2elocal/share/wine
SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache
SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig
SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share
SETUVAR __fish_initialized:3800 SETUVAR __fish_initialized:3400
SETUVAR _fisher_ankitsumitg_2F_docker_2D_fish_2D_completions_files:/home/joe/\x2econfig/fish/completions/docker\x2efish
SETUVAR _fisher_plugins:ankitsumitg/docker\x2dfish\x2dcompletions
SETUVAR fish_color_autosuggestion:969896 SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:b294bb SETUVAR fish_color_command:b294bb
@@ -36,7 +28,7 @@ SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:81a2be SETUVAR fish_color_param:81a2be
SETUVAR fish_color_quote:b5bd68 SETUVAR fish_color_quote:b5bd68
SETUVAR fish_color_redirection:8abeb7 SETUVAR fish_color_redirection:8abeb7
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen SETUVAR fish_color_user:brgreen
@@ -48,4 +40,4 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR --export fish_user_paths:/opt/Defold\x1e/home/joe/\x2edotnet\x1e/home/joe/\x2elocal/share/qlot/bin\x1e/home/joe/\x2elocal/bin/elm\x1e/home/joe/\x2epyenv/bin\x1e/home/joe/Android/Sdk/build\x2dtools\x1e/home/joe/Android/Sdk/emulator\x1e/home/joe/Android/Sdk/cmdline\x2dtools/latest/bin\x1e/home/joe/\x2elocal/android\x2dstudio/bin\x1e/home/joe/\x2edotnet/tools\x1e/home/joe/Repositories/emsdk\x1e/home/joe/Repositories/emsdk/node/18\x2e20\x2e3_64bit/bin\x1e/home/joe/Repositories/emsdk/upstream/emscripten\x1e/home/joe/\x2elocal/bin/odin\x1e/home/joe/\x2elocal/scripts\x1e/home/joe/\x2elocal/opt/JetBrains\x20Rider\x2d2024\x2e1\x2e4/bin\x1e/home/joe/\x2elocal/share/bin/fasm\x1e/home/joe/\x2elocal/share/bin/zig\x1e/home/joe/\x2elocal/share/bin/cargo/bin\x1e/home/joe/\x2elocal/bin\x1e/home/joe/\x2enimble/bin SETUVAR fish_user_paths:/home/joe/\x2elocal/bin/elm\x1e/home/joe/\x2elocal/share/bin/cargo/bin\x1e\x1e/home/joe/\x2elocal/bin
@@ -1,32 +0,0 @@
function __ssh_agent_is_started -d "check if ssh agent is already started"
if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end
source $SSH_ENV > /dev/null
end
if test -z "$SSH_AGENT_PID"
return 1
end
ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent
#pgrep ssh-agent
return $status
end
function __ssh_agent_start -d "start a new ssh agent"
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
chmod 600 $SSH_ENV
source $SSH_ENV > /dev/null
true # suppress errors from setenv, i.e. set -gx
end
function fish_ssh_agent --description "Start ssh-agent if not started yet, or uses already started ssh-agent."
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if not __ssh_agent_is_started
__ssh_agent_start
end
end
+3
View File
@@ -0,0 +1,3 @@
function unity --wraps='env GDK_SCALE=2 /home/joe/Documents/Unity/2022.3.7f1/Editor/Unity -projectPath' --description 'alias unity env GDK_SCALE=2 /home/joe/Documents/Unity/2022.3.7f1/Editor/Unity -projectPath'
env GDK_SCALE=2 /home/joe/Documents/Unity/2022.3.7f1/Editor/Unity -projectPath $argv
end
-3
View File
@@ -1,3 +0,0 @@
function vim --wraps=nvim --description 'alias vim nvim'
nvim $argv
end
-5
View File
@@ -16,8 +16,3 @@
cmd = kitty +kitten diff $LOCAL $REMOTE cmd = kitty +kitten diff $LOCAL $REMOTE
[difftool "kitty.gui"] [difftool "kitty.gui"]
cmd = kitty kitty +kitten diff $LOCAL $REMOTE cmd = kitty kitty +kitten diff $LOCAL $REMOTE
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
+18 -37
View File
@@ -11,7 +11,7 @@ hc emit_hook reload
xsetroot -solid '#5A8E3A' xsetroot -solid '#5A8E3A'
emacs --daemon emacs --daemon
# picom -b -c picom -b -c
polybar & polybar &
feh --no-fehbg --bg-center ~/.cache/randomwallpaper@iflow.space/wallpapers/wallpaper.png feh --no-fehbg --bg-center ~/.cache/randomwallpaper@iflow.space/wallpapers/wallpaper.png
pcloud & pcloud &
@@ -41,10 +41,10 @@ hc keybind $Mod-Left focus left
hc keybind $Mod-Down focus down hc keybind $Mod-Down focus down
hc keybind $Mod-Up focus up hc keybind $Mod-Up focus up
hc keybind $Mod-Right focus right hc keybind $Mod-Right focus right
hc keybind $Mod-h cycle_all -1 hc keybind $Mod-h focus left
hc keybind $Mod-j focus --levels=frame down hc keybind $Mod-j focus down
hc keybind $Mod-k focus --levels=frame up hc keybind $Mod-k focus up
hc keybind $Mod-l cycle_all +1 hc keybind $Mod-l focus right
# moving clients in tiling and floating mode # moving clients in tiling and floating mode
hc keybind $Mod-Shift-Left shift -e left hc keybind $Mod-Shift-Left shift -e left
@@ -64,15 +64,15 @@ hc keybind $Mod-o split right 0.5
hc keybind $Mod-Control-space split explode hc keybind $Mod-Control-space split explode
# resizing frames and floating clients # resizing frames and floating clients
resizestep=0.2 resizestep=0.02
hc keybind $Mod-Control-h resize left +$resizestep hc keybind $Mod-Control-h resize left +$resizestep
hc keybind $Mod-Control-j resize down +$resizestep hc keybind $Mod-Control-j resize down +$resizestep
hc keybind $Mod-Control-k resize up +$resizestep hc keybind $Mod-Control-k resize up +$resizestep
hc keybind $Mod-Control-l resize right +$resizestep hc keybind $Mod-Control-l resize right +$resizestep
hc keybind $Mod-Control-Left resize left -$resizestep hc keybind $Mod-Control-Left resize left +$resizestep
hc keybind $Mod-Control-Down resize down -$resizestep hc keybind $Mod-Control-Down resize down +$resizestep
hc keybind $Mod-Control-Up resize up -$resizestep hc keybind $Mod-Control-Up resize up +$resizestep
hc keybind $Mod-Control-Right resize right -$resizestep hc keybind $Mod-Control-Right resize right +$resizestep
# tags # tags
tag_names=( {1..9} ) tag_names=( {1..9} )
@@ -85,16 +85,9 @@ for i in "${!tag_names[@]}" ; do
if [ -n "$key" ] ; then if [ -n "$key" ] ; then
hc keybind "$Mod-$key" use_index "$i" hc keybind "$Mod-$key" use_index "$i"
hc keybind "$Mod-Shift-$key" move_index "$i" hc keybind "$Mod-Shift-$key" move_index "$i"
hc keybind "$Mod-Ctrl-$key" chain , move_index "$i" , use_index "$i"
hc keybind "$Mod-Ctrl-Shift-$key" chain , move_index "$i" , use_index "$i"
fi fi
done done
for monitor in $(hc list_clients | cut -d: -f1) ; do
# start it on each monitor
"$panel" "$monitor" &
done
# cycle through tags # cycle through tags
hc keybind $Mod-period use_index +1 --skip-visible hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma use_index -1 --skip-visible hc keybind $Mod-comma use_index -1 --skip-visible
@@ -102,7 +95,6 @@ hc keybind $Mod-comma use_index -1 --skip-visible
# layouting # layouting
hc keybind $Mod-r remove hc keybind $Mod-r remove
hc keybind $Mod-s floating toggle hc keybind $Mod-s floating toggle
hc keybind $Mod-c spawn center_window.sh
hc keybind $Mod-f fullscreen toggle hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle
hc keybind $Mod-Shift-d set_attr clients.focus.decorated toggle hc keybind $Mod-Shift-d set_attr clients.focus.decorated toggle
@@ -165,15 +157,15 @@ hc set frame_border_width 1
hc set show_frame_decorations 'focused_if_multiple' hc set show_frame_decorations 'focused_if_multiple'
hc set frame_bg_transparent on hc set frame_bg_transparent on
hc set frame_transparent_width 5 hc set frame_transparent_width 5
hc set frame_gap 0 hc set frame_gap 40
hc set tabbed_max true hc set tabbed_max true
hc attr theme.title_height 13 hc attr theme.title_height 20
hc attr theme.title_when one_tab hc attr theme.title_when one_tab
hc attr theme.title_align center hc attr theme.title_align center
hc attr theme.title_font 'Jetbrains Mono Nerd Font:pixelsize=12' # example using Xft hc attr theme.title_font 'Liberation:pixelsize=15' # example using Xft
# hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' # hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
hc attr theme.title_depth 8 # space below the title's baseline hc attr theme.title_depth 9 # space below the title's baseline
hc attr theme.active.color '#345F0Cef' hc attr theme.active.color '#345F0Cef'
hc attr theme.title_color '#ffffff' hc attr theme.title_color '#ffffff'
hc attr theme.normal.color '#323232dd' hc attr theme.normal.color '#323232dd'
@@ -185,7 +177,7 @@ hc attr theme.active.tab_title_color '#ababab'
hc attr theme.normal.title_color '#898989' hc attr theme.normal.title_color '#898989'
hc attr theme.inner_width 5 hc attr theme.inner_width 5
hc attr theme.inner_color black hc attr theme.inner_color black
hc attr theme.border_width 3 hc attr theme.border_width 5
hc attr theme.floating.border_width 4 hc attr theme.floating.border_width 4
hc attr theme.floating.outer_width 1 hc attr theme.floating.outer_width 1
hc attr theme.floating.outer_color black hc attr theme.floating.outer_color black
@@ -200,7 +192,7 @@ done
hc attr theme.tiling.outer_width 1 hc attr theme.tiling.outer_width 1
hc attr theme.background_color '#141414' hc attr theme.background_color '#141414'
hc set window_gap 0 hc set window_gap 30
hc set frame_padding 0 hc set frame_padding 0
hc set smart_window_surroundings off hc set smart_window_surroundings off
hc set smart_frame_surroundings on hc set smart_frame_surroundings on
@@ -216,7 +208,6 @@ hc rule floatplacement=center
#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule instance='Godot_Engine' floating=on
hc rule title~'emacs-run-.*' floating=on floatplacement=center hc rule title~'emacs-run-.*' floating=on floatplacement=center
hc rule title~'^Glut.*' floating=on floatplacement=center hc rule title~'^Glut.*' floating=on floatplacement=center
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
@@ -231,9 +222,6 @@ hc unlock
# hc set_monitors 1280x1024+0+0 1280x1024+1280+0 # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
# or simply: # or simply:
# hc detect_monitors # hc detect_monitors
horgap=15
# hc pad 0 40 $horgap 15 $horgap
# find the panel # find the panel
panel=~/.config/herbstluftwm/panel.sh panel=~/.config/herbstluftwm/panel.sh
@@ -243,14 +231,7 @@ for monitor in $(hc list_monitors | cut -d: -f1) ; do
"$panel" "$monitor" & "$panel" "$monitor" &
done done
hc keybind $Mod-Ctrl-1 spawn herbstclient load "$(cat ~/.cache/1.hlwm)"
hc keybind $Mod-Ctrl-2 spawn herbstclient load "$(cat ~/.cache/2.hlwm)"
hc keybind $Mod-Ctrl-3 spawn herbstclient load "$(cat ~/.cache/3.hlwm)"
hc keybind $Mod-Ctrl-4 spawn herbstclient load "$(cat ~/.cache/4.hlwm)"
tag1=$(cat ~/.cache/1.hlwm) tag1=$(cat ~/.cache/1.hlwm)
tag2=$(cat ~/.cache/2.hlwm) tag2=$(cat ~/.cache/2.hlwm)
# hc load 1 "$tag1" hc load 1 "$tag1"
# hc load 2 "$tag2" hc load 2 "$tag2"
# hc load 3 "$tag2"
-136
View File
@@ -1,136 +0,0 @@
let mapleader = " "
set so=3
set incsearch
set clipboard+=unnamed
set number
set relativenumber
"" set idearefactormode=visual
set idearefactormode=visual
set ignorecase
set commentary
set highlightedyank
set NERDTree
set ideajoin
set surround
set multiple-cursors
" TODO Find bindings for these
" map <Leader>rc :action ChooseRcnConfiguration<CR>
" map ;b :action ToggleLineBreakpoint<CR>
" map ;e :action EvaluateExpression<CR>
" map ;d :action Debug<CR>
" map ;r :action Resume<CR>
" map ;s :action StepInto<CR>
" map ;n :action StepOver<CR>
" nmap :action<Up><CR> **** Repeat last command
" Find out about VCS tool
" We need to get good bindings for window navigation
" IDE has nice search behavior, consider adding these
" map / :action Find<CR>
" map n :action FindNext<CR>
" map N :action FindPrevious<CR>
" vnoremap n :action FindNext<CR>
" vnoremap N :action FindPrevious<CR>
" map * :action FindWordAtCaret<CR>
" map # :action FindWordAtCaret<CR>
map <Leader>rl <Action>(IdeaVim.ReloadVimRc.reload)
map ' `
map Y y$
map $ g_
map vv ^vg_
vnoremap < <gv
vnoremap > >gv
map gt <Action>(GotoTypeDeclaration)
map <Leader>f <Action>(FindInPath)
map <C-=> <Action>(EditorIncreaseFontSize)
map <C--> <Action>(EditorDecreaseFontSize)
map <C-0> <Action>(EditorResetFontSize)
map ) <Action>(MethodDown)
map ( <Action>(MethodUp)
map \ q
map q <Action>(KJumpAction.Word0)
map <Leader>i :e ~/.config/ideavim/ideavimrc<CR>
map <C-p>p <Action>(SearchEverywhere)
map <C-p>c <Action>(GotoClass)
map <C-p>s <Action>(FileStructurePopup)
map <C-p>f <Action>(GotoFile)
map <C-p>r <Action>(RecentFiles)
map <A-x> <Action>(GotoAction)
" map <C-p>u <Action>(GotoTest)
map zd <Action>(CollapseDocComments)
map zD <Action>(ExpandDocComments)
map <C-w>H <Action>(MoveEditorToOppositeTabGroup)
map <C-w>L <Action>(MoveEditorToOppositeTabGroup)
noremap <C-e> 2<C-e>
noremap <C-y> 2<C-y>
map <Leader>h <Action>(HideAllWindows)
map <Leader>q <Action>(CloseContent)
" map <Leader>t <Action>(QuickImplementations)
map <Leader>d <Action>(QuickJavaDoc)
map <Leader>e <Action>(ShowErrorDescription)
map <Leader>u <Action>(FindUsages)
map <Leader>rn <Action>(RenameElement)
map <Leader>c <Action>(ChangeColorScheme)
map <Leader>bb <Action>(BuildCurrentProject)
map <Leader>br <Action>(Run)
map <Leader>bc <Action>(RunClass)
map <Leader>bd <Action>(Debug)
map <Leader>bs <Action>(BuildSolutionAction)
map <Leader>; :actionlist<Space>
map <Leader>th <Action>(ToggleInlayHintsGloballyAction)
map <Leader>td <Action>(ToggleDistractionFreeMode)
map <Leader>w <Action>(SaveDocument)
map <Leader>or <Action>(ManageRecentProjects)
" noremap - <Action>(LocateInSolutionView)
noremap - :action SelectInProjectView<CR>
map = <Action>(ReformatCode)
" vnoremap = <Action>(ReformatCode)
map <Leader>/ :nohlsearch<CR>
map g/ <Action>(Find)
map g; <Action>(JumpToLastChange)
map g, <Action>(JumpToNextChange)
map <A-1> <Action>(GoToTab1)
map <A-2> <Action>(GoToTab2)
map <A-3> <Action>(GoToTab3)
map <A-4> <Action>(GoToTab4)
map <A-5> <Action>(GoToTab5)
map <A-6> <Action>(GoToTab6)
map <A-7> <Action>(GoToTab7)
map <A-8> <Action>(GoToTab8)
map <A-9> <Action>(GoToTab9)
map <C-S-j> <Action>(MoveLineDown)
map <C-S-k> <Action>(MoveLineUp)
map <C-h> <c-w>h
map <C-l> <c-w>l
map <C-j> <c-w>j
map <C-k> <c-w>k
map <C-S-s> <Action>(SurroundWithLiveTemplate)
map <A-j> <Action>(EditorCloneCaretBelow)
map <A-k> <Action>(EditorCloneCaretAbove)
map <A-;> A;<Esc>
map <A-,> A,<Esc>
imap <A-;> <Esc>A;<Esc>
map <A-e> <Action>(GotoNextError)
map <S-A-e> <Action>(GotoPreviousError)
map <A-o> moo<Esc>'o
map <A-S-o> moO<Esc>'o
map <S-A-h> <Action>(ParameterNameHints)
map <C-A-e> <Action>(Tool_External Tools_Emacs)
+9 -1
View File
@@ -1,14 +1,22 @@
[ids] [ids]
* *
[global] [global]
overload_tap_timeout = 250 overload_tap_timeout = 250
[main] [main]
esc = capslock esc = capslock
capslock = overload(control, esc) capslock = overload(control, esc)
rightalt = layer(rightalt)
rightcontrol = overload(hyper, rightcontrol)
leftcontrol = overload(hyper, leftcontrol)
[altgr] [hyper:C-M-S-A]
[rightalt:G]
h = left h = left
j = down j = down
k = up k = up
+1 -2
View File
@@ -56,8 +56,7 @@ map kitty_mod+j neighboring_window down
map kitty_mod+k neighboring_window up map kitty_mod+k neighboring_window up
map kitty_mod+l neighboring_window right map kitty_mod+l neighboring_window right
map alt+y paste_from_clipboard map ctrl+y paste_from_clipboard
map alt+c copy_to_clipboard
map kitty_mod+p previous_tab map kitty_mod+p previous_tab
map kitty_mod+n next_tab map kitty_mod+n next_tab
+26 -74
View File
@@ -13,45 +13,21 @@ Subfolders Verbatim
Path ~/.mail/ferano.io/ Path ~/.mail/ferano.io/
Inbox ~/.mail/ferano.io/Inbox Inbox ~/.mail/ferano.io/Inbox
Channel ferano.io-inbox Channel ferano.io
Far :ferano.io.remote:INBOX Far :ferano.io.remote:
Near :ferano.io.local:INBOX Near :ferano.io.local:
# Include everything
Patterns *
Sync All Sync All
Create Both Create Both
Remove Both Remove Both
Expunge Both Expunge Both
SyncState * SyncState *
Channel ferano.io-drafts Channel ferano.io.inbox
Far :ferano.io.remote:Drafts Far :ferano.io.remote:
Near :ferano.io.local:Drafts Near :ferano.io.local:
Sync All Patterns INBOX
Create Both
Remove Both
Expunge Both
SyncState *
Channel ferano.io-sent
Far :ferano.io.remote:Sent
Near :ferano.io.local:Sent
Sync All
Create Both
Remove Both
Expunge Both
SyncState *
Channel ferano.io-junk
Far :ferano.io.remote:Junk
Near :ferano.io.local:Junk
Sync All
Create Both
Remove Both
Expunge Both
SyncState *
Channel ferano.io-trash
Far :ferano.io.remote:Trash
Near :ferano.io.local:Trash
Sync All Sync All
Create Both Create Both
Remove Both Remove Both
@@ -69,66 +45,42 @@ Account gmail
MaildirStore gmail.local MaildirStore gmail.local
Subfolders Verbatim Subfolders Verbatim
# The trailing "/" is important
Path ~/.mail/gmail/ Path ~/.mail/gmail/
Inbox ~/.mail/gmail/INBOX Inbox ~/.mail/gmail/Inbox
Channel gmail-inbox Channel gmail
Far :gmail.remote:INBOX Far :gmail.remote:
Near :gmail.local:INBOX Near :gmail.local:
# Include everything
Patterns *
Sync All Sync All
Create Both Create Both
Remove Both Remove Both
Expunge Both Expunge Both
SyncState * SyncState *
Channel gmail-drafts Channel gmail.inbox
Far :gmail.remote:"[Gmail]/Drafts" Far :gmail.remote:
Near :gmail.local:"[Gmail]/Drafts" Near :gmail.local:
Patterns INBOX
Sync All Sync All
Create Both Create Both
Remove Both Remove Both
Expunge Both Expunge Both
SyncState * SyncState *
Channel gmail-sent Channel gmail.allmail
Far :gmail.remote:"[Gmail]/Sent Mail" Far :gmail.remote:
Near :gmail.local:"[Gmail]/Sent Mail" Near :gmail.local:
Patterns *All*
Sync All Sync All
Create Both Create Both
Remove Both Remove Both
Expunge Both Expunge Both
SyncState * SyncState *
Channel gmail-trash
Far :gmail.remote:"[Gmail]/Trash"
Near :gmail.local:"[Gmail]/Trash"
Sync All
Create Both
Remove Both
Expunge Both
SyncState *
Group ferano.io
Channel ferano.io-inbox
Channel ferano.io-drafts
Channel ferano.io-sent
Channel ferano.io-junk
Channel ferano.io-trash
Group gmail
Channel gmail-inbox
Channel gmail-drafts
Channel gmail-sent
Channel gmail-trash
Group all Group all
Channel ferano.io-inbox Channel ferano.io
Channel ferano.io-drafts Channel gmail
Channel ferano.io-sent
Channel ferano.io-junk
Channel ferano.io-trash
Channel gmail-inbox
Channel gmail-drafts
Channel gmail-sent
Channel gmail-trash
+10 -12
View File
@@ -8,7 +8,7 @@
# unless explicitly requested using the wintypes option. # unless explicitly requested using the wintypes option.
# #
# shadow = false # shadow = false
shadow = false; shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12) # The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12 # shadow-radius = 12
@@ -69,21 +69,19 @@ shadow-exclude = [
# Fading # # Fading #
################################# #################################
fading = true; # Fade windows during opacity changes
fade-delta = 30; # The time between steps in a fade in milliseconds
fade-in-step = 1.0; # Opacity change between steps while fading in
fade-out-step = 1.0; # Opacity change between steps while fading out
# Fade windows in/out when opening/closing and when opacity changes, # Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used. # unless no-fading-openclose is used.
# fading = false # fading = false
# fading = false; fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028 # fade-in-step = 0.028
# fade-in-step = 0.08; fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03 # fade-out-step = 0.03
# fade-out-step = 0.08; fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) # The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10 # fade-delta = 10
@@ -105,11 +103,11 @@ fade-out-step = 1.0; # Opacity change between steps while fading out
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1 # inactive-opacity = 1
inactive-opacity = 1.0; inactive-opacity = 0.8;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0 # frame-opacity = 1.0
frame-opacity = 1.0; frame-opacity = 0.7;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. # Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true # inactive-opacity-override = true
@@ -256,7 +254,7 @@ detect-client-opacity = true;
# to maximize performance for full-screen windows. Known to cause flickering # to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. # when redirecting/unredirecting windows.
# #
unredir-if-possible = false # unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0 # unredir-if-possible-delay = 0
@@ -321,7 +319,7 @@ use-damage = true;
# calls are finished before picom starts drawing. Needed on nvidia-drivers # calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users. # with GLX backend for some users.
# #
xrender-sync-fence = true # xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window # GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface. # contents. Read the man page for a detailed explanation of the interface.
+5 -7
View File
@@ -29,23 +29,21 @@ disabled = #707880
[bar/example] [bar/example]
width = 100% width = 100%
height = 16pt height = 20pt
radius = 6 radius = 6
bottom = true
margin-top = 0
; dpi = 96 ; dpi = 96
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 1pt line-size = 3pt
border-size = 0pt border-size = 7pt
border-color = #00000000 border-color = #00000000
padding-left = 0 padding-left = 0
padding-right = 0 padding-right = 1
module-margin = 1 module-margin = 1
@@ -54,7 +52,7 @@ separator-foreground = ${colors.disabled}
; font-0 = BigBlueTermPlus Nerd Font:style=Regular:size=14;4 ; font-0 = BigBlueTermPlus Nerd Font:style=Regular:size=14;4
; font-0 = Inconsolata LGC Nerd Font:style=Regular:size=14;4 ; font-0 = Inconsolata LGC Nerd Font:style=Regular:size=14;4
font-0 = JetBrainsMono Nerd Font:style=Regular:size=10;4 font-0 = JetBrainsMono Nerd Font;2
modules-left = xworkspaces xwindow modules-left = xworkspaces xwindow
modules-right = pulseaudio xkeyboard bt filesystem memory cpu wlan date modules-right = pulseaudio xkeyboard bt filesystem memory cpu wlan date
-4
View File
@@ -1,4 +0,0 @@
#! /usr/bin/bash
xset r rate 270 60
setxkbmap -layout us -variant altgr-intl
picom -b
-456
View File
@@ -1,456 +0,0 @@
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import os
import socket
import subprocess
import re
import random
from datetime import datetime
from Xlib import display as xdisplay
from typing import Callable
from libqtile import bar, layout, widget
from libqtile.widget import Chord
from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from libqtile.log_utils import logger
from libqtile import hook
@hook.subscribe.startup_once
def autostart():
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.Popen([home])
mod = "mod4"
alt = "mod1"
terminal = "kitty"
kbd_lights = ["off", "low", "med", "high"]
current_kbd_light = [0]
current_language = ["en"]
def kbd_brightness_up(qtile):
idx = current_kbd_light[0]
current_kbd_light[0] = min(len(kbd_lights) - 1, idx+1)
value = kbd_lights[current_kbd_light[0]]
qtile.spawn(f"asusctl -k {value}")
def kbd_brightness_down(qtile):
idx = current_kbd_light[0]
current_kbd_light[0] = max(0, idx-1)
value = kbd_lights[current_kbd_light[0]]
qtile.spawn(f"asusctl -k {value}")
def toggle_language(qtile):
if current_language[0] == "en":
qtile.spawn("setxkbmap -layout th")
current_language[0] = "th"
else:
qtile.spawn("setxkbmap -layout us -variant altgr-intl")
current_language[0] = "en"
def get_current_window_info(qtile):
logger.warning(qtile.current_window.info())
@hook.subscribe.client_new
def new_client(client):
if "Unity" in client.get_wm_class() and "Unity" == client.name:
padding = 10
x = client.group.screen.width - client.width - padding
y = client.group.screen.height - client.height - padding - 22
client.set_position_floating(x,y)
def move_to_corner(corner: str) -> Callable:
def _inner(qtile) -> None:
win = qtile.current_window
if win is None:
return
if not win.floating:
win.toggle_floating()
screen = qtile.current_screen
padding = 0
bar_height = 24
w = win.width
h = win.height
sw = screen.width
sh = screen.height
positions = {
"top-left": (padding, bar_height + padding),
"top-right": (sw - w - padding, bar_height + padding),
"bottom-left": (padding, sh - h - padding),
"bottom-right": (sw - w - padding, sh - h - padding),
}
x, y = positions[corner]
win.set_position_floating(x, y)
return _inner
keys = [
# A list of available commands that can be bound to keys can be found
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
# Switch between windows
# .when(wm_class != 'kitty')
# Key([mod], "h", lazy.function(move_focus, direction='left'), desc="Move focus to left"),
Key([mod], "h", lazy.layout.left().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
# Key([mod], "j", lazy.layout.down().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
# Key([mod], "k", lazy.layout.up().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
Key([mod], "l", lazy.layout.right().when(focused=Match(wm_class=re.compile('(?![Ee]macs)'))), desc="Move focus to left"),
# Key([alt], "tab", lazy.layout.next(), desc="Move window focus to other window"),
Key([mod], "o", lazy.layout.normalize(), desc="Move window focus to other window"),
Key([alt], "tab", lazy.layout.previous(), desc="Move window focus to other window"),
Key([mod], "tab", lazy.screen.toggle_group(), desc="Toggle Group"),
# Eventually we should switch back to emacs app launcher
Key([mod], "space", lazy.spawn("rofi -show drun -theme Arc-Dark.rasi"), desc="Open Rofi"),
KeyChord([mod], "b", [
Key([], "c", lazy.spawn("connect-bt", shell=True)),
Key([], "d", lazy.spawn("bluetoothctl disconnect F8:5B:6E:2A:6A:CF &>/dev/null",
shell=True)),
Key([], "r", lazy.spawn("bluetoothctl scan on && sleep 1 && bluetoothctl connect F8:5B:6E:2A:6A:CF && sleep 2 && bluetoothctl scan off",
shell=True)),
Key([], "t", lazy.spawn("toggle-bt-codec", shell=True)),
]),
# Move windows between left/right columns or move up/down in current stack.
# Moving out of range in Columns layout will create new column.
Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"),
Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
# Grow windows. If current window is on the edge of screen and direction
# will be to screen edge - window would shrink.
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"),
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
Key([mod, "control"], "u", lazy.spawn("pkill -9 Unity"), desc="Kill Unity"),
Key([mod], "comma", lazy.screen.prev_group(), desc="Move to previous group"),
Key([mod], "period", lazy.screen.next_group(), desc="Move to next group"),
Key([mod, "shift"], "comma", lazy.prev_screen(), desc="Move focus to left screen"),
Key([mod, "shift"], "period", lazy.next_screen(), desc="Move focus to left screen"),
Key([mod], "w", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod, "control"], "w", lazy.function(get_current_window_info), desc="Get window info"),
Key([mod], "s", lazy.spawn("flameshot gui"), desc="Flameshot screenshot"),
Key([mod, "shift"], "s", lazy.spawn("flameshot screen -n 0 -c"), desc="Flameshot screenshot screen to clipboard"),
# TODO: Figure out another binding for this
# Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# Toggle between split and unsplit sides of stack.
# Split = all windows displayed
# Unsplit = 1 window displayed, like Max layout, but still with
# multiple stack panes
Key([mod, "control", "shift"], "l",
lazy.spawn("slock | systemctl suspend", shell=True), desc="Slock and suspend"),
Key(
[mod, "shift"],
"Return",
lazy.layout.toggle_split(),
desc="Toggle between split and unsplit sides of stack",
),
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
# Toggle between different layouts as defined below
Key([mod], "c", lazy.window.center(), desc="Center focused window"),
# Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
Key(
[mod],
"f",
lazy.window.toggle_fullscreen(),
desc="Toggle fullscreen on the focused window",
),
Key([mod], "t", lazy.window.toggle_floating(), desc="Toggle floating on the focused window"),
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "shift"], "r", lazy.spawn("reload_wm.sh"), desc="Kill Unity"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod, alt], "space", lazy.function(toggle_language), desc="Toggle Language Layout"),
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 5%-")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("amixer sset Master 5%+")),
Key([], "XF86Launch1", lazy.spawn("playerctl play-pause")),
Key([], "XF86AudioMicMute", lazy.spawn("playerctl play-pause")),
Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-")),
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +5%")),
# This uses discrete values
Key([], "XF86KbdBrightnessDown", lazy.function(kbd_brightness_down)),
Key([], "XF86KbdBrightnessUp", lazy.function(kbd_brightness_up)),
Key([mod, alt, "control", "shift"], "q", lazy.function(move_to_corner("top-left")), desc="Move float to top-left"),
Key([mod, alt, "control", "shift"], "w", lazy.function(move_to_corner("top-right")), desc="Move float to top-right"),
Key([mod, alt, "control", "shift"], "a", lazy.function(move_to_corner("bottom-left")), desc="Move float to bottom-left"),
Key([mod, alt, "control", "shift"], "s", lazy.function(move_to_corner("bottom-right")), desc="Move float to bottom-right"),
]
pape_dir = '/home/joe/Pictures/Wallpapers/'
papes = [os.path.join(pape_dir, p) for p in os.listdir(pape_dir)]
if papes:
pape = random.choice(papes)
else:
pape = "/usr/share/backgrounds/default.png"
def get_num_monitors():
number_of_monitors = 0
try:
x_display = xdisplay.Display()
resources = x_display.screen().root.xrandr_get_screen_resources()
for output in resources.outputs:
monitor = x_display.xrandr_get_output_info(
output, resources.config_timestamp)
preferred = False
if hasattr(monitor, "preferred"):
preferred = monitor.preferred
elif hasattr(monitor, "num_preferred"):
preferred = monitor.num_preferred
if preferred:
number_of_monitors += 1
except Exception as e:
# always setup at least one monitor
logger.error(e)
return 1
else:
return number_of_monitors
group_box = widget.GroupBox()
current_layout = widget.CurrentLayout()
prompt = widget.Prompt()
window_name = widget.WindowName()
window_name2 = widget.WindowName()
chord = widget.Chord(chords_colors={"launch": ("#ff0000", "#ffffff"),}, name_transform=lambda name: name.upper())
systray = widget.Systray()
battery = widget.Battery() if socket.gethostname() != "puter" else widget.CPU()
clock = widget.Clock(format="%Y-%m-%d %a %I:%M %p")
volume = widget.Volume()
screens = [
Screen(
wallpaper=pape,
wallpaper_mode='fill',
top=bar.Bar([
group_box, current_layout, prompt, window_name,
systray, chord, volume, battery, clock,
],
24,
# border_width=[2, 0, 2, 0], # Draw top and bottom borders
# border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta
),
),
]
groups = [Group(i) for i in "0123456789"]
num_monitors = get_num_monitors()
if num_monitors > 1:
side_screen = Screen(
wallpaper=pape,
wallpaper_mode='fill',
# bottom=bar.Bar(
# [
# # group_box, current_layout, prompt, window_name2, chord, volume, battery,
# ],
# 24,
# # border_width=[2, 0, 2, 0], # Draw top and bottom borders
# # border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta
# ),
)
screens.insert(0, side_screen)
groups[0].screen_affinity = 0
for g in groups[1:]:
g.screen_affinity = 1
groups[0].label = '🎵'
# groups.insert(0, Group('1', screen_affinity=0, label='🎵'))
def go_to_group(name: str) -> Callable:
def _inner(qtile) -> None:
if num_monitors > 1:
if name == '0':
qtile.focus_screen(0)
else:
qtile.focus_screen(1)
qtile.groups_map[name].toscreen()
return _inner
def swap_windows(name: str) -> Callable:
def _inner(qtile) -> None:
other_windows = [*qtile.groups_map[name].windows]
current_windows = [*qtile.current_group.windows]
for win in current_windows:
win.togroup(name)
for win in other_windows:
win.togroup(qtile.current_group.name)
return _inner
for i in groups:
key_name = i.name if i.name != "0" else "grave"
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
key_name,
lazy.function(go_to_group(i.name)),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[mod, "shift"],
key_name,
lazy.window.togroup(i.name, switch_group=False),
desc="Switch to & move focused window to group {}".format(i.name),
),
Key(
[mod, "control"],
key_name,
lazy.function(swap_windows(i.name)),
desc="Swap all windows with windows from N group".format(i.name),
),
# Or, use below if you prefer not to switch to that group.
# # mod1 + shift + letter of group = move focused window to group
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
# desc="move focused window to group {}".format(i.name)),
]
)
# keys.append(Key([mod], 'm', lazy.function(go_to_music), desc="Music"))
layouts = [
layout.Max(),
layout.Columns(
border_focus=["#999999"],
border_width=1
),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.Tile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]
widget_defaults = dict(
font="JetBrains Mono",
fontsize=12,
padding=5,
)
# Drag floating layouts.
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
Click([mod], "Button2", lazy.window.bring_to_front()),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = False
floats_kept_above = True
cursor_warp = False
floating_layout = layout.Floating(
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules,
# This is the youtube music brave thing
Match(wm_class="crx_cinhimbnkkaeohfgghhklpknlkffjgod"),
Match(wm_class="p5py"),
Match(wm_class="pygame"),
Match(wm_class="gnome-calculator"),
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="SimpleScreenRecorder"), # ssh-askpass
# Defold
Match(wm_class="com.defold.editor.Start", func=lambda c: c.is_transient_for()),
Match(wm_class="Tinyswords"),
Match(func=lambda c:
(c.window.get_wm_normal_hints() is not None and
c.window.get_wm_normal_hints().get('flags') == {'PWinGravity'}) and
(c.window.get_wm_class() is not None and
any("defold" in cls.lower() for cls in c.window.get_wm_class()))),
# Godot
Match(title="Alert!"),
Match(title="Please Confirm..."),
Match(title="Create New Node"),
Match(title="Select Frames"),
Match(title="Open a file"),
Match(title="Node Configuration Warning!"),
Match(title="Save Scene As..."),
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
# Unity3D
Match(wm_class="Unity", title="UnityEditor.AddComponent.AddComponentWindow"),
Match(wm_class="Unity", title="UnityEditor.IconSelector"),
Match(wm_class="Unity", title="UnityEditor.PopupWindow"),
Match(wm_class="Unity", title="UnityEditor.PopupWindowWithoutFocus"),
Match(wm_class="Unity", title="UnityEditor.AnnotationWindow"),
Match(wm_class="Unity", title="Enable Android Auto-resolution?"),
Match(wm_class="Unity", title="Select Material"),
Match(wm_class="Unity", title="Select Preset"),
Match(wm_class="Unity", title="Color"),
Match(wm_class="Unity", title="Save Layout"),
Match(wm_class="Unity", title="Sirenix.OdinInspector.Editor.TypeSelectorV2"),
Match(wm_class="Unity", title=re.compile(r"^Sirenix.OdinInspector.Editor.EnumSelector.*")),
# Match(wm_class="Unity", title=re.compile(r"^Select .*")),
]
)
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = True
# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = None
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting
# this string if your java app doesn't work correctly. We may as well just lie
# and say that we're a working one by default.
#
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist.
wmname = "LG3D"
logger.warning('Loaded: ' + str(datetime.now()))
-5
View File
@@ -1,11 +1,6 @@
.config/emacs/* .config/emacs/*
!.config/emacs/init.org !.config/emacs/init.org
!.config/emacs/elisp/
!.config/emacs/snippets
!.config/emacs/elisp/welcome.el
!.config/emacs/Emacs@256.png
/.config/nvim/plugin/ /.config/nvim/plugin/
.config/magit/* .config/magit/*
!.config/magit/init.el !.config/magit/init.el
!.config/magit/early-init.el !.config/magit/early-init.el
__pycache__
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash
BATTERY_LEVEL=$(upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | awk '{print $2}' | sed 's/%//')
AC_POWER=$(cat /sys/class/power_supply/AC0/online)
if [ $AC_POWER -eq 1 ]; then
exit
fi
if [ $BATTERY_LEVEL -le 5 ]; then
notify-send "Low Battery" "Battery level is ${BATTERY_LEVEL}%" -u critical
exit
fi
if [ $BATTERY_LEVEL -le 10 ]; then
notify-send "Low Battery" "Battery level is ${BATTERY_LEVEL}%" -u normal
fi
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
coproc bluetoothctl
echo -e 'agent on\nconnect F8:5B:6E:2A:6A:CF\nexit' >&${COPROC[1]}
-9
View File
@@ -1,9 +0,0 @@
#!/bin/bash
AC_STATE=$(cat /sys/class/power_supply/AC0/online)
if [ "$AC_STATE" -eq 1 ]; then
asusctl profile -P Balanced
else
asusctl profile -P Quiet
fi
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
curr_network=$(nmcli device wifi | rg "^\*" | awk '{print $3}')
if [ -z "$curr_network" ]; then
echo "Looks like we're not connected to any network"
exit 1
fi
path_to_net_conns="/etc/NetworkManager/system-connections"
fullpath="${path_to_net_conns}/${curr_network}.nmconnection"
if [ ! -f "$fullpath" ]; then
echo "Could not find this wifi's Network Manager entry"
exit 1
fi
password=$(sudo cat $fullpath | rg "^psk" | cut -d "=" -f 2)
echo Name: \ \ \ $curr_network
echo Password: $password
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
ldac=`pactl list | grep Active | grep a2dp-sink-sbc`
card=`pactl list | grep "Name: bluez_card." | cut -d ' ' -f 2`
if [ -n "$ldac" ]; then
echo "Switching $card to msbc..."
pactl set-card-profile $card headset-head-unit-msbc
echo "...done"
else
echo "Switching $card to ldac..."
pactl set-card-profile $card a2dp-sink-sbc
echo "...done"
fi
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
# Set mouse buttons for elecom
# 3 = 9 (forward)
# 8 = 3 (right click)
# 9 = 2 (middle click)
# 10 = 8 (back)
dev_id=$(xinput | rg "slave\s+pointer" | rg ELECOM | rg -o "id=(\d+)" -r '$1')
if [ -n "$dev_id" ]; then
xinput set-button-map $dev_id 1 2 9 4 5 6 7 2 3 8
echo "Button mapping applied" >> /tmp/trackball.log
else
echo "No device found" >> /tmp/trackball.log
fi
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
set -e
odin_path="/home/joe/.local/bin/odin"
# git pull
make -j15 release-native
rm -rf $odin_path/core $odin_path/base $odin_path/vendor
cp -r -t $odin_path ./core ./base ./vendor ./odin
-15
View File
@@ -1,15 +0,0 @@
#!/bin/sh
set -e
if [ $# -eq 0 ]; then
echo "Error: Please provide a path to the markdown file"
exit 1
fi
basename="${1##*/}"
basename="${basename%.*}"
echo $basename
TMPFILE=$(mktemp /tmp/XXXXXXXXXX-${basename}.html)
pandoc -f markdown -t html -o "$TMPFILE" "$1" --embed-resources --standalone --css="https://cdn.jsdelivr.net/npm/sakura.css/css/sakura.css"
xdg-open $TMPFILE