Skip to content

Instantly share code, notes, and snippets.

@mach1el
mach1el / setup_zsh.sh
Last active October 29, 2025 02:11
Setup zsh
#!/bin/bash
export ZSH="$HOME/.oh-my-zsh"
export ZSH_CUSTOM="${ZSH}/custom"
sudo pacman -Syy git curl wget zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/eendroroy/alien.git ${ZSH_CUSTOM}/themes/alien
cd ${ZSH_CUSTOM}/themes/alien
git submodule update --init --recursive
@mach1el
mach1el / config.toml
Created October 15, 2022 07:42
containerd configuration
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
plugin_dir = ""
disabled_plugins = []
required_plugins = []
oom_score = 0
[grpc]
address = "/run/containerd/containerd.sock"
@mach1el
mach1el / touchegg.conf
Created August 6, 2022 06:02
/usr/share/touchegg/touchegg.conf
<touchégg>
<settings>
<!--
Delay, in milliseconds, since the gesture starts before the animation is displayed.
Default: 150ms if this property is not set.
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
displayed if you complete the action quick enough. This property configures that time.
-->
<property name="animation_delay">150</property>
@mach1el
mach1el / .zshrc
Last active October 29, 2025 02:10
My zsh
# ---- Instant prompt from p10k (keeps shell fast) ----
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# ---- Oh My Zsh plugins ----
plugins=(
git
gitignore
sudo
[ActivityManager][Global Shortcuts]
switch-to-activity-f9e4bb65-a4c5-4683-bdbb-44c9984832c7=
[KDE Keyboard Layout Switcher][Global Shortcuts]
Switch to Next Keyboard Layout=Ctrl+Alt+K
[StandardShortcuts]
AboutApp=
AboutKDE=
Activate Next Tab=Ctrl+]; Ctrl+PgDown
#!/bin/sh
sudo pacman --noconfirm -S xdotool xf86-input-synaptics xf86-input-libinput gtk-engine-murrine gtk-engines sassc optipng inkscape libdbusmenu-glib libdbusmenu-gtk3 libdbusmenu-gtk2 gobject-introspection powerline-fonts powerline powerline-fonts python-powerline ttf-meslo-nerd-font-powerlevel10k awesome-terminal-font
yay --noconfirm -S whitesur-icon-theme-git whitesur-gtk-theme-git whitesur-cursor-theme-git la-capitaine-icon-theme osx-el-capitan-theme-git capitaine-cursors mojave-gtk-theme-git
xfconf-query -c xsettings -p /Gtk/ShellShowsMenubar -n -t bool -s true
xfconf-query -c xsettings -p /Gtk/ShellShowsAppmenu -n -t bool -s true
wget https://gist.githubusercontent.com/mach1el/90a8b92ecfcb3161a00b739ad0ec11be/raw/9af33715e1ee1103b806dec8bd94da0ceea008af/70-synaptics.conf -O /etc/X11/xorg.conf.d/70-synaptics.conf
#!/usr/bin/env python3
import os,sys
def usage():
print("""\
{0} [carrier] [prefix] [amount]
{0} [carrier] [prefix],[prefix] [amount]
""".format(sys.argv[0]))
def do_math(a):
@mach1el
mach1el / fix-audio.sh
Created August 5, 2020 00:01
Fix audio
#!/bin/bash
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74
@mach1el
mach1el / .zshrc
Created July 9, 2020 10:22
Zsh config file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/michael/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bullet-train"
@mach1el
mach1el / lightdm.conf
Created July 9, 2020 08:53
Lightdm config file
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account