Skip to content

Instantly share code, notes, and snippets.

@adnan360
adnan360 / ibus-cli.md
Last active April 1, 2025 19:31
Control ibus layouts right from Linux terminal

Control ibus layouts right from Linux terminal

Ibus is an input tool that allows to type in many languages and keyboard layouts under GNU/Linux. Being able to control ibus layouts is extremely helpful on minimal desktop environments and window managers, like i3, sway etc. You can utilize the learnings of this on Waybar, Polybar etc.

First run the ibus daemon (if not already running):

ibus-daemon -xdr
@ovcharik
ovcharik / wt-two-finger-scroll.ahk
Created December 4, 2019 20:29
Autohotkey script. Throttle touchpad two finger scrolling in Windows Terminal.
; Config
#Persistent
#SingleInstance force
; 200 wheel events per second rate
#HotkeyInterval 1000
#MaxHotkeysPerInterval 200
DeactivateMenuItem := "Deactivate (Win + Shift + W)"
EnableHScrollMenuItem := "Enable HScroll (Win + Shift + H)"
# app: Xdotool
# user input
direction = 'down' # 'up' or 'down' or 'left' or 'right'
# end of user input
time.sleep(1)
system.exec_command("xdotool key space")
time.sleep(1)
activeApp = window.get_active_class()
if activeApp == 'nemo.Nemo' or activeApp == 'nemo-desktop.Nemo-desktop':
if direction == 'up':
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 26, 2025 18:36
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@DanielJenkyn
DanielJenkyn / install_obb.sh
Last active February 12, 2024 09:00
Script to install .apk and .obb (Split binary) onto Android device
#!/bin/bash
project_name= com.jenkyncorp.bestapp
reinstall=
# Takes the most recent .apk and .obb (If you have multiple files)
OBB=$(ls -t *.obb | head -n1)
APK=$(ls -t *.apk | head -n1)
while [ "$1" != "" ]; do
@luckman212
luckman212 / frontapp.py
Created May 10, 2019 05:15
simple python script that prints the frontmost (aka focused) app
#!/usr/bin/python
# references
# https://developer.apple.com/documentation/appkit/nsworkspace
# https://bmn.name/post/2016/05/28/current-osx-app/
# https://stackoverflow.com/questions/28815863/how-to-get-active-window-title-using-python-in-mac
# https://apple.stackexchange.com/questions/123730/is-there-a-way-to-detect-what-program-is-stealing-focus-on-my-mac/
try:
from AppKit import NSWorkspace
@jakub-g
jakub-g / mac-pain.md
Last active October 17, 2024 08:25
MacOS for Windows users: overcoming the annoyances

Introduction

For a long time Windows user, starting using Mac can be an exercise in frustration and keeping your nerves at bay. Many things don't work as expected, need to be activated in some ways, keyboard shortcuts are non-existent or wildly different.

This page is a living reference of a Windows long-timer trying to do basic stuff on a Mac. If you see an easier way to achieve certain things, don't hesitate to drop a comment.

Related links:

@adnan360
adnan360 / notification-sidebar.py
Last active July 20, 2020 04:39
A simple sidebar showing all the system notifications - based on xfce4-notifyd
# Written by Adnan Shameem
# License: CC0 - do whatever you want with it
# This script relies on xfce-notifyd. It is lightweight and saves the
# notifications in a ~/.cache/xfce4/notifyd/log file which is formatted
# in INI type format.
# To make this script work,
# 1. Install notification-daemon
# 2. Install xfce4-notifyd
# 3. Run either:

Installing Cool-Retro-Term on Windows10

First of all, this document is just a recompilation of different resources that already existed on the web previously that I personally tested some ones did work and other not. I liked the idea to make a full guide from start to end so all of you could also enjoy playing with cool-retro-term on windows 10. Personally I installed it on a windows 10 pro version. Fingers crossed!

result

# Remap express keys of XP-PEN Artist22E Pro_V3
# Input device ID: bus 0x03 vendor 0x28bd product 0x900b version 0x100
#
# place me into /etc/udev/hwdb.d/10-xp-pen-keyboard.hwdb
# and run:
# sudo udevadm hwdb --update; sudo udevadm trigger
#
# print list of key codes:
# sed -n '/KEY_/{s/.*KEY_\([A-Za-z0-9_]\+\).*/\L\1/g;p}' /usr/include/linux/input-event-codes.h | less
#