From 71ca28742ac4f93ab2401eaee8e78471c023cd4b Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 7 Nov 2024 11:32:27 +0800 Subject: Update --- misc/kobo/settings.reader.lua | 257 ++++++++++++++++++++++++++++ misc/kobo/settings/gestures.lua | 358 ++++++++++++++++++++++++++++++++++++++++ misc/libinput/00-keyboard.conf | 9 - misc/libinput/30-touchpad.conf | 7 - misc/systemd/wakeup.service | 12 ++ 5 files changed, 627 insertions(+), 16 deletions(-) create mode 100755 misc/kobo/settings.reader.lua create mode 100644 misc/kobo/settings/gestures.lua delete mode 100644 misc/libinput/00-keyboard.conf delete mode 100644 misc/libinput/30-touchpad.conf create mode 100644 misc/systemd/wakeup.service (limited to 'misc') diff --git a/misc/kobo/settings.reader.lua b/misc/kobo/settings.reader.lua new file mode 100755 index 0000000..ea3722a --- /dev/null +++ b/misc/kobo/settings.reader.lua @@ -0,0 +1,257 @@ +-- we can read Lua syntax here! +return { + ["BookShortcuts_directory_action"] = "FM", + ["SSH_allow_no_password"] = true, + ["activate_menu"] = "swipe", + ["auto_disable_wifi"] = true, + ["auto_save_settings_interval_minutes"] = 15, + ["auto_standby_timeout_seconds"] = -1, + ["auto_suspend_timeout_seconds"] = 900, + ["autodim_duration_seconds"] = 5, + ["autodim_fraction"] = 20, + ["autodim_starttime_minutes"] = -1, + ["autoshutdown_timeout_seconds"] = -1, + ["autoturn_distance"] = 1, + ["autoturn_enabled"] = false, + ["autoturn_timeout_seconds"] = 5, + ["autowarmth_fl_off_during_day_offset_s"] = 0, + ["avoid_flashing_ui"] = true, + ["back_in_filemanager"] = "parent_folder", + ["back_in_reader"] = "default", + ["back_to_exit"] = "disable", + ["bookmarks_items_font_size"] = 19, + ["bookmarks_items_per_page"] = 14, + ["calibre_opds"] = {}, + ["closed_rotation_mode"] = 0, + ["copt_font_gamma"] = 43, + ["copt_h_page_margins"] = { + [1] = 20, + [2] = 20, + }, + ["copt_line_spacing"] = 115, + ["copt_status_line"] = 1, + ["coverbrowser_initial_default_setup_done"] = true, + ["cre_font_family_fonts"] = {}, + ["cre_header_auto_refresh"] = 1, + ["cre_header_battery"] = 1, + ["cre_header_battery_percent"] = 0, + ["cre_header_chapter_marks"] = 1, + ["cre_header_clock"] = 1, + ["cre_header_page_count"] = 1, + ["cre_header_page_number"] = 1, + ["cre_header_reading_percent"] = 0, + ["cre_header_title"] = 1, + ["default_highlight_action"] = "dictionary", + ["dev_no_c_blitter"] = false, + ["device_id"] = "2F1B2BBA7854401D999E14DD76377039", + ["device_status_battery_alarm"] = true, + ["device_status_battery_interval_minutes"] = 15, + ["device_status_battery_threshold"] = 10, + ["device_status_battery_threshold_high"] = 100, + ["device_status_memory_interval_minutes"] = 5, + ["device_status_memory_threshold"] = 100, + ["dicts_disabled"] = {}, + ["dicts_order"] = {}, + ["duration_format"] = "classic", + ["end_document_action"] = "mark_read", + ["exporter"] = { + ["html"] = { + ["enabled"] = false, + }, + ["joplin"] = { + ["enabled"] = false, + }, + ["json"] = { + ["enabled"] = false, + }, + ["markdown"] = { + ["formatting_options"] = { + ["invert"] = "bold", + ["lighten"] = "italic", + ["strikeout"] = "strikethrough", + ["underscore"] = "underline_markdownit", + }, + ["highlight_formatting"] = true, + }, + ["readwise"] = { + ["enabled"] = false, + }, + ["text"] = { + ["enabled"] = false, + }, + }, + ["filemanagermenu_tab_index"] = 3, + ["flash_keyboard"] = false, + ["folder_shortcuts"] = {}, + ["footer"] = { + ["align"] = "center", + ["all_at_once"] = false, + ["auto_refresh_time"] = false, + ["battery"] = false, + ["battery_hide_threshold"] = 100, + ["book_chapter"] = false, + ["book_chapter_max_width_pct"] = 30, + ["book_time_to_read"] = false, + ["book_title"] = false, + ["book_title_max_width_pct"] = 30, + ["bookmark_count"] = false, + ["bottom_horizontal_separator"] = false, + ["chapter_progress"] = false, + ["chapter_time_to_read"] = false, + ["container_bottom_padding"] = 1, + ["container_height"] = 14, + ["disable_progress_bar"] = false, + ["disabled"] = false, + ["frontlight"] = false, + ["hide_empty_generators"] = false, + ["item_prefix"] = "icons", + ["items_separator"] = "bar", + ["lock_tap"] = false, + ["mem_usage"] = false, + ["page_progress"] = true, + ["pages_left"] = false, + ["pages_left_book"] = false, + ["pages_left_includes_current_page"] = false, + ["percentage"] = false, + ["progress_bar_min_width_pct"] = 20, + ["progress_bar_position"] = "alongside", + ["progress_margin"] = false, + ["progress_margin_width"] = 24, + ["progress_pct_format"] = "0", + ["progress_style_thick_height"] = 7, + ["progress_style_thin"] = false, + ["progress_style_thin_height"] = 3, + ["reclaim_height"] = false, + ["skim_widget_on_hold"] = false, + ["text_font_bold"] = false, + ["text_font_size"] = 14, + ["time"] = true, + ["toc_markers"] = true, + ["toc_markers_width"] = 2, + ["wifi_status"] = false, + }, + ["frontlight_intensity"] = 15, + ["frontlight_warmth"] = 0, + ["ges_tap_interval_on_keyboard_ms"] = 0, + ["highlight_lighten_factor"] = 0.2, + ["highlight_long_hold_threshold_s"] = 3, + ["history_filter"] = "all", + ["hold_pan_rate"] = 5, + ["home_dir"] = "/mnt/onboard/books", + ["inertial_scroll"] = false, + ["input_ignore_gsensor"] = true, + ["is_frontlight_on"] = false, + ["keyboard_key_font_size"] = 22, + ["keyboard_layout"] = "en", + ["keyboard_layouts"] = {}, + ["language"] = "C", + ["last_migration_date"] = 20221027, + ["lastdir"] = "/mnt/onboard/books", + ["lastfile"] = "/mnt/onboard/books/unix/ascii.txt", + ["low_pan_rate"] = false, + ["menu_search_string"] = "幫助", + ["metric_length"] = true, + ["multiswipes_enabled"] = false, + ["opds_servers"] = { + [1] = { + ["title"] = "Project Gutenberg", + ["url"] = "https://m.gutenberg.org/ebooks.opds/?format=opds", + }, + [2] = { + ["title"] = "Standard Ebooks", + ["url"] = "https://standardebooks.org/feeds/opds", + }, + [3] = { + ["title"] = "Feedbooks", + ["url"] = "https://catalog.feedbooks.com/catalog/public_domain.atom", + }, + [4] = { + ["title"] = "ManyBooks", + ["url"] = "http://manybooks.net/opds/index.php", + }, + [5] = { + ["title"] = "Internet Archive", + ["url"] = "https://bookserver.archive.org/", + }, + [6] = { + ["title"] = "textos.info (Spanish)", + ["url"] = "https://www.textos.info/catalogo.atom", + }, + [7] = { + ["title"] = "Gallica (French)", + ["url"] = "https://gallica.bnf.fr/opds", + }, + }, + ["page_turns_tap_zones"] = "default", + ["panel_zoom_enabled"] = { + ["cbt"] = true, + ["cbz"] = true, + }, + ["panel_zoom_fallback_to_text_selection"] = { + ["pdf"] = true, + }, + ["plugins_disabled"] = { + ["calibre"] = true, + ["calibrecompanion"] = true, + ["evernote"] = true, + ["exporter"] = true, + ["externalkeyboard"] = true, + ["goodreads"] = true, + ["japanese"] = true, + ["keepalive"] = true, + ["kobolight"] = true, + ["movetoarchive"] = true, + ["opds"] = true, + ["readtimer"] = true, + ["send2ebook"] = true, + ["storagestat"] = true, + ["vocabbuilder"] = true, + ["zsync"] = true, + }, + ["quickstart_shown_version"] = 202301000000, + ["reader_footer_custom_text"] = "KOReader", + ["reader_footer_custom_text_repetitions"] = "1", + ["reader_footer_mode"] = 0, + ["save_document"] = "prompt", + ["screensaver_delay"] = "disable", + ["screensaver_hide_fallback_msg"] = false, + ["screensaver_image"] = "/mnt/onboard/screenshots/Reader_2023-02-15_140821.png", + ["screensaver_img_background"] = "black", + ["screensaver_message_position"] = "bottom", + ["screensaver_msg_background"] = "none", + ["screensaver_show_message"] = true, + ["screensaver_stretch_images"] = false, + ["screensaver_type"] = "image_file", + ["screenshot_dir"] = "/mnt/onboard/screenshots/", + ["scroll_method"] = "classic", + ["shorten_home_dir"] = false, + ["show_bottom_menu"] = false, + ["show_hidden"] = true, + ["show_unsupported"] = true, + ["start_with"] = "filemanager", + ["statistics"] = { + ["calendar_browse_future_months"] = false, + ["calendar_nb_book_spans"] = 3, + ["calendar_show_histogram"] = true, + ["calendar_start_day_of_week"] = 2, + ["convert_to_db"] = true, + ["is_enabled"] = true, + ["max_sec"] = 120, + ["min_sec"] = 5, + }, + ["style_tweaks"] = { + ["footnote-inpage_epub_smaller"] = true, + ["footnote-inpage_fb2"] = true, + }, + ["style_tweaks_in_dispatcher"] = {}, + ["terminal_buffer_size"] = 16, + ["terminal_font_size"] = 16, + ["terminal_shell"] = "sh", + ["text_lang_fallback"] = "en-US", + ["toc_items_per_page"] = 14, + ["vocabulary_builder"] = { + ["enabled"] = true, + }, + ["wifi_disable_action"] = "leave_on", + ["wifi_was_on"] = false, +} diff --git a/misc/kobo/settings/gestures.lua b/misc/kobo/settings/gestures.lua new file mode 100644 index 0000000..a15d344 --- /dev/null +++ b/misc/kobo/settings/gestures.lua @@ -0,0 +1,358 @@ +-- we can read Lua syntax here! +return { + ["custom_multiswipes"] = {}, + ["gesture_fm"] = { + ["hold_bottom_left_corner"] = { + ["history"] = true, + ["settings"] = { + ["order"] = { + [1] = "history", + }, + }, + }, + ["hold_bottom_right_corner"] = { + ["settings"] = { + ["order"] = { + [1] = "suspend", + }, + }, + ["suspend"] = true, + }, + ["hold_top_left_corner"] = { + ["exit"] = true, + ["settings"] = { + ["order"] = { + [1] = "exit", + }, + }, + }, + ["hold_top_right_corner"] = { + ["settings"] = { + ["order"] = { + [1] = "terminal", + }, + }, + ["terminal"] = true, + }, + ["multiswipe"] = {}, + ["multiswipe_east_north"] = { + ["history"] = true, + }, + ["multiswipe_east_north_west"] = {}, + ["multiswipe_east_north_west_east"] = {}, + ["multiswipe_east_south"] = { + ["go_to"] = true, + }, + ["multiswipe_east_south_west_north"] = { + ["full_refresh"] = true, + }, + ["multiswipe_east_west"] = {}, + ["multiswipe_east_west_east"] = { + ["favorites"] = true, + }, + ["multiswipe_north_east"] = {}, + ["multiswipe_north_south"] = { + ["folder_up"] = true, + }, + ["multiswipe_north_south_north"] = {}, + ["multiswipe_north_west"] = { + ["folder_shortcuts"] = true, + }, + ["multiswipe_northwest_southwest_northwest"] = { + ["toggle_wifi"] = true, + }, + ["multiswipe_south_east"] = {}, + ["multiswipe_south_east_north"] = {}, + ["multiswipe_south_east_north_south"] = {}, + ["multiswipe_south_north"] = {}, + ["multiswipe_south_north_south"] = {}, + ["multiswipe_south_west"] = { + ["show_frontlight_dialog"] = true, + }, + ["multiswipe_southeast_northeast"] = {}, + ["multiswipe_southeast_northeast_northwest"] = { + ["wifi_on"] = true, + }, + ["multiswipe_southeast_southwest_northwest"] = { + ["wifi_off"] = true, + }, + ["multiswipe_west_east"] = {}, + ["multiswipe_west_east_west"] = { + ["open_previous_document"] = true, + }, + ["multiswipe_west_north"] = {}, + ["multiswipe_west_south"] = { + ["back"] = true, + }, + ["one_finger_swipe_right_edge_down"] = { + ["full_refresh"] = true, + ["settings"] = { + ["order"] = { + [1] = "full_refresh", + }, + }, + }, + ["one_finger_swipe_right_edge_up"] = { + ["full_refresh"] = true, + ["settings"] = { + ["order"] = { + [1] = "full_refresh", + }, + }, + }, + ["pinch_gesture"] = { + ["folder_up"] = true, + ["settings"] = { + ["order"] = { + [1] = "folder_up", + }, + }, + }, + ["short_diagonal_swipe"] = { + ["settings"] = { + ["order"] = { + [1] = "show_menu", + }, + }, + ["show_menu"] = true, + }, + ["spread_gesture"] = { + ["open_previous_document"] = true, + ["settings"] = { + ["order"] = { + [1] = "open_previous_document", + }, + }, + }, + ["tap_left_bottom_corner"] = { + ["settings"] = { + ["order"] = { + [1] = "show_frontlight_dialog", + }, + }, + ["show_frontlight_dialog"] = true, + }, + ["two_finger_swipe_east"] = { + ["settings"] = { + ["order"] = { + [1] = "toggle_wifi", + }, + }, + ["toggle_wifi"] = true, + }, + ["two_finger_swipe_north"] = { + ["settings"] = { + ["order"] = { + [1] = "show_network_info", + }, + }, + ["show_network_info"] = true, + }, + ["two_finger_swipe_south"] = { + ["reboot"] = true, + ["settings"] = { + ["order"] = { + [1] = "reboot", + }, + }, + }, + ["two_finger_swipe_west"] = { + ["settings"] = { + ["order"] = { + [1] = "toggle_ssh_server", + }, + }, + ["toggle_ssh_server"] = true, + }, + }, + ["gesture_reader"] = { + ["double_tap_left_side"] = { + ["page_jmp"] = -10, + }, + ["double_tap_right_side"] = { + ["page_jmp"] = 10, + }, + ["hold_bottom_left_corner"] = { + ["history"] = true, + ["settings"] = { + ["order"] = { + [1] = "history", + }, + }, + }, + ["hold_bottom_right_corner"] = { + ["settings"] = { + ["order"] = { + [1] = "suspend", + }, + }, + ["suspend"] = true, + }, + ["hold_top_left_corner"] = { + ["screenshot"] = true, + ["settings"] = { + ["order"] = { + [1] = "screenshot", + }, + }, + }, + ["hold_top_right_corner"] = { + ["book_info"] = true, + ["settings"] = { + ["order"] = { + [1] = "book_info", + }, + }, + }, + ["multiswipe"] = {}, + ["multiswipe_east_north"] = { + ["history"] = true, + }, + ["multiswipe_east_north_west"] = { + ["zoom"] = "contentwidth", + }, + ["multiswipe_east_north_west_east"] = { + ["zoom"] = "pagewidth", + }, + ["multiswipe_east_south"] = { + ["go_to"] = true, + }, + ["multiswipe_east_south_west_north"] = { + ["full_refresh"] = true, + }, + ["multiswipe_east_west"] = { + ["latest_bookmark"] = true, + }, + ["multiswipe_east_west_east"] = { + ["favorites"] = true, + }, + ["multiswipe_north_east"] = { + ["toc"] = true, + }, + ["multiswipe_north_south"] = {}, + ["multiswipe_north_south_north"] = { + ["prev_chapter"] = true, + }, + ["multiswipe_north_west"] = { + ["bookmarks"] = true, + }, + ["multiswipe_northwest_southwest_northwest"] = { + ["toggle_wifi"] = true, + }, + ["multiswipe_south_east"] = { + ["toggle_reflow"] = true, + }, + ["multiswipe_south_east_north"] = { + ["zoom"] = "contentheight", + }, + ["multiswipe_south_east_north_south"] = { + ["zoom"] = "pageheight", + }, + ["multiswipe_south_north"] = { + ["skim"] = true, + }, + ["multiswipe_south_north_south"] = { + ["next_chapter"] = true, + }, + ["multiswipe_south_west"] = { + ["show_frontlight_dialog"] = true, + }, + ["multiswipe_southeast_northeast"] = { + ["follow_nearest_link"] = true, + }, + ["multiswipe_southeast_northeast_northwest"] = { + ["wifi_on"] = true, + }, + ["multiswipe_southeast_southwest_northwest"] = { + ["wifi_off"] = true, + }, + ["multiswipe_west_east"] = { + ["previous_location"] = true, + }, + ["multiswipe_west_east_west"] = { + ["open_previous_document"] = true, + }, + ["multiswipe_west_north"] = { + ["book_status"] = true, + }, + ["multiswipe_west_south"] = { + ["back"] = true, + }, + ["one_finger_swipe_right_edge_down"] = { + ["page_browser"] = true, + ["settings"] = { + ["order"] = { + [1] = "page_browser", + }, + }, + }, + ["one_finger_swipe_right_edge_up"] = { + ["book_map"] = true, + ["settings"] = { + ["order"] = { + [1] = "book_map", + }, + }, + }, + ["pinch_gesture"] = { + ["filemanager"] = true, + ["settings"] = { + ["order"] = { + [1] = "filemanager", + }, + }, + }, + ["short_diagonal_swipe"] = { + ["settings"] = { + ["order"] = { + [1] = "show_menu", + }, + }, + ["show_menu"] = true, + }, + ["spread_gesture"] = { + ["open_previous_document"] = true, + ["settings"] = { + ["order"] = { + [1] = "open_previous_document", + }, + }, + }, + ["tap_left_bottom_corner"] = { + ["settings"] = { + ["order"] = { + [1] = "show_frontlight_dialog", + }, + }, + ["show_frontlight_dialog"] = true, + }, + ["tap_top_left_corner"] = { + ["toggle_page_flipping"] = true, + }, + ["tap_top_right_corner"] = { + ["toggle_bookmark"] = true, + }, + ["two_finger_swipe_east"] = { + ["toc"] = true, + }, + ["two_finger_swipe_north"] = { + ["settings"] = { + ["order"] = { + [1] = "toggle_gsensor", + }, + }, + ["toggle_gsensor"] = true, + }, + ["two_finger_swipe_south"] = { + ["settings"] = { + ["order"] = { + [1] = "skim", + }, + }, + ["skim"] = true, + }, + ["two_finger_swipe_west"] = { + ["bookmarks"] = true, + }, + }, +} diff --git a/misc/libinput/00-keyboard.conf b/misc/libinput/00-keyboard.conf deleted file mode 100644 index 4aa4ac7..0000000 --- a/misc/libinput/00-keyboard.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Written by systemd-localed(8), read by systemd-localed and Xorg. It's -# probably wise not to edit this file manually. Use localectl(1) to -# instruct systemd-localed to update it. -Section "InputClass" - Identifier "system-keyboard" - MatchIsKeyboard "on" - Option "XkbLayout" "us" - Option "XkbOptions" "ctrl:nocaps" -EndSection diff --git a/misc/libinput/30-touchpad.conf b/misc/libinput/30-touchpad.conf deleted file mode 100644 index b5d4424..0000000 --- a/misc/libinput/30-touchpad.conf +++ /dev/null @@ -1,7 +0,0 @@ -# check ~/.local/share/xorg/Xorg.0.log for device name -Section "InputClass" - Identifier "touchpad" - Driver "libinput" - Option "Tapping" "on" - Option "NaturalScrolling" "on" -EndSection diff --git a/misc/systemd/wakeup.service b/misc/systemd/wakeup.service new file mode 100644 index 0000000..0a292d3 --- /dev/null +++ b/misc/systemd/wakeup.service @@ -0,0 +1,12 @@ +[Unit] +Description=Run my_user_script +After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target network-online.target +Wants=network-online.target + +[Service] +ExecStart=/home/pham/helper/bin/wakeup.sh +User=pham +Environment=DISPLAY=:0 + +[Install] +WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target -- cgit v1.2.3-70-g09d2