aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-02-08 09:46:19 -0800
committerGravatar Tom Willemse2022-02-08 09:46:19 -0800
commite22b5a5626be303f93e94fbb216654197d3cb5c9 (patch)
tree8331131652589237f561bdcb7899d43370358f79
parent0b640ec28e1980b6f1d47c95df1a21765fe04726 (diff)
downloademacs-config-e22b5a5626be303f93e94fbb216654197d3cb5c9.tar.gz
emacs-config-e22b5a5626be303f93e94fbb216654197d3cb5c9.zip
[oni-counsel] Add some functions to interact with the OS
-rw-r--r--oni-counsel.el24
1 files changed, 23 insertions, 1 deletions
diff --git a/oni-counsel.el b/oni-counsel.el
index 1dee935..280eef5 100644
--- a/oni-counsel.el
+++ b/oni-counsel.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0919.233934
+;; Version: 2022.0204.011058
;; Package-Requires: (counsel diminish)
;; This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,28 @@
(write-region "" nil filename t)
(find-file filename))
+(defun oni-run-launcher ()
+ (interactive)
+ (with-selected-frame (make-frame '((name . "emacs-run-launcher")
+ (minibuffer . only)
+ (width . 120)
+ (height . 11)))
+ (unwind-protect
+ (counsel-linux-app)
+ (delete-frame))))
+
+(defun oni-run-window-switch ()
+ (interactive)
+ (with-selected-frame (make-frame '((name . "emacs-run-wmctrl")
+ (minibuffer . only)
+ (width . 120)
+ (height . 11)))
+ (unwind-protect
+ (counsel-wmctrl)
+ (delete-frame))))
+
+(setq counsel-linux-app-format-function 'counsel-linux-app-format-function-name-pretty)
+
(setq counsel-find-file-ignore-regexp
(rx (or (and bos ".")
(and ".zwc" eos))))