LINUX.ORG.RU

exmw установка

 


1

1

Всем удачи... Можете, пожалуйста, подсказать как установить exwm? добавил в init

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

какие пакеты нужно установить? и дальше?..



Последнее исправление: thakur (всего исправлений: 1)

Ну вот тебе мой конфиг

(require 'exwm)

;; Fix problems with Ido
(require 'exwm-config)
(exwm-config-ido)

;; Set the initial number of workspaces.
(setq exwm-workspace-number 6)

;; All buffers created in EXWM mode are named "*EXWM*". You may want to change
;; it in `exwm-update-class-hook' and `exwm-update-title-hook', which are run
;; when a new window class name or title is available. Here's some advice on
;; this subject:
;; + Always use `exwm-workspace-rename-buffer` to avoid naming conflict.
;; + Only renaming buffer in one hook and avoid it in the other. There's no
;;   guarantee on the order in which they are run.
;; + For applications with multiple windows (e.g. GIMP), the class names of all
;;   windows are probably the same. Using window titles for them makes more
;;   sense.
;; + Some application change its title frequently (e.g. browser, terminal).
;;   Its class name may be more suitable for such case.
;; In the following example, we use class names for all windows expect for
;; Java applications and GIMP.
(add-hook 'exwm-update-class-hook
          (lambda ()
            (unless (or (string-prefix-p "sun-awt-X11-" exwm-instance-name)
                        (string= "gimp" exwm-instance-name))
              (exwm-workspace-rename-buffer exwm-class-name))))
(add-hook 'exwm-update-title-hook
          (lambda ()
            (when (or (not exwm-instance-name)
                      (string-prefix-p "sun-awt-X11-" exwm-instance-name)
                      (string= "gimp" exwm-instance-name))
              (exwm-workspace-rename-buffer exwm-title))))

;; `exwm-input-set-key' allows you to set a global key binding (available in
;; any case). Following are a few examples.
;; + We always need a way to go back to line-mode from char-mode
(exwm-input-set-key (kbd "s-r") #'exwm-reset)
;; + Bind a key to switch workspace interactively
(exwm-input-set-key (kbd "s-w") #'exwm-workspace-switch)
;; + Bind "s-0" to "s-9" to switch to the corresponding workspace.
(dotimes (i 10)
  (exwm-input-set-key (kbd (format "s-%d" i))
                      `(lambda ()
                         (interactive)
                         (exwm-workspace-switch-create ,i))))
;; + Application launcher ('M-&' also works if the output buffer does not
;;   bother you). Note that there is no need for processes to be created by
;;   Emacs.
(exwm-input-set-key (kbd "s-d")
                    (lambda (command)
                      (interactive (list (read-shell-command "> ")))
                      (start-process-shell-command command nil command)))
;; + 'slock' is a simple X display locker provided by suckless tools.
(exwm-input-set-key (kbd "s-l")
                    (lambda () (interactive) (start-process "" nil "slock")))

;; The following example demonstrates how to set a key binding only available
;; in line mode. It's simply done by first push the prefix key to
;; `exwm-input-prefix-keys' and then add the key sequence to `exwm-mode-map'.
;; The example shorten 'C-c q' to 'C-q'.
(push ?\C-q exwm-input-prefix-keys)
(define-key exwm-mode-map [?\C-q] #'exwm-input-send-next-key)

;; The following example demonstrates how to use simulation keys to mimic the
;; behavior of Emacs. The argument to `exwm-input-set-simulation-keys' is a
;; list of cons cells (SRC . DEST), where SRC is the key sequence you press and
;; DEST is what EXWM actually sends to application. Note that SRC must be a key
;; sequence (of type vector or string), while DEST can also be a single key.
(exwm-input-set-simulation-keys
 '(
    ;; movement
    ([?\C-b] . left)
    ([?\M-b] . C-left)
    ([?\C-f] . right)
    ([?\M-f] . C-right)
    ([?\C-p] . up)
    ([?\C-n] . down)
    ([?\C-a] . home)
    ([?\C-e] . end)
    ([?\M-v] . prior)
    ([?\C-v] . next)
    ([?\C-d] . delete)
    ([?\C-k] . (S-end delete))
    ;; cut/paste.
    ([?\C-w] . ?\C-x)
    ([?\M-w] . ?\C-c)
    ([?\C-y] . ?\C-v)
    ;; search
    ([?\C-s] . ?\C-f)))

;; You can hide the mode-line of floating X windows by uncommenting the
;; following lines
;(add-hook 'exwm-floating-setup-hook #'exwm-layout-hide-mode-line)
;(add-hook 'exwm-floating-exit-hook #'exwm-layout-show-mode-line)

;; You can hide the minibuffer and echo area when they're not used, by
;; uncommenting the following line
;(setq exwm-workspace-minibuffer-position 'bottom)

(require 'exwm-randr)
(setq exwm-randr-workspace-output-plist '(0 "eDP1"))

(defun exwm-auto-toggle-screen ()
  (with-temp-buffer
    (call-process "xrandr" nil t nil)
    (beginning-of-buffer)
    (if (search-forward "HDMI2 connected" nil 'noerror)
        (start-process-shell-command
         "xrandr" nil "xrandr --output eDP1 --mode 1920x1200 --output HDMI2 --mode 1920x1200 --same-as eDP1")
      (start-process-shell-command
       "xrandr" nil "xrandr --output eDP1 --mode 1920x1200"))))

(add-hook 'exwm-randr-screen-change-hook 'exwm-auto-toggle-screen)

(exwm-randr-enable)

(require 'exwm-cm)
;; Make all Emacs frames opaque.
(setq window-system-default-frame-alist '((x . ((alpha . 100)))))
;; Assign everything else a 80% opacity.
(setq exwm-cm-opacity 95)
(exwm-cm-enable)

;; Systray
(require 'exwm-systemtray)
(exwm-systemtray-enable)

;; Do not forget to enable EXWM. It will start by itself when things are ready.
(exwm-enable)

/usr/share/xsessions/exwm.desktop

[Desktop Entry]
Name=EXWM
Comment=improved dynamic tiling window manager
Exec=/usr/bin/emacs
TryExec=/usr/bin/emacs
Type=Application
X-LightDM-DesktopName=exwm
DesktopNames=exwm
Keywords=tiling;wm;windowmanager;window;manager;
Difrex ★★★★
()
Ответ на: комментарий от Difrex

то есть просто добавляю в init; M-x eval-buffer; потом в /usr/share/xsessions/exwm.desktop и пакеты устанавливать не надо?..это готовое решение?

thakur
() автор топика

Привет.

Устанавливать один пакет руками можно так:

M-x, package-refresh-contents, package-install, exwm

Можно настроить автоматическую установку пакетов.

Лично я использую вот такой участок кода:

(let* ((package--builtins nil)
       (packages
       '(exwm ; Emacs X Window Manager
         org ; org-mode
          )))         
  (ignore-errors 
    (let ((packages (remove-if 'package-installed-p packages)))
      (when packages
        ;; Install uninstalled packages
        (package-refresh-contents)
        (mapc 'package-install packages)))))

Он проверяет, установлены ли пакеты из списка(в данном примере — exwm и org для наглядности), обновляет список из репозиториев и устанавливает ранее не установленные.

raven_cler ★★
()
Последнее исправление: raven_cler (всего исправлений: 1)
Ответ на: комментарий от raven_cler

UPD:

Для одного пакета:

(unless (package-installed-p 'exwm)
  (package-refresh-contents)
  (package-install 'use-package))

raven_cler ★★
()
Ответ на: комментарий от raven_cler

Он проверяет, установлены ли пакеты из списка(в данном примере — exwm и org для наглядности), обновляет список из репозиториев и устанавливает ранее не установленные.

круто.... спасибо. попробую.

thakur
() автор топика
Ответ на: комментарий от thakur

вчера проводил манипуляции с пакетом и может не правильно хотел снова и он куда-то исчез где его искать?

  eww-lnum           20150102.1512 available  melpa      Conkeror-like functionality for eww
  exato              20180305.1042 available  melpa      EXATO: Evil XML/HTML Attributes Text Object
  excorporate        0.8.1         available  gnu        Exchange integration
  exec-path-from-... 20190106.307  available  melpa      Get environment variables such as $PATH from the shell
  exiftool           20190203.2006 available  melpa      Elisp wrapper around ExifTool
  exotica-theme      20180212.2329 available  melpa      A dark theme with vibrant colors
  expand-line        20151006.207  available  melpa      Expand selection by line
  expand-region      20190416.538  available  melpa      Increase selected region by semantic units.
  express            20140508.2041 available  melpa      Alternatives to `message'
  exsqlaim-mode      20170607.1003 available  melpa      Use variables inside sql queries
  extempore-mode     20180105.621  available  melpa      Emacs major mode for Extempore source files
  extend-dnd         20151122.1850 available  melpa      R drag and Drop
  extmap             20181028.1645 available  melpa      Externally-stored constant mapping for Elisp
  exunit             20190216.340  available  melpa      ExUnit test runner

thakur
() автор топика
Ответ на: комментарий от Difrex

Класс, спасибо!

Можешь рассказать, зачем нужны переименования в exwm-update-class-hook и exwm-update-title-hook - что это даёт?

И, похоже, у тебя коммент про opacity с кодом рассинхронизовался ;)

zabbal ★★★★★
()
Ответ на: комментарий от zabbal

Можешь рассказать, зачем нужны переименования в exwm-update-class-hook и exwm-update-title-hook - что это даёт?

я сам ничего не переименовывал. пробовал установить пакет exwm. потом увидел, что ещё есть какие-то пакеты начинающиеся на exwm и их попробовал установить. вставил предложенный Вами кофиг...ничего не произошло. посмотрел снова этот список и обнаружил, что нет там exwm. решил, что какую-то хрень сделал и поэтому написал. щас там у меня при наборе команды показываются варианты

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
exwm-debug 	exwm-exit
exwm-firefox-core-back-word 	exwm-firefox-core-back-word-select
exwm-firefox-core-bookmark-menu 	exwm-firefox-core-bookmark-new
exwm-firefox-core-bookmark-sidebar 	exwm-firefox-core-bottom
exwm-firefox-core-bottom-select 	exwm-firefox-core-cancel
exwm-firefox-core-copy 	exwm-firefox-core-cut
exwm-firefox-core-delete 	exwm-firefox-core-down
exwm-firefox-core-down-select 	exwm-firefox-core-downloads-menu
exwm-firefox-core-find 	exwm-firefox-core-find-next
exwm-firefox-core-find-previous 	exwm-firefox-core-focus-search-bar
exwm-firefox-core-forward-word 	exwm-firefox-core-forward-word-select
exwm-firefox-core-half-page-down 	exwm-firefox-core-half-page-down-select
exwm-firefox-core-half-page-up 	exwm-firefox-core-half-page-up-select
exwm-firefox-core-history-back 	exwm-firefox-core-history-forward
exwm-firefox-core-history-menu 	exwm-firefox-core-history-sidebar
exwm-firefox-core-home-page 	exwm-firefox-core-left
exwm-firefox-core-left-select 	exwm-firefox-core-open-file
exwm-firefox-core-page-down 	exwm-firefox-core-page-down-select
exwm-firefox-core-page-up 	exwm-firefox-core-page-up-select
exwm-firefox-core-paste 	exwm-firefox-core-quick-find
exwm-firefox-core-quit 	exwm-firefox-core-reader-mode
exwm-firefox-core-redo 	exwm-firefox-core-reload
exwm-firefox-core-reload-override-cache 	exwm-firefox-core-right
exwm-firefox-core-right-select 	exwm-firefox-core-save-page
exwm-firefox-core-select-all 	exwm-firefox-core-tab-close
exwm-firefox-core-tab-close-undo 	exwm-firefox-core-tab-first
exwm-firefox-core-tab-last 	exwm-firefox-core-tab-move-left
exwm-firefox-core-tab-move-right 	exwm-firefox-core-tab-mute
exwm-firefox-core-tab-new 	exwm-firefox-core-tab-next
exwm-firefox-core-tab-previous
exwm-firefox-core-toggle-focus-search-bar
exwm-firefox-core-top 	exwm-firefox-core-top-select
exwm-firefox-core-undo 	exwm-firefox-core-up
exwm-firefox-core-up-select 	exwm-firefox-core-window-close
exwm-firefox-core-window-close-undo 	exwm-firefox-core-window-new
exwm-firefox-core-window-new-private 	exwm-firefox-evil-activate-if-firefox
exwm-firefox-evil-mode 	exwm-floating-hide
exwm-floating-toggle-floating 	exwm-init
exwm-input-grab-keyboard 	exwm-input-release-keyboard
exwm-input-send-next-key 	exwm-input-send-simulation-key
exwm-input-set-key 	exwm-input-set-simulation-key
exwm-input-toggle-keyboard 	exwm-layout-enlarge-window
exwm-layout-enlarge-window-horizontally 	exwm-layout-hide-mode-line
exwm-layout-set-fullscreen 	exwm-layout-show-mode-line
exwm-layout-shrink-window 	exwm-layout-shrink-window-horizontally
exwm-layout-toggle-fullscreen 	exwm-layout-toggle-mode-line
exwm-layout-unset-fullscreen 	exwm-mode
exwm-mode-menu 	exwm-randr--refresh
exwm-randr-refresh 	exwm-reset
exwm-restart 	exwm-workspace--handle-focus-in
exwm-workspace--handle-focus-out 	exwm-workspace--prompt-add
exwm-workspace--prompt-delete 	exwm-workspace--switch-map-nth-prefix
exwm-workspace--switch-map-select-nth 	exwm-workspace-add
exwm-workspace-attach-minibuffer 	exwm-workspace-delete
exwm-workspace-detach-minibuffer 	exwm-workspace-move
exwm-workspace-move-window 	exwm-workspace-swap
exwm-workspace-switch 	exwm-workspace-switch-create
exwm-workspace-switch-to-buffer 	exwm-workspace-toggle-minibuffer
exwmx-dmenu 	exwmx-dmenu-simple
при
M-x exwm-firefox-core-home-page
такое
xcb:keysyms:event->keysym: No method definition: xcb:keysyms:event->keysym, (nil M-home)

И, похоже, у тебя коммент про opacity с кодом рассинхронизовался ;)

и что делать?

P.S. сразу не расстреливайте...:-)

thakur
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.