This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Setup packages and stuff | |
(require 'package) | |
;; Add MELPA | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/") t) | |
(unless package--initialized | |
(package-initialize)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REGEDIT4 | |
[HKEY_CLASSES_ROOT\org-protocol] | |
@="URL:Org Protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\org-protocol\shell] | |
[HKEY_CLASSES_ROOT\org-protocol\shell\open] | |
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command] | |
@="\"C:\\BIN\\org-protocol-to-wsl-helper.bat\" \"%1\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PREREQUISITES | |
# - KWin Grayscale Effect | |
# https://store.kde.org/p/1263836/ | |
# install it via System Settings -> Workspace Behavior -> Desktop Effects [Get New Desktop Effects...] and search for "Grayscale Effect" | |
# OR ALTERNATIVELY | |
# install it from command line: | |
# /usr/lib/kf5/kpackagehandlers/knshandler kns://plasmoids.knsrc/api.kde-look.org/1263836 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name org-protocols | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2.0 | |
// @description Send links or/and selected content into your Emacs via various protocols | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun beautify-html-file-and-revert () | |
"Beautify file with html-beautify and only if major mode is web-mode" | |
(interactive) | |
(when (eq major-mode 'web-mode) | |
(message "html-beautify taking care of your markup" (buffer-file-name)) | |
(shell-command (concat "html-beautify --quiet --replace -s 2 -I -E \"\" --max-preserve-newlines 0 -f " (buffer-file-name))) | |
(revert-buffer t t))) | |
(add-hook 'after-save-hook #'beautify-html-file-and-revert) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; runs `prettier-stylelint --write` on the current file after save | |
;;; alpha quality -- use at your own risk | |
(defun prettier-stylelint-fix-file-and-revert () | |
"Prettify current file and apply fixes only in css-mode or scss-mode" | |
(interactive) | |
(when (or (eq major-mode 'css-mode) (eq major-mode 'scss-mode)) | |
(message "prettier-stylelint fixing your file" (buffer-file-name)) ;;optional line, you can remove it | |
(shell-command (concat "prettier-stylelint --quiet --write " (buffer-file-name))) | |
(revert-buffer t t))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wid=$(xdotool search --classname urxvt) | |
if [ -z $wid ] | |
then | |
urxvt -e sh -c "tmux" | |
wid=$(xdotool search --classname urxvt) | |
xdotool windowfocus $wid | |
elif [ -z $(xdotool search --onlyvisible --classname urxvt 2>/dev/null) ] |