Skip to content

An 𝐴𝑝𝑝 π‘™π‘Žπ‘’π‘›π‘β„Žπ‘’π‘Ÿ, π΅π‘Žπ‘ π‘–π‘ π‘π‘Žπ‘™π‘π‘’π‘™π‘Žπ‘‘π‘œπ‘Ÿ , πΈπ‘šπ‘œπ‘—π‘– π‘π‘–π‘π‘˜π‘’π‘Ÿ, πΆπ‘’π‘ π‘‘π‘œπ‘š π‘π‘œπ‘šπ‘šπ‘Žπ‘›π‘‘ π‘π‘Žπ‘™π‘™π‘’π‘‘π‘‘π‘’ for the terminal.

Notifications You must be signed in to change notification settings

5hubham5ingh/jiffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jiffy

𝐴𝑝𝑝 π‘™π‘Žπ‘’π‘›π‘β„Žπ‘’π‘Ÿ | π΅π‘Žπ‘ π‘–π‘ π‘π‘Žπ‘™π‘π‘’π‘™π‘Žπ‘‘π‘œπ‘Ÿ | πΈπ‘šπ‘œπ‘—π‘– π‘π‘–π‘π‘˜π‘’π‘Ÿ
πΆπ‘’π‘ π‘‘π‘œπ‘š π‘π‘œπ‘šπ‘šπ‘Žπ‘›π‘‘ π‘π‘Žπ‘™π‘™π‘’π‘‘π‘‘π‘’

Launcher
jiffyApp

Emojies
emoji

Calculator
bc

Dependencies

External

  • Kitty Terminal(optional) : For displaying app icon images.
  • fzf : For fuzzy searching.

GNU core utils

  • bc : Basic calculator.
  • head : Used in fzf's commands.
  • tail : Same as above.
  • echo : Same as above.
  • cut : Same as above.
  • column : Same as above.

Installation

  • You can download the precompiled binary of Jiffy from the GitHub Releases page.

  • Move the binary to a directory included in your system's PATH (e.g., /usr/local/bin or ~/bin).

  • After installing the binary, you can run jiffy from your terminal.

    Build from source

    • Install QuickJs compiler
      git clone --depth 1 https://github.com/bellard/quickjs.git &&
      cd quickjs &&
      make &&
      sudo make install &&
    • Get the Jiffy's source code and compile.
      git clone --depth 1 https://github.com/5hubham5ingh/jiffy.git &&
      cd jiffy &&
      qjsc -flto main.js -o jiffy
      sudo mv jiffy /usr/bin/

Configuration

Jiffy allows you to define custom menus in a menu.jsonc file. This file can be placed in your ~/.config/jiffy/ directory. The menu follows the JSONC format, where you can specify different system actions like shutdown, reboot, sleep, and other commands.

Example menu.jsonc

{
  "Power Menu": [
    {
      "name": "Shutdown",
      "exec": "shutdown -P now",
      "description": "System shutdown.",
      "icon" : "/home/ss/.config/jiffy/icons/shutdown.png"
    },
    {
      "name": "Sleep",
      "exec": "shutdown -H now",
      "description": "System sleep.",
      "icon" : "/home/ss/.config/jiffy/icons/sleep.png"
    },
    {
      "name": "Reboot",
      "exec": "shutdown -r now",
      "description": "System reboot.",
      "icon" : "/home/ss/.config/jiffy/icons/reboot.png"
    },
    {
      "name": "List scheduled shutdown.",
      "exec": "shutdown --show",
      "description": "List scheduled shutdown.",
      "icon" : "/home/ss/.config/jiffy/icons/list.png",
      "terminal": true
    }
  ]
}

This example defines a "Power Menu" with shutdown, reboot, and sleep options. The exec field specifies the command to run, and the description gives a brief explanation of each option.

Usage

You can launch Jiffy by running the following command:

jiffy [ARG] ...

Options

Option Description Possible Values Default
-m, --mode VAL Set the mode of commands from modes predefined in the config file. Apps, a, Basic calculator, bc, Emojies, e, Jiffy menu, j, +menus from menu.jsonc Jiffy menu
-s, --icon-size NUM App's icon cell size. Any integer 5
-p, --preset VAL Start with UI preset. 1, 2, 3 1
-x, --clipboard VAL Clipboard used for pasting the selected emoji. Any valid clipboard command (e.g., xsel, xclip) wl-copy
-c, --(no-)print-category Print app's category. --print-category, --no-print-category --print-category
--fzf-args VAL (+) Custom arguments for fzf. Any valid fzf argument
-r, --(no-)refresh Cache the application list. --refresh, --no-refresh --no-refresh
-t, --terminal VAL Default terminal to launch terminal apps. Any valid terminal command kitty -1 --hold
-i, --inject JS Inject JS code to run at startup. Any valid JavaScript code
-h, --help print help
--version print version

Examples

  1. Hide prompt and app's category:

    jiffy --fzf-args='--prompt=" "' -c
  2. Hide app description and refresh app's list:

    jiffy --fzf-args="--preview-window=0" --no-cache
  3. Change UI preset and inject custom JS:

    jiffy -p 2 -i 'OS.exec(["kitty", "@", "set-spacing", "margin=0"])'

    This example changes the UI preset and removes the window margin by injecting JavaScript.

Keyboard Shortcuts

You can switch between any predefined modes or UI presets using following shotcut keys-

Shortcut Action
ctrl+space Change UI preset
ctrl+e Emoji mode
ctrl+j Jiffy menu
ctrl+b Basic calculator
ctrl+a App launcher
ctrl+r Refresh system applications list (for app launcher)

Todo

  • Clipboard manager.

Feel free to contribute or open issues if you encounter any problems or have suggestions for new features.

About

An 𝐴𝑝𝑝 π‘™π‘Žπ‘’π‘›π‘β„Žπ‘’π‘Ÿ, π΅π‘Žπ‘ π‘–π‘ π‘π‘Žπ‘™π‘π‘’π‘™π‘Žπ‘‘π‘œπ‘Ÿ , πΈπ‘šπ‘œπ‘—π‘– π‘π‘–π‘π‘˜π‘’π‘Ÿ, πΆπ‘’π‘ π‘‘π‘œπ‘š π‘π‘œπ‘šπ‘šπ‘Žπ‘›π‘‘ π‘π‘Žπ‘™π‘™π‘’π‘‘π‘‘π‘’ for the terminal.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published