Get rid of gcalcli
This commit is contained in:
parent
433ce601c7
commit
a3e84258a9
@ -23,7 +23,6 @@ device:
|
||||
./workspace/light.nix
|
||||
./workspace/mako.nix
|
||||
./workspace/mopidy.nix
|
||||
./workspace/gcalcli.nix
|
||||
./workspace/xresources.nix
|
||||
./themes.nix
|
||||
./applications.nix
|
||||
|
@ -1,37 +0,0 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
home-manager.users.balsoft = lib.mkIf (! isNull config.secrets.gcal) {
|
||||
home.file.".gcalcli_oauth.home".text = lib.optionals
|
||||
(!(isNull config.secrets.gcal)) (builtins.toJSON {
|
||||
access_token = "";
|
||||
client_id = config.secrets.gcal.client-id;
|
||||
client_secret = config.secrets.gcal.client-secret;
|
||||
refresh_token = config.secrets.gcal.refresh-token;
|
||||
token_expiry = "2019-03-31T11:26:27Z";
|
||||
token_uri = https://oauth2.googleapis.com/token;
|
||||
user_agent = "gcalcli/v4.0.4";
|
||||
revoke_uri = "https=//oauth2.googleapis.com/revoke";
|
||||
id_token = null;
|
||||
id_token_jwt = null;
|
||||
token_response = {
|
||||
access_token = "";
|
||||
expires_in = 0;
|
||||
scope =
|
||||
"https=//www.googleapis.com/auth/urlshortener https=//www.googleapis.com/auth/calendar";
|
||||
token_type = "Bearer";
|
||||
};
|
||||
scopes = [
|
||||
"https=//www.googleapis.com/auth/calendar"
|
||||
"https=//www.googleapis.com/auth/urlshortener"
|
||||
];
|
||||
token_info_uri = "https=//oauth2.googleapis.com/tokeninfo";
|
||||
invalid = false;
|
||||
_class = "OAuth2Credentials";
|
||||
_module = "oauth2client.client";
|
||||
});
|
||||
home.activation.gcalcli = {
|
||||
after = ["linkGeneration"];
|
||||
before = [];
|
||||
data = "cp .gcalcli_oauth.home .gcalcli_oauth";
|
||||
};
|
||||
};
|
||||
}
|
@ -40,7 +40,7 @@ in {
|
||||
interval=60
|
||||
markup=pango
|
||||
'' + genIniOrdered (optional (!isNull config.secrets.mail) (scr "email")
|
||||
++ [ (scrint "weather" 600) (scr "calendar") (scr "emacs") (scr "nixos") ]
|
||||
++ [ (scrint "weather" 600) (scr "emacs") (scr "nixos") ]
|
||||
++ optional (!isNull config.secrets.wage) (scrint "youtrack-wage" 3600)
|
||||
++ [ (scrint "music" 3) (scrint "sound" 1) ] ++ [
|
||||
(scrint "cpu" 5)
|
||||
|
@ -1,22 +0,0 @@
|
||||
{ config, gcalcli, bash, iconfont, ... }: ''
|
||||
#!${bash}/bin/bash
|
||||
ping -c 1 calendar.google.com &> /dev/null || exit 1
|
||||
AGENDA_NEXT="`PYTHONIOENCODING=utf8 ${
|
||||
gcalcli
|
||||
}/bin/gcalcli --nocolor search "*" 'now' 'now+6d' --nostarted --tsv | head -1`"
|
||||
DATE="`awk '{print $1 " " $2}' <<< "$AGENDA_NEXT"`"
|
||||
echo -n "<span font='${iconfont}'></span> "
|
||||
if [[ `date -d "$DATE" +'%u'` -eq `date +'%u'` ]]
|
||||
then
|
||||
echo -n `date -d "$DATE" +'%H:%M'`
|
||||
else
|
||||
echo -n `date -d "$DATE" +'%H:%M %a'`
|
||||
fi
|
||||
if [[ $((`date -d "$DATE" +%s`-`date +%s`)) -lt 1800 ]]
|
||||
then
|
||||
code=33
|
||||
else
|
||||
code=0
|
||||
fi
|
||||
echo ":`awk '{$1=""; $2=""; $3=""; $4=""; print}' <<< "$AGENDA_NEXT" | tr -s " " | tr -s " "`"
|
||||
''
|
@ -31,7 +31,6 @@ builtins.mapAttrs buildHaskellScript {
|
||||
} // builtins.mapAttrs writeScript {
|
||||
battery = ./battery.nix;
|
||||
brightness = ./brightness.nix;
|
||||
calendar = ./calendar.nix;
|
||||
email = ./email.nix;
|
||||
emacs = ./emacs.nix;
|
||||
bluetooth = ./bluetooth.nix;
|
||||
|
Loading…
Reference in New Issue
Block a user