{"id":13646676,"url":"https://github.com/dimitri/switch-window","last_synced_at":"2025-10-30T15:14:57.881Z","repository":{"id":1044556,"uuid":"875586","full_name":"dimitri/switch-window","owner":"dimitri","description":"Offer a *visual* way to choose a window to switch to","archived":false,"fork":false,"pushed_at":"2022-08-12T21:37:33.000Z","size":336,"stargazers_count":293,"open_issues_count":5,"forks_count":36,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-02T00:07:18.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tapoueh.org/projects.html#sec19","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimitri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-31T18:56:28.000Z","updated_at":"2024-05-01T01:57:13.000Z","dependencies_parsed_at":"2022-08-12T21:40:09.174Z","dependency_job_id":null,"html_url":"https://github.com/dimitri/switch-window","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitri%2Fswitch-window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitri%2Fswitch-window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitri%2Fswitch-window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitri%2Fswitch-window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitri","download_url":"https://codeload.github.com/dimitri/switch-window/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240415659,"owners_count":19797671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:03:02.890Z","updated_at":"2025-10-30T15:14:52.845Z","avatar_url":"https://github.com/dimitri.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"\n# \u0026#30446;\u0026#24405;\n\n1.  [What is switch-window](#org9b80f3a)\n    1.  [Installation](#org1901772)\n    2.  [Configure and Usage](#org01196ff)\n    3.  [Tips](#org2d38818)\n        1.  [I want to select a window with \"a-z\" instead of \"1-9\".](#org717fd2d)\n        2.  [I want to let window to show bigger label.](#org60994d2)\n        3.  [I want to **hide** window label when window's number \u003c 3](#orgdda3c53)\n        4.  [I want to select minibuffer with label \"z\".](#org6e7586e)\n        5.  [I want to auto resize a window when switch to it](#orgf5e3a00)\n        6.  [Switch-window seem to conflict with Exwm, how to do?](#orgb4d408a)\n        7.  [I use text terminal, but I want **bigger** label.](#org3db5fe7)\n        8.  [I want to use image or icon as label.](#orge3cc36e)\n        9.  [\\`switch-window-shortcut-appearance' can't satisfy my need.  how to do?](#org0124ba1)\n        10. [Have any other similar package exist?](#org8ca55e7)\n    4.  [Changelog](#org28e451f)\n        1.  [1.6.0 - 2018-06-06](#orgc3208c1)\n        2.  [1.5.0 - 2017-04-29](#orgab813d2)\n        3.  [1.0.0 - 2015-01-14](#org6a9177a)\n        4.  [0.11 - 2013-09-14](#orgaba8619)\n        5.  [0.10 - 2011-06-19](#orgf02a915)\n        6.  [0.9 - 2010-11-11 - emacs22 called, it wants some support](#org005fae8)\n        7.  [0.8 - 2010-09-13 - 999](#org8ce6897)\n        8.  [0.7 - 2010-08-23 - window-dedicated-p](#orgba23ce4)\n        9.  [0.6 - 2010-08-12 - **Minibuf-1**](#org70a0744)\n        10. [0.5 - 2010-08-08 - Polishing](#org531e6dd)\n\n\n\u003ca id=\"org9b80f3a\"\u003e\u003c/a\u003e\n\n# What is switch-window\n\nswitch-window is an Emacs window switch tool, which offer a\n**visual** way to choose a window to switch to, delete, split\nor other operations.\n\n![img](./snapshots/switch-window.png)\n\n\n\u003ca id=\"org1901772\"\u003e\u003c/a\u003e\n\n## Installation\n\n1.  Config melpa source, please read: \u003chttp://melpa.org/#/getting-started\u003e\n2.  M-x package-install RET switch-window RET\n\nNote: User can install switch-window with [El-Get](http://github.com/dimitri/el-get) too.\n\n\n\u003ca id=\"org01196ff\"\u003e\u003c/a\u003e\n\n## Configure and Usage\n\n    (require 'switch-window)\n    (global-set-key (kbd \"C-x o\") 'switch-window)\n    (global-set-key (kbd \"C-x 1\") 'switch-window-then-maximize)\n    (global-set-key (kbd \"C-x 2\") 'switch-window-then-split-below)\n    (global-set-key (kbd \"C-x 3\") 'switch-window-then-split-right)\n    (global-set-key (kbd \"C-x 0\") 'switch-window-then-delete)\n\n    (global-set-key (kbd \"C-x 4 d\") 'switch-window-then-dired)\n    (global-set-key (kbd \"C-x 4 f\") 'switch-window-then-find-file)\n    (global-set-key (kbd \"C-x 4 m\") 'switch-window-then-compose-mail)\n    (global-set-key (kbd \"C-x 4 r\") 'switch-window-then-find-file-read-only)\n\n    (global-set-key (kbd \"C-x 4 C-f\") 'switch-window-then-find-file)\n    (global-set-key (kbd \"C-x 4 C-o\") 'switch-window-then-display-buffer)\n\n    (global-set-key (kbd \"C-x 4 0\") 'switch-window-then-kill-buffer)\n\nWhen switch-window is enabled, user can use the below five keys:\n\n\u003ctable border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\"\u003e\n\n\n\u003ccolgroup\u003e\n\u003ccol  class=\"org-left\" /\u003e\n\n\u003ccol  class=\"org-left\" /\u003e\n\u003c/colgroup\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003ekey\u003c/th\u003e\n\u003cth scope=\"col\" class=\"org-left\"\u003ecommand description\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"i\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eMove the border up\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"k\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eMove the border down\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"j\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eMove the border left\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"l\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eMove the border right\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"b\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eBalance windows\u003c/td\u003e\n\u003c/tr\u003e\n\n\n\u003ctr\u003e\n\u003ctd class=\"org-left\"\u003e\"SPC\"\u003c/td\u003e\n\u003ctd class=\"org-left\"\u003eResume auto-resize\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nIf you want to customize this feature, please see variable:\n\\`switch-window-extra-map'.\n\nNote: if you use auto-resize window feature, you **must** know\nthat when you execute above window operate commands, auto-resize\nfeature will be disabled temporarily, you should use above \"SPC\"\nkey to resume.\n\n\n\u003ca id=\"org2d38818\"\u003e\u003c/a\u003e\n\n## Tips\n\n\n\u003ca id=\"org717fd2d\"\u003e\u003c/a\u003e\n\n### I want to select a window with \"a-z\" instead of \"1-9\".\n\n    (setq switch-window-shortcut-style 'qwerty)\n\nNote: user can arrange qwerty shortcuts by variable\n\\`switch-window-qwerty-shortcuts'.\n\n\n\u003ca id=\"org60994d2\"\u003e\u003c/a\u003e\n\n### I want to let window to show bigger label.\n\nThe face of label is switch-window-label, user can change it :height\nwith custiomize-face\n\n\n\u003ca id=\"orgdda3c53\"\u003e\u003c/a\u003e\n\n### I want to **hide** window label when window's number \u003c 3\n\n    (setq switch-window-threshold 2)\n\n\n\u003ca id=\"org6e7586e\"\u003e\u003c/a\u003e\n\n### I want to select minibuffer with label \"z\".\n\n    (setq switch-window-minibuffer-shortcut ?z)\n\n\n\u003ca id=\"orgf5e3a00\"\u003e\u003c/a\u003e\n\n### I want to auto resize a window when switch to it\n\n    (setq switch-window-auto-resize-window t)\n    (setq switch-window-default-window-size 0.8) ;80% of frame size\n    (switch-window-mouse-mode) ;auto resize when switch window with mouse\n\nAdvanced usage:\n\n    (setq switch-window-auto-resize-window\n          (lambda ()\n            (equal (buffer-name) \"*scratch*\"))) ;when return t, run auto switch\n    (setq switch-window-default-window-size '(0.8 . 0.6)) ;80% width and 60% height of frame\n\nBy the way, you can use package [golden-ratio](https://github.com/roman/golden-ratio.el) also.\n\n\n\u003ca id=\"orgb4d408a\"\u003e\u003c/a\u003e\n\n### Switch-window seem to conflict with Exwm, how to do?\n\nBy default, switch-window get user's input with the help\nof function \\`read-event', this approach does not work well\nwith [Exwm](https://github.com/ch11ng/exwm) (Emacs X window manager),\nuser should set the below variable and use minibuffer\nto get input instead:\n\n    (setq switch-window-input-style 'minibuffer)\n\nNote: if you use minibuffer to get input, the feature about\n\\`switch-window-minibuffer-shortcut' will not work well.\n\n\n\u003ca id=\"org3db5fe7\"\u003e\u003c/a\u003e\n\n### I use text terminal, but I want **bigger** label.\n\nThe only choice is using asciiart, which **draw** a bigger label\nwith **small** ascii char.\n\n    (setq switch-window-shortcut-appearance 'asciiart)\n\n![img](./snapshots/switch-window-3.png)\n\n\n\u003ca id=\"orge3cc36e\"\u003e\u003c/a\u003e\n\n### I want to use image or icon as label.\n\n1.  Prepare your label images, rename them to:\n    1.png \u0026#x2026; 9.png, a.png \u0026#x2026; z.png.\n\n    You can use other image types supported by\n    Emacs, please see: \\`image-types'.\n2.  Put all above images to directory:\n    \\`switch-window-image-directory'.\n3.  Set variable: \\`switch-window-shortcut-appearance'\n\n        (setq switch-window-shortcut-appearance 'image)\n\n![img](./snapshots/switch-window-2.png)\n\n\n\u003ca id=\"org0124ba1\"\u003e\u003c/a\u003e\n\n### \\`switch-window-shortcut-appearance' can't satisfy my need.  how to do?\n\nAll you should do is hacking you own label buffer function,\nfor example: my-switch-window-label-buffer-function, and set\nthe below variable:\n\n    (setq switch-window-label-buffer-function\n          'my-switch-window-label-buffer-function)\n\n\n\u003ca id=\"org8ca55e7\"\u003e\u003c/a\u003e\n\n### Have any other similar package exist?\n\n-   [ace-window](https://github.com/abo-abo/ace-window)\n\n\n\u003ca id=\"org28e451f\"\u003e\u003c/a\u003e\n\n## Changelog\n\n\n\u003ca id=\"orgc3208c1\"\u003e\u003c/a\u003e\n\n### 1.6.0 - 2018-06-06\n\n1.  Add switch-window-label face to control the appearance of label.\n2.  Remove \\`switch-window-increase', use switch-window-label face instead.\n3.  Show orig text with label: see \\`switch-window-background'\n4.  Switch between frames:  see \\`switch-window-multiple-frames'\n5.  [incompatible] \\`switch-window-label-buffer-function''s arguments have changed,\n    user should update when use it.\n\n\n\u003ca id=\"orgab813d2\"\u003e\u003c/a\u003e\n\n### 1.5.0 - 2017-04-29\n\n-   Implement commands:\n    1.  switch-window-then-maximize\n    2.  switch-window-then-delete\n    3.  switch-window-then-split-below\n    4.  switch-window-then-split-right\n    5.  switch-window-then-split-horizontally\n    6.  switch-window-then-split-vertically\n    7.  switch-window-then-swap-buffer\n-   Let switch-window work well with Exwm (Emacs X window manager).\n-   User can customize switch-window label's appearance.\n\n\n\u003ca id=\"org6a9177a\"\u003e\u003c/a\u003e\n\n### 1.0.0 - 2015-01-14\n\n-   Please fixme.\n\n\n\u003ca id=\"orgaba8619\"\u003e\u003c/a\u003e\n\n### 0.11 - 2013-09-14\n\n-   restore point to end-of-buffer for windows where it was the case after\n    switching, fixing an anoying bug.\n\n\n\u003ca id=\"orgf02a915\"\u003e\u003c/a\u003e\n\n### 0.10 - 2011-06-19\n\n-   implement M-x delete-other-window (thanks developernotes on github)\n\n\n\u003ca id=\"org005fae8\"\u003e\u003c/a\u003e\n\n### 0.9 - 2010-11-11 - emacs22 called, it wants some support\n\n-   implement a propertize based hack to support emacs22\n\n\n\u003ca id=\"org8ce6897\"\u003e\u003c/a\u003e\n\n### 0.8 - 2010-09-13 - 999\n\n-   Suport more than 9 windows (with a single key to type)\n-   Use quail-keyboard-layout to choose single key labels for windows\n\n\n\u003ca id=\"orgba23ce4\"\u003e\u003c/a\u003e\n\n### 0.7 - 2010-08-23 - window-dedicated-p\n\n-   temporarily unset the window dedicated flag for displaying the\n    numbers, patch from René Kyllingstad \u003cRene@Kyllingstad.com\u003e\n-   fix timeout and RET handling wrt to not changing window selection\n\n\n\u003ca id=\"org70a0744\"\u003e\u003c/a\u003e\n\n### 0.6 - 2010-08-12 - **Minibuf-1**\n\n-   add support for selecting the minibuffer when it's active\n-   some try at a better horizontal centering\n-   assorted cleanup\n\n\n\u003ca id=\"org531e6dd\"\u003e\u003c/a\u003e\n\n### 0.5 - 2010-08-08 - Polishing\n\n-   dim:switch-window-increase is now a maximum value\n\n\n\nConverted from switch-window.el by [el2org](https://github.com/tumashu/el2org) .","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitri%2Fswitch-window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitri%2Fswitch-window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitri%2Fswitch-window/lists"}