From a06a4cd302e8d3334d1b2790853e84e2bf54681c Mon Sep 17 00:00:00 2001 From: Charged Date: Fri, 26 Aug 2022 04:13:04 +0000 Subject: [PATCH 1/4] Fix typo. --- .config/awesome/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/awesome/README.org b/.config/awesome/README.org index cbb107c..19b51e3 100644 --- a/.config/awesome/README.org +++ b/.config/awesome/README.org @@ -1,4 +1,4 @@ -#+TITLE: Aweomsome WM Config +#+TITLE: Awesome WM Config #+AUTHOR: Derek Taylor #+PROPERTY: header-args :tangle rc.lua #+auto_tangle: t From b9a4e73a92e988b5586992f02474a04436704e6b Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 26 Aug 2022 15:19:53 +0000 Subject: [PATCH 2/4] Fix broken xmonad config link --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 8a70110..2768abe 100644 --- a/README.org +++ b/README.org @@ -29,7 +29,7 @@ Dotfiles are the customization files that are used to personalize your Linux or - [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/openbox][Openbox]] (you may also want my [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/tint2][tint2]] panel config and [[https://gitlab.com/dwt1/dt-dark-theme][dt-dark-theme]] GTK theme) - [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/qtile][Qtile]] - [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/spectrwm][Spectrwm]] (you will also need this [[https://gitlab.com/dwt1/dotfiles/-/blob/master/baraction.sh][baraction.sh]] script) -- [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.xmonad][XMonad]] +- [[https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/xmonad][XMonad]] (*) = /links to another repository of mine/ From 2812c5ab7da842b60b1fdcaf6f26198e1e949169 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Sun, 4 Sep 2022 10:11:00 -0500 Subject: [PATCH 3/4] Minor edits to the Dired sections of Doom Emacs config. --- .config/doom/config.el | 7 ++++++- .config/doom/config.org | 14 +++++++++++++- .config/nitrogen/bg-saved.cfg | 10 +++++----- .config/nitrogen/nitrogen.cfg | 8 ++++---- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index a937fd6..c9959ef 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -151,10 +151,15 @@ List of keybindings (SPC h b b)") (kbd "R") 'dired-do-rename (kbd "T") 'dired-do-touch (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. + (kbd "Z") 'dired-do-compress (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory + (kbd "-") 'dired-do-kill-lines (kbd "% l") 'dired-downcase + (kbd "% m") 'dired-mark-files-regexp (kbd "% u") 'dired-upcase + (kbd "* %") 'dired-mark-files-regexp + (kbd "* .") 'dired-mark-extension + (kbd "* /") 'dired-mark-directories (kbd "; d") 'epa-dired-do-decrypt (kbd "; e") 'epa-dired-do-encrypt) ;; Get file icons in dired diff --git a/.config/doom/config.org b/.config/doom/config.org index 744689a..998161e 100644 --- a/.config/doom/config.org +++ b/.config/doom/config.org @@ -354,10 +354,15 @@ Dired is the file manager within Emacs. Below, I setup keybindings for image pr (kbd "R") 'dired-do-rename (kbd "T") 'dired-do-touch (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. + (kbd "Z") 'dired-do-compress (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory + (kbd "-") 'dired-do-kill-lines (kbd "% l") 'dired-downcase + (kbd "% m") 'dired-mark-files-regexp (kbd "% u") 'dired-upcase + (kbd "* %") 'dired-mark-files-regexp + (kbd "* .") 'dired-mark-extension + (kbd "* /") 'dired-mark-directories (kbd "; d") 'epa-dired-do-decrypt (kbd "; e") 'epa-dired-do-encrypt) ;; Get file icons in dired @@ -393,6 +398,13 @@ If peep-dired is enabled, you will get image previews as you go up/down with 'j' trash-directory "~/.local/share/Trash/files/") #+end_src +=NOTE=: For convenience, you may want to create a symlink to 'local/share/Trash' in your home directory: +#+begin_example +cd ~/ +ln -s ~/.local/share/Trash . +#+end_example + + * DOOM THEME Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'. diff --git a/.config/nitrogen/bg-saved.cfg b/.config/nitrogen/bg-saved.cfg index f1dbedc..aafccb3 100644 --- a/.config/nitrogen/bg-saved.cfg +++ b/.config/nitrogen/bg-saved.cfg @@ -1,14 +1,14 @@ -[xin_1] -file=/home/dt/wallpapers/0258.jpg +[xin_0] +file=/home/dt/wallpapers/0296.jpg mode=0 bgcolor=#000000 -[xin_0] -file=/home/dt/wallpapers/0258.jpg +[xin_1] +file=/home/dt/wallpapers/0296.jpg mode=0 bgcolor=#000000 [xin_2] -file=/home/dt/wallpapers/0258.jpg +file=/home/dt/wallpapers/0296.jpg mode=0 bgcolor=#000000 diff --git a/.config/nitrogen/nitrogen.cfg b/.config/nitrogen/nitrogen.cfg index 56df4d9..c16556b 100644 --- a/.config/nitrogen/nitrogen.cfg +++ b/.config/nitrogen/nitrogen.cfg @@ -1,8 +1,8 @@ [geometry] -posx=3840 -posy=0 -sizex=1920 -sizey=1080 +posx=1936 +posy=40 +sizex=932 +sizey=1020 [nitrogen] view=icon From e2ce5de3746124f40f13d41b711c311a319b6329 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Sun, 4 Sep 2022 11:51:18 -0500 Subject: [PATCH 4/4] Turning neovim into Doom Emacs with new plugins. --- .config/doom/config.el | 2 +- .config/doom/config.org | 2 +- .config/nvim/init.lua | 119 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 120 insertions(+), 3 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index c9959ef..9ba9d9a 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -362,7 +362,7 @@ List of keybindings (SPC h b b)") (map! :leader (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) + :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/nc/Org/agenda.org")) :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) diff --git a/.config/doom/config.org b/.config/doom/config.org index 998161e..ca07392 100644 --- a/.config/doom/config.org +++ b/.config/doom/config.org @@ -754,7 +754,7 @@ Keybindings to open files that I work with all the time using the find-file comm #+BEGIN_SRC emacs-lisp (map! :leader (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) + :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/nc/Org/agenda.org")) :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index a6c5957..f90c1fe 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -114,13 +114,113 @@ A.nvim_create_autocmd('TextYankPost', { -- KEYBINDINGS local function map(m, k, v) - vim.keymap.set(m, k, v, { silent = true }) + vim.keymap.set(m, k, v, { silent = true }) end -- Mimic shell movements map('i', '', 'A') map('i', '', 'I') +map('n', 'sl', 'SessionLoad') +map('n', 'fr', 'Telescope oldfiles') +map('n', 'ff', 'Telescope find_files') +map('n', 'fb', 'Telescope file_browser') +map('n', 'fw', 'Telescope live_grep') +map('n', 'ht', 'Telescope colorscheme') + +-- DASHBOARD +local db = require('dashboard') +local home = os.getenv('HOME') + +db.default_banner = { + '', + '', + ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗', + ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║', + ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║', + ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║', + ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║', + ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝', + '', + ' [ TIP: To exit neovim, just poweroff your computer. ] ', + '', +} +-- linux +--db.preview_command = 'ueberzug' +-- +--db.preview_file_path = home .. '/.config/nvim/static/neovim.cat' +db.preview_file_height = 11 +db.preview_file_width = 70 +db.custom_center = { + {icon = ' ', + desc = 'Recent sessions ', + shortcut = 'SPC s l', + action ='SessionLoad'}, + {icon = ' ', + desc = 'Find recent files ', + action = 'Telescope oldfiles', + shortcut = 'SPC f r'}, + {icon = ' ', + desc = 'Find files ', + action = 'Telescope find_files find_command=rg,--hidden,--files', + shortcut = 'SPC f f'}, + {icon = ' ', + desc ='File browser ', + action = 'Telescope file_browser', + shortcut = 'SPC f b'}, + {icon = ' ', + desc = 'Find word ', + action = 'Telescope live_grep', + shortcut = 'SPC f w'}, + {icon = ' ', + desc = 'Load new theme ', + action = 'Telescope colorscheme', + shortcut = 'SPC h t'}, + } +db.custom_footer = { '', '🎉 If I\'m using Neovim, then my Emacs config must be broken!' } + +-- TELESCOPE FILE BROWSER +---- You don't need to set any of these options. +-- IMPORTANT!: this is only a showcase of how you can set default options! +require("telescope").setup { + extensions = { + file_browser = { + theme = "ivy", + -- disables netrw and use telescope-file-browser in its place + hijack_netrw = true, + mappings = { + ["i"] = { + -- your custom insert mode mappings + }, + ["n"] = { + -- your custom normal mode mappings + }, + }, + }, + }, +} +-- To get telescope-file-browser loaded and working with telescope, +-- you need to call load_extension, somewhere after setup function: +require("telescope").load_extension "file_browser" + +-- ORGMODE +-- Load custom tree-sitter grammar for org filetype +require('orgmode').setup_ts_grammar() + +-- Tree-sitter configuration +require'nvim-treesitter.configs'.setup { + -- If TS highlights are not enabled at all, or disabled via `disable` prop, highlighting will fallback to default Vim syntax highlighting + highlight = { + enable = true, + additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar + }, + ensure_installed = {'org'}, -- Or run :TSUpdate org +} + +require('orgmode').setup({ + org_agenda_files = {'~/nc/Org/agenda.org'}, + org_default_notes_file = '~/nc/Org/notes.org', +}) -- PLUGINS -- Only required if you have packer configured as `opt` @@ -129,6 +229,23 @@ return require('packer').startup(function() -- Packer can manage itself use 'wbthomason/packer.nvim' + -- A nice start screen for nvim + use 'glepnir/dashboard-nvim' + + -- Telescope and treesitter + use { + 'nvim-telescope/telescope.nvim', tag = '0.1.0', + requires = { {'nvim-lua/plenary.nvim'} } + } + use { "nvim-telescope/telescope-file-browser.nvim" } + use {'nvim-treesitter/nvim-treesitter'} + + -- Org mode in nvim??? + use {'nvim-orgmode/orgmode', config = function() + require('orgmode').setup{} + end + } + -- A better status line use { 'nvim-lualine/lualine.nvim',