Compare commits

...

4 Commits

Author SHA1 Message Date
Alexandre LUCAZEAU 3b6b76c6cf FIX : init.el for org-capture
TEST : kdeconnect to i3status
2023-06-19 21:45:51 +02:00
Alexandre LUCAZEAU 1191cd5a62 ADD kdeconnect 2023-06-12 14:30:21 +02:00
Alexandre LUCAZEAU 8de3cdf6a7 FIX all config 2023-06-08 09:39:18 +02:00
Alexandre LUCAZEAU 45dce66310 FIX nix garbage configuration 2023-06-05 13:43:03 +02:00
6 changed files with 121 additions and 87 deletions

View File

@ -119,8 +119,16 @@
enable = true; enable = true;
unmanaged = [ "interface-name:ve-*" ]; unmanaged = [ "interface-name:ve-*" ];
}; };
firewall.enable = true; firewall = {
firewall.allowedTCPPorts = [ 24800 6600 1194]; enable = true;
allowedTCPPorts = [ 24800 6600 1194 ];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
}; };
i18n.defaultLocale = "fr_FR.UTF-8"; i18n.defaultLocale = "fr_FR.UTF-8";
@ -153,10 +161,17 @@
# run garbage collector at 19h00 everyday # run garbage collector at 19h00 everyday
# and remove stuff older than 60 days # and remove stuff older than 60 days
nix.gc.automatic = true; # nix.gc.automatic = true;
nix.gc.dates = "19:00"; # nix.gc.dates = "19:00";
nix.gc.persistent = true; # nix.gc.persistent = true;
nix.gc.options = "--delete-older-than 60d"; # nix.gc.options = "--delete-older-than 60d";
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "--delete-older-than 10d";
};
# clean /tmp at boot # clean /tmp at boot
boot.cleanTmpDir = true; boot.cleanTmpDir = true;

View File

@ -145,6 +145,7 @@ exec --no-startup-id udiskie -t
exec --no-startup-id blueman-applet exec --no-startup-id blueman-applet
exec --no-startup-id vlc exec --no-startup-id vlc
exec --no-startup-id guake exec --no-startup-id guake
exec --no-startup-id kdeconnect-indicator
exec --no-startup-id i3-msg 'workspace $ws9; exec keepassxc;' exec --no-startup-id i3-msg 'workspace $ws9; exec keepassxc;'
#exec --no-startup-id i3-msg 'workspace $ws5; exec emacs;' #exec --no-startup-id i3-msg 'workspace $ws5; exec emacs;'
exec --no-startup-id i3-msg 'workspace $ws1; exec ferdi;' exec --no-startup-id i3-msg 'workspace $ws1; exec ferdi;'

View File

