summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/kj-setup.sh3
-rwxr-xr-xbin/media-filename-to-title.sh2
-rwxr-xr-xbin/split-media-files.sh12
-rw-r--r--nix-home-config/aji.nix3
-rw-r--r--nix-home-config/desktop.nix17
-rw-r--r--nix-home-config/my-env.nix27
-rw-r--r--nix-home-config/pincer.nix2
-rw-r--r--nix-home-config/synergy-client.nix36
-rw-r--r--nix-home-config/synergy-server.nix36
-rw-r--r--spacemacs39
-rw-r--r--xmonad/xmonad.hs18
-rw-r--r--zshenv4
12 files changed, 147 insertions, 52 deletions
diff --git a/bin/kj-setup.sh b/bin/kj-setup.sh
index 10ddef5..acdd311 100755
--- a/bin/kj-setup.sh
+++ b/bin/kj-setup.sh
@@ -64,6 +64,7 @@ done
# done
# create_symlink dotfiles/zshrc .zshrc
+create_symlink dotfiles/zshenv .zshenv
mkdir -p .ssh
create_symlink ../dotfiles/ssh/config .ssh/config
@@ -71,7 +72,7 @@ create_symlink ../dotfiles/ssh/config .ssh/config
mkdir -p .xmonad
create_symlink ../dotfiles/xmonad/xmonad.hs .xmonad/xmonad.hs
create_symlink dotfiles/xmonad/xmobar.hs .xmobarrc
-create_symlink dotfiles/xsession .xsession
+#create_symlink dotfiles/xsession .xsession
mkdir -p .i3
create_symlink ../dotfiles/i3/config .i3/config
diff --git a/bin/media-filename-to-title.sh b/bin/media-filename-to-title.sh
index 0047ac3..38dadd2 100755
--- a/bin/media-filename-to-title.sh
+++ b/bin/media-filename-to-title.sh
@@ -1,5 +1,3 @@
-#!bash
-
for f in *; do
ffmpeg -i "$f" -metadata title="$(basename $f)" -c copy "new_$f"
mv "new_$f" "$f"
diff --git a/bin/split-media-files.sh b/bin/split-media-files.sh
index 1f4c8bc..c680629 100755
--- a/bin/split-media-files.sh
+++ b/bin/split-media-files.sh
@@ -1,5 +1,3 @@
-#!bash
-
max_duration=$((4*3600))
if [[ $# -ne 1 ]]; then
@@ -10,10 +8,8 @@ fi
input_file="$1"
base="$(basename $input_file | perl -pe 's/(.*)\.([^.]*)$/$1/')"
-extension="$(echo $input_file | perl -pe 's/(.*)\.([^.]*)$/$2/')"
-if [[ $extension == "m4b" ]]; then
- extension=m4a
-fi
-ffmpeg -i "${input_file}" -c copy -f segment -segment_time $max_duration \
- "${base}-%03d.${extension}"
+ffmpeg -i "${input_file}" \
+ -f segment -segment_time $max_duration -segment_start_number 1 \
+ -segment_format mp3 -qscale:a 5 \
+ "${base}-%02d.mp3"
diff --git a/nix-home-config/aji.nix b/nix-home-config/aji.nix
index af21dbd..6142064 100644
--- a/nix-home-config/aji.nix
+++ b/nix-home-config/aji.nix
@@ -3,6 +3,9 @@
{
imports = [
./my-env.nix
+ ./desktop.nix
+ ./synergy-server.nix
+ # ./synergy-client.nix
];
home.stateVersion = "19.03";
diff --git a/nix-home-config/desktop.nix b/nix-home-config/desktop.nix
new file mode 100644
index 0000000..41dfe79
--- /dev/null
+++ b/nix-home-config/desktop.nix
@@ -0,0 +1,17 @@
+{ config, pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ iw
+ wirelesstools
+ hledger
+ hledger-ui
+ ledger
+ signal-desktop
+ nix-index
+ ffmpeg
+ vlc
+ synergy
+ firefox-bin
+ ];
+}
diff --git a/nix-home-config/my-env.nix b/nix-home-config/my-env.nix
index 6a97cf5..93a1a43 100644
--- a/nix-home-config/my-env.nix
+++ b/nix-home-config/my-env.nix
@@ -3,28 +3,33 @@
{
programs.home-manager.enable = true;
programs.neovim.enable = true;
+ services.lorri.enable = true;
home.sessionVariables = {
EDITOR = "nvim";
};
+ home.file.".zshrc-nix-hook".text = ''
+ eval "$(direnv hook zsh)"
+ '';
+
home.packages = with pkgs; [
+ direnv
htop
- iw
- wirelesstools
- R
- rPackages.data_table
- rPackages.ggplot2
- rPackages.hms
- rPackages.viridis
+ (rWrapper.override {
+ packages = with rPackages; [
+ data_table
+ ggplot2
+ hms
+ viridis
+ lubridate
+ ];
+ })
emacs
hledger
- hledger-ui
ledger
bwm_ng
- signal-desktop
nix-index
- ffmpeg
- vlc
+ rustup
];
}
diff --git a/nix-home-config/pincer.nix b/nix-home-config/pincer.nix
index af21dbd..34f2d9e 100644
--- a/nix-home-config/pincer.nix
+++ b/nix-home-config/pincer.nix
@@ -3,6 +3,8 @@
{
imports = [
./my-env.nix
+ ./desktop.nix
+ ./synergy-client.nix
];
home.stateVersion = "19.03";
diff --git a/nix-home-config/synergy-client.nix b/nix-home-config/synergy-client.nix
new file mode 100644
index 0000000..7a07389
--- /dev/null
+++ b/nix-home-config/synergy-client.nix
@@ -0,0 +1,36 @@
+{ config, pkgs, ... }:
+
+let
+ configFile = pkgs.writeText "synergy.conf" ''
+ section: screens
+ pincer:
+ aji:
+ end
+
+ section: links
+ pincer:
+ right = aji
+ aji:
+ left = pincer
+ end
+ '';
+in
+{
+ systemd.user.services = {
+ synergyc = {
+ Unit = {
+ Description = "Synergy Client";
+ After = ["network.target" "graphical-session.target"];
+ };
+
+ Service = {
+ Type = "simple";
+ ExecStart = "${pkgs.synergy}/bin/synergyc -f localhost:24800";
+ };
+
+ Install = {
+ WantedBy = ["default.target"];
+ };
+ };
+ };
+}
diff --git a/nix-home-config/synergy-server.nix b/nix-home-config/synergy-server.nix
new file mode 100644
index 0000000..c3f66ee
--- /dev/null
+++ b/nix-home-config/synergy-server.nix
@@ -0,0 +1,36 @@
+{ config, pkgs, ... }:
+
+let
+ configFile = pkgs.writeText "synergy.conf" ''
+ section: screens
+ pincer:
+ aji:
+ end
+
+ section: links
+ pincer:
+ right = aji
+ aji:
+ left = pincer
+ end
+ '';
+in
+{
+ systemd.user.services = {
+ synergys = {
+ Unit = {
+ Description = "Synergy Server";
+ After = ["network.target" "graphical-session.target"];
+ };
+
+ Service = {
+ Type = "simple";
+ ExecStart = "${pkgs.synergy}/bin/synergys -f -c ${configFile}";
+ };
+
+ Install = {
+ WantedBy = ["default.target"];
+ };
+ };
+ };
+}
diff --git a/spacemacs b/spacemacs
index a6ce47e..4601624 100644
--- a/spacemacs
+++ b/spacemacs
@@ -17,7 +17,7 @@ values."
;; List of configuration layers to load. If it is the symbol `all' instead
;; of a list then all discovered layers will be installed.
dotspacemacs-configuration-layers
- '(
+ '(sql
csv
finance
;; ----------------------------------------------------------------
@@ -208,22 +208,27 @@ It is called immediately after `dotspacemacs/init'. You are free to put any
user code."
;; bind ctrl-w to backwards-kill-word when no region is selected
(global-set-key (kbd "C-w") 'backward-kill-word-or-kill-region)
+
+ (spacemacs|use-package-add-hook org
+ :pre-init
+ (package-initialize))
+
(defun backward-kill-word-or-kill-region (&optional arg)
(interactive "p")
(if (region-active-p)
(kill-region (region-beginning) (region-end))
(backward-kill-word arg)))
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . nil)
- (R . t)))
+ ;; (org-babel-do-load-languages
+ ;; 'org-babel-load-languages
+ ;; '((emacs-lisp . nil)
+ ;; (R . t)))
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
- (autoload 'org-mks "org-macs")
- (autoload 'org-show-all "org")
- (autoload 'org-line-number-display-width "org-compat")
- (autoload 'org-set-local "org-element")
- (autoload 'org-element-block-name-alist "org-element")
+ ;; (autoload 'org-mks "org-macs")
+ ;; (autoload 'org-show-all "org")
+ ;; (autoload 'org-line-number-display-width "org-compat")
+ ;; (autoload 'org-set-local "org-element")
+ ;; (autoload 'org-element-block-name-alist "org-element")
(setq-default exec-path-from-shell-variables '())
@@ -241,10 +246,10 @@ user code."
(defun kj-org-config ()
"Org configuration."
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((R . t)))
(with-eval-after-load 'org
+ (org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((R . t)))
(autoload 'org-babel-execute:emacs-lisp "ob-emacs-lisp")
(org-babel-do-load-languages
'org-babel-load-languages
@@ -265,7 +270,7 @@ user code."
;; "* TODO %?\n %i\n %a")))
org-agenda-files '("~/org/todo.org")
)
- ; (global-git-commit-mode t)
+ ; (global-git-commit-mode t)
(setq org-capture-templates
`(
@@ -321,12 +326,6 @@ layers configuration. You are free to put any user code."
(setq magit-last-seen-setup-instructions "1.4.0")
(add-to-list 'spacemacs-indent-sensitive-modes 'nix-mode)
(setq dns-mode-soa-auto-increment-serial nil)
- (add-to-list 'org-structure-template-alist
- `("r" ,(string-join '("** Untitled Run"
- " :PROPERTIES:"
- " :dist: "
- " :date: %t"
- " :END:") "\n")))
(setq
ledger-binary-path "hledger"
ledger-post-amount-alignment-column 50)
diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs
index 3cd577d..4df0d58 100644
--- a/xmonad/xmonad.hs
+++ b/xmonad/xmonad.hs
@@ -26,28 +26,26 @@ import Control.Monad
main = do
host <- (head . splitOn "." . nodeName) <$> getSystemID
setEnv "HOST" host True
- config <- xmobar (myConfig host)
+ -- config <- xmobar (myConfig host)
+ let config = myConfig host
xmonad config
layoutScreensHost = "unused" -- orange
myConfig host =
- ewmh desktopConfig
+ (docks . ewmh) $ desktopConfig
{ layoutHook = smartBorders $ myLayout
, keys = myKeys
, modMask = mod4Mask
- , terminal = "$TERMINAL"
+ , terminal = "urxvt"
, borderWidth = 2
, focusedBorderColor = "#ff0000"
, normalBorderColor = "#777778"
- , workspaces = pure <$> "\"<>PYFAOEU"
- , startupHook = do
- setWMName "LG3D"
- -- when (host == layoutScreensHost) (layoutScreens 2 (TwoPane 0.5 0.5))
+ , workspaces = pure <$> "\"<>PYFAOEUI"
, manageHook = insertPosition Below Newer <+> (isDialog --> doF W.shiftMaster <+> doF W.swapDown)
}
where myLayout = onHost layoutScreensHost (verticalTiled ||| horizontalTiled ||| Full) $
- layoutHook defaultConfig
+ layoutHook desktopConfig
verticalTiled = Mirror (Tall 1 (5/100) (2/3))
horizontalTiled = Tall 0 (5/100) (2/3)
@@ -122,7 +120,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
, ((modm .|. shiftMask, xK_s ), rescreen)
-- This is redundant because it's added by the statusBar function.
- -- , ((modm , xK_b ), sendMessage ToggleStruts)
+ , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
-- , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
@@ -131,7 +129,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
-- Lock screen
- , ((modm .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
+ , ((modm .|. shiftMask, xK_z), spawn "mate-screensaver-command --lock")
]
++
diff --git a/zshenv b/zshenv
new file mode 100644
index 0000000..56d8b0d
--- /dev/null
+++ b/zshenv
@@ -0,0 +1,4 @@
+export ZSHENV_LOADED=true
+export EDITOR=nvim
+export PATH=$PATH:$HOME/bin
+export TERMINAL=urxvt