- Relocated files and updated paths
7
linux/gnome_logoff.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' |
|
||||
while read x; do
|
||||
# echo "$x"
|
||||
sudo systemctl stop xkeysnail
|
||||
exit 0
|
||||
done
|
BIN
linux/gui/capslock_1200x720.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
linux/gui/keys_1200x720.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
1438
linux/gui/kinto-gui.py
Normal file
11
linux/gui/kinto.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
# /.local/share/applications
|
||||
Name=Kinto.sh
|
||||
GenericName=Kinto.sh
|
||||
Categories=Utility;
|
||||
Type=Application
|
||||
Exec={homedir}/.config/kinto/gui/kinto-gui.py
|
||||
Icon={homedir}/.config/kinto/kinto-color-48.svg
|
||||
# Icon=/usr/share/icons/Pocillo/kinto-color.svg
|
||||
Terminal=false
|
||||
NoDisplay=false
|
BIN
linux/gui/tuxbg.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
linux/gui/tuxcry4.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
linux/gui/tuxerror.png
Normal file
After Width: | Height: | Size: 172 KiB |
BIN
linux/gui/tuxuninstall.png
Normal file
After Width: | Height: | Size: 94 KiB |
40
linux/initkb
Normal file
@@ -0,0 +1,40 @@
|
||||
kbtype = ask
|
||||
rightmod = true
|
||||
vsc2st3 = false
|
||||
capslock = default
|
||||
systray = true
|
||||
autostart = true
|
||||
|
||||
#
|
||||
# kbtype - ask|win|mac|ibm|cbk|wmk
|
||||
#
|
||||
# What physical keyboard type does the user have?
|
||||
# ask - Prompt the user
|
||||
# win - Standard layout Ctrl, Win, Alt, Spacebar
|
||||
# mac - Mac layout Ctrl, Alt, Cmd, Spacebar
|
||||
# ibm - Model M layout Ctrl, Alt, Spacebar (Capslock is Capslock)
|
||||
# cbk - Chromebook layout Ctrl, Alt, Spacebar (Capslock is Search (Win))
|
||||
# wmk - WinMac layout
|
||||
# wmk - Uses Apple driver to swap Cmd & Alt so
|
||||
# swapping between Win & Mac keyboards is seamless.
|
||||
#
|
||||
# rightmod - Remap modifiers on right
|
||||
# true (default)
|
||||
#
|
||||
# ^ Note: Useful to set to false for multi-language users (aka AltGr)
|
||||
#
|
||||
# vsc2st3 - Remap VS Code to use Sublime Text keymap
|
||||
# false (default)
|
||||
#
|
||||
# capslock - esc_cmd|cmd|default
|
||||
# esc_cmd - escape if tapped, cmd if held
|
||||
# cmd - remaps to cmd
|
||||
# default - no remap
|
||||
#
|
||||
# systray - Sets whether the system tray will show
|
||||
# true - default
|
||||
# false - only defaults on gnome3 and kde
|
||||
#
|
||||
# autostart - Sets whether or not kinto will automatically start
|
||||
# true - deefault
|
||||
#
|
20
linux/killdups.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
||||
if [[ $xkeycount -le 1 ]]; then
|
||||
# No dups found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while ! zenity --entry --title="Kinto Duplicates" --text="Type Password to end duplicates:" --hide-text| sudo -S cat /dev/null >/dev/null; do
|
||||
if ! $(zenity --question --text="Wrong password, try again?"); then
|
||||
# Dups still exist
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill
|
||||
pgrep 'xkeysnail' | xargs -r -n1 sudo kill
|
||||
sudo -K # remove privilege
|
||||
# No dups should exist
|
||||
exit 0
|
492
linux/kinto.py
Normal file
@@ -0,0 +1,492 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# autostart = true
|
||||
|
||||
import re
|
||||
from xkeysnail.transform import *
|
||||
|
||||
# Use the following for testing terminal keymaps
|
||||
# terminals = [ "", ... ]
|
||||
# xbindkeys -mk
|
||||
terminals = ["kinto-gui.py","gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal"]
|
||||
terminals = [term.casefold() for term in terminals]
|
||||
termStr = "|".join(str(x) for x in terminals)
|
||||
|
||||
# Use for browser specific hotkeys
|
||||
browsers = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge","Epiphany","Firefox","Discord"]
|
||||
browsers = [browser.casefold() for browser in browsers]
|
||||
browserStr = "|".join(str(x) for x in browsers)
|
||||
|
||||
chromes = ["Chromium","Chromium-browser","Google-chrome","microsoft-edge-dev","microsoft-edge"]
|
||||
chromes = [chrome.casefold() for chrome in chromes]
|
||||
chromeStr = "|".join(str(x) for x in chromes)
|
||||
|
||||
# edges = ["microsoft-edge-dev","microsoft-edge"]
|
||||
# edges = [edge.casefold() for edge in edges]
|
||||
# edgeStr = "|".join(str(x) for x in edges)
|
||||
|
||||
mscodes = ["code","vscodium"]
|
||||
codeStr = "|".join(str(x) for x in mscodes)
|
||||
|
||||
define_multipurpose_modmap(
|
||||
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
|
||||
# {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc
|
||||
# {Key.LEFT_META: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc - Chromebook
|
||||
{ # Placeholder
|
||||
})
|
||||
|
||||
# [Global modemap] Change modifier keys as in xmodmap
|
||||
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||
|
||||
# Key.CAPSLOCK: Key.RIGHT_CTRL, # Caps2Cmd
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Caps2Cmd - Chromebook
|
||||
|
||||
# - IBM
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
|
||||
# Key.LEFT_CTRL: Key.LEFT_ALT, # IBM
|
||||
# Key.CAPSLOCK: Key.LEFT_META, # IBM
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
|
||||
|
||||
# - Chromebook
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook - Multi-language (Remove)
|
||||
|
||||
# - Default Mac/Win
|
||||
# - Default Win
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac - Multi-language (Remove)
|
||||
|
||||
# - Mac Only
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
|
||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove)
|
||||
})
|
||||
|
||||
# [Conditional modmap] Change modifier keys in certain applications
|
||||
define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
||||
# - IBM
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.CAPSLOCK: Key.LEFT_ALT, # IBM
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM
|
||||
# # Right Meta does not exist on chromebooks
|
||||
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
|
||||
|
||||
# - Chromebook
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
|
||||
# # Right Meta does not exist on chromebooks
|
||||
|
||||
# - Default Mac/Win
|
||||
# - Default Win
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac - Multi-language (Remove)
|
||||
|
||||
# - Mac Only
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove)
|
||||
})
|
||||
|
||||
# Keybindings for IntelliJ
|
||||
define_keymap(re.compile("jetbrains-idea", re.IGNORECASE),{
|
||||
# General
|
||||
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
|
||||
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
|
||||
K("C-Key_2"): K("M-Key_2"), # Open corresponding tool window
|
||||
K("C-Key_3"): K("M-Key_3"), # Open corresponding tool window
|
||||
K("C-Key_4"): K("M-Key_4"), # Open corresponding tool window
|
||||
K("C-Key_5"): K("M-Key_5"), # Open corresponding tool window
|
||||
K("C-Key_6"): K("M-Key_6"), # Open corresponding tool window
|
||||
K("C-Key_7"): K("M-Key_7"), # Open corresponding tool window
|
||||
K("C-Key_8"): K("M-Key_8"), # Open corresponding tool window
|
||||
K("C-Key_9"): K("M-Key_9"), # Open corresponding tool window
|
||||
K("Super-Grave"): K("C-Grave"), # Quick switch current scheme
|
||||
K("C-Comma"): K("C-M-s"), # Open Settings dialog
|
||||
K("C-Semicolon"): K("C-M-Shift-s"), # Open Project Structure dialog
|
||||
# Debugging
|
||||
K("C-M-r"): K("F9"), # Resume program
|
||||
# Search/Replace
|
||||
K("C-g"): K("F3"), # Find next
|
||||
K("C-Shift-F3"): K("Shift-F3"), # Find previous
|
||||
K("Super-g"): K("M-j"), # Select next occurrence
|
||||
K("C-Super-g"): K("C-M-Shift-j"), # Select all occurrences
|
||||
K("Super-Shift-g"): K("M-Shift-j"), # Unselect occurrence
|
||||
# Editing
|
||||
K("Super-Space"): K("LC-Space"), # Basic code completion
|
||||
K("Super-Shift-Space"): K("LC-Shift-Space"),# Smart code completion
|
||||
K("Super-j"): K("C-q"), # Quick documentation lookup
|
||||
K("C-n"): K("M-Insert"), # Generate code...
|
||||
K("Super-o"): K("C-o"), # Override methods
|
||||
K("Super-i"): K("C-i"), # Implement methods
|
||||
K("M-Up"): K("C-w"), # Extend selection
|
||||
K("M-Down"): K("C-Shift-w"), # Shrink selection
|
||||
K("Super-Shift-q"): K("M-q"), # Context info
|
||||
K("Super-M-o"): K("C-M-o"), # Optimize imports
|
||||
K("Super-M-i"): K("C-M-i"), # Auto-indent line(s)
|
||||
K("C-Backspace"): K("C-y"), # Delete line at caret
|
||||
K("Super-Shift-j"): K("C-Shift-j"), # Smart line join
|
||||
K("M-Delete"): K("C-Delete"), # Delete to word end
|
||||
K("M-Backspace"): K("C-Backspace"), # Delete to word start
|
||||
K("C-Shift-Equal"): K("C-KPPLUS"), # Expand code block
|
||||
K("C-Minus"): K("C-KPMINUS"), # Collapse code block
|
||||
K("C-Shift-Equal"): K("C-Shift-KPPLUS"), # Expand all
|
||||
K("C-Shift-Minus"): K("C-Shift-KPMINUS"), # Collapse all
|
||||
K("C-w"): K("C-F4"), # Close active editor tab
|
||||
# Refactoring
|
||||
K("C-Delete"): K("M-Delete"), # Safe Delete
|
||||
K("C-T"): K("C-M-Shift-t"), # Refactor this
|
||||
# Navigation
|
||||
K("C-o"): K("C-n"), # Go to class
|
||||
K("C-Shift-o"): K("C-Shift-n"), # Go to file
|
||||
K("C-M-o"): K("C-M-Shift-n"), # Go to symbol
|
||||
K("Super-Right"): K("M-Right"), # Go to next editor tab
|
||||
K("Super-Left"): K("M-Left"), # Go to previous editor tab
|
||||
K("Super-l"): K("C-g"), # Go to line
|
||||
K("Super-e"): K("C-e"), # Recent files popup
|
||||
K("M-Space"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("C-Y"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration
|
||||
K("Super-Up"): K("M-Up"), # Go to previous
|
||||
K("Super-Down"): K("M-Down"), # Go to next method
|
||||
K("Super-h"): K("C-h"), # Type hierarchy
|
||||
K("Super-M-h"): K("C-M-h"), # Call hierarchy
|
||||
K("C-Down"): K("C-Enter"), # Edit source/View source
|
||||
K("M-Home"): K("M-Home"), # Show navigation bar
|
||||
K("F2"): K("F11"), # Toggle bookmark
|
||||
K("Super-F3"): K("C-F11"), # Toggle bookmark with mnemonic
|
||||
K("Super-Key_0"): K("C-Key_0"), # Go to numbered bookmark
|
||||
K("Super-Key_1"): K("C-Key_1"), # Go to numbered bookmark
|
||||
K("Super-Key_2"): K("C-Key_2"), # Go to numbered bookmark
|
||||
K("Super-Key_3"): K("C-Key_3"), # Go to numbered bookmark
|
||||
K("Super-Key_4"): K("C-Key_4"), # Go to numbered bookmark
|
||||
K("Super-Key_5"): K("C-Key_5"), # Go to numbered bookmark
|
||||
K("Super-Key_6"): K("C-Key_6"), # Go to numbered bookmark
|
||||
K("Super-Key_7"): K("C-Key_7"), # Go to numbered bookmark
|
||||
K("Super-Key_8"): K("C-Key_8"), # Go to numbered bookmark
|
||||
K("Super-Key_9"): K("C-Key_9"), # Go to numbered bookmark
|
||||
K("C-F3"): K("Shift-F11"), # Show bookmarks
|
||||
# Compile and Run
|
||||
K("Super-M-r"): K("M-Shift-F10"), # Select configuration and run
|
||||
K("Super-M-d"): K("M-Shift-F9"), # Select configuration and debug
|
||||
K("Super-r"): K("Shift-F10"), # Run
|
||||
K("Super-d"): K("Shift-F9"), # Debug
|
||||
K("Super-Shift-r"): K("C-Shift-F10"), # Run context configuration from editor
|
||||
K("Super-Shift-d"): K("C-Shift-F9"), # Debug context configuration from editor
|
||||
# VCS/Local History
|
||||
K("Super-v"): K("M-Grave"), # VCS quick popup
|
||||
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||
})
|
||||
|
||||
# Keybindings for Nautilus
|
||||
define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
|
||||
K("RC-Up"): K("M-Up"), # Go Up dir
|
||||
K("RC-Down"): K("M-Down"), # Go Down dir
|
||||
K("RC-Left"): K("M-Left"), # Go Back
|
||||
K("RC-Right"): K("M-Right"), # Go Forward
|
||||
})
|
||||
|
||||
# Keybindings for Browsers
|
||||
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||
K("M-RC-J"): K("RC-Shift-J"), # Dev tools
|
||||
})
|
||||
|
||||
# Open preferences in browsers
|
||||
define_keymap(re.compile("Firefox", re.IGNORECASE),{
|
||||
K("C-comma"): [K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")],
|
||||
})
|
||||
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
|
||||
K("C-comma"): [K("M-e"), K("s"),K("Enter")],
|
||||
})
|
||||
# Opera C-F12
|
||||
|
||||
define_keymap(None,{
|
||||
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
|
||||
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
|
||||
K("RC-LC-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
|
||||
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
||||
K("RC-Q"): K("M-F4"), # Default SL - not-popos
|
||||
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
|
||||
K("M-Tab"): pass_through_key, # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
K("RC-Tab"): K("M-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default not-xfce4 - Cmd Tab - App Switching Default
|
||||
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
# K("Super-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
|
||||
# K("RC-Q"):K("Super-q"), # SL - Close Apps (popos)
|
||||
# K("RC-Space"): K("Super-Space"), # SL - Launch Application Menu (eos)
|
||||
# K("RC-H"): K("Super-Page_Down"), # SL - Minimize app (kde_neon)
|
||||
# SL - Default SL - Change workspace (kde_neon)
|
||||
# K("RC-Space"): K("LC-Esc"), # SL- Launch Application Menu xfce4
|
||||
# K("RC-F3"):K("C-M-d"), # SL- Show Desktop xfce4
|
||||
# K("RC-LC-f"):K("Super-Up"), # SL- Maximize app eos
|
||||
# K("RC-LC-f"):K("Super-PAGE_UP"), # SL- Maximize app manjaro
|
||||
# Basic App hotkey functions
|
||||
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
|
||||
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
|
||||
# Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("RC-backslash"), # xfce4
|
||||
# K("RC-Shift-Tab"): K("RC-Shift-backslash"), # xfce4
|
||||
# K("RC-Grave"): K("RC-Shift-backslash"), # xfce4
|
||||
# In-App Tab switching
|
||||
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
|
||||
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
|
||||
|
||||
# emacs style
|
||||
K("Super-a"): K("Home"), # Beginning of Line
|
||||
K("Super-e"): K("End"), # End of Line
|
||||
K("Super-b"): K("Left"),
|
||||
K("Super-f"): K("Right"),
|
||||
K("Super-n"): K("Down"),
|
||||
K("Super-p"): K("Up"),
|
||||
K("Super-k"): [K("Shift-End"), K("Backspace")],
|
||||
K("Super-d"): K("Delete"),
|
||||
|
||||
# Wordwise
|
||||
K("RC-Left"): K("Home"), # Beginning of Line
|
||||
K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line
|
||||
K("RC-Right"): K("End"), # End of Line
|
||||
K("RC-Shift-Right"): K("Shift-End"), # Select all to End of Line
|
||||
# K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
|
||||
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
|
||||
# K("RC-Left"): K("M-LEFT"), # Chrome-nw - Back
|
||||
# K("RC-Right"): K("M-RIGHT"), # Chrome-nw - Forward
|
||||
K("RC-Up"): K("C-Home"), # Beginning of File
|
||||
K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File
|
||||
K("RC-Down"): K("C-End"), # End of File
|
||||
K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File
|
||||
# K("M-Backspace"): K("Delete"), # Chromebook/IBM - Delete
|
||||
K("Super-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||
K("Super-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||
K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook - Delete Left Word of Cursor
|
||||
K("Alt-Delete"): K("C-Delete"), # Default not-chromebook - Delete Right Word of Cursor
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
})
|
||||
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||
# Wordwise remaining - for Everything but VS Code
|
||||
K("M-Left"): K("C-Left"), # Left of Word
|
||||
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
|
||||
K("M-Right"): K("C-Right"), # Right of Word
|
||||
K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word
|
||||
K("M-Shift-g"): K("C-Shift-g"), # View source control
|
||||
# ** VS Code fix **
|
||||
# Electron issue precludes normal keybinding fix.
|
||||
# Alt menu auto-focus/toggle gets in the way.
|
||||
#
|
||||
# refer to ./xkeysnail-config/vscode_keybindings.json
|
||||
# **
|
||||
#
|
||||
# ** Firefox fix **
|
||||
# User will need to set "ui.key.menuAccessKeyFocuses"
|
||||
# under about:config to false.
|
||||
#
|
||||
# https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt
|
||||
# **
|
||||
#
|
||||
})
|
||||
|
||||
# Keybindings for VS Code
|
||||
define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
K("Super-Space"): K("LC-Space"), # Basic code completion
|
||||
# Wordwise remaining - for VS Code
|
||||
# Alt-F19 hack fixes Alt menu activation
|
||||
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
|
||||
K("M-Right"): [K("M-F19"),K("C-Right")], # Right of Word
|
||||
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
||||
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
||||
|
||||
# K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||
# K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||
K("C-M-Left"): K("C-PAGE_UP"), # next_view
|
||||
K("C-M-Right"): K("C-PAGE_DOWN"), # prev_view
|
||||
|
||||
# VS Code Shortcuts
|
||||
K("C-g"): pass_through_key, # cancel Go to Line...
|
||||
K("Super-g"): K("C-g"), # Go to Line...
|
||||
K("F3"): pass_through_key, # cancel Find next
|
||||
K("C-h"): pass_through_key, # cancel replace
|
||||
K("C-M-f"): K("C-h"), # replace
|
||||
K("C-Shift-h"): pass_through_key, # cancel replace_next
|
||||
K("C-M-e"): K("C-Shift-h"), # replace_next
|
||||
K("f3"): pass_through_key, # cancel find_next
|
||||
K("C-g"): K("f3"), # find_next
|
||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
||||
# K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under
|
||||
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
|
||||
# K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down - Sublime
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
}, "Code")
|
||||
|
||||
# Keybindings for Sublime Text
|
||||
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
||||
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||
K("C-Super-up"): K("M-o"), # Switch file
|
||||
K("Super-RC-f"): K("f11"), # toggle_full_screen
|
||||
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
|
||||
K("C-up"): pass_through_key, # cancel scroll_lines up
|
||||
K("C-M-up"): K("C-up"), # scroll_lines up
|
||||
K("C-down"): pass_through_key, # cancel scroll_lines down
|
||||
K("C-M-down"): K("C-down"), # scroll_lines down
|
||||
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
|
||||
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
|
||||
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||
K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||
K("C-Shift-left_brace"): K("C-PAGE_DOWN"), # next_view
|
||||
K("C-Shift-right_brace"): K("C-PAGE_UP"), # prev_view
|
||||
K("C-M-right"): K("C-PAGE_DOWN"), # next_view
|
||||
K("C-M-left"): K("C-PAGE_UP"), # prev_view
|
||||
K("insert"): pass_through_key, # cancel toggle_overwrite
|
||||
K("C-M-o"): K("insert"), # toggle_overwrite
|
||||
K("M-c"): pass_through_key, # cancel toggle_case_sensitive
|
||||
K("C-M-c"): K("M-c"), # toggle_case_sensitive
|
||||
K("C-h"): pass_through_key, # cancel replace
|
||||
K("C-M-f"): K("C-h"), # replace
|
||||
K("C-Shift-h"): pass_through_key, # cancel replace_next
|
||||
K("C-M-e"): K("C-Shift-h"), # replace_next
|
||||
K("f3"): pass_through_key, # cancel find_next
|
||||
K("C-g"): K("f3"), # find_next
|
||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||
K("C-f3"): pass_through_key, # cancel find_under
|
||||
K("Super-M-g"): K("C-f3"), # find_under
|
||||
K("C-Shift-f3"): pass_through_key, # cancel find_under_prev
|
||||
K("Super-M-Shift-g"): K("C-Shift-f3"), # find_under_prev
|
||||
K("M-f3"): pass_through_key, # Default - cancel find_all_under
|
||||
# K("M-Refresh"): pass_through_key, # Chromebook/IBM - cancel find_all_under
|
||||
# K("M-C-g"): K("M-Refresh"), # Chromebook/IBM - find_all_under
|
||||
K("Super-C-g"): K("M-f3"), # Default - find_all_under
|
||||
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
|
||||
K("Super-M-up"): K("C-Shift-up"), # swap_line_up
|
||||
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
|
||||
K("Super-M-down"): K("C-Shift-down"), # swap_line_down
|
||||
K("C-Pause"): pass_through_key, # cancel cancel_build
|
||||
K("Super-c"): K("C-Pause"), # cancel_build
|
||||
K("f9"): pass_through_key, # cancel sort_lines case_s false
|
||||
K("f5"): K("f9"), # sort_lines case_s false
|
||||
K("Super-f9"): pass_through_key, # cancel sort_lines case_s true
|
||||
K("Super-f5"): K("Super-f9"), # sort_lines case_s true
|
||||
K("M-Shift-Key_1"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_1"): K("M-Shift-Key_1"), # set_layout
|
||||
K("M-Shift-Key_2"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_2"): K("M-Shift-Key_2"), # set_layout
|
||||
K("M-Shift-Key_3"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_3"): K("M-Shift-Key_3"), # set_layout
|
||||
K("M-Shift-Key_4"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_4"): K("M-Shift-Key_4"), # set_layout
|
||||
K("M-Shift-Key_8"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_2"): K("M-Shift-Key_8"), # set_layout
|
||||
K("M-Shift-Key_9"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_3"): K("M-Shift-Key_9"), # set_layout
|
||||
K("M-Shift-Key_5"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_5"): K("M-Shift-Key_5"), # set_layout
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
}, "Sublime Text")
|
||||
|
||||
define_keymap(re.compile("konsole", re.IGNORECASE),{
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("Shift-Right"),
|
||||
K("LC-Shift-Tab") : K("Shift-Left"),
|
||||
K("LC-Grave") : K("Shift-Left"),
|
||||
|
||||
}, "Konsole tab switching")
|
||||
|
||||
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("LC-Shift-Right"),
|
||||
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
||||
K("LC-Grave") : K("LC-Shift-Left"),
|
||||
|
||||
}, "Elementary Terminal tab switching")
|
||||
|
||||
define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
# K("LC-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
|
||||
# K("LC-Left"):K("Super-Left"), # SL - Change workspace eos
|
||||
# K("LC-Right"):K("C-M-Home"), # SL - Change workspace xfce4
|
||||
# K("LC-Right"):K("Super-Right"), # SL - Change workspace eos
|
||||
# K("LC-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("LC-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("LC-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
# K("LC-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
||||
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
||||
K("LC-Grave") : K("LC-PAGE_UP"),
|
||||
# Converts Cmd to use Ctrl-Shift
|
||||
K("RC-Tab"): K("RC-F13"),
|
||||
K("RC-Shift-Tab"): K("RC-Shift-F13"),
|
||||
K("RC-V"): K("C-Shift-V"),
|
||||
K("RC-MINUS"): K("C-Shift-MINUS"),
|
||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
||||
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
||||
K("RC-W"): K("C-Shift-W"),
|
||||
K("RC-E"): K("C-Shift-E"),
|
||||
K("RC-R"): K("C-Shift-R"),
|
||||
K("RC-T"): K("C-Shift-t"),
|
||||
K("RC-Y"): K("C-Shift-Y"),
|
||||
K("RC-U"): K("C-Shift-U"),
|
||||
K("RC-I"): K("C-Shift-I"),
|
||||
K("RC-O"): K("C-Shift-O"),
|
||||
K("RC-P"): K("C-Shift-P"),
|
||||
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
|
||||
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
|
||||
K("RC-A"): K("C-Shift-A"),
|
||||
K("RC-S"): K("C-Shift-S"),
|
||||
K("RC-D"): K("C-Shift-D"),
|
||||
K("RC-F"): K("C-Shift-F"),
|
||||
K("RC-G"): K("C-Shift-G"),
|
||||
K("RC-H"): K("C-Shift-H"),
|
||||
K("RC-J"): K("C-Shift-J"),
|
||||
K("RC-K"): K("C-Shift-K"),
|
||||
K("RC-L"): K("C-Shift-L"),
|
||||
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
|
||||
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
|
||||
K("RC-GRAVE"): K("C-Shift-GRAVE"),
|
||||
K("RC-BACKSLASH"): K("C-Shift-BACKSLASH"),
|
||||
K("RC-Z"): K("C-Shift-Z"),
|
||||
K("RC-X"): K("C-Shift-X"),
|
||||
K("RC-C"): K("C-Shift-C"),
|
||||
K("RC-V"): K("C-Shift-V"),
|
||||
K("RC-B"): K("C-Shift-B"),
|
||||
K("RC-N"): K("C-Shift-N"),
|
||||
K("RC-M"): K("C-Shift-M"),
|
||||
K("RC-COMMA"): K("C-Shift-COMMA"),
|
||||
K("RC-DOT"): K("C-Shift-DOT"),
|
||||
K("RC-SLASH"): K("C-Shift-SLASH"),
|
||||
K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"),
|
||||
}, "terminals")
|
10
linux/limitedadmins
Normal file
@@ -0,0 +1,10 @@
|
||||
# /etc/sudoers.d/limitedadmins
|
||||
%{username} ALL=NOPASSWD: {systemctl} restart xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} status xkeysnail
|
||||
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
|
||||
%{username} ALL=NOPASSWD: {pkill} -f logoff
|
||||
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
|
||||
%{username} ALL=NOPASSWD: {xkeysnail} /home/{username}/.config/kinto/kinto.py
|
||||
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
|
13
linux/prexk.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then
|
||||
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
||||
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
||||
fi
|
||||
if [ -f {homedir}/.config/systemd/user/keyswap.service ]; then
|
||||
systemctl --user stop keyswap >/dev/null 2>&1
|
||||
systemctl --user disable keyswap >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
|
||||
mkdir -p /tmp/kinto/xkeysnail
|
||||
cp {homedir}/.config/kinto/kinto.py /tmp/kinto/xkeysnail/kinto.py
|
6
linux/root_logoff.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# /usr/local/bin/logoff.sh
|
||||
while true; do
|
||||
w | grep -E "$1.*$2" > /dev/null 2>&1 || (sudo systemctl stop xkeysnail && sudo pkill -f logoff)
|
||||
sleep 5
|
||||
done
|
182
linux/system-config/dename.sh
Normal file
@@ -0,0 +1,182 @@
|
||||
#!/bin/bash
|
||||
|
||||
function detect_budgie()
|
||||
{
|
||||
ps -e | grep -E '^.* budgie-wm' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`dpkg-query -l | grep budgie-core | awk '{print $3}'`
|
||||
DESKTOP="budgie"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_gnome()
|
||||
{
|
||||
ps -e | grep -E '^.* gnome-session' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`gnome-session --version | awk '{print $2}'`
|
||||
DESKTOP="gnome"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_kde4()
|
||||
{
|
||||
ps -e | grep -E '^.* kded4$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
else
|
||||
VERSION=`kded4 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||
DESKTOP="KDE"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function detect_kde()
|
||||
{
|
||||
ps -e | grep -E '^.* kded5$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
else
|
||||
VERSION=`kded5 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||
DESKTOP="KDE"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function detect_unity()
|
||||
{
|
||||
ps -e | grep -E 'unity-panel' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`unity --version | awk '{print $2}'`
|
||||
DESKTOP="unity"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_xfce()
|
||||
{
|
||||
ps -e | grep -E '^.* xfce4-session$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`xfce4-session --version | grep xfce4-session | awk '{print $2}'`
|
||||
DESKTOP="xfce"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_cinnamon()
|
||||
{
|
||||
ps -e | grep -E '^.* cinnamon$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`cinnamon --version | awk '{print $2}'`
|
||||
DESKTOP="cinnamon"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_mate()
|
||||
{
|
||||
ps -e | grep -E '^.* mate-panel$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`mate-about --version | awk '{print $4}'`
|
||||
DESKTOP="mate"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_lxde()
|
||||
{
|
||||
ps -e | grep -E '^.* lxsession$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# We can detect LXDE version only thru package manager
|
||||
which apt-cache > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
which yum > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
VERSION='unknown'
|
||||
else
|
||||
# For Fedora
|
||||
VERSION=`yum list lxde-common | grep lxde-common | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||
fi
|
||||
else
|
||||
# For Lubuntu and Knoppix
|
||||
VERSION=`apt-cache show lxde-common /| grep 'Version:' | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||
fi
|
||||
DESKTOP="lxde"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_sugar()
|
||||
{
|
||||
if [ "$DESKTOP_SESSION" == "sugar" ];
|
||||
then
|
||||
VERSION=`python -c "from jarabe import config; print config.version"`
|
||||
DESKTOP="sugar"
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
DESKTOP="unknown"
|
||||
if detect_unity;
|
||||
then
|
||||
if detect_kde;
|
||||
then
|
||||
if detect_kde4;
|
||||
then
|
||||
if detect_budgie;
|
||||
then
|
||||
if detect_gnome;
|
||||
then
|
||||
if detect_xfce;
|
||||
then
|
||||
if detect_cinnamon;
|
||||
then
|
||||
if detect_mate;
|
||||
then
|
||||
if detect_lxde;
|
||||
then
|
||||
detect_sugar
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" == '-v' ];
|
||||
then
|
||||
echo $VERSION
|
||||
else
|
||||
if [ "$1" == '-n' ];
|
||||
then
|
||||
echo $DESKTOP
|
||||
else
|
||||
echo $DESKTOP $VERSION
|
||||
fi
|
||||
fi
|
21
linux/system-config/unipkg.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
||||
echo "Debian"
|
||||
$pkgmgr update
|
||||
$pkgmgr --yes --force-yes install $1
|
||||
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
||||
echo "dnf"
|
||||
$pkgmgr check-update; $pkgmgr install -y $1
|
||||
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
||||
echo "Arch-based"
|
||||
$pkgmgr -Syy;yes | $pkgmgr -S $1
|
||||
else
|
||||
echo "Package manager not found, please install $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ 1 -ne $# ]]; then
|
||||
echo "Syntax: $0 PACKAGE"
|
||||
exit 1
|
||||
fi
|
||||
exit $?
|
41
linux/trayapps/appindicator/icons/kinto-color-16.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#61BB46;}
|
||||
.st1{fill:#FDB827;}
|
||||
.st2{fill:#F5821F;}
|
||||
.st3{fill:#E03A3E;}
|
||||
.st4{fill:#963D97;}
|
||||
.st5{fill:#009DDC;}
|
||||
.st6{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<title>kinto-final</title>
|
||||
<path id="Green" class="st0" d="M13.5,3.6H4.7c-1,0-1.9,0.9-1.9,1.9v0.2h12.6V5.5C15.4,4.5,14.5,3.6,13.5,3.6z"/>
|
||||
<rect id="Yellow" x="2.8" y="5.7" class="st1" width="12.6" height="2.2"/>
|
||||
<rect id="Orange" x="2.8" y="7.8" class="st2" width="12.6" height="2.2"/>
|
||||
<rect id="Red" x="2.8" y="10" class="st3" width="12.6" height="2.2"/>
|
||||
<path id="Purple" class="st4" d="M2.8,14.3L2.8,14.3h12.6l0,0v-2.1H2.8V14.3z"/>
|
||||
<path id="Blue" class="st5" d="M4.7,16.2h9c1-0.1,1.7-1,1.7-1.9H2.8C2.8,15.3,3.7,16.2,4.7,16.2z"/>
|
||||
<g id="Border">
|
||||
<path class="st6" d="M16.2,2.8c-0.6-0.6-1.4-1-2.2-0.9H4.3c-0.9,0-1.7,0.3-2.2,0.9c-0.6,0.6-1,1.4-1,2.2v9.7c0,0.9,0.3,1.7,1,2.2
|
||||
c0.5,0.6,1.3,1,2.2,1h2.1l0,0h2.3l0,0h3.5l0,0l0,0H14c1.7,0,3.1-1.4,3.1-3.1V5C17.2,4.2,16.8,3.4,16.2,2.8z M15.4,14.3
|
||||
c0,1-0.7,1.8-1.7,1.9L11,11.6l2.8-2.9h-2.5l-2.5,3V5.9H6.7v10.3H4.7c-1,0-1.9-0.9-1.9-1.9V5.5c0-1,0.9-1.9,1.9-1.9h8.7
|
||||
c1,0,1.9,0.9,1.9,1.9L15.4,14.3z M8.7,16.2V14l0.9-0.9l1.7,3.1L8.7,16.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
41
linux/trayapps/appindicator/icons/kinto-color.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#61BB46;}
|
||||
.st1{fill:#FDB827;}
|
||||
.st2{fill:#F5821F;}
|
||||
.st3{fill:#E03A3E;}
|
||||
.st4{fill:#963D97;}
|
||||
.st5{fill:#009DDC;}
|
||||
.st6{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<title>kinto-final</title>
|
||||
<path id="Green" class="st0" d="M14.1,2.7h-10c-1.2,0-2.2,1-2.2,2.2v0.2h14.4V4.9C16.3,3.7,15.3,2.7,14.1,2.7z"/>
|
||||
<rect id="Yellow" x="1.9" y="5.1" class="st1" width="14.4" height="2.5"/>
|
||||
<rect id="Orange" x="1.9" y="7.5" class="st2" width="14.4" height="2.5"/>
|
||||
<rect id="Red" x="1.9" y="10" class="st3" width="14.4" height="2.5"/>
|
||||
<path id="Purple" class="st4" d="M1.9,14.9C1.9,14.9,1.9,14.9,1.9,14.9l14.4,0c0,0,0,0,0,0v-2.4H1.9V14.9z"/>
|
||||
<path id="Blue" class="st5" d="M4.1,17.1l10.3,0c1.1-0.1,1.9-1.1,1.9-2.2H1.9C1.9,16.1,2.9,17.1,4.1,17.1z"/>
|
||||
<g id="Border">
|
||||
<path class="st6" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1H3.6c-1,0-1.9,0.4-2.5,1C0.4,2.5,0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.6,2.6,19,3.6,19H6v0h2.6v0h4l0,0l0,0h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.2,1.8z M16.3,14.9
|
||||
c0,1.1-0.8,2.1-1.9,2.2l-3.1-5.3l3.2-3.3h-2.9l-2.9,3.4V5.3H6.3v11.8H4.1c-1.2,0-2.2-1-2.2-2.2v-10c0-1.2,1-2.2,2.2-2.2h10
|
||||
c1.2,0,2.2,1,2.2,2.2L16.3,14.9z M8.6,17.1v-2.5l1-1l2,3.6L8.6,17.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
28
linux/trayapps/appindicator/icons/kinto-invert-16.svg
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path class="st0" d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2
|
||||
c0.5,0.7,1.3,1,2.2,1h2.1V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1
|
||||
C17,4.3,16.7,3.6,16.1,2.9z"/>
|
||||
<polygon class="st0" points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
28
linux/trayapps/appindicator/icons/kinto-invert.svg
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path class="st0" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
|
||||
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
|
||||
<polygon class="st0" points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
24
linux/trayapps/appindicator/icons/kinto-solid-16.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2c0.5,0.7,1.3,1,2.2,1h2.1
|
||||
V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1C17,4.3,16.7,3.6,16.1,2.9z"/>
|
||||
<polygon points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
25
linux/trayapps/appindicator/icons/kinto-solid.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
|
||||
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
|
||||
<polygon points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
27
linux/trayapps/appindicator/icons/kinto.svg
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<path class="st0" d="M17.3,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6C1.6,0.7,0,2.3,0,4.3v11.1c0,2,1.6,3.6,3.6,3.6H6v0h2.6v0h4l0,0l0,0
|
||||
h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.3,1.8z M17.2,15.4C17.2,15.5,17.2,15.5,17.2,15.4c0,1.3-1,2.3-2.2,2.5l-1.4-2.4
|
||||
L12,12.8L11.5,12l1.9-2l1.6-1.7h-3.2L10.4,10l-1.8,2v-2V7.3V4.8H6v2.5V10v2.8v2.7v2.4H3.6c-1.4,0-2.5-1.1-2.5-2.4c0,0,0,0,0-0.1
|
||||
v-2.7V10V7.3V4.5V4.3c0-1.4,1.1-2.5,2.5-2.5h11.1c1.4,0,2.5,1.1,2.5,2.5v0.2v2.7V10v2.8V15.4z M8.6,15.5v-0.4L9.6,14l0.9,1.5
|
||||
l1.4,2.4H8.6V15.5z"/>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
8
linux/trayapps/appindicator/kintotray.desktop
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto Tray
|
||||
GenericName=Kintotray
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "{homedir}/.config/kinto/kintotray.py"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
719
linux/trayapps/appindicator/kintotray.py
Normal file
@@ -0,0 +1,719 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
gi.require_version('AppIndicator3', '0.1')
|
||||
gi.require_version('Notify', '0.7')
|
||||
|
||||
import signal,time,os,fcntl,datetime,re
|
||||
from subprocess import Popen, PIPE, CalledProcessError
|
||||
from shutil import which
|
||||
from gi.repository import Gtk,GLib,GdkPixbuf
|
||||
from gi.repository import AppIndicator3 as appindicator
|
||||
from gi.repository import Notify as notify
|
||||
|
||||
import signal
|
||||
|
||||
def kill_child():
|
||||
if child_pid is None:
|
||||
pass
|
||||
else:
|
||||
os.kill(child_pid, signal.SIGTERM)
|
||||
|
||||
import atexit
|
||||
atexit.register(kill_child)
|
||||
|
||||
APPINDICATOR_ID = 'Kinto'
|
||||
|
||||
class Indicator():
|
||||
|
||||
global child_pid
|
||||
kinto_status = Popen("while :; do clear; systemctl is-active xkeysnail; sleep 2s; done", stdout=PIPE, shell=True)
|
||||
child_pid = kinto_status.pid
|
||||
|
||||
homedir = os.path.expanduser("~")
|
||||
kconfig = homedir+"/.config/kinto/kinto.py"
|
||||
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
|
||||
|
||||
enable_id = 0
|
||||
winmac_id = 0
|
||||
chkautostart_id = 0
|
||||
autostart_bool = False
|
||||
menu = Gtk.Menu()
|
||||
menukb = Gtk.Menu()
|
||||
checkbox_autostart = Gtk.CheckMenuItem('Autostart')
|
||||
restart = Gtk.MenuItem('Restart')
|
||||
stop = Gtk.MenuItem('Stop')
|
||||
keyboards = Gtk.MenuItem('Keyboard Types')
|
||||
keyboards.set_submenu(menukb)
|
||||
winkb = Gtk.RadioMenuItem(label='Windows')
|
||||
mackb = Gtk.RadioMenuItem(label='Apple',group=winkb)
|
||||
chromekb = Gtk.RadioMenuItem(label='Chromebook',group=winkb)
|
||||
ibmkb = Gtk.RadioMenuItem(label='IBM (No Super/Win key)',group=winkb)
|
||||
winmackb = Gtk.RadioMenuItem(label='Windows & Apple*',group=winkb)
|
||||
edit = Gtk.MenuItem('Customize')
|
||||
edit_submenu = Gtk.Menu()
|
||||
edit.set_submenu(edit_submenu)
|
||||
tweaks = Gtk.MenuItem('Tweaks')
|
||||
rightmod = Gtk.CheckButton('AltGr on Right Cmd')
|
||||
vsc2st3 = Gtk.CheckButton('ST3 hotkeys for VS Code')
|
||||
caps2esc = Gtk.CheckButton('Capslock is Escape when tapped, Cmd when held')
|
||||
caps2cmd = Gtk.CheckButton('Capslock is Cmd')
|
||||
button_config = Gtk.MenuItem('Kinto Config (shortcuts)')
|
||||
service = Gtk.MenuItem('Kinto Service')
|
||||
# Keyboard type set below
|
||||
button_syskb = Gtk.MenuItem('System Shortcuts')
|
||||
button_region = Gtk.MenuItem('Change Language')
|
||||
systray = Gtk.CheckMenuItem('Tray Enabled')
|
||||
helpm = Gtk.MenuItem('Help')
|
||||
help_submenu = Gtk.Menu()
|
||||
helpm.set_submenu(help_submenu)
|
||||
debug = Gtk.MenuItem('Debug')
|
||||
opengui = Gtk.MenuItem('Open Kinto')
|
||||
support = Gtk.MenuItem("Support")
|
||||
about = Gtk.MenuItem('About')
|
||||
global restartsvc
|
||||
restartsvc = False
|
||||
unixts = int(time.time())
|
||||
last_status = ""
|
||||
|
||||
def __init__(self):
|
||||
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
self.last_status = 'active'
|
||||
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto-invert.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
|
||||
else:
|
||||
self.last_status = 'inactive'
|
||||
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
|
||||
|
||||
self.indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
|
||||
self.indicator.set_menu(self.build_menu(res))
|
||||
notify.init(APPINDICATOR_ID)
|
||||
|
||||
GLib.timeout_add(2000, self.update_terminal)
|
||||
|
||||
def build_menu(self,res):
|
||||
|
||||
with open(self.kconfig) as configfile:
|
||||
autostart_line = configfile.read().split('\n')[1]
|
||||
|
||||
# Autostart
|
||||
if "autostart = true" in autostart_line.casefold():
|
||||
autostart_bool = True
|
||||
|
||||
if autostart_bool:
|
||||
# Popen(['sudo', 'systemctl','restart','xkeysnail'])
|
||||
self.checkbox_autostart.set_active(True)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
|
||||
else:
|
||||
self.checkbox_autostart.set_active(False)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
|
||||
|
||||
self.restart.connect('activate',self.runRestart)
|
||||
self.menu.append(self.restart)
|
||||
self.stop.connect('activate',self.runStop)
|
||||
self.menu.append(self.stop)
|
||||
|
||||
self.refreshKB()
|
||||
|
||||
self.mackb.signal_id = self.mackb.connect('activate',self.setKB,"mac")
|
||||
self.winkb.signal_id = self.winkb.connect('activate',self.setKB,"win")
|
||||
self.chromekb.signal_id = self.chromekb.connect('activate',self.setKB,"chrome")
|
||||
self.ibmkb.signal_id = self.ibmkb.connect('activate',self.setKB,"ibm")
|
||||
self.winmackb.signal_id = self.winmackb.connect('activate',self.setKB,"winmac")
|
||||
|
||||
self.menukb.append(self.winkb)
|
||||
self.menukb.append(self.mackb)
|
||||
self.menukb.append(self.chromekb)
|
||||
self.menukb.append(self.ibmkb)
|
||||
self.menukb.append(self.winmackb)
|
||||
self.menu.append(self.keyboards)
|
||||
|
||||
self.tweaks.connect('activate',self.setTweaks)
|
||||
self.edit_submenu.append(self.tweaks)
|
||||
self.button_config.connect('activate',self.setConfig)
|
||||
self.edit_submenu.append(self.button_config)
|
||||
self.service.connect('activate',self.setService)
|
||||
self.edit_submenu.append(self.service)
|
||||
# Set System Keyboard Shortcuts
|
||||
self.button_syskb.connect('activate',self.setSysKB)
|
||||
self.edit_submenu.append(self.button_syskb)
|
||||
# Set Language
|
||||
self.button_region.connect('activate',self.setRegion)
|
||||
self.edit_submenu.append(self.button_region)
|
||||
self.edit_submenu.append(self.checkbox_autostart)
|
||||
if os.path.exists(os.environ['HOME']+'/.config/autostart/kintotray.desktop'):
|
||||
self.systray.set_active(True)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
|
||||
else:
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
|
||||
self.edit_submenu.append(self.systray)
|
||||
self.menu.append(self.edit)
|
||||
|
||||
self.debug.connect('activate',self.runDebug,1)
|
||||
self.help_submenu.append(self.debug)
|
||||
self.opengui.connect('activate',self.runDebug,0)
|
||||
self.help_submenu.append(self.opengui)
|
||||
self.support.connect('activate',self.openSupport)
|
||||
self.help_submenu.append(self.support)
|
||||
self.about.connect('activate',self.runAbout)
|
||||
self.help_submenu.append(self.about)
|
||||
self.menu.append(self.helpm)
|
||||
|
||||
self.keyboards.connect('activate',self.refresh)
|
||||
|
||||
# self.debug.connect('activate',self.runDebug)
|
||||
# self.menu.append(self.debug)
|
||||
|
||||
# self.tweaks.connect('activate',self.setTweaks)
|
||||
# self.menu.append(self.tweaks)
|
||||
|
||||
# Edit Config
|
||||
# self.button_config.connect('activate',self.setConfig)
|
||||
# self.menu.append(self.button_config)
|
||||
|
||||
# # Set System Keyboard Shortcuts
|
||||
# self.button_syskb.connect('activate',self.setSysKB)
|
||||
# self.menu.append(self.button_syskb)
|
||||
|
||||
# # Set Language
|
||||
# self.button_region.connect('activate',self.setRegion)
|
||||
# self.menu.append(self.button_region)
|
||||
|
||||
item_quit = Gtk.MenuItem('Close')
|
||||
item_quit.connect('activate', quit)
|
||||
self.menu.append(item_quit)
|
||||
self.menu.show_all()
|
||||
|
||||
return self.menu
|
||||
|
||||
# def refresh(self, widget, event):
|
||||
# print('refresh!!!')
|
||||
# if event.button != 1:
|
||||
# return False #only intercept left mouse button
|
||||
# md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, "herp derp, I only needed one click")
|
||||
# md.run()
|
||||
# md.destroy()
|
||||
# return True
|
||||
|
||||
def checkTray(self,button,tray_bool):
|
||||
# path.exists('.config/autostart/kintotray.py')
|
||||
if tray_bool:
|
||||
Popen(['cp',os.environ['HOME']+'/.config/kinto/kintotray.desktop',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
||||
self.systray.disconnect(self.systray.signal_id)
|
||||
self.systray.set_active(True)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
|
||||
else:
|
||||
Popen(['rm',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
||||
Gtk.main_quit()
|
||||
self.systray.disconnect(self.systray.signal_id)
|
||||
self.systray.set_active(False)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
|
||||
return
|
||||
|
||||
def refresh(self,button):
|
||||
self.refreshKB()
|
||||
|
||||
def refreshKB(self):
|
||||
# Keyboard Types
|
||||
ismac = "perl -ne 'print if /^(\s{4})((?!#).*)(# Mac\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
iswin = "perl -ne 'print if /^(\s{4})(# -- Default Win)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
ischrome = "perl -ne 'print if /^(\s{4})((?!#).*)(# Chromebook\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
iswinmac = "perl -ne 'print if /^(\s{4})(# -- Default Mac)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
isibm = "perl -ne 'print if /^(\s{4})((?!#).*)(# IBM\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
mac_result = int(self.queryConfig(ismac))
|
||||
win_result = int(self.queryConfig(iswin))
|
||||
chrome_result = int(self.queryConfig(ischrome))
|
||||
ibm_result = int(self.queryConfig(isibm))
|
||||
winmac_result = int(self.queryConfig(iswinmac))
|
||||
|
||||
countkb = 0
|
||||
|
||||
if mac_result:
|
||||
self.mackb.set_active(True)
|
||||
countkb += 1
|
||||
if win_result:
|
||||
self.winkb.set_active(True)
|
||||
countkb += 1
|
||||
if chrome_result:
|
||||
self.chromekb.set_active(True)
|
||||
countkb += 1
|
||||
if winmac_result:
|
||||
self.winmackb.set_active(True)
|
||||
countkb += 1
|
||||
if ibm_result:
|
||||
ibmkb.set_active(True)
|
||||
countkb += 1
|
||||
|
||||
if countkb > 1:
|
||||
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)'])
|
||||
|
||||
return
|
||||
|
||||
def non_block_read(self):
|
||||
''' even in a thread, a normal read with block until the buffer is full '''
|
||||
output = self.kinto_status.stdout
|
||||
# with open('goodlines.txt') as f:
|
||||
# mylist = list(f)
|
||||
# output = '\n'.join(self.kinto_status.stdout.splitlines()[-1:])
|
||||
# '\n'.join(stderr.splitlines()[-N:])
|
||||
# .splitlines()[-1:]
|
||||
fd = output.fileno()
|
||||
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
|
||||
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
|
||||
op = output.read()
|
||||
if op == None:
|
||||
return ''
|
||||
status = op.decode('utf-8').rstrip()
|
||||
if "inactive" in status or "failed" in status or "deactivating" in status or "activating" in status:
|
||||
stats = "inactive"
|
||||
elif "active" in status:
|
||||
stats = "active"
|
||||
else:
|
||||
stats = "inactive"
|
||||
return stats
|
||||
|
||||
def update_terminal(self):
|
||||
status = self.non_block_read().strip()
|
||||
nowts = int(time.time())
|
||||
if (nowts - self.unixts) > 5 and (status=='active' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto-invert.svg'):
|
||||
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
|
||||
elif (nowts - self.unixts) > 5 and (status == 'inactive' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto.svg'):
|
||||
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto.svg')
|
||||
self.last_status = status
|
||||
|
||||
return self.kinto_status.poll() is None
|
||||
|
||||
def openSupport(self,button):
|
||||
Gtk.show_uri_on_window(None, "https://github.com/rbreaves/kinto#table-of-contents", Gtk.get_current_event_time())
|
||||
return
|
||||
|
||||
def runAbout(self,button):
|
||||
win = Gtk.Window()
|
||||
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
win.set_default_icon_list([pixbuf])
|
||||
|
||||
win.set_title("About")
|
||||
win.set_default_size(350, 200)
|
||||
win.set_position(Gtk.WindowPosition.CENTER)
|
||||
|
||||
context = win.get_style_context()
|
||||
default_background = str(context.get_background_color(Gtk.StateType.NORMAL))
|
||||
|
||||
tokenValue = re.search('red=(\d.\d+), green=(\d.\d+), blue=(\d.\d+), alpha=(\d.\d+)', default_background)
|
||||
red = float(tokenValue.group(1))
|
||||
green = float(tokenValue.group(2))
|
||||
blue = float(tokenValue.group(3))
|
||||
alpha = float(tokenValue.group(4))
|
||||
|
||||
bgAvg = (red + green + blue)/3
|
||||
|
||||
if(bgAvg > 0.5):
|
||||
theme = "light"
|
||||
else:
|
||||
theme = "dark"
|
||||
|
||||
vbox = Gtk.VBox()
|
||||
# innervbox = Gtk.VBox()
|
||||
|
||||
if theme == "dark":
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-invert.svg'
|
||||
else:
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
image = Gtk.Image()
|
||||
image.set_from_pixbuf(pixbuf)
|
||||
|
||||
with open(os.environ['HOME']+'/.config/kinto/version', 'r') as file:
|
||||
verdata = file.read().replace('\n', '')
|
||||
|
||||
version = Gtk.Label('Kinto v' + verdata)
|
||||
|
||||
credits = Gtk.Label("Author: Ben Reaves")
|
||||
spacer = Gtk.Label(" ")
|
||||
copy = Gtk.Label("© 2019, 2020 - GPLv2")
|
||||
url = Gtk.LinkButton("http://kinto.sh", label="kinto.sh")
|
||||
|
||||
vbox.add(image)
|
||||
vbox.add(version)
|
||||
vbox.add(spacer)
|
||||
vbox.add(credits)
|
||||
vbox.add(copy)
|
||||
vbox.add(url)
|
||||
win.add(vbox)
|
||||
|
||||
win.show_all()
|
||||
|
||||
version.set_selectable(True)
|
||||
win.connect('delete-event', self.on_delete_event)
|
||||
|
||||
return
|
||||
|
||||
def setTweaks(self,button):
|
||||
win = Gtk.Window()
|
||||
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
win.set_default_icon_list([pixbuf])
|
||||
|
||||
win.set_title("Kinto Tweaks")
|
||||
win.set_default_size(350, 200)
|
||||
win.set_position(Gtk.WindowPosition.CENTER)
|
||||
|
||||
# Check AltGr - commented out is enabled
|
||||
is_rightmod = "perl -ne 'print if /^(\s{4})(Key.*)(Multi-language)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
rightmod_result = int(self.queryConfig(is_rightmod))
|
||||
|
||||
# Sublime enabled for vscode
|
||||
is_vsc2st3 = "perl -ne 'print if /^(\s{4}\w.*)(- Sublime)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
vsc2st3_result = int(self.queryConfig(is_vsc2st3))
|
||||
|
||||
# Caps2Esc enabled
|
||||
is_caps2esc = "perl -ne 'print if /^(\s{4}{\w.*)(# Caps2Esc)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
caps2esc_result = int(self.queryConfig(is_caps2esc))
|
||||
|
||||
# Caps2Cmd enabled
|
||||
is_caps2cmd = "perl -ne 'print if /^(\s{4}\w.*)(# Caps2Cmd)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
caps2cmd_result = int(self.queryConfig(is_caps2cmd))
|
||||
|
||||
# Enter2Cmd enabled
|
||||
# (\s{4}{\w.*)(# Enter2Cmd)
|
||||
|
||||
vbox = Gtk.VBox()
|
||||
|
||||
self.lbl = Gtk.Label()
|
||||
global restartsvc
|
||||
restartsvc = False
|
||||
self.rightmod = Gtk.CheckButton('AltGr on Right Cmd')
|
||||
self.vsc2st3 = Gtk.CheckButton('ST3 hotkeys for VS Code')
|
||||
self.caps2esc = Gtk.CheckButton('Capslock is Escape when tapped, Cmd when held')
|
||||
self.caps2cmd = Gtk.CheckButton('Capslock is Cmd')
|
||||
|
||||
if rightmod_result == 0:
|
||||
self.rightmod.set_active(True)
|
||||
|
||||
if vsc2st3_result > 0:
|
||||
self.vsc2st3.set_active(True)
|
||||
|
||||
if caps2esc_result > 0:
|
||||
self.caps2esc.set_active(True)
|
||||
self.caps2cmd.set_sensitive(False)
|
||||
|
||||
if caps2cmd_result > 0:
|
||||
self.caps2cmd.set_active(True)
|
||||
self.caps2esc.set_sensitive(False)
|
||||
|
||||
self.rightmod.signal_id = self.rightmod.connect('toggled',self.setRightMod)
|
||||
self.vsc2st3.signal_id = self.vsc2st3.connect('toggled',self.setVSC2ST3)
|
||||
self.caps2esc.signal_id = self.caps2esc.connect('toggled',self.setCaps2Esc)
|
||||
self.caps2cmd.signal_id = self.caps2cmd.connect('toggled',self.setCaps2Cmd)
|
||||
|
||||
vbox.add(self.rightmod)
|
||||
vbox.add(self.vsc2st3)
|
||||
vbox.add(self.caps2esc)
|
||||
vbox.add(self.caps2cmd)
|
||||
vbox.add(self.lbl)
|
||||
win.add(vbox)
|
||||
|
||||
win.show_all()
|
||||
|
||||
win.connect('delete-event', self.on_delete_event)
|
||||
|
||||
return
|
||||
|
||||
__gsignals__ = {
|
||||
"delete-event" : "override"
|
||||
}
|
||||
|
||||
def on_delete_event(event, self, widget):
|
||||
global restartsvc
|
||||
if restartsvc == True:
|
||||
try:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restartcmd)
|
||||
restartsvc = False
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!'])
|
||||
|
||||
self.hide()
|
||||
self.destroy()
|
||||
return True
|
||||
|
||||
def setRightMod(self,button):
|
||||
global restartsvc
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active():
|
||||
# print('winkb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(WinMac - Multi-language.*)|(K)(.*)(# )(WinMac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.mackb.get_active():
|
||||
# print('mackb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(Mac - Multi-language.*)|(K)(.*)(# )(Mac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.chromekb.get_active():
|
||||
# print('chromekb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(Chromebook - Multi-language.*)|(K)(.*)(# )(Chromebook - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.ibmkb.get_active():
|
||||
# print('ibmkb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(IBM - Multi-language.*)|(K)(.*)(# )(IBM - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting AltGr!'])
|
||||
|
||||
return
|
||||
|
||||
def setVSC2ST3(self,button):
|
||||
global restartsvc
|
||||
|
||||
try:
|
||||
if self.chromekb.get_active() or self.ibmkb.get_active():
|
||||
setkb = 's/^(\s{4})(\w.*)(# )(Chromebook/IBM - Sublime)|^(\s{4})(# )(\w.*)(# Chromebook/IBM - Sublime)/$5$7$8$1$3$2$3$4/g'
|
||||
else:
|
||||
setkb = 's/^(\s{4})(\w.*)(# )(Default - Sublime)|^(\s{4})(# )(\w.*)(# Default - Sublime)/$5$7$8$1$3$2$3$4/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!'])
|
||||
return
|
||||
|
||||
def setCaps2Esc(self,button):
|
||||
|
||||
global restartsvc
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
|
||||
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc\n)|(\{\w.*)(# )(Caps2Esc - Chrome.*)|(\{.*)(# )(Caps2Esc\n|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
|
||||
if self.chromekb.get_active():
|
||||
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc - Chrome.*)|(\{\w.*)(# )(Caps2Esc\n)|(\{.*)(# )(Caps2Esc - Chrome.*|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
if self.caps2esc.get_active():
|
||||
self.caps2cmd.set_sensitive(False)
|
||||
else:
|
||||
self.caps2cmd.set_sensitive(True)
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error resetting caps2esc!'])
|
||||
|
||||
return
|
||||
|
||||
def setCaps2Cmd(self,button):
|
||||
|
||||
global restartsvc
|
||||
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
|
||||
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd\n)|(\w.*)(# )(Caps2Cmd - Chrome.*)|(# )(\w.*)(# )(Caps2Cmd\n)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
|
||||
if self.chromekb.get_active():
|
||||
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd - Chrome.*)|(\w.*)(# )(Caps2Cmd\n)|(# )(\w.*)(# )(Caps2Cmd - Chrome.*)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
if self.caps2cmd.get_active():
|
||||
self.caps2esc.set_sensitive(False)
|
||||
else:
|
||||
self.caps2esc.set_sensitive(True)
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
|
||||
|
||||
return
|
||||
|
||||
def runRestart(self,button):
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
# Popen(['notify-send','Kinto: Ending Debug'])
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
|
||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error restarting Kinto!'])
|
||||
|
||||
def runStop(self,button):
|
||||
try:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
# Popen(['notify-send','Kinto: Ending Debug'])
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error stopping Kinto!'])
|
||||
|
||||
def runDebug(self,button,opendebug):
|
||||
try:
|
||||
if opendebug:
|
||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py','-d'])
|
||||
else:
|
||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error opening Kinto!'])
|
||||
|
||||
def queryConfig(self,query):
|
||||
res = Popen(query, stdout=PIPE, stderr=None, shell=True)
|
||||
res.wait()
|
||||
return res.communicate()[0].strip().decode('UTF-8')
|
||||
|
||||
def setAutostart(self,button,autostart):
|
||||
try:
|
||||
if autostart == False:
|
||||
Popen(['perl','-pi','-e','s/autostart = true/autostart = false/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
self.checkbox_autostart.set_active(False)
|
||||
self.checkbox_autostart.disconnect(self.chkautostart_id)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
|
||||
else:
|
||||
Popen(['perl','-pi','-e','s/autostart = false/autostart = true/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
self.checkbox_autostart.set_active(True)
|
||||
self.checkbox_autostart.disconnect(self.chkautostart_id)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error setting autostart!'])
|
||||
|
||||
def setConfig(self,button):
|
||||
try:
|
||||
if os.path.exists('/opt/sublime_text/sublime_text'):
|
||||
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('gedit') is not None:
|
||||
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('mousepad') is not None:
|
||||
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('kate') is not None:
|
||||
Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('kwrite') is not None:
|
||||
Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
|
||||
except CalledProcessError: # Notify user about error on running restart commands.
|
||||
Popen(['notify-send','Kinto: Error could not open config file!'])
|
||||
|
||||
def setService(self,button):
|
||||
try:
|
||||
if os.path.exists('/opt/sublime_text/sublime_text'):
|
||||
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('gedit') is not None:
|
||||
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('mousepad') is not None:
|
||||
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('kate') is not None:
|
||||
Popen(['kate','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('kwrite') is not None:
|
||||
Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
|
||||
|
||||
except CalledProcessError: # Notify user about error on running restart commands.
|
||||
Popen(['notify-send','Kinto: Error could not open config file!'])
|
||||
|
||||
def setKB(self,button,kbtype):
|
||||
try:
|
||||
if kbtype == "win":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Win)|^(\s{3})(\s{1}# )(-)(- Default Mac*)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
|
||||
elif kbtype == "winmac":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Mac.*)|^(\s{3})(\s{1}# )(-)(- Default Win)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
|
||||
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '0':
|
||||
# print("found hid_apple")
|
||||
self.queryConfig("echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
|
||||
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '0':
|
||||
# print("found applespi")
|
||||
self.queryConfig("echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
|
||||
elif kbtype == "mac":
|
||||
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/hid_apple/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '1':
|
||||
# print("found hid_apple - remove")
|
||||
self.queryConfig("echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
|
||||
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '1':
|
||||
# print("found applespi - remove")
|
||||
self.queryConfig("echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# Mac\n|.*# Mac -)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
elif kbtype == "chrome":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# Chromebook.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
elif kbtype == "ibm":
|
||||
setkb ='s/^(\s{3})(\s{1}#)(.*# IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
cmdsTerm = Popen(cmds)
|
||||
cmdsTerm.wait()
|
||||
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restart)
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting KB Type!'])
|
||||
|
||||
def setSysKB(self,button):
|
||||
if self.ostype == "XFCE":
|
||||
Popen(['xfce4-keyboard-settings'])
|
||||
elif self.ostype == "KDE":
|
||||
self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
|
||||
else:
|
||||
Popen(['gnome-control-center','keyboard'])
|
||||
|
||||
def setRegion(self,button):
|
||||
if self.ostype == "XFCE":
|
||||
Popen(['gnome-language-selector'])
|
||||
elif self.ostype == "KDE":
|
||||
self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
|
||||
else:
|
||||
Popen(['gnome-control-center','region'])
|
||||
|
||||
def quit(source):
|
||||
Gtk.main_quit()
|
||||
|
||||
Indicator()
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
Gtk.main()
|
31
linux/vscode_keybindings.json
Normal file
@@ -0,0 +1,31 @@
|
||||
// Place your key bindings in this file to override the defaultsauto[]
|
||||
[
|
||||
{
|
||||
"key": "alt+left",
|
||||
"command": "-workbench.action.terminal.focusPreviousPane",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+right",
|
||||
"command": "-workbench.action.terminal.focusNextPane",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+right",
|
||||
"command": "cursorWordRight"
|
||||
},
|
||||
{
|
||||
"key": "alt+left",
|
||||
"command": "cursorWordLeft"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+left",
|
||||
"command": "cursorWordStartLeftSelect",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+right",
|
||||
"command": "cursorWordEndRightSelect",
|
||||
"when": "textInputFocus"
|
||||
}
|
||||
]
|
11
linux/xkeysnail.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto_xkey
|
||||
GenericName=Kinto_xkey
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && {xhost} +SI:localuser:root && sudo {systemctl} restart xkeysnail"
|
||||
# Budgie logoff fix to avoid key input loss
|
||||
# ;{homedir}/.config/kinto/logoff.sh
|
||||
# ;sudo /usr/local/bin/logoff.sh $USER $DISPLAY
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
14
linux/xkeysnail.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=xkeysnail
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
|
||||
ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0'
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
Environment=DISPLAY={displayid}
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
19
linux/xkeystart.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# >/dev/null 2>&1
|
||||
|
||||
if [ -f /usr/local/bin/xkeysnail ];then
|
||||
xkeyfullpath="/usr/local/bin/xkeysnail"
|
||||
elif [ -f /usr/bin/xkeysnail ];then
|
||||
xkeyfullpath="/usr/bin/xkeysnail"
|
||||
else
|
||||
xkeyfullpath=`which xkeysnail`
|
||||
fi
|
||||
|
||||
"$xkeyfullpath" --quiet --watch "$1" &
|
||||
|
||||
inotifywait -m -e close_write,moved_to,create,modify /tmp/kinto/xkeysnail |
|
||||
|
||||
while read -r path; do
|
||||
/usr/bin/killall xkeysnail
|
||||
"$xkeyfullpath" --quiet --watch "$1" &
|
||||
done
|