A simple menu to keep all your most used one-liners and scripts in one place

Overview

Dama

Desktop Agnostic Menu Aggregate

This program aims to be a hackable, easy to use menu that can be paired to lightweight window managers in order to change settings on the fly.

This is a learning experience for me, most of what i'm doing is probably not a best practice.

Looks

here's a screenshot with the adapta gtk theme

feature roadmap

version 1.0 has been reached, possibly breaking changes will not occur on the main branch

changes might still be made to layout styling / anything that doesn't involve user configuration files

  • correctly render hardcoded components
  • parse components from a json file at startup
    • look in multiple locations before giving up
  • interact with provided scripts
    • execute commands (e.g. change brightness with a slider)
    • get values back from commands (e.g. set the correct value for the brightness slider at startup)
  • add support for image widgets
    • dynamically resize the image
  • add support for checkbox widgets
  • style the layout in a sensible way
    • allow setting names for tabs
    • move the tab list to the side

Dependencies

Dama is built with rust, using the gtk crate and uses cargo to manage the build process.

Installation

just run the command:

make install

writing your own menu entries

menu entries are read from json files listed in a file called config. The program will look for it in $XDG_CONFIG_HOME/dama/ if the variable is set, or in $HOME/.config/dama if it is not.

if that file doesn't exist, dama will try to read from $HOME/.dama/config.

each line of your config should be the full path to a json file describing a menu entry.

Available entries are of types:

{"Notebook" : [
      // list of children
]},

{"Box": [ "name", 
	  // this is used to set the tab's name if the box 
	  // is a direct child of a notebook.
	  // Otherwise, it is ignored and can be left empty.
	  "Vertical", 
          // or  Horizontal
      [
	  // list of children
      ]
]},

{"Label": "some text"},

{"Image": "/absolute/path/to/image"} 
            // the image will not be resized, you will have to resize 
            // the source file for the time being

{"Button": ["the button's label", 
            "notify-send \"click!\""]
            // the command to be executed on click 
}, 

{"Checkbox": ["the label",
			"echo true",
			// command providing initial state
            "notify-send $DAMA_VAL"]
            // the command to be executed on toggle
}, 

{"Scale": [0.0,   
           // the minimum value
           100.0,  
           // the maximum value
           "xbacklight -get",
           // the command to run in order to get the initial value.
           // this will be clamped between maximum and minimum values.
           "xbacklight -set $DAMA_VAL"] 
           // the command to be executed when the slider is moved.
           // the current value of the slider is available through                              
           // the environment variable $DAMA_VAL, rounded to an integer.
}                             

A toplevel Notebook is implicitly added as a container for your entries.

all commands are executed with sh -c.

In a horizontal Box, if the first element is a Label, it will expand to push the remaining elements to the right of the window. This should result in a tidier layout.

You might also like...
Checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks. See CVE-2021-42574

BIDI Character Detector This tool checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks to mitigate

ripgrep recursively searches directories for a regex pattern while respecting your gitignore
ripgrep recursively searches directories for a regex pattern while respecting your gitignore

ripgrep (rg) ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will resp

How-to: Sanitize your Rust code!

rust-san How-to: Sanitize your Rust code! Intro How to use the sanitizers? Examples AddressSanitizer Out of bounds access Use after free LeakSanitizer

Adds zero-cost stack overflow protection to your embedded programs

flip-link adds zero-cost stack overflow protection to your embedded programs The problem Bare metal Rust programs may not be memory safe in presence o

Cyg will help you to secure files in your repository directly using PGP encryption

cyg: Secure files in your repository Cyg will help you to secure files in your repository directly using PGP encryption. The name "cyg" was inspired b

A simple password manager written in Rust
A simple password manager written in Rust