@ -114,72 +114,10 @@
org-image-actual-width '(300)) org-image-actual-width '(300))
;; files with ".org" open in org-mode ;; files with ".org" open in org-mode
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(setq org-agenda-files '("/home/alexandre/Nextcloud/PRIVE/13_Org/journal")) (setq org-agenda-files '("/home/alexandre/Nextcloud/PRIVE/13_Org/backlog.org" "/home/alexandre/Nextcloud/PRIVE/13_Org/notes"))
(setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org/notes")) (setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org/notes"))
(setq org-default-notes-file "~/Nextcloud/PRIVE/13_Org/backlog.org") (setq org-default-notes-file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;;(setq org-capture-templates
;; '(("b" "Ajouter au backlog" entry
;; (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;; "* TODO %?" :empty-lines 1))
(setq org-capture-templates
'(("t" "TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \n %U" :empty-lines 1)
("s" "Scheduled TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \nSCHEDULED: %^t\n %U" :empty-lines 1)
("l" "Link" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %a %? %^G\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n")
("n" "Note" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\n%U" :empty-lines 1)
("j" "Journal" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\nEntered on %U\n")))
;; Org-Roam basic configuration
(use-package org-roam
:after org
:init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
:config
(org-roam-setup)
(org-roam-db-autosync-mode)
:bind (("C-c n f" . org-roam-node-find)
("C-c n r" . org-roam-node-random)
(:map org-mode-map
(("C-c n i" . org-roam-node-insert)
("C-c n o" . org-id-get-create)
("C-c n t" . org-roam-tag-add)
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle)
("C-c n o" . org-open-at-point)
("C-M-i" . completion-at-point)))))
;; (:map org-roam-dailies-map
;; (("Y" . org-roam-dailies-capture-yesterday)
;; ("T" . org-roam-dailies-capture-tomorrow))))
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
;;:target (file+datetree "journal-2023.org" year))))
:target (file+head "journal-%<%Y>.org" "#+TITLE: %<%Y-%m-%d>\n"))))
;; :target (file+head "%<%Y-%m>.org" "#+TITLE: %<%Y-%m>\n"))))
;; one file org
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
;; Open DRI.org when I hit C-c g
(defun gtd ()
"Open the GTD file."
(interactive)
(find-file org-gtd-file))
;; keybinding
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cg" 'gtd)
;; This seems like a good basic set of keywords to start out with:
(setq org-todo-keywords '((type "TODO" "En cours" "WAIT" "CANCELED" "DONE"))) (setq org-todo-keywords '((type "TODO" "En cours" "WAIT" "CANCELED" "DONE")))
(setf org-todo-keyword-faces '(("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold)) (setf org-todo-keyword-faces '(("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold))
("En cours" . (:foreground "yellow" :background "red" :bold t :weight bold)) ("En cours" . (:foreground "yellow" :background "red" :bold t :weight bold))
("En attente de réponse" . (:foreground "yellow" :background "magenta2" :bold t :weight bold)) ("En attente de réponse" . (:foreground "yellow" :background "magenta2" :bold t :weight bold))
@ -187,28 +125,92 @@
("DONE" . (:foreground "gray50" :background "gray30")))) ("DONE" . (:foreground "gray50" :background "gray30"))))
;; tags ;; tags
(setq org-tag-alist '(("DEVIS" . ?d) ("PROJETS" . ?p) ("CLIENT" . ?c) ("PROSPECT" . ?o) ("INTERNE" . ?i) ("AO" . ?a) ("PJ" . ?z) ("AVV" . ?v))) (setq org-tag-alist '(("DEVIS" . ?d) ("PROJETS" . ?p) ("CLIENT" . ?c) ("PROSPECT" . ?o) ("INTERNE" . ?i) ("AO" . ?a) ("PJ" . ?z) ("AVV" . ?v) ("LEGACY" . ?l) ("ROC" . ?r)))
(setq org-tag-faces (setq org-tag-faces
'( '(
("DEVIS" . (:foreground "OrangeRed" :weight bold)) ("DEVIS" . (:foreground "OrangeRed" :weight bold))
("ROC" . (:foreground "OrangeRed" :weight bold))
("PJ" . (:foreground "brightyellow" :weight bold)) ("PJ" . (:foreground "brightyellow" :weight bold))
("PROJET" . (:foreground "IndianRed1" :weight bold)) ("PROJET" . (:foreground "IndianRed1" :weight bold))
("INTERNE" . (:foreground "LimeGreen" :weight bold)) ("INTERNE" . (:foreground "LimeGreen" :weight bold))
("LEGACY" . (:foreground "LimeGreen" :weight bold))
("CLIENT" . (:foreground "Orange" :weight bold)) ("CLIENT" . (:foreground "Orange" :weight bold))
("PROSPECT" . (:foreground "MediumPurple3" :weight bold)) ("PROSPECT" . (:foreground "MediumPurple3" :weight bold))
("AO" . (:foreground "HotPink2" :weight bold)) ("AO" . (:foreground "HotPink2" :weight bold))
) )
) )
;;; Org-journal ;; org-capture use to add note to backlog file. At the end of day, use org-refile to dispatch to good note
;; https://github.com/bastibe/org-journal ;; https://sachachua.com/blog/2014/11/using-org-mode-keep-process-journal/
;; C-c C-j
(require 'org-journal) (setq org-capture-templates
(setq org-journal-date-prefix "#+TITLE: " '(("t" "TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
org-journal-carryover-items "-TODO=\"DONE\"" "* TODO %? %^G \n %U" :empty-lines 1)
org-journal-time-prefix "* " ("s" "Scheduled TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
org-journal-date-format "%a, %Y-%m-%d" "* TODO %? %^G \nSCHEDULED: %^t\n %U" :empty-lines 1)
org-journal-file-format "%Y-%m-%d-journal.org" ("l" "Link" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
org-journal-dir "/home/alexandre/Nextcloud/PRIVE/13_Org/journal/") "* TODO %a %? %^G\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n")
(global-set-key "\C-cnj" 'org-journal-new-entry) ("j" "Journal entry" plain
(file+datetree+prompt "~/Nextcloud/PRIVE/13_Org/backlog.org")
"%K - %a\n%i\n%?\n")
("n" "Note" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\n%U" :empty-lines 1)))
;; Org-Roam basic configuration
(use-package org-roam
:after org
:init
(setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
(org-roam-completion-everywhere t)
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n o" . org-open-at-point)
("C-c n j" . org-roam-dailies-capture-today)
("C-c n i" . org-roam-node-insert))
:config
(org-roam-setup)
(org-roam-db-autosync-mode)
)
;; caldav
;;(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/alexandre")
;;(setq org-caldav-calendars
;; '((:calendar-id "alexandre-dri"
;; :files ("~/Nextcloud/PRIVE/13_Org/calendar/alexandre-dri.org")
;; :inbox "~/Nextcloud/PRIVE/13_Org/calendar/alexandre-dri-inbox.org")))
;;(setq org-icalendar-include-todo 'all
;; org-caldav-sync-todo t)
;;
(use-package org-journal
:ensure t
:defer t
:init
;; Change default prefix key; needs to be set before loading org-journal
(setq org-journal-prefix-key "C-c j ")
:config
(setq org-journal-file-type=weekly
org-journal-date-format "%A, %d %B %Y"))
;;;; Index org file and backlog file
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
(defvar org-backlog-file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;; Open DRI.org when I hit C-c g
(defun gtd ()
"Open the GTD file."
(interactive)
(find-file org-gtd-file))
;; Open backlog.org when I hit file hit C-c b
(defun gtb ()
"Open the backlog file."
(interactive)
(find-file org-backlog-file))
;; keybinding
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cg" 'gtd)
(global-set-key "\C-cb" 'gtb)

View File

@ -10,6 +10,7 @@
./mails.nix ./mails.nix
./dunst.nix ./dunst.nix
./bat.nix ./bat.nix
./kdeconnect.nix
# ./redshift.nix # ./redshift.nix
# ../../../modules/neovim.nix # ../../../modules/neovim.nix
../../../modules/rust.nix ../../../modules/rust.nix

View File

@ -72,11 +72,11 @@
interval = 60; interval = 60;
format = "%a %d/%m %R"; format = "%a %d/%m %R";
} }
{ # {
block = "pomodoro"; # block = "Kdeconnect";
message = "Break !"; # format = " $icon {$bat_icon $bat_charge |}{$notif_icon |}{$network_icon$network_strength $network_type |}";
break_message = "Reprise"; # bat_good = 101;
} # }
]; ];
icons = "material-nf"; icons = "material-nf";
theme = "nord-dark"; theme = "nord-dark";

View File

@ -0,0 +1,15 @@
{ pkgs, ... }: {
services.kdeconnect = {
enable = true;
};
}
# networking.firewall = {
# enable = true;
# allowedTCPPortRanges = [
# { from = 1714; to = 1764; } # KDE Connect
# ];
# allowedUDPPortRanges = [
# { from = 1714; to = 1764; } # KDE Connect
# ];
# }