-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yup, i definitely wrote all of this in a single commit
- Loading branch information
0 parents
commit 37d5ef7
Showing
142 changed files
with
21,599 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
buildDir/ | ||
build/ | ||
.idea/ | ||
.vscode/ | ||
subprojects/*/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
description = "A simple bar, launcher, control center, and notification daemon."; | ||
|
||
inputs = { | ||
nixpkgs = { | ||
url = "github:nixos/nixpkgs/nixos-unstable"; | ||
}; | ||
flake-utils = { | ||
url = "github:numtide/flake-utils"; | ||
}; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
foobar = (pkgs.callPackage ./nix/package.nix {}); | ||
in | ||
{ | ||
packages = { | ||
inherit foobar; | ||
default = foobar; | ||
}; | ||
|
||
devShells = { | ||
algoks = pkgs.mkShell { | ||
name = "foobar"; | ||
packages = [ pkgs.libnotify ]; # for testing the notification daemon | ||
inputsFrom = foobar; | ||
}; | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024, the Foobar developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
project('foobar', 'c', default_options: ['c_std=gnu11', 'warning_level=1']) | ||
|
||
gnome = import('gnome') | ||
|
||
glib_dep = dependency('glib-2.0', version: '>=2.78') | ||
gio_dep = dependency('gio-2.0', version: '>=2.78') | ||
gio_unix_dep = dependency('gio-unix-2.0', version: '>=2.78') | ||
gtk_dep = dependency('gtk4', version: '>=4.12') | ||
json_dep = dependency('json-glib-1.0', version: '>=1.8') | ||
nm_dep = dependency('libnm', version: '>=1.44') | ||
m_dep = meson.get_compiler('c').find_library('m', required : false) | ||
layershell_dep = dependency('gtk4-layer-shell', required: false) | ||
gvc_dep = dependency('gvc', required: false) | ||
if not layershell_dep.found() | ||
layershell_proj = subproject('gtk4-layer-shell') | ||
layershell_dep = layershell_proj.get_variable('gtk_layer_shell') | ||
endif | ||
if not gvc_dep.found() | ||
gvc_proj = subproject('gvc') | ||
gvc_dep = gvc_proj.get_variable('libgvc_dep') | ||
endif | ||
|
||
subdir('res') | ||
subdir('src') | ||
|
||
install_man('pub/foobar.1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
fetchFromGitHub, | ||
fetchFromGitLab, | ||
makeWrapper, | ||
git, | ||
meson, | ||
ninja, | ||
vala, | ||
sassc, | ||
pkg-config, | ||
gobject-introspection, | ||
wayland-scanner, | ||
glib, | ||
gtk4, | ||
json-glib, | ||
librsvg, | ||
networkmanager, | ||
wayland, | ||
libpulseaudio, | ||
alsa-lib, | ||
upower, | ||
brightnessctl | ||
}: | ||
let | ||
dep-gtk4-layer-shell = fetchFromGitHub { | ||
owner = "wmww"; | ||
repo = "gtk4-layer-shell"; | ||
rev = "v1.0.2"; | ||
hash = "sha256-decjPkFkYy7kIjyozsB7BEmw33wzq1EQyIBrxO36984="; | ||
}; | ||
dep-gvc = fetchFromGitLab { | ||
domain = "gitlab.gnome.org"; | ||
owner = "GNOME"; | ||
repo = "libgnome-volume-control"; | ||
rev = "91f3f41490666a526ed78af744507d7ee1134323"; | ||
hash = "sha256-lpDWVlRFngMSNfACrfJ5vRTZ2xdlwcrh4/YGcNDogys="; | ||
}; | ||
in stdenv.mkDerivation { | ||
pname = "foobar"; | ||
version = "1.0.0"; | ||
src = ./..; | ||
postUnpack = '' | ||
pushd "$sourceRoot" | ||
cp -R --no-preserve=mode,ownership ${dep-gtk4-layer-shell} subprojects/gtk4-layer-shell | ||
cp -R --no-preserve=mode,ownership ${dep-gvc} subprojects/gvc | ||
popd | ||
''; | ||
# needed to enable support for SVG icons in GTK | ||
postInstall = '' | ||
wrapProgram "$out/bin/foobar" \ | ||
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
''; | ||
|
||
nativeBuildInputs = [ makeWrapper git meson ninja vala sassc pkg-config gobject-introspection wayland-scanner ]; | ||
buildInputs = [ glib gtk4 json-glib librsvg networkmanager wayland libpulseaudio alsa-lib upower brightnessctl ]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/hannesschulze/foobar"; | ||
description = "A simple bar, launcher, control center, and notification daemon."; | ||
maintainers = [ | ||
{ name = "Hannes Schulze"; } | ||
]; | ||
license = licenses.mit; | ||
mainProgram = "foobar"; | ||
}; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.TH FOOBAR 1 "April 2024" "1.0.0" "User Commands" | ||
|
||
.SH NAME | ||
.PP | ||
foobar \- a simple bar, launcher, control center, and notification daemon. | ||
|
||
.SH SYNPOSIS | ||
.PP | ||
.B foobar | ||
.RI [\| "ACTION" \|]... | ||
.br | ||
.B foobar | ||
.B \-h | ||
|
||
.SH DESCRIPTION | ||
.PP | ||
.B foobar | ||
can be used to launch the main | ||
.I server | ||
instance of the bar application, or to send commands to an active server process. | ||
|
||
If there is no other instance running, the command only launches the bar regardless of the | ||
.I actions | ||
passed to it. Otherwise, no new instance is launched and all the specified | ||
.I actions | ||
are processed one after another. | ||
|
||
.SH OPTIONS | ||
.TP | ||
.BR \-q ", " \-\-quit | ||
Kindly ask the active bar instance to kill itself. | ||
.TP | ||
.BR \-l ", " \-\-toggle\-launcher | ||
Toggle the visibility of the application's | ||
.I launcher | ||
window. If not previously shown, it will appear on the currently active monitor. | ||
.TP | ||
.BR \-c ", " \-\-toggle\-control\-center | ||
Toggle the visibility of the application's | ||
.I control center | ||
window. If not previously shown, it will appear on the currently active monitor. | ||
.TP | ||
.BR \-i ", " \-\-inspector | ||
Open the GTK inspector for the active bar instance. This can be useful for inspecting the widget hierarchy or quickly testing changes to the application's stylesheet. | ||
|
||
.SH FILES | ||
.TP | ||
.I $XDG_CONFIG_HOME/foobar.conf | ||
The main configuration for all components of the application. | ||
|
||
This file is created and initialized to the default configuration when | ||
.I foobar | ||
is first launched. | ||
|
||
.SH BUGS | ||
.TP | ||
Submit bug reports and request features online at: | ||
<\f[I]https://github.com/hannesschulze/foobar/issues\f[R]> | ||
|
||
.SH SEE ALSO | ||
.PP | ||
Sources at: <\f[I]https://github.com/hannesschulze/foobar\f[R]> | ||
|
||
.SH COPYRIGHT | ||
.PP | ||
Copyright (c) 2024, the Foobar developers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[general] | ||
stylesheet = resource:///foobar/styles/teatime.css | ||
|
||
[panel] | ||
position = top | ||
margin = 16 | ||
padding = 12 | ||
size = 40 | ||
spacing = 12 | ||
multi-monitor = true | ||
|
||
[panel.workspaces] | ||
kind = workspaces | ||
position = center | ||
action = none | ||
button-size = 20 | ||
spacing = 6 | ||
|
||
[panel.status-left] | ||
kind = status | ||
position = start | ||
action = none | ||
items = battery;network | ||
spacing = 6 | ||
show-labels = true | ||
enable-scrolling = false | ||
action = none | ||
|
||
[panel.status-right] | ||
kind = status | ||
position = end | ||
action = none | ||
items = brightness;audio;bluetooth;notifications; | ||
spacing = 6 | ||
show-labels = false | ||
enable-scrolling = true | ||
|
||
[panel.clock] | ||
kind = clock | ||
position = end | ||
action = none | ||
format = %H:%M | ||
|
||
[launcher] | ||
width = 600 | ||
position = 240 | ||
max-height = 400 | ||
|
||
[control-center] | ||
width = 600 | ||
height = 400 | ||
position = top | ||
offset = 16 | ||
padding = 24 | ||
spacing = 12 | ||
orientation = horizontal | ||
alignment = center | ||
rows = connectivity;audio-output;brightness; | ||
|
||
[notifications] | ||
width = 400 | ||
min-height = 48 | ||
spacing = 16 | ||
close-button-inset = -6 | ||
time-format = %H:%M |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.