ripasso A simple password manager written in Rust. The root crate ripasso is a library for accessing and decrypting passwords stored in pass format (G

A fast, simple, recursive content discovery tool written in Rust.
A fast, simple, recursive content discovery tool written in Rust.

A simple, fast, recursive content discovery tool written in Rust πŸ¦€ Releases ✨ Example Usage ✨ Contributing ✨ Documentation πŸ¦€ πŸ˜• What the heck is a f

simple multi-threaded port scanner written in rust
simple multi-threaded port scanner written in rust

knockson simple multi-threaded port scanner written in rust Install Using AUR https://aur.archlinux.org/packages/knockson-bin/ yay -Syu knockson-bin M

A simple port scanner built using rust-lang

A simple port scanner built using rust-lang

Comments
  • Better window resizing

    Better window resizing

    currently, the window can't be resized below the minimum size of the widgets contained in it. we could:

    • Collapse the sidebar when the window is too narrow
    • Resize the window below its minimum size anyway and add scrollbars when content is cropped.
    • set the window's geometry on startup to some sane value instead of 'just big enough for the current content'.
    enhancement 
    opened by ap29600 0
  • For the widgets that have state, add the possibility to update widget state when a specified file is written to.

    For the widgets that have state, add the possibility to update widget state when a specified file is written to.

    For example, the brightness slider may watch /sys/class/backlight/<...>/brightness and update state when the brightness changes due to other sources.

    enhancement 
    opened by ap29600 1
Owner
null
BGPKIT Parser aims to provides the most ergonomic MRT/BGP/BMP message parsing Rust API.

BGPKIT Parser aims to provides the most ergonomic MRT/BGP/BMP message parsing Rust API.

BGPKIT 46 Dec 19, 2022
Attempts to suspend all known AV/EDRs processes on Windows using syscalls and the undocumented NtSuspendProcess API. Made with <3 for pentesters. Written in Rust.

Ronflex Attempts to suspend all known AV/EDRs processes on Windows using syscalls and the undocumented NtSuspendProcess API. Made with <3 for penteste

null 5 Apr 17, 2023
Rusty Mimikatz - All credits to: github.com/ThottySploity/mimiRust (Original author deleted account so I uploaded for community use)

MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust. β–ˆβ–ˆβ–ˆβ–„ β–„β–ˆβ–ˆβ–ˆβ–“ β–ˆβ–ˆβ–“ β–ˆβ–ˆβ–ˆβ–„ β–„β–ˆβ–ˆβ–ˆβ–“ β–ˆβ–ˆβ–“ β–ˆβ–ˆβ–€β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–ˆ β–ˆβ–ˆ

null 179 Jan 5, 2023
Upgrade all the things

Introduction Note This is a fork of topgrade by r-darwish to keep it maintained. Keeping your system up to date usually involves invoking multiple pac

null 858 Apr 25, 2023
Advanced Fuzzing Library - Slot your Fuzzer together in Rust! Scales across cores and machines. For Windows, Android, MacOS, Linux, no_std, ...

LibAFL, the fuzzer library. Advanced Fuzzing Library - Slot your own fuzzers together and extend their features using Rust. LibAFL is written and main

Advanced Fuzzing League ++ 1.2k Jan 6, 2023
Breaking your Rust code for fun and profit

Breaking your Rust code for fun & profit this is an architecture-preview, not all components are there This is a mutation testing framework for Rust c

null 542 Jan 4, 2023
A tiny program that locates and extracts public save files from Windows to your local directory!

Save Game Extractor | Download Save Game Extractor is a tool that automatically locates and copies save files for Windows games in public directories.

popcar2 6 Dec 23, 2021
Cover your tracks during Linux Exploitation by leaving zero traces on system logs and filesystem timestamps. πŸ‘»πŸš

moonwalk Cover your tracks during Linux Exploitation / Penetration Testing by leaving zero traces on system logs and filesystem timestamps. ?? Table o

Mufeed VH 1.1k Jan 6, 2023
A simple scanner that loops through ips and checks if a minecraft server is running on port 25565

scanolotl Scanolotl is a simple scanner that loops through ips and checks if a minecraft server is running on port 25565. Scanolotl can also preform a

JustFr33z 3 Jul 28, 2022
spy on the DNS queries your computer is making

dnspeep dnspeep lets you spy on the DNS queries your computer is making. Here's some example output: $ sudo dnspeep query name

Julia Evans 1.2k Dec 29, 2022