From 23f58cc0d4ef36c66d7270aa4ca11d95c4090da1 Mon Sep 17 00:00:00 2001 From: osmarks Date: Mon, 28 Jul 2025 11:19:15 +0100 Subject: [PATCH] yet more dotfiles --- dotfiles/wezterm.lua | 20 ++++++++++++++++++++ histretention.py | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 dotfiles/wezterm.lua diff --git a/dotfiles/wezterm.lua b/dotfiles/wezterm.lua new file mode 100644 index 0000000..b8aa87b --- /dev/null +++ b/dotfiles/wezterm.lua @@ -0,0 +1,20 @@ +local wezterm = require 'wezterm' + +local config = {} + +config.ssh_domains = { + { + name = 'protagonism', + remote_address = 'protagonism' + }, +} +config.unix_domains = { + { + name = 'unix', + } +} + +config.font = wezterm.font "Fira Code" +config.font_size = 10 + +return config diff --git a/histretention.py b/histretention.py index befec85..2c8d172 100644 --- a/histretention.py +++ b/histretention.py @@ -1,6 +1,6 @@ -import sqlite3 +import sqlite3, sys -longterm = sqlite3.connect("/data/archive/lthist.sqlite3") +longterm = sqlite3.connect(sys.argv[1]) longterm.executescript(f""" CREATE TABLE IF NOT EXISTS places ( guid TEXT PRIMARY KEY, @@ -33,4 +33,4 @@ ON CONFLICT DO UPDATE SET lastModified = excluded.lastModified, title = excluded # TODO: possibly wrong with new profile, might need to increment historyvisits or something longterm.execute("INSERT INTO historyvisits SELECT (moz_historyvisits.id || '/' || visit_date), moz_places.guid, visit_date, visit_type FROM moz_historyvisits JOIN moz_places ON moz_places.id = moz_historyvisits.place_id ON CONFLICT DO NOTHING;") -longterm.commit() \ No newline at end of file +longterm.commit()