Skip to content

Commit

Permalink
Add pgtk
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Jan 7, 2024
1 parent 741feed commit 4c1e5aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions .emacs.d/init.d/arch/gnu/linux/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
(if (display-graphic-p)
(progn
(set-face-attribute 'default nil :family "UDEV Gothic JPDOC" :height 120)
(when (executable-find "wl-copy")
;; https://www.emacswiki.org/emacs/CopyAndPaste#h5o-4
;; credit: yorickvP on Github
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
nil ; should return nil if we're the current paste owner
(shell-command-to-string "wl-paste -n | tr -d \r")))
(setq interprogram-cut-function 'wl-copy)
(setq interprogram-paste-function 'wl-paste))))
(when (equal window-system 'pgtk)
(when (executable-find "wl-copy")
;; https://www.emacswiki.org/emacs/CopyAndPaste#h5o-4
;; credit: yorickvP on Github
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
nil ; should return nil if we're the current paste owner
(shell-command-to-string "wl-paste -n | tr -d \r")))
(setq interprogram-cut-function 'wl-copy)
(setq interprogram-paste-function 'wl-paste)))))
;; (setq initial-frame-alist
;; (append (list
;; '(height . 32)
Expand Down
2 changes: 1 addition & 1 deletion .zsh/.zshrc.mine
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export WEBKIT_FORCE_SANDBOX=0
# then
# sudo ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
# fi
if which xrdb > /dev/null; then xrdb -merge ~/.Xresources; fi
# if which xrdb > /dev/null; then xrdb -merge ~/.Xresources; fi
if [ -z "$WAYLAND_DISPLAY" ]
then
if which setxkbmap > /dev/null; then setxkbmap -layout us; fi
Expand Down

0 comments on commit 4c1e5aa

Please sign in to comment.