Commit Graph

30 Commits

Author SHA1 Message Date
Narvin Singh
59b3d77547 Feat: Commands
Add commands that can be the target of keybindings to perform an
action and update the status bar.
2020-12-31 13:39:04 -05:00
Narvin Singh
3c56b60400 Feat: MIT License 2020-12-30 01:24:32 -05:00
Narvin Singh
994cbf659f Feat: Rename the application to akuma-v-dwm 2020-12-30 01:05:06 -05:00
Narvin Singh
bf2f67a28d Refactor: Lifted code outside of main function
It seemed like overkill to enclose the entire script in a function
just so readonly variables would work correctly.
2020-12-30 00:36:11 -05:00
Narvin Singh
7a2f2bbf08 Style: Remove unnecessary declare statements 2020-12-29 22:32:16 -05:00
Narvin Singh
a071b38a9d Refactor: Use short signal name 2020-12-29 21:59:23 -05:00
Narvin Singh
5f6db51c0a Fix: ShellCheck SC2091 2020-12-29 21:25:13 -05:00
Narvin Singh
410fbe2477 Fix: Quote variable 2020-12-29 20:26:56 -05:00
Narvin Singh
5a6f16ea5b Feat: Usage and help parameter 2020-12-29 20:25:42 -05:00
Narvin Singh
96442be9b3 Feat: Efficient waiting with long-running sleep
Replace short foreground sleep in a loop with a long background sleep
in a loop that we wait, which should be much more efficient.
2020-12-29 18:58:38 -05:00
Narvin Singh
ea4806df9d Feat: Module list can be comma or space delimited 2020-12-29 15:08:25 -05:00
Narvin Singh
f0734ee8cb Fix: Update usage to reflect name: xrsbs
Update usage to refer to the scheduler by its new name and declare
constant variables as readonly.
2020-12-29 12:24:20 -05:00
Narvin Singh
8a512754e5 Refactor: Make variable names more descriptive
Change variable names and revise and consolidate comments so the code
is clearer.
2020-12-29 11:23:44 -05:00
Narvin Singh
0e8ca10665 Chore: Revise comments 2020-12-28 22:04:18 -05:00
Narvin Singh
56b1b2c9c8 Feat: Swap resolution and module list param order 2020-12-28 21:58:52 -05:00
Narvin Singh
3b421f4faa Chore: Add comment for ShellCheck SC1090 2020-12-28 20:17:51 -05:00
Narvin Singh
8471ea66c0 Feat: Daemon 2020-12-28 20:02:32 -05:00
Narvin Singh
08dc3a58d3 Feat: CPU, memory, backlight and volume modules 2020-12-28 14:03:50 -05:00
Narvin Singh
01ee5fba93 Feat: Default suffix is percent sign
By making the percent sign part of the suffix, it can be changed or
entirely omitted by changing the suffix.
2020-12-28 13:58:09 -05:00
Narvin Singh
2355282d88 Fix: Change module function names to be unique
The code for each module is wrapped in a function so the module
can be parameterized, and so its variables can be scoped to the
function. However, the function names must be unique, otherwise when
the modules are sourced, functions will overwrite functions with the
same name in previously sourced modules.
2020-12-28 11:48:33 -05:00
Narvin Singh
d05a68932b Feat: Battery module 2020-12-27 22:14:21 -05:00
Narvin Singh
1e331865af Feat: Date/time module 2020-12-27 22:13:52 -05:00
Narvin Singh
da7febb8f9 Chore: Add xrsbd and xrsbs level 2 headings 2020-12-27 14:32:18 -05:00
Narvin Singh
186fce8d9f Chore: Update README to describe xrsb 2020-12-27 14:25:41 -05:00
Narvin Singh
3ca912c80c Feat: Scheduler
The project name is changing from status-bar to xrsb (for X root
window status bar), so the scheduler is called xrsbs.

The scheduler sends the SIGUSR1 signal to a daemon that is
responsible for maintaining and updating the status (X root window
name property). The daemon will determine which actions to perform
based on the files present in the action directory and remove the files
once the actions are performed, so the scheduler creates action files
just before sending the signal. The scheduler can send one signal to
perform multiple actions by creating multiple action files, and can
create the action file(s) and send the signal immediately,
after some delay, or repeatedly at some interval.
2020-12-27 13:31:56 -05:00
Narvin Singh
b79e5bbcd0 Refactor: Change from using xprop to xsetroot 2020-12-25 21:22:42 -05:00
Narvin Singh
3ee3574351 Fix: CPU usage using %cpu
Use %cpu format in ps and drop the percent sign from the output since
the numbers don't usually add up to 100.
2020-12-24 11:34:53 -05:00
Narvin Singh
fc8f655bb7 Fix: Memory usage using raw numbers
Use free without -h to get raw numbers to report correct memory usage,
otherwise when the free memory is a lower order of magnitude than the
total memory, e.g., the free memory is in MiB and the total memory
is in GiB, then the human-readable free memory number will be too
large compared to the total memory number.
2020-12-24 10:46:11 -05:00
Narvin Singh
deca8326c1 Feat: status-bar
Each panel of the status bar can be turned on or off and configured
with an icon or no icon.

- Loops every 2 seconds
- Reports on:
  - CPU usage
  - Memory usage
  - Backlight brightness
  - Volume (requires amixer from alsa-utils)
    - Icon changes when volume is below 50%, at or above 50%, or muted
  - Battery percentage for each batter
    - Icon changes from batter to plug when on AC power
  - Date and time
2020-12-23 23:48:59 -05:00
Narvin Singh
4227b4f854 Feat: README stub 2020-12-23 00:35:30 -05:00