glowing-bear: remove

Not used and mostly replaced by matrix. Also, nixpkgs provides a package
now.
parent 3e9c8109
......@@ -81,9 +81,6 @@ are always welcome.
* `gianas-return` (`pkgs.nur.repos.ma27.gianas-return`): Gianas Return aims to be a worthy
UNOFFICIAL sequel of 'The Great Giana Sisters'.
* `glowing-bear` (`pkgs.nur.repos.ma27.glowing-bear`): A [weechat](https://weechat.org/) frontend,
patched to get rid of Cloudflare dependencies.
* `fzf-zsh` (`pkgs.nur.repos.ma27.fzf-zsh`): [`fzf`](https://github.com/junegunn/fzf) wrapper for
`oh-my-zsh`.
......@@ -275,31 +272,6 @@ ssh-keygen
In order to clone a `git` repository, the previously generated pubkey for Hydra
needs to be uploaded to the given `git` upstream server.
## Glowing-bear
This module is fairly trivial as it simply creates an `nginx` instance and serves
the `glowing-bear` derivation with all of its built dependencies.
The differences to upstream are:
* Due to all dependencies built with Nix no dependency to `cloudflare` is needed.
* The support for Alt+[0-9] shortcuts to jump between buffers has been disabled. This shortcut
is mostly used by browsers and causes confusion when overrided by a web application in one tab.
It can be activated like this:
```
{
ma27.glowing-bear = {
enable = true;
nginx.vhost = "messenger.example.com";
};
}
```
Please keep in mind that `SSL` support is enabled by default and you need a signed
cert for WeeChat to use TLS for the relay protocol.
## Library
This repository ships several simple helper APIs to simplify Nix-based development
......
......@@ -15,7 +15,6 @@ rec {
modules = {
hydra = import ./modules/hydra.nix;
sieve-dsl = import ./modules/sieve-dsl.nix;
glowing-bear = import ./modules/glowing-bear.nix;
};
### OVERLAYS
......@@ -23,7 +22,6 @@ rec {
sudo = import ./pkgs/sudo/overlay.nix;
hydra = import ./pkgs/hydra/overlay.nix;
php = import ./pkgs/php/overlay.nix;
glowing-bear = import ./pkgs/glowing-bear/overlay.nix;
fzf-zsh = import ./pkgs/fzf-zsh/overlay.nix;
fzf-nix-helpers = import ./pkgs/fzf-helpers/overlay.nix;
autorandr = import ./pkgs/autorandr/overlay.nix;
......@@ -32,8 +30,6 @@ rec {
### PACKAGES
gianas-return = callPackage' ./pkgs/gianas-return { };
glowing-bear = callPackage' ./pkgs/glowing-bear { };
fzf-zsh = callPackage' ./pkgs/fzf-zsh { };
fzf-nix-helpers = callPackage' ./pkgs/fzf-helpers { };
......
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.ma27.glowing-bear;
in
{
options.ma27.glowing-bear = {
enable = mkEnableOption "Glowing Bear service";
nginx = {
vhost = mkOption {
description = "VHost name to be used by nginx to serve `glowing-bear`";
type = types.str;
};
ssl = mkEnableOption "SSL support for the glowing bear vhost" // { default = true; };
};
package = mkOption {
default = pkgs.glowing-bear;
type = types.package;
description = "Which package to use for glowing-bear sources";
};
};
config = mkIf cfg.enable {
nixpkgs.overlays = [ (import ../pkgs/glowing-bear/overlay.nix) ];
services.nginx.enable = true;
services.nginx.virtualHosts.${cfg.nginx.vhost} = mkMerge [
{
locations."/".root = cfg.package;
}
(mkIf cfg.nginx.ssl {
enableACME = true;
forceSSL = true;
})
];
};
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
}
# Generated by bower2nix v3.2.0 (https://github.com/rvl/bower2nix)
{ fetchbower, buildEnv }:
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
(fetchbower "angular" "1.7.5" "1.7.x" "1mv5y1zdvfkl5b32z3s9xcwmk10fxjz024vpdmhma6vvbxfccja0")
(fetchbower "angular-route" "1.7.5" "1.7.x" "0aigyh8xvgn70bx47a02ngg1sljarjxzwzcbn9kdzrinalvpsajx")
(fetchbower "angular-sanitize" "1.7.5" "1.7.x" "1k0ayksphc8yl5d4i7jj3bnsasn8qcrppcyk2zf4nfx1kcy8lbg1")
(fetchbower "angular-touch" "1.7.5" "1.7.x" "1h96ws6maycm79hq96f9bg9zxk37yvsvrii6ndx6qdjwlijrfdqj")
(fetchbower "angular-loader" "1.7.5" "1.7.x" "1qz67ffx91r1flnc715fqr32jlvqk1kah5b62ibci4yarnv1rfdv")
(fetchbower "angular-mocks" "1.7.5" "1.7.x" "1m9s25i1nyfxy5vfbdji19avykfjgs0ip6ch592486kr78gvlphh")
(fetchbower "underscore" "1.9.1" "~1.9" "11nzjz2k3vrf7mwwillgxpkr49w47vi8gp88mmif1g8w41c2khf0")
(fetchbower "bootstrap" "3.3.7" "~3.3" "1cb4w1qizw9qklgzn2g4g4j6k73jzql8z99b25gs5gcbzxbhf935")
(fetchbower "html5-boilerplate" "4.3.0" "~4.3.0" "1hf5iyds9615ly22gabx56nri80d3fvc5708q4mz3iw4p1cqd93h")
(fetchbower "emojione" "2.2.7" "~2.2" "1gpfhbmxhp8gyzrclz03jsjkzvlydnzsa5wzzvswf3v0d95ym7mc")
(fetchbower "jquery" "3.3.1" "1.9.1 - 3" "0dglgy915l9fwzxg5b9v9fmrvminm8cv5cmpwi8y5mfnx4g7rcqi")
]; }
{ stdenv, fetchFromGitHub, nodePackages, buildBowerComponents }:
let
name = "glowing-bear-${version}";
version = "0.7.1";
src = fetchFromGitHub {
owner = "glowing-bear";
repo = "glowing-bear";
rev = version;
sha256 = "0gwrf67l3i3nl7zy1miljz6f3vv6zzc3g9as06by548f21cizzjb";
};
frontendPkgs = buildBowerComponents {
name = "${name}-bower";
generated = ./bower.nix;
inherit src;
};
in
stdenv.mkDerivation {
inherit name src;
buildInputs = [ nodePackages.uglify-js ];
buildPhase = ''
uglifyjs \
${frontendPkgs}/bower_components/angular/angular.min.js \
${frontendPkgs}/bower_components/angular-route/angular-route.min.js \
${frontendPkgs}/bower_components/angular-sanitize/angular-sanitize.min.js \
${frontendPkgs}/bower_components/angular-touch/angular-touch.min.js \
${frontendPkgs}/bower_components/underscore/underscore-min.js \
${frontendPkgs}/bower_components/emojione/lib/js/emojione.min.js \
js/localstorage.js \
js/weechat.js \
js/irc-utils.js \
js/glowingbear.js \
js/settings.js \
js/utils.js \
js/notifications.js \
js/filters.js \
js/handlers.js \
js/connection.js \
js/file-change.js \
js/imgur-drop-directive.js \
js/whenscrolled-directive.js \
js/inputbar.js \
js/plugin-directive.js \
js/websockets.js \
js/models.js \
js/bufferResume.js \
js/plugins.js \
js/imgur.js \
-c -m --screw-ie8 -o min.js
'';
patches = [ ./remove-cloudflare-deps.patch ./disable-alt-0-9-keys.patch ];
installPhase = ''
runHook preInstall
mkdir $out
cp -r {directives,webapp.manifest.json,index.html,css,assets,3rdparty,min.js,serviceworker.js} $out
cp ${frontendPkgs}/bower_components/bootstrap/dist/css/bootstrap.min.css $out/css
runHook postInstall
'';
meta = with stdenv.lib; {
description = "A web client for WeeChat";
homepage = https://github.com/glowing-bear/glowing-bear;
license = licenses.gpl3;
maintainers = with maintainers; [ ma27 ];
};
}
diff --git a/js/inputbar.js b/js/inputbar.js
index ceb2265..3201c4d 100644
--- a/js/inputbar.js
+++ b/js/inputbar.js
@@ -322,38 +322,6 @@ weechat.directive('inputBar', function() {
}
}
- // Left Alt+[0-9] -> jump to buffer
- if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58) && settings.enableQuickKeys) {
- if (code === 48) {
- code = 58;
- }
- bufferNumber = code - 48 - 1 ;
-
- // quick select filtered entries
- if (($scope.$parent.search.length || $scope.$parent.onlyUnread) && $scope.$parent.filteredBuffers.length) {
- filteredBufferNum = $scope.$parent.filteredBuffers[bufferNumber];
- if (filteredBufferNum !== undefined) {
- activeBufferId = [filteredBufferNum.number, filteredBufferNum.id];
- }
- } else {
- // Map the buffers to only their numbers and IDs so we don't have to
- // copy the entire (possibly very large) buffer object, and then sort
- // the buffers according to their WeeChat number
- sortedBuffers = _.map(models.getBuffers(), function(buffer) {
- return [buffer.number, buffer.id];
- }).sort(function(left, right) {
- // By default, Array.prototype.sort() sorts alphabetically.
- // Pass an ordering function to sort by first element.
- return left[0] - right[0];
- });
- activeBufferId = sortedBuffers[bufferNumber];
- }
- if (activeBufferId) {
- $scope.$parent.setActiveBuffer(activeBufferId[1]);
- $event.preventDefault();
- }
- }
-
// Tab -> nick completion
if (code === 9 && !$event.altKey && !$event.ctrlKey) {
$event.preventDefault();
self: super:
{
glowing-bear = super.callPackage ./.{ };
}
diff --git a/index.html b/index.html
index 3222cd5..51bc700 100644
--- a/index.html
+++ b/index.html
@@ -13,18 +13,12 @@
<!-- https://w3c.github.io/manifest/ && https://developer.mozilla.org/en-US/docs/Web/Manifest -->
<link rel="manifest" href="webapp.manifest.json">
<title ng-bind-template="{{ notificationStatus }}Glowing Bear {{ pageTitle}}"></title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
+ <link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="shortcut icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
<link rel="apple-touch-icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
<link rel="shortcut icon" type="image/png" href="assets/img/favicon.png" >
<link href="css/glowingbear.css" rel="stylesheet" media="screen">
<link href="css/themes/dark.css" rel="stylesheet" media="screen" id="themeCSS" />
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js" integrity="sha256-QRJz3b0/ZZC4ilKmBRRjY0MgnVhQ+RR1tpWLYaRRjSo=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular-route.min.js" integrity="sha256-PQfkC+TI/HZv0O9JbmrLmPyhgOT2hry24vA5yAV59zY=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular-sanitize.min.js" integrity="sha256-LLlLr1XzKUXSFI9SiuEJOAn88Dwge+/zld523N2c8+8=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular-touch.min.js" integrity="sha256-4IS2pHNTST2Jl6dSzNsERpYleiQi1r4L2MLPElG8LZ4=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js" integrity="sha256-G7A4JrJjJlFqP0yamznwPjAApIKPkadeHfyIwiaa9e0=" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/lib/js/emojione.min.js" integrity="sha256-9cBkVeU53NiJ9/BdcJta3HbERAmf5X9DE2WvL8V+gDs=" crossorigin="anonymous"></script>
<script type="text/javascript" src="3rdparty/inflate.min.js"></script>
<script type="text/javascript" src="js/localstorage.js"></script>
<script type="text/javascript" src="js/weechat.js"></script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment