From ef7ac8e555c5c1f05ae64c2089d6f890b2ec983b Mon Sep 17 00:00:00 2001 From: Tan Yee Jian Date: Sat, 7 Aug 2021 01:02:08 +0800 Subject: [PATCH] Backup --- alacritty/.config/alacritty/alacritty.yml | 60 +- coc/.config/coc/extensions/db.json | 3 + coc/.config/coc/extensions/package.json | 3 +- coc/.config/coc/memos.json | 1 + cron/.cron/backup-nus.sh | 13 + cron/.cron/backup_nus.sh | 2 - cron/.cron/luminus-download.sh | 4 + cron/.cron/luminus_download.sh | 3 - emacs/.doom.d/config.el | 73 ++- emacs/.doom.d/init.el | 87 +-- emacs/.doom.d/snippets/latex-mode/homework | 43 +- emacs/.doom.d/texput.log | 22 + i3/.config/i3/config | 289 +--------- i3/.config/i3/default_config | 297 ++++++++++ i3/.config/i3/status.toml | 2 +- i3/.config/i3/teaching_config | 297 ++++++++++ install.sh | 10 +- nvim/.config/nvim/coc-settings.json | 5 - ranger/.config/ranger/commands_full.py | 538 +++++++++++------- ranger/.config/ranger/rc.conf | 16 +- ranger/.config/ranger/rifle.conf | 11 +- ranger/.config/ranger/scope.sh | 56 +- vim/.vim/autoload/plug.vim | 14 +- vim/.vim/autoload/plug.vim.old | 11 +- vim/.vim/myvimrc.d/.netrwhist | 3 +- vim/.vim/myvimrc.d/vim_plug.vim | 4 + wallpapers/.config/lockscreen/randomlock.fish | 3 +- .../wallpapers/sylvain-sarrailh-westpeak.jpg | Bin 304887 -> 0 bytes xonsh/.config/xonsh/rc.xsh | 4 + 29 files changed, 1179 insertions(+), 695 deletions(-) create mode 100644 coc/.config/coc/extensions/db.json create mode 100644 coc/.config/coc/memos.json create mode 100755 cron/.cron/backup-nus.sh delete mode 100755 cron/.cron/backup_nus.sh create mode 100755 cron/.cron/luminus-download.sh delete mode 100755 cron/.cron/luminus_download.sh create mode 100644 emacs/.doom.d/texput.log mode change 100644 => 120000 i3/.config/i3/config create mode 100644 i3/.config/i3/default_config create mode 100644 i3/.config/i3/teaching_config delete mode 100644 wallpapers/.config/wallpapers/sylvain-sarrailh-westpeak.jpg create mode 100644 xonsh/.config/xonsh/rc.xsh diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index c2faabc8..d6c30df8 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -77,7 +77,7 @@ env: # # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`. # Set this to `None` to use the default theme variant. - gtk_theme_variant: dark + gtk_theme_variant: light #scrolling: # Maximum number of lines in the scrollback buffer. @@ -282,7 +282,7 @@ font: # # Window opacity as a floating point number from `0.0` to `1.0`. # The value `0.0` is completely transparent and `1.0` is opaque. -#background_opacity: 1.0 +background_opacity: 0.8 #selection: #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" @@ -563,34 +563,34 @@ live_config_reload: true # Print all received window events. #print_events: false -# Colors (Gruvbox dark) -colors: - # Default colors - primary: - # hard contrast: background = '0x1d2021' - background: '0x282828' - # soft contrast: background = '0x32302f' - foreground: '0xebdbb2' - # Normal colors - normal: - black: '0x282828' - red: '0xcc241d' - green: '0x98971a' - yellow: '0xd79921' - blue: '0x458588' - magenta: '0xb16286' - cyan: '0x689d6a' - white: '0xa89984' - # Bright colors - bright: - black: '0x928374' - red: '0xfb4934' - green: '0xb8bb26' - yellow: '0xfabd2f' - blue: '0x83a598' - magenta: '0xd3869b' - cyan: '0x8ec07c' - white: '0xebdbb2' +# # Colors (Gruvbox dark) +# colors: +# # Default colors +# primary: +# # hard contrast: background = '0x1d2021' +# background: '0x282828' +# # soft contrast: background = '0x32302f' +# foreground: '0xebdbb2' +# # Normal colors +# normal: +# black: '0x282828' +# red: '0xcc241d' +# green: '0x98971a' +# yellow: '0xd79921' +# blue: '0x458588' +# magenta: '0xb16286' +# cyan: '0x689d6a' +# white: '0xa89984' +# # Bright colors +# bright: +# black: '0x928374' +# red: '0xfb4934' +# green: '0xb8bb26' +# yellow: '0xfabd2f' +# blue: '0x83a598' +# magenta: '0xd3869b' +# cyan: '0x8ec07c' +# white: '0xebdbb2' # # Colors (Pencil Light) # colors: diff --git a/coc/.config/coc/extensions/db.json b/coc/.config/coc/extensions/db.json new file mode 100644 index 00000000..874863cb --- /dev/null +++ b/coc/.config/coc/extensions/db.json @@ -0,0 +1,3 @@ +{ + "lastUpdate": 1614922854095 +} \ No newline at end of file diff --git a/coc/.config/coc/extensions/package.json b/coc/.config/coc/extensions/package.json index 9fd20080..6db67860 100644 --- a/coc/.config/coc/extensions/package.json +++ b/coc/.config/coc/extensions/package.json @@ -7,7 +7,6 @@ "coc-rust-analyzer": ">=0.32.0", "coc-snippets": ">=2.2.9", "coc-solargraph": ">=1.2.0", - "coc-texlab": ">=2.3.0", - "coc-tsserver": ">=1.6.7" + "coc-texlab": ">=2.3.0" } } \ No newline at end of file diff --git a/coc/.config/coc/memos.json b/coc/.config/coc/memos.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/coc/.config/coc/memos.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/cron/.cron/backup-nus.sh b/cron/.cron/backup-nus.sh new file mode 100755 index 00000000..d4ba55b6 --- /dev/null +++ b/cron/.cron/backup-nus.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -euxo pipefail + +notify-send "Beginning to backup NUS directory." +cd /home/yeejian/nus +git add . +git commit -m "Automated backup" +git push origin main +cd /home/yeejian/nus/nus-notes +git add . +git commit -m "Automated backup" +git push origin master +notify-send "Done backing up NUS directory." diff --git a/cron/.cron/backup_nus.sh b/cron/.cron/backup_nus.sh deleted file mode 100755 index 1d35ed52..00000000 --- a/cron/.cron/backup_nus.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cd /home/titanx/projects/org && git add . && git commit -m "automated update" && git push origin master diff --git a/cron/.cron/luminus-download.sh b/cron/.cron/luminus-download.sh new file mode 100755 index 00000000..2011ed43 --- /dev/null +++ b/cron/.cron/luminus-download.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -euxo pipefail + +fluminurs --download-to=/home/yeejian/nus/ivle/y4s1 --updated=overwrite --credential-file=/home/yeejian/login.json diff --git a/cron/.cron/luminus_download.sh b/cron/.cron/luminus_download.sh deleted file mode 100755 index d03806f6..00000000 --- a/cron/.cron/luminus_download.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -# cd /home/titanx/projects/fluminus_cli && git pull && mix deps.get && mix fluminus --download-to=/home/titanx/nus/ivle/y3s1 -/home/titanx/bin/fluminurs --download-to=/home/titanx/nus/ivle/y3s2 --updated=rename diff --git a/emacs/.doom.d/config.el b/emacs/.doom.d/config.el index ff6ccef0..3cc5d3ec 100644 --- a/emacs/.doom.d/config.el +++ b/emacs/.doom.d/config.el @@ -2,20 +2,21 @@ (setq doom-font (font-spec :family "Iosevka Term" :size 18) doom-unicode-font (font-spec :family "Noto Color Emoji" :size 15) doom-theme 'doom-gruvbox + doom-variable-pitch-font (font-spec :family "Times New Roman" :size 15) user-full-name "Tan Yee Jian" user-mail-address "tanyeejian@gmail.com" ) ;; (custom-set-faces! '(default :height 135)) -(defun yeejian/org-start-work () "Start working on an item in Agenda." - (org-agenda-todo "INPROGRESS") - (org-agenda-clock-in)) +;; (defun yeejian/org-start-work () "Start working on an item in Agenda." +;; (org-agenda-todo "INPROGRESS") +;; (org-agenda-clock-in)) -(defun yeejian/org-stop-work () "Stop working on an item in Agenda." - (org-agenda-todo "WAITING") - (org-agenda-clock-out)) +;; (defun yeejian/org-stop-work () "Stop working on an item in Agenda." +;; (org-agenda-todo "WAITING") +;; (org-agenda-clock-out)) (after! org (map! :map org-mode-map @@ -24,9 +25,9 @@ :n "S-k" #'org-shiftup :n "S-j" #'org-shiftdown ) - (map! :map org-agenda-mode-map - :m "I" #'yeejian/org-start-work - :m "O" #'yeejian/org-stop-work) + ;; (map! :map org-agenda-mode-map + ;; :m "I" #'yeejian/org-start-work + ;; :m "O" #'yeejian/org-stop-work) (setq org-todo-keywords '((sequence "TODO(t)" "INPROGRESS(i)" "WAITING(w)" "|" "DONE(d!)" "CANCELLED(c@)")) org-agenda-files (list "~/Dropbox/org/") org-directory "~/Dropbox/org/" @@ -59,7 +60,7 @@ "\\newtheorem{observation}{Observation}[section]" "\\DeclareMathOperator{\\diam}{diam}" "\\linespread{1.1}") - org-latex-packages-alist '(("" "amsthm" nil) ("" minted nil)) + org-latex-packages-alist '(("" "amsthm" nil) ("" "minted" nil) ("" "hyperref" nil)) bibtex-dialect 'biblatex org-latex-pdf-process '("latexmk -shell-escape -bibtex -pdf %f") org-latex-listings 'minted @@ -68,8 +69,8 @@ ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . "zathura %s")) - org-journal-dir "~/Dropbox/org/journal" - org-roam-directory "~/Dropbox/org/roam" + ;; org-journal-dir "~/Dropbox/org/journal" + ;; org-roam-directory "~/Dropbox/org/roam" org-capture-templates '(("t" "Todo" entry (file "inbox.org") "* TODO %?\n %i\n %a") @@ -124,12 +125,46 @@ ;; (after! latex-preview-pane ;; (setq shell-escape-mode t)) -(add-hook 'c++-mode-hook #'clang-format+-mode) - -(after! proof-general - (map! :mode coq - :n "C-c k" #'proof-undo-last-successful-command - :n "C-c j" #'proof-assert-next-command-interactive - )) +;; (defun compile-latex () +;; "Compile the current file into pdf." +;; (let ((command (concat "pdflatex -synctex 1 -shell-escape " (buffer-file-name)))) +;; (shell-command command) +;; (message (concat "Done compiling " command)) +;; ) +;; ) + + +;; (add-hook 'latex-mode-hook +;; (lambda () +;; (add-hook 'after-save-hook 'compile-latex nil 'make-it-local))) + +;; (add-hook 'c++-mode-hook #'clang-format+-mode) + +;; (after! proof-general +;; (map! :mode coq +;; :n "C-c k" #'proof-undo-last-successful-command +;; :n "C-c j" #'proof-assert-next-command-interactive +;; )) + +;; (after! lsp-mode +;; (lsp-register-client +;; (make-lsp-client +;; :new-connection +;; (lsp-stdio-connection (list "swipl" +;; "-g" "use_module(library(lsp_server))." +;; "-g" "lsp_server:main" +;; "-t" "halt" +;; "--" "stdio")) +;; :major-modes '(prolog-mode) +;; :priority 1 +;; :multi-root t +;; :server-id 'prolog-ls))) + +(after! fstar-mode + (setq fstar-executable "/home/yeejian/Downloads/fstar/bin/fstar.exe") + ) +(after! mixed-pitch-mode + (setq ) + ) (message "Done reloading config.") diff --git a/emacs/.doom.d/init.el b/emacs/.doom.d/init.el index 2390f8d8..c65f1bcf 100644 --- a/emacs/.doom.d/init.el +++ b/emacs/.doom.d/init.el @@ -4,56 +4,58 @@ ;; in. Remember to run 'doom sync' after modifying it! ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find information about all of Doom's -;; modules and what flags they support. +;; documentation. There you'll find a "Module Index" link where you'll find +;; a comprehensive list of Doom's modules and what flags they support. ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or -;; 'C-c g k' for non-vim users) to view its documentation. This works on +;; 'C-c c k' for non-vim users) to view its documentation. This works on ;; flags as well (those symbols that start with a plus). ;; -;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its ;; directory (for easy access to its source code). (doom! :input chinese ;;japanese + ;;layout ; auie,ctsrnm is the superior home row :completion company ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... - ivy ; a search engine for love and life + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future :ui ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs ;; doom-quit ; DOOM quit-message prompts when you quit Emacs - ;;fill-column ; a `fill-column' indicator + (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra ;;indent-guides ; highlighted indent columns + ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink cursor line after big motions ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows - ligatures ; ligatures or substitute text with pretty symbols - ;; tabs ; an tab bar for Emacs + ;;tabs ; a tab bar for Emacs treemacs ; a project drawer, like neotree but cooler unicode ; extended unicode support for various languages vc-gutter ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces - ;;zen ; distraction-free coding or writing + zen ; distraction-free coding or writing :editor (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - (format ; automated prettiness - +onsave) + (format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim ;;multiple-cursors ; editing in many places at once @@ -79,8 +81,8 @@ :checkers syntax ; tasing you for every semicolon you forget - spell ; tasing you for misspelling mispelling - ;; grammar ; tasing grammar mistake every you make + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible @@ -102,13 +104,19 @@ pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux ;;upload ; map local to remote projects via ssh/ftp + :os + (:if IS-MAC macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + :lang - ;;agda ; types of types of types of types... - ;; (cc +lsp) ; C/C++/Obj-C madness + agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;(cc +lsp) ; C > C++ == 1 ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all coq ; proofs-as-programs @@ -121,58 +129,51 @@ emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age ;;ess ; emacs speaks statistics + ;;factor ;;faust ; dsp, but you get to keep your soul - ;;fsharp ; ML stands for Microsoft's Language + ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 - (go +lsp) ; the hipster dialect + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect (haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python - ;;idris ; + idris ; a language you can depend on ;;json ; At least it ain't XML - (java +lsp) ; the poster child for carpal tunnel syndrome - (javascript ; all(hope(abandon(ye(who(enter(here)))))) - +lsp) + ;;(java +meghanada) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) - (latex - +latexmk - +lsp - +fold) ; writing papers in Emacs has never been so fun - ;;lean - ;;factor - ;;ledger ; an accounting system in Emacs + (latex +lsp) ; writing papers in Emacs has never been so fun + lean ; for folks with too much to prove + ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices - (markdown +grip) ; writing docs for people to ignore + markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - (org ; organize your plain life in plain text - +roam - +journal) - ;;perl ; write code no one else can comprehend + (org +pretty ; organize your plain life in plain text + +pomodoro) ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - (python ; beautiful is better than ugly - +lsp - +black) + (python +lsp) ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good - ;;scheme ; a fully conniving family of lisps - (sh ; she sells {ba,z,fi}sh shells on the C xor - +lsp - +fish) + ;;(scheme +guile) ; a fully conniving family of lisps + (sh +lsp +fish) ; she sells {ba,z,fi}sh shells on the C xor sml ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. ;;web ; the tubes - (yaml +lsp) ; JSON, but readable + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler :email ;;(mu4e +gmail) @@ -181,6 +182,8 @@ :app ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought diff --git a/emacs/.doom.d/snippets/latex-mode/homework b/emacs/.doom.d/snippets/latex-mode/homework index e38babf2..e2f13acd 100644 --- a/emacs/.doom.d/snippets/latex-mode/homework +++ b/emacs/.doom.d/snippets/latex-mode/homework @@ -19,7 +19,8 @@ \usepackage{amsmath, amssymb, amsthm} \theoremstyle{plain} % \usepackage[outputdir=tmp]{minted} -\usepackage{lmodern} +% \usepackage{lmodern} +\usepackage{tgpagella} \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} @@ -29,27 +30,13 @@ \lhead{\myname} \chead{\mytitle} -% figure support -\usepackage{import} -\usepackage{xifthen} -\pdfminorversion=7 -\usepackage{pdfpages} -\usepackage{transparent} -\newcommand{\incfig}[1]{% - \def\svgwidth{\columnwidth} - \import{./figures/}{#1.pdf_tex} -} - -\newtheorem{thm}{Theorem}[section] -\newtheorem{crl}{Corollary}[thm] -\newtheorem{lemma}{Lemma}[thm] -\newtheorem*{lemma*}{Lemma} -\newtheorem{note}{Note}[thm] -\newtheorem{defn}{Definition}[section] -\newtheorem{ex}{Example}[section] -\newtheorem{prop}{Proposition}[section] -\newtheorem{obs}{Observation} -\newtheorem{claim}{Claim} +\usepackage{tocloft} +\usepackage[thinc]{esdiff} +\renewcommand{\thesection}{Question \arabic{section}} +\renewcommand{\thesubsection}{Part \arabic{section}(\roman{subsection})} +\renewcommand{\thesubsubsection}{Solution} +\cftsetindents{subsection}{1.5em}{4.5em} +\cftsetindents{subsubsection}{3.8em}{5.5em} \newcommand{\pmat}[1]{ \begin{pmatrix}#1\end{pmatrix} } \newcommand{\seqn}[1]{(#1)^\infty_{n=1}} @@ -74,15 +61,11 @@ \DeclareMathOperator{\spn}{span} \DeclareMathOperator{\diam}{diam} -% Question: section -% Solution: subsection, subsubsection -% Hence remove numberings -% \setcounter{secnumdepth}{0} - - \begin{document} \maketitle -\section*{Problem 1} +% \tableofcontents +\section{} +\subsection{} +\subsubsection{} $0 -\subsection*{Solution} \end{document} \ No newline at end of file diff --git a/emacs/.doom.d/texput.log b/emacs/.doom.d/texput.log new file mode 100644 index 00000000..39bcb679 --- /dev/null +++ b/emacs/.doom.d/texput.log @@ -0,0 +1,22 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Arch Linux) (preloaded format=pdflatex 2021.3.11) 29 MAR 2021 19:28 +entering extended mode + \write18 enabled. + %&-line parsing enabled. +**%f + +* +! Emergency stop. +<*> %f + +End of file on the terminal! + + +Here is how much of TeX's memory you used: + 2 strings out of 479383 + 106 string characters out of 5875830 + 267160 words of memory out of 5000000 + 17218 multiletter control sequences out of 15000+600000 + 403430 words of font info for 27 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 0i,0n,0p,1b,6s stack positions out of 5000i,500n,10000p,200000b,80000s +! ==> Fatal error occurred, no output PDF file produced! diff --git a/i3/.config/i3/config b/i3/.config/i3/config deleted file mode 100644 index 343ccf4a..00000000 --- a/i3/.config/i3/config +++ /dev/null @@ -1,288 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 -set $home /home/titanx -set $browser firefox -set $shell /usr/bin/fish -set $config /home/titanx/.config -# set $sink 0 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -# font pango:sans 12, FontAwesome 10 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -# font pango:DejaVu Sans Mono 12 -font pango:Iosevka Term 11 - -# set primary gruvbox colorscheme colors -set $bg #282828 -set $red #cc241d -set $green #98971a -set $yellow #d79921 -set $blue #458588 -set $purple #b16286 -set $aqua #689d68 -set $gray #a89984 -set $darkgray #1d2021 -set $white #ebdbb2 - -# # green gruvbox -# # class border|backgr|text|indicator|child_border -# client.focused $green $green $darkgray $purple $darkgray -# client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray -# client.unfocused $darkgray $darkgray $yellow $purple $darkgray -# client.urgent $red $red $white $red $red - -# blue gruvbox -# class border|backgr|text|indicator|child_border -client.focused $blue $blue $white $purple $darkgray -client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray -client.unfocused $darkgray $darkgray $yellow $purple $darkgray -client.urgent $red $red $white $red $red - -# Before i3 v4.8, we used to recommend this one as the default: -# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# The font above is very space-efficient, that is, it looks good, sharp and -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -set $TERMINAL kitty -# bindsym $mod+Return exec alacritty -bindsym $mod+Return exec kitty -# Drop-down terminal. Does not work, oniy tiles -# bindsym $mod+i exec tdrop -a alacritty - - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -# bindsym $mod+d exec --no-startup-id dmenu_run -# bindsym $mod+d exec --no-startup-id rofi -show combi -bindsym $mod+d exec --no-startup-id rofi -show run -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+semicolon split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -set $ws1 "1  " -set $ws2 "2 " -set $ws3 "3 " -set $ws4 "4 " -set $ws5 "5 " -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9  " -set $ws10 "10 " - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws10 - -# dual-display setup -workspace $ws1 output HDMI-1 eDP-1 -workspace $ws2 output HDMI-1 eDP-1 -workspace $ws3 output HDMI-1 eDP-1 -workspace $ws4 output HDMI-1 eDP-1 -workspace $ws5 output HDMI-1 eDP-1 -workspace $ws6 output eDP-1 -workspace $ws7 output eDP-1 -workspace $ws8 output eDP-1 -workspace $ws9 output eDP-1 -workspace $ws10 output eDP-1 -exec_always /home/titanx/.screenlayout/second_first.sh - -# workspace $ws1 output eDP-1 -# workspace $ws2 output eDP-1 -# workspace $ws3 output eDP-1 -# workspace $ws4 output eDP-1 -# workspace $ws5 output eDP-1 -# workspace $ws6 output HDMI-1 eDP-1 -# workspace $ws7 output HDMI-1 eDP-1 -# workspace $ws8 output HDMI-1 eDP-1 -# workspace $ws9 output HDMI-1 eDP-1 -# workspace $ws10 output HDMI-1 eDP-1 - -# assign default windows -# Workspace 2 for Browsers -assign [class="Firefox"] $ws2 -assign [class="Nightly"] $ws2 -# Workspace 3 for Zoom -assign [class="zoom"] $ws7 -# Workspace 4 for Games -assign [class="galaxyclient.exe"] $ws4 -assign [class="lutris"] $ws4 -# assign [class="Gwent.exe"] $ws4 -# Workspace 9 for Social -assign [class="TelegramDesktop"] $ws9 -assign [class="Slack"] $ws9 -# Workspace 10 for Spotify and Monitoring -for_window [class="Spotify"] move to workspace $ws10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +4% #increase sound volume -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -4% #decrease sound volume -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound - -# Sreen brightness controls -bindsym $mod+F12 exec xbacklight -inc 2 # increase screen brightness -bindsym $mod+F11 exec xbacklight -dec 2 # decrease screen brightness - -bindsym Print exec flameshot full -p ~/Pictures - -# i3status-rs -bar { - font pango:Iosevka Term, FontAwesome 10 - position bottom - status_command ~/bin/i3status-rs $config/i3/status.toml - colors { - separator #666666 - background #222222 - statusline #dddddd - focused_workspace #0088CC #0088CC #ffffff - active_workspace #333333 #333333 #ffffff - inactive_workspace #333333 #333333 #888888 - urgent_workspace #2f343a #900000 #ffffff - } -} -# Wallpaper and lockscreen -# exec_always feh --randomize --bg-tile $config/wallpapers/* -bindsym $mod+shift+x exec $config/lockscreen/randomlock.fish -exec_always --no-startup-id $config/wallpapers/randomwall.sh -exec_always --no-startup-id compton -exec --no-startup-id redshift -l 1.17:103.46 -t 5700:2500 - -# Enable nice applets -exec --no-startup-id nm-applet -exec_always --no-startup-id ibus-daemon -exec --no-startup-id flameshot -# exec blueman-applet - -# Auto-start -exec --no-startup-id firefox -# exec telegram -# exec slack -exec --no-startup-id dropbox start diff --git a/i3/.config/i3/config b/i3/.config/i3/config new file mode 120000 index 00000000..bc3990af --- /dev/null +++ b/i3/.config/i3/config @@ -0,0 +1 @@ +/home/yeejian/.config/i3/default_config \ No newline at end of file diff --git a/i3/.config/i3/default_config b/i3/.config/i3/default_config new file mode 100644 index 00000000..7ec18776 --- /dev/null +++ b/i3/.config/i3/default_config @@ -0,0 +1,297 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 +set $home /home/yeejian +set $browser firefox-beta +set $shell /usr/bin/fish +set $config /home/yeejian/.config +# set $sink 0 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# font pango:sans 12, FontAwesome 10 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +# font pango:DejaVu Sans Mono 12 +font pango:Iosevka Term 12 + +# set primary gruvbox colorscheme colors +set $bg #282828 +set $red #cc241d +set $green #98971a +set $yellow #d79921 +set $blue #458588 +set $purple #b16286 +set $aqua #689d68 +set $gray #a89984 +set $darkgray #1d2021 +set $white #ebdbb2 + +# # green gruvbox +# # class border|backgr|text|indicator|child_border +# client.focused $green $green $darkgray $purple $darkgray +# client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray +# client.unfocused $darkgray $darkgray $yellow $purple $darkgray +# client.urgent $red $red $white $red $red + +# blue gruvbox +# class border|backgr|text|indicator|child_border +client.focused $blue $blue $white $purple $darkgray +client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray +client.unfocused $darkgray $darkgray $yellow $purple $darkgray +client.urgent $red $red $white $red $red + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +set $TERMINAL alacritty +# bindsym $mod+Return exec alacritty +bindsym $mod+Return exec $TERMINAL +# Drop-down terminal. Does not work, oniy tiles +# bindsym $mod+i exec tdrop -a alacritty + + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec --no-startup-id dmenu_run +# bindsym $mod+d exec --no-startup-id rofi -show combi +bindsym $mod+d exec --no-startup-id rofi -show combi +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+semicolon split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1  " +set $ws2 "2 " +set $ws3 "3 " +set $ws4 "4 " +set $ws5 "5 " +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9  " +set $ws10 "10 " + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# dual-display setup +workspace $ws1 output HDMI-1 eDP-1 +workspace $ws2 output HDMI-1 eDP-1 +workspace $ws3 output HDMI-1 eDP-1 +workspace $ws4 output HDMI-1 eDP-1 +workspace $ws5 output HDMI-1 eDP-1 +workspace $ws6 output eDP-1 +workspace $ws7 output eDP-1 +workspace $ws8 output eDP-1 +workspace $ws9 output eDP-1 +workspace $ws10 output eDP-1 +exec_always $home/.screenlayout/second_first.sh + +# teaching/presentation setup +workspace $ws1 output eDP-1 +workspace $ws2 output eDP-1 +workspace $ws3 output eDP-1 +workspace $ws4 output eDP-1 +workspace $ws5 output eDP-1 +workspace $ws6 output HDMI-1 eDP-1 +workspace $ws7 output HDMI-1 eDP-1 +workspace $ws8 output HDMI-1 eDP-1 +workspace $ws9 output HDMI-1 eDP-1 +workspace $ws10 output HDMI-1 eDP-1 + +# assign default windows +# Workspace 2 for Browsers +assign [class="Firefox"] $ws2 +assign [class="Firefox Beta"] $ws2 +assign [class="Nightly"] $ws2 +# Workspace 3 for Zoom +# assign [class="zoom"] $ws3 +# Workspace 4 for Games +assign [class="galaxyclient.exe"] $ws4 +assign [class="lutris"] $ws4 +# assign [class="Gwent.exe"] $ws4 +# Workspace 9 for Social +assign [class="TelegramDesktop"] $ws9 +assign [class="Slack"] $ws9 +# Workspace 10 for Spotify and Monitoring +for_window [class="Spotify"] move to workspace $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 5 px or 5 ppt + bindsym j resize grow height 5 px or 5 ppt + bindsym k resize shrink height 5 px or 5 ppt + bindsym l resize grow width 5 px or 5 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +#start of bar section +bar { + font pango:Iosevka Term, FontAwesome 12 + position bottom + status_command /usr/bin/i3status-rs /home/yeejian/.config/i3status-rust/config.toml + colors { + # bar background color + background $bg + # text color used for blocks that do not have a color specified. + statusline $yellow + # workspaces section + # border backgr. text + focused_workspace $blue $blue $white + inactive_workspace $darkgray $darkgray $white + active_workspace $darkgray $darkgray $white + urgent_workspace $red $red $bg + } + tray_output primary +} +#end of bar section + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound + +# Sreen brightness controls +bindsym $mod+F12 exec light -A 5 # increase screen brightness +bindsym $mod+F11 exec light -U 5 # decrease screen brightness +bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness +bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness + +bindsym Print exec flameshot full -p ~/Pictures + +# Wallpaper and lockscreen +# exec_always feh --randomize --bg-tile $config/wallpapers/* +bindsym $mod+shift+x exec $config/lockscreen/randomlock.fish +exec_always --no-startup-id $config/wallpapers/randomwall.sh +exec --no-startup-id picom +exec --no-startup-id redshift -l 1.17:103.46 -t 5700:2500 # Singapore +# exec --no-startup-id redshift -l 52.2:5.27 -t 5700:2500 # Amsterdam + +# Enable nice applets +exec --no-startup-id nm-applet +exec-always --no-startup-id ibus-daemon --daemonize +exec --no-startup-id flameshot + +# Auto-start +exec --no-startup-id $browser +# exec --no-startup-id syncthing +exec --no-startup-id dropbox start +exec --no-startup-id emacs diff --git a/i3/.config/i3/status.toml b/i3/.config/i3/status.toml index e556ea0f..c8d1918b 100644 --- a/i3/.config/i3/status.toml +++ b/i3/.config/i3/status.toml @@ -24,7 +24,7 @@ device = "wlp2s0" # ssid = true # signal_strength = true # ip = true -speed_up = false +# speed_up = false # graph_up = true interval = 5 use_bits = false diff --git a/i3/.config/i3/teaching_config b/i3/.config/i3/teaching_config new file mode 100644 index 00000000..5ff930da --- /dev/null +++ b/i3/.config/i3/teaching_config @@ -0,0 +1,297 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 +set $home /home/yeejian +set $browser firefox-beta +set $shell /usr/bin/fish +set $config /home/yeejian/.config +# set $sink 0 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# font pango:sans 12, FontAwesome 10 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +# font pango:DejaVu Sans Mono 12 +font pango:Iosevka Term 12 + +# set primary gruvbox colorscheme colors +set $bg #282828 +set $red #cc241d +set $green #98971a +set $yellow #d79921 +set $blue #458588 +set $purple #b16286 +set $aqua #689d68 +set $gray #a89984 +set $darkgray #1d2021 +set $white #ebdbb2 + +# # green gruvbox +# # class border|backgr|text|indicator|child_border +# client.focused $green $green $darkgray $purple $darkgray +# client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray +# client.unfocused $darkgray $darkgray $yellow $purple $darkgray +# client.urgent $red $red $white $red $red + +# blue gruvbox +# class border|backgr|text|indicator|child_border +client.focused $blue $blue $white $purple $darkgray +client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray +client.unfocused $darkgray $darkgray $yellow $purple $darkgray +client.urgent $red $red $white $red $red + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +set $TERMINAL alacritty +# bindsym $mod+Return exec alacritty +bindsym $mod+Return exec $TERMINAL +# Drop-down terminal. Does not work, oniy tiles +# bindsym $mod+i exec tdrop -a alacritty + + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec --no-startup-id dmenu_run +# bindsym $mod+d exec --no-startup-id rofi -show combi +bindsym $mod+d exec --no-startup-id rofi -show combi +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+semicolon split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1  " +set $ws2 "2 " +set $ws3 "3 " +set $ws4 "4 " +set $ws5 "5 " +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9  " +set $ws10 "10 " + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +# # dual-display setup +# workspace $ws1 output HDMI-1 eDP-1 +# workspace $ws2 output HDMI-1 eDP-1 +# workspace $ws3 output HDMI-1 eDP-1 +# workspace $ws4 output HDMI-1 eDP-1 +# workspace $ws5 output HDMI-1 eDP-1 +# workspace $ws6 output eDP-1 +# workspace $ws7 output eDP-1 +# workspace $ws8 output eDP-1 +# workspace $ws9 output eDP-1 +# workspace $ws10 output eDP-1 +# exec_always $home/.screenlayout/second_first.sh + +# teaching/presentation setup +workspace $ws1 output eDP-1 +workspace $ws2 output eDP-1 +workspace $ws3 output eDP-1 +workspace $ws4 output eDP-1 +workspace $ws5 output eDP-1 +workspace $ws6 output HDMI-1 eDP-1 +workspace $ws7 output HDMI-1 eDP-1 +workspace $ws8 output HDMI-1 eDP-1 +workspace $ws9 output HDMI-1 eDP-1 +workspace $ws10 output HDMI-1 eDP-1 + +# assign default windows +# Workspace 2 for Browsers +assign [class="Firefox"] $ws2 +assign [class="Firefox Beta"] $ws2 +assign [class="Nightly"] $ws2 +# Workspace 3 for Zoom +# assign [class="zoom"] $ws3 +# Workspace 4 for Games +assign [class="galaxyclient.exe"] $ws4 +assign [class="lutris"] $ws4 +# assign [class="Gwent.exe"] $ws4 +# Workspace 9 for Social +assign [class="TelegramDesktop"] $ws9 +assign [class="Slack"] $ws9 +# Workspace 10 for Spotify and Monitoring +for_window [class="Spotify"] move to workspace $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 5 px or 5 ppt + bindsym j resize grow height 5 px or 5 ppt + bindsym k resize shrink height 5 px or 5 ppt + bindsym l resize grow width 5 px or 5 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +#start of bar section +bar { + font pango:Iosevka Term, FontAwesome 12 + position bottom + status_command /usr/bin/i3status-rs /home/yeejian/.config/i3status-rust/config.toml + colors { + # bar background color + background $bg + # text color used for blocks that do not have a color specified. + statusline $yellow + # workspaces section + # border backgr. text + focused_workspace $blue $blue $white + inactive_workspace $darkgray $darkgray $white + active_workspace $darkgray $darkgray $white + urgent_workspace $red $red $bg + } + tray_output primary +} +#end of bar section + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound + +# Sreen brightness controls +bindsym $mod+F12 exec light -A 5 # increase screen brightness +bindsym $mod+F11 exec light -U 5 # decrease screen brightness +bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness +bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness + +bindsym Print exec flameshot full -p ~/Pictures + +# Wallpaper and lockscreen +# exec_always feh --randomize --bg-tile $config/wallpapers/* +bindsym $mod+shift+x exec $config/lockscreen/randomlock.fish +exec_always --no-startup-id $config/wallpapers/randomwall.sh +exec --no-startup-id picom +exec --no-startup-id redshift -l 1.17:103.46 -t 5700:2500 # Singapore +# exec --no-startup-id redshift -l 52.2:5.27 -t 5700:2500 # Amsterdam + +# Enable nice applets +exec --no-startup-id nm-applet +exec-always --no-startup-id ibus-daemon --daemonize +exec --no-startup-id flameshot + +# Auto-start +exec --no-startup-id $browser +# exec --no-startup-id syncthing +exec --no-startup-id dropbox start +exec --no-startup-id emacs diff --git a/install.sh b/install.sh index 9183208d..c52970e4 100755 --- a/install.sh +++ b/install.sh @@ -82,11 +82,11 @@ post_install () { } main () { - nice_keys && - update_packages && - install_programs && - ./scripts/stow_all.sh - post_install + nice_keys +# update_packages && +# install_programs && +# ./scripts/stow_all.sh +# post_install } main diff --git a/nvim/.config/nvim/coc-settings.json b/nvim/.config/nvim/coc-settings.json index 9fafca72..35faa5ce 100644 --- a/nvim/.config/nvim/coc-settings.json +++ b/nvim/.config/nvim/coc-settings.json @@ -25,11 +25,6 @@ } } }, - "efm": { - "command": "efm-langserver", - "args": [], - "filetypes": ["vim", "eruby", "markdown"] - }, "prolog-lsp": { "command": "swipl", "args": ["-g", "use_module(library(lsp_server)).", diff --git a/ranger/.config/ranger/commands_full.py b/ranger/.config/ranger/commands_full.py index 5defa677..32af8082 100644 --- a/ranger/.config/ranger/commands_full.py +++ b/ranger/.config/ranger/commands_full.py @@ -89,7 +89,7 @@ # of ranger. # =================================================================== -from __future__ import (absolute_import, division, print_function) +from __future__ import absolute_import, division, print_function from collections import deque import os @@ -104,12 +104,12 @@ class alias(Command): Copies the oldcommand as newcommand. """ - context = 'browser' + context = "browser" resolve_macros = False def execute(self): if not self.arg(1) or not self.arg(2): - self.fm.notify('Syntax: alias ', bad=True) + self.fm.notify("Syntax: alias ", bad=True) return self.fm.commands.alias(self.arg(1), self.rest(2)) @@ -135,7 +135,7 @@ class cd(Command): """ def execute(self): - if self.arg(1) == '-r': + if self.arg(1) == "-r": self.shift() destination = os.path.realpath(self.rest(1)) if os.path.isfile(destination): @@ -145,16 +145,16 @@ def execute(self): destination = self.rest(1) if not destination: - destination = '~' + destination = "~" - if destination == '-': - self.fm.enter_bookmark('`') + if destination == "-": + self.fm.enter_bookmark("`") else: self.fm.cd(destination) def _tab_args(self): # dest must be rest because path could contain spaces - if self.arg(1) == '-r': + if self.arg(1) == "-r": start = self.start(2) dest = self.rest(2) else: @@ -168,9 +168,13 @@ def _tab_args(self): else: dest_exp = tail else: - dest_exp = '' - return (start, dest_exp, os.path.join(self.fm.thisdir.path, dest_exp), - dest.endswith(os.path.sep)) + dest_exp = "" + return ( + start, + dest_exp, + os.path.join(self.fm.thisdir.path, dest_exp), + dest.endswith(os.path.sep), + ) @staticmethod def _tab_paths(dest, dest_abs, ends_with_sep): @@ -178,21 +182,23 @@ def _tab_paths(dest, dest_abs, ends_with_sep): try: return next(os.walk(dest_abs))[1], dest_abs except (OSError, StopIteration): - return [], '' + return [], "" if ends_with_sep: try: - return [os.path.join(dest, path) for path in next(os.walk(dest_abs))[1]], '' + return [ + os.path.join(dest, path) for path in next(os.walk(dest_abs))[1] + ], "" except (OSError, StopIteration): - return [], '' + return [], "" return None, None def _tab_match(self, path_user, path_file): - if self.fm.settings.cd_tab_case == 'insensitive': + if self.fm.settings.cd_tab_case == "insensitive": path_user = path_user.lower() path_file = path_file.lower() - elif self.fm.settings.cd_tab_case == 'smart' and path_user.islower(): + elif self.fm.settings.cd_tab_case == "smart" and path_user.islower(): path_file = path_file.lower() return path_file.startswith(path_user) @@ -203,14 +209,16 @@ def _tab_normal(self, dest, dest_abs): try: dirnames = next(os.walk(os.path.dirname(dest_abs)))[1] except (OSError, StopIteration): - return [], '' + return [], "" - return [os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d)], '' + return [ + os.path.join(dest_dir, d) for d in dirnames if self._tab_match(dest_base, d) + ], "" def _tab_fuzzy_match(self, basepath, tokens): """ Find directories matching tokens recursively """ if not tokens: - tokens = [''] + tokens = [""] paths = [basepath] while True: token = tokens.pop() @@ -220,8 +228,11 @@ def _tab_fuzzy_match(self, basepath, tokens): directories = next(os.walk(path))[1] except (OSError, StopIteration): continue - matches += [os.path.join(path, d) for d in directories - if self._tab_match(token, d)] + matches += [ + os.path.join(path, d) + for d in directories + if self._tab_match(token, d) + ] if not tokens or not matches: return matches paths = matches @@ -236,7 +247,7 @@ def _tab_fuzzy(self, dest, dest_abs): basepath, token = os.path.split(basepath) if basepath == basepath_old: break - if os.path.isdir(basepath_old) and not token.startswith('.'): + if os.path.isdir(basepath_old) and not token.startswith("."): basepath = basepath_old break tokens.append(token) @@ -244,10 +255,12 @@ def _tab_fuzzy(self, dest, dest_abs): paths = self._tab_fuzzy_match(basepath, tokens) if not os.path.isabs(dest): paths_rel = self.fm.thisdir.path - paths = [os.path.relpath(os.path.join(basepath, path), paths_rel) - for path in paths] + paths = [ + os.path.relpath(os.path.join(basepath, path), paths_rel) + for path in paths + ] else: - paths_rel = '' + paths_rel = "" return paths, paths_rel def tab(self, tabnum): @@ -267,7 +280,8 @@ def tab(self, tabnum): if self.fm.settings.cd_bookmarks: paths[0:0] = [ os.path.relpath(v.path, paths_rel) if paths_rel else v.path - for v in self.fm.bookmarks.dct.values() for path in paths + for v in self.fm.bookmarks.dct.values() + for path in paths if v.path.startswith(os.path.join(paths_rel, path) + sep) ] @@ -283,11 +297,12 @@ class chain(Command): Calls multiple commands at once, separated by semicolons. """ + resolve_macros = False def execute(self): if not self.rest(1).strip(): - self.fm.notify('Syntax: chain ; ; ...', bad=True) + self.fm.notify("Syntax: chain ; ; ...", bad=True) return for command in [s.strip() for s in self.rest(1).split(";")]: self.fm.execute_console(command) @@ -297,11 +312,11 @@ class shell(Command): escape_macros_for_shell = True def execute(self): - if self.arg(1) and self.arg(1)[0] == '-': + if self.arg(1) and self.arg(1)[0] == "-": flags = self.arg(1)[1:] command = self.rest(2) else: - flags = '' + flags = "" command = self.rest(1) if command: @@ -309,43 +324,51 @@ def execute(self): def tab(self, tabnum): from ranger.ext.get_executables import get_executables - if self.arg(1) and self.arg(1)[0] == '-': + + if self.arg(1) and self.arg(1)[0] == "-": command = self.rest(2) else: command = self.rest(1) - start = self.line[0:len(self.line) - len(command)] + start = self.line[0 : len(self.line) - len(command)] try: position_of_last_space = command.rindex(" ") except ValueError: - return (start + program + ' ' for program - in get_executables() if program.startswith(command)) + return ( + start + program + " " + for program in get_executables() + if program.startswith(command) + ) if position_of_last_space == len(command) - 1: selection = self.fm.thistab.get_selection() if len(selection) == 1: - return self.line + selection[0].shell_escaped_basename + ' ' - return self.line + '%s ' + return self.line + selection[0].shell_escaped_basename + " " + return self.line + "%s " - before_word, start_of_word = self.line.rsplit(' ', 1) - return (before_word + ' ' + file.shell_escaped_basename - for file in self.fm.thisdir.files or [] - if file.shell_escaped_basename.startswith(start_of_word)) + before_word, start_of_word = self.line.rsplit(" ", 1) + return ( + before_word + " " + file.shell_escaped_basename + for file in self.fm.thisdir.files or [] + if file.shell_escaped_basename.startswith(start_of_word) + ) class open_with(Command): - def execute(self): app, flags, mode = self._get_app_flags_mode(self.rest(1)) self.fm.execute_file( files=[f for f in self.fm.thistab.get_selection()], app=app, flags=flags, - mode=mode) + mode=mode, + ) def tab(self, tabnum): return self._tab_through_executables() - def _get_app_flags_mode(self, string): # pylint: disable=too-many-branches,too-many-statements + def _get_app_flags_mode( + self, string + ): # pylint: disable=too-many-branches,too-many-statements """Extracts the application, flags and mode from a string. examples: @@ -355,8 +378,8 @@ def _get_app_flags_mode(self, string): # pylint: disable=too-many-branches,too- "" => None """ - app = '' - flags = '' + app = "" + flags = "" mode = 0 split = string.split() @@ -420,11 +443,12 @@ def _is_app(self, arg): @staticmethod def _is_flags(arg): from ranger.core.runner import ALLOWED_FLAGS + return all(x in ALLOWED_FLAGS for x in arg) @staticmethod def _is_mode(arg): - return all(x in '0123456789' for x in arg) + return all(x in "0123456789" for x in arg) class set_(Command): @@ -434,7 +458,8 @@ class set_(Command): Use `:set