Emoji picker
This commit is contained in:
parent
e459041e92
commit
f35fb1bfb6
1 changed files with 52 additions and 18 deletions
70
config.org
70
config.org
|
|
@ -9,6 +9,8 @@
|
||||||
- [[#recent-files][Recent Files]]
|
- [[#recent-files][Recent Files]]
|
||||||
- [[#general-keybindings][General Keybindings]]
|
- [[#general-keybindings][General Keybindings]]
|
||||||
- [[#startup-time][Startup Time]]
|
- [[#startup-time][Startup Time]]
|
||||||
|
- [[#support-functions][Support functions]]
|
||||||
|
- [[#emacs-function-launcher][Emacs function launcher]]
|
||||||
- [[#app-launcher][App Launcher]]
|
- [[#app-launcher][App Launcher]]
|
||||||
- [[#standalone-run][Standalone run]]
|
- [[#standalone-run][Standalone run]]
|
||||||
- [[#backup-files-tilda-files][Backup files (tilda files)]]
|
- [[#backup-files-tilda-files][Backup files (tilda files)]]
|
||||||
|
|
@ -17,6 +19,9 @@
|
||||||
- [[#diminish][Diminish]]
|
- [[#diminish][Diminish]]
|
||||||
- [[#dired-file-manager][DIRED (File manager)]]
|
- [[#dired-file-manager][DIRED (File manager)]]
|
||||||
- [[#ediff][EDIFF]]
|
- [[#ediff][EDIFF]]
|
||||||
|
- [[#emoji][Emoji]]
|
||||||
|
- [[#copy-to-clipboard][Copy to clipboard]]
|
||||||
|
- [[#standalone-emoji-picker][Standalone emoji picker]]
|
||||||
- [[#flycheck][FLYCHECK]]
|
- [[#flycheck][FLYCHECK]]
|
||||||
- [[#fonts][Fonts]]
|
- [[#fonts][Fonts]]
|
||||||
- [[#zooming-inout][Zooming In/Out]]
|
- [[#zooming-inout][Zooming In/Out]]
|
||||||
|
|
@ -203,6 +208,29 @@
|
||||||
|
|
||||||
(add-hook 'emacs-startup-hook #'efs/display-startup-time)
|
(add-hook 'emacs-startup-hook #'efs/display-startup-time)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
* Support functions
|
||||||
|
** Emacs function launcher
|
||||||
|
Launches emacs function as a window
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
(defun emacs-run-launcher (func)
|
||||||
|
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs func on that frame, which is an emacs command that prompts you to select something and open it dmenu like behaviour. Delete the frame after that command has exited"
|
||||||
|
(interactive)
|
||||||
|
(with-selected-frame
|
||||||
|
(make-frame '((name . "emacs-run-launcher")
|
||||||
|
(minibuffer . only)
|
||||||
|
(fullscreen . 0) ; no fullscreen
|
||||||
|
(undecorated . t) ; remove title bar
|
||||||
|
;;(auto-raise . t) ; focus on this frame
|
||||||
|
;;(tool-bar-lines . 0)
|
||||||
|
;;(menu-bar-lines . 0)
|
||||||
|
(internal-border-width . 10)
|
||||||
|
(width . 80)
|
||||||
|
(height . 11)))
|
||||||
|
(unwind-protect
|
||||||
|
(funcall func)
|
||||||
|
(delete-frame))))
|
||||||
|
#+end_src
|
||||||
* App Launcher
|
* App Launcher
|
||||||
This code creates a menu to launch linux apps, that have Desktop entry.
|
This code creates a menu to launch linux apps, that have Desktop entry.
|
||||||
Code was taken from [[https://github.com/SebastienWae/app-launcher/blob/main/app-launcher.el][this awesome repo]]
|
Code was taken from [[https://github.com/SebastienWae/app-launcher/blob/main/app-launcher.el][this awesome repo]]
|
||||||
|
|
@ -366,25 +394,10 @@ When ARG is non-nil, ignore NoDisplay property in *.desktop files."
|
||||||
** Standalone run
|
** Standalone run
|
||||||
This code snippet runs app launcher without emacs frame
|
This code snippet runs app launcher without emacs frame
|
||||||
To use it, create a global keyboard shortcut with the following code
|
To use it, create a global keyboard shortcut with the following code
|
||||||
~emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)~
|
~emacsclient -cF "((visibility . nil))" -e "(emacs-run-app-launcher)~
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun emacs-run-launcher ()
|
(defun emacs-run-app-launcher()
|
||||||
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
(emacs-run-launcher 'app-launcher-run-app))
|
||||||
(interactive)
|
|
||||||
(with-selected-frame
|
|
||||||
(make-frame '((name . "emacs-run-launcher")
|
|
||||||
(minibuffer . only)
|
|
||||||
(fullscreen . 0) ; no fullscreen
|
|
||||||
(undecorated . t) ; remove title bar
|
|
||||||
;;(auto-raise . t) ; focus on this frame
|
|
||||||
;;(tool-bar-lines . 0)
|
|
||||||
;;(menu-bar-lines . 0)
|
|
||||||
(internal-border-width . 10)
|
|
||||||
(width . 80)
|
|
||||||
(height . 11)))
|
|
||||||
(unwind-protect
|
|
||||||
(app-launcher-run-app)
|
|
||||||
(delete-frame))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Backup files (tilda files)
|
* Backup files (tilda files)
|
||||||
By default, Emacs creates automatic backups of files in their original directories, such “file.el” and the backup “file.el~”. This leads to a lot of clutter, so let’s tell Emacs to put all backups that it creates in the ~TRASH~ directory.
|
By default, Emacs creates automatic backups of files in their original directories, such “file.el” and the backup “file.el~”. This leads to a lot of clutter, so let’s tell Emacs to put all backups that it creates in the ~TRASH~ directory.
|
||||||
|
|
@ -478,6 +491,27 @@ This package implements hiding or abbreviation of the modeline displays (lighter
|
||||||
|
|
||||||
(add-hook 'ediff-mode-hook 'dt-ediff-hook)
|
(add-hook 'ediff-mode-hook 'dt-ediff-hook)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
* Emoji
|
||||||
|
** Copy to clipboard
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package emojify :ensure t)
|
||||||
|
(defun kylekrein/copy-emoji-to-clipboard()
|
||||||
|
(interactive)
|
||||||
|
(require 'emojify)
|
||||||
|
;;(let ((emoji (emoji--read-emoji))) ;;works without external package, but not so pretty
|
||||||
|
(let ((emoji (emojify-completing-read "Copy Emoji: ")))
|
||||||
|
(when emoji
|
||||||
|
(kill-new emoji)
|
||||||
|
(message "Copied: %s" emoji))))
|
||||||
|
#+end_src
|
||||||
|
** Standalone emoji picker
|
||||||
|
To use it, create a global keyboard shortcut with the following code
|
||||||
|
~emacsclient -cF "((visibility . nil))" -e "(emacs-run-emoji-picker)~
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun emacs-run-emoji-picker ()
|
||||||
|
(interactive)
|
||||||
|
(emacs-run-launcher 'kylekrein/copy-emoji-to-clipboard))
|
||||||
|
#+end_src
|
||||||
* FLYCHECK
|
* FLYCHECK
|
||||||
Install luacheck from your Linux distro’s repositories for flycheck to work correctly with lua files. Install python-pylint for flycheck to work with python files. Haskell works with flycheck as long as haskell-ghc or haskell-stack-ghc is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
Install luacheck from your Linux distro’s repositories for flycheck to work correctly with lua files. Install python-pylint for flycheck to work with python files. Haskell works with flycheck as long as haskell-ghc or haskell-stack-ghc is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue