• Stars
    star
    233
  • Rank 170,950 (Top 4 %)
  • Language
    Emacs Lisp
  • Created almost 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hide mode-line, display necessary information at right of minibuffer.

More screenshots

What's this?

I don't like the mode-line, it's too high and affect me to read the code. With Emacs, we only need to focus on very little information, such as time, current mode, git branch. Excessive information can seriously interfere with our attention.

Installation

Clone this repository

$ git clone --depth=1 https://github.com/manateelazycat/awesome-tray.git

Then put awesome-tray.el to your load-path.

The load-path is usually ~/elisp/. It's set in your ~/.emacs like this:

(add-to-list `load-path (expand-file-name "~/elisp"))
(require 'awesome-tray)
(awesome-tray-mode 1)

Customize Mode line.

  • awesome-tray-hide-mode-line: Enabled by default, makes the mode-line very thin and highlight it when its active/inactive.
  • awesome-tray-mode-line-active-color: Use for customize active color.
  • awesome-tray-mode-line-inactive-color: Use for customize inactive color.
  • awesome-tray-mode-line-height: Mode line height, default is 0.1
  • awesome-tray-date-format: Use to customize the date string format.
  • awesome-tray-mpd-format: Use to customize the mpd string format, see the variable docstring for details.
  • awesome-tray-git-format: Use to customize the git string format.
  • awesome-tray-location-format: Use to customize the location string format, see mode-line-format.
  • awesome-tray-location-info-all: Use to customize the location "All", if mode-line-format contains %p.
  • awesome-tray-location-info-top: Use to customize the location "Top", if mode-line-format contains %p.
  • awesome-tray-location-info-bottom: Use to customize the location "Bottom", if mode-line-format contains %p.
  • awesome-tray-git-show-status: If non-nil, show current file status on the git module.
  • awesome-tray-ellipsis: Use to customize the ellipses used when truncating.
  • awesome-tray-separator: Use to customize the separator between modules.
  • awesome-tray-evil-show-mode: If non-nil, show current evil mode in the evil module.
  • awesome-tray-evil-show-macro: If non-nil, show recording macro in the evil module.
  • awesome-tray-evil-show-cursor-count: If non-nil, show multiple cursors count in the evil module.
  • awesome-tray-github-update-duration: Update duration of the github notification, in seconds.
  • awesome-tray-github-erase-duration: Github notification time before it gets removed from the bar, in seconds.
  • awesome-tray-meow-show-mode: If non-nil, show current meow mode in the meow module.
  • awesome-tray-input-method-default-style: Input method indicator you want to show when no input method is toggled on.
  • awesome-tray-input-method-local-style: Input method indicator for your local input method.
  • awesome-tray-input-method-local-methods: List of input methods as your local input method. If input method is toggled on, but not a member of this list, input-method-title will display in as input method indicator in awesome-tray, such as "DE@" for German. Default is "rime".

Dangerous options

Please read the docstring for those variables

Those options can make your awesome-tray look weird, if your minibuffer looks weird disable them

  • awesome-tray-second-line: screenshot, Displays awesome-tray in a second line keeping the minibuffer messages readable.
  • awesome-tray-position: screenshot, Displays awesome-tray in the left, right or center, better to be used with awesome-tray-second-line enabled.

Customize Module

You can control modules through option awesome-tray-active-modules.

When changing the modules load awesome-tray-mode after setting the modules to prevent useless hooks and changes

You can find all modules name in the keys of variable awesome-tray-module-alist. Currently we have:

  • awesome-tab: Show group information of awesome-tab.
  • buffer-name: Show buffer name.
  • circe: Show circe tracking buffer information.
  • date: Show current date.
  • celestial: If you are not settled for date, you can add lunar phase and sunrise/set time. Requires celestial-mode-line package.
  • evil: Show evil state, recording macro and multiple cursors count in both evil-mc and multiple-cursors.
  • file-path: Show file path with full customizability. When the path is long, it can be shrinked into something like .../.em/el/awesome-tray/awesome-tray.el. See awesome-tray-file-path-*** variables for details.
  • git: Show git information.
  • last-command: Show last execute command.
  • location: Show point position in buffer.
  • pdf-view-page: Show page number in pdf-view-mode.
  • location-or-page: Show location or pdf page number depends on current mode.
  • parent-dir: Show direct parent directory.
  • mode-name: Show major mode name.
  • rvm: Show Ruby version information given by rvm-prompt.
  • battery: Show battery status.
  • input-method: Show input method status.
  • buffer-read-only: Show read only status.
  • belong: Show which class/function status, need install treesit first.
  • org-pomodoro: Show org-pomodoro status. Denote the rest time of pomodoro by [.], short break by (.) and long break by {.}.
  • flymake: Show Flymake state.
  • meow: Show meow state.
  • mpd: Show mpd information using libmpdel, you need to connect to a mpd profile, use (libmpdel-connect-profile (libmpdel--select-profile)) unless you have multiple profiles.
  • volume: Show current volume using volume.el.
  • word-count: Show file and selected region word-count.
  • anzu: Show searched word count and current index using anzu.
  • github: Show github notifications using async and ghub.
  • hostname: Show remote buffers hostname.

Create a Module

Let's create a module that says hello to you. With a module you need:

  • A name. Let's simply call it "hello".

  • A info function that returns the string to be displayed. Here's a simple one

    (defun my-module-hello-info ()
      (concat "Hello " (user-login-name) "!"))

    A complex info function may encounter an error, awesome-tray will handle this and not show any information there.

  • a face. Let's use a simple yet elegant italic style:

    (defface my-module-hello-face
      '((t (:italic t)))
      "Hello module face."
      :group 'awesome-tray)
  • Awesome-tray uses awesome-tray-module-alist to find informations about a module. Let's put ours in it:

    (add-to-list 'awesome-tray-module-alist
               '("hello" . (my-module-hello-info my-module-hello-face)))
  • Now put "hello" in the awesome-tray-active-modules list, and you will see awesome-tray say hello to you!

If you created a module that could be useful to others, please consider contributing it to awesome-tray!

More Repositories

1

lazycat-emacs

Andy Stewart's emacs
Emacs Lisp
425
star
2

aweshell

Awesome shell extension base on eshell with wonderful features!
Emacs Lisp
395
star
3

snails

A modern, easy-to-expand fuzzy search framework
Emacs Lisp
386
star
4

awesome-tab

Emacs package to provide out-of-the-box configuration to use tabs.
Emacs Lisp
364
star
5

deepin-terminal

Deepin Terminal written by vala
Vala
257
star
6

nox

Nox is a lightweight, high-performance LSP client for Emacs
Emacs Lisp
206
star
7

color-rg

Search and refactoring tool based on ripgrep.
Emacs Lisp
149
star
8

popweb

Show popup web window for Emacs
JavaScript
142
star
9

mind-wave

Emacs AI plugin based on ChatGPT API
Emacs Lisp
137
star
10

company-english-helper

English helper base on Emacs company-mode
Emacs Lisp
99
star
11

insert-translated-name

Insert translated string as variable or function name
Emacs Lisp
87
star
12

awesome-pair

Auto parenthesis pairing with syntax table
Emacs Lisp
76
star
13

auto-save

Automatically save files without temporary files to protect your finger. ;)
Emacs Lisp
73
star
14

blink-search

In the blink of an eye, the search is complete
Emacs Lisp
72
star
15

sdcv

Emacs interface for sdcv (Stardict console version)
Emacs Lisp
64
star
16

deno-bridge

Build bridge between Emacs and Deno, execution of JavaScript and Typescript within Emacs.
Emacs Lisp
59
star
17

deepin-software-center

Software center for linux deepin.
Python
51
star
18

manateelazycat.github.io

My personal blog
HTML
50
star
19

deepin-screen-recorder

Deepin screen recorder
C++
50
star
20

holo-layer

HoloLayer is a multimedia layer plugin designed specifically for Emacs
Emacs Lisp
48
star
21

grammatical-edit

Grammatical edit base on tree-sitter
Emacs Lisp
47
star
22

hammerspoon-config

My config for Hammerspoon Window Manager
Lua
46
star
23

thing-edit

Copy and paste anything under cursor.
Emacs Lisp
46
star
24

sort-tab

Smarter tab solution for Emacs, sort tab with using frequency.
Emacs Lisp
44
star
25

deepin-system-monitor

System monitor for deepin
C++
41
star
26

instant-rename-tag

Instant rename tag
Emacs Lisp
32
star
27

python-bridge

Write Emacs Plugin by Python, split code from EAF.
Emacs Lisp
32
star
28

lazy-load

Lazy load keys for speed ​​up Emacs startup.
Emacs Lisp
30
star
29

deepin-pinyin-assistant

Deepin pinyin assistant
C
27
star
30

fingertip

Fingertip is struct edit plugin that base on treesit
Emacs Lisp
26
star
31

deepin-editor

Simple note application for deepin
C++
24
star
32

markmacro

Keyboard macro for marked regions
Emacs Lisp
21
star
33

one-key

Many commands share one key.
Emacs Lisp
20
star
34

mrkeyboard

Mr. Keyboard
Vala
17
star
35

grep-dired

Find name with given regexp, and show in dired.
Emacs Lisp
16
star
36

lazycat-theme

Cool hacker's emacs theme, but won't hurt your eye
Emacs Lisp
16
star
37

nova

Nova is a multi-threaded remote access plugin designed specifically for Emacs, with outstanding file synchronization performance.
Emacs Lisp
16
star
38

multi-term

Managing multiple terminal buffers in Emacs.
Emacs Lisp
15
star
39

deepin-voice-recorder

Voice recorder application for deepin
C++
15
star
40

corfu-english-helper

English helper for Emacs, base on corfu-mode
Emacs Lisp
15
star
41

lazy-search

Mark current symbol and jump in all matching symbols.
Emacs Lisp
15
star
42

lsp-bridge

Fastest LSP client for Emacs, work in progress...
Python
14
star
43

deepin-picker

Color picker tool for deepin
C++
13
star
44

css-sort

An Emacs extension you can sort CSS attributables automatically.
Emacs Lisp
13
star
45

tower-ng

Use rails write web todo-list tool like https://tower.im, this project is just a learning project
Ruby
12
star
46

smart-align

Smart align block around cursor
Emacs Lisp
11
star
47

delete-block

Delete block effectively
Emacs Lisp
10
star
48

recursive-search-references

Find function references in directory
Emacs Lisp
9
star
49

deepin-desktop-monitor

Deepin Desktop Monitor
C++
8
star
50

key-echo

Key-Echo is an Emacs plugin that uses XRecord technology to listen to system key events
Emacs Lisp
8
star
51

highlight-matching-tag

This plugin will highlight matching tag instantaneously.
Emacs Lisp
8
star
52

bison

Mode to editing bision source code in Emacs
Emacs Lisp
8
star
53

wraplish

Wraplish 是一个在 Unicode 与英文之间加上空格的Emacs插件,
Emacs Lisp
7
star
54

duplicate-line

Duplicate line or region, don't need move cursor.
Emacs Lisp
7
star
55

flex

It's a mode for flex files that provide better syntax highlight than flex-mode.el
Emacs Lisp
7
star
56

watch-other-window

Scroll other window and keep current window's position.
Emacs Lisp
7
star
57

find-define

Jump to the definition of a function or variable
Emacs Lisp
6
star
58

deepin-gnome-shell-3.4.1

Deepin gnome shell 3.4.1
C
6
star
59

move-text

Move current line or region
Emacs Lisp
6
star
60

deepin-translate-tools

Translate tools for deepin linux.
Python
6
star
61

vi-navigate

Navigate read-only buffer like vi behavior.
Emacs Lisp
6
star
62

html-to-word

This is a HTML to Word conversion library for Rails.
Ruby
6
star
63

manateelazycat

Github profile repo
5
star
64

cache-path-from-shell

Provide a chache mechanism make sure exec-path-from-shell just execute once.
Emacs Lisp
5
star
65

find-orphan

Find orphan function that need remove
Emacs Lisp
5
star
66

open-newline

Open newline like vi.
Emacs Lisp
4
star
67

toggle-one-window

Toggle between window layout and one window.
Emacs Lisp
4
star
68

lazycat-gs-theme

Gnome shell for my own use
Shell
3
star
69

manatee

Manatee Integrate Live Environment
Haskell
3
star
70

deb2po

Convert format between *.debian and *.po file.
Python
3
star
71

effortless-indent

Indent paste code without additional selection operations
Emacs Lisp
3
star
72

lazycat-emacs-time-machine

The elisp code that has been tossed, no longer used, archived to commemorate
Emacs Lisp
3
star
73

deno-bridge-ts

Build bridge between Emacs and Deno, execution of JavaScript and Typescript within Emacs, this repo is TypeScript part for deno-bridge
TypeScript
1
star