Compare commits

...

3 Commits

Author SHA1 Message Date
josiah bfd8247b3c Add function to force add existing buffer.
1 year ago
josiah c7b6f3a8e0 Add digikam backup script.
1 year ago
josiah 10268cc02c Update bg.
1 year ago

@ -106,7 +106,7 @@ theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/m
theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
-- i edited this thing
theme.wallpaper = "~/.config/awesome/Hi_Fi_Girl_Remix_by_cycloidbeta.jpg"
theme.wallpaper = "~/network-share/sainthood/homes/josiah/Photos/backgrounds/convenience store [3840x2160].png"
theme.awesome_icon = "~/.config/awesome/tiny-purple-bat.png"
-- You can use your own layout icons like this:

@ -261,6 +261,13 @@
(setq mu4e-view-show-images t))
(defun magit-add-current-buffer ()
"Adds (with force) the file from the current buffer to the git repo"
(interactive)
(shell-command (concat "git add -f "
(shell-quote-argument buffer-file-name))))
(server-start)
;;; jlj-generic.el ends here

@ -0,0 +1,64 @@
#!/usr/bin/env python3
"""Backup digikam files / dbs so I don't lose everything I care about."""
import argparse
import sys
import shutil
FILES = [
"/home/josiah/.config/digikam_oauthrc",
"/home/josiah/.config/digikamrc",
"/home/josiah/.config/digikam_systemrc",
]
DIRECTORIES = [
"/home/josiah/apps/digikam/"
]
DEST = "/home/josiah/network-share/sainthood/homes/josiah/backups/digikam/"
def resolvepath(path):
"""Resolve and normalize a path
1. Handle tilde expansion; turn ~/.ssh into /home/user/.ssh and
~otheruser/bin to /home/otheruser/bin
2. Normalize the path so that it doesn't contain relative segments, turning
e.g. /usr/local/../bin to /usr/bin
3. Get the real path of the actual file, resolving symbolic links
"""
return os.path.realpath(os.path.normpath(os.path.expanduser(path)))
def idb_excepthook(type, value, tb):
"""Call an interactive debugger in post-mortem mode
If you do "sys.excepthook = idb_excepthook", then an interactive debugger
will be spawned at an unhandled exception
"""
if hasattr(sys, 'ps1') or not sys.stderr.isatty():
sys.__excepthook__(type, value, tb)
else:
import pdb, traceback
traceback.print_exception(type, value, tb)
print
pdb.pm()
def main(*args, **kwargs):
parser = argparse.ArgumentParser(
description="")
parser.add_argument(
"--debug", "-d", action='store_true', help="Include debugging output")
parsed = parser.parse_args()
if parsed.debug:
sys.excepthook = idb_excepthook
for item in FILES:
shutil.copy2(item, DEST)
for item in DIRECTORIES:
shutil.copytree(item, DEST, copy_function=shutil.copy2, dirs_exist_ok=True)
if __name__ == "__main__":
sys.exit(main(*sys.argv))
Loading…
Cancel
Save