Skip to content

Instantly share code, notes, and snippets.

View ostadsgo's full-sized avatar
🏠
Working from home

Saeed Gholami ostadsgo

🏠
Working from home
View GitHub Profile
pcm.!default {
type hw
card 1 # Change this to the correct card number from aplay -l
}
ctl.!default {
type hw
card 1 # Change this to the correct card number from aplay -l
}
@ostadsgo
ostadsgo / fonts.conf
Created May 10, 2025 17:36
fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer><family>Inter</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Source Code Pro</family></prefer>
@ostadsgo
ostadsgo / build
Last active May 14, 2025 22:31
build
#!/usr/bin/sh
# Xorg
sudo xbps-install xorg-minimal xinit xauth xsetroot\
# Devel
base-devel libX11-devel libXft-devel libXinerama-devel\
# Font / sound
adobe-source-code-pro font-vazir pulseaudio \
# X
xclip xset setxkbmap xinput xprop xrandr \
name email
Jane Doe jane@example.com
@ostadsgo
ostadsgo / user-dirs.dirs
Created April 5, 2025 22:26
.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/dl"
XDG_TEMPLATES_DIR="$HOME/"
@ostadsgo
ostadsgo / mimeapps.list
Last active May 14, 2025 22:57
.config/mimeapps.list
[Default Applications]
inode/directory=pcmanfm.desktop
application/pdf=org.pwmt.zathura.desktop
text/plain=nvim.desktop
application/xhtml+xml=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
text/html=firefox.desktop
image/jpeg=sxiv.desktop
image/jpg=sxiv.desktop
@ostadsgo
ostadsgo / init.lua
Created March 8, 2025 01:12
Emacs keys for neovim
-- Emacs cursor and word move
vim.keymap.set("i", "<C-f>", "<Right>", opts) -- move cursor right by one char
vim.keymap.set("i", "<C-b>", "<Left>", opts) -- move cursor left by one char
vim.keymap.set("i", "<M-f>", "<C-right>", opts)-- move cursor right by one word
vim.keymap.set("i", "<M-b>", "<C-left>", opts)-- move cursor left by one word
-- -- delete word
vim.keymap.set("i", "<C-d>", "<C-o>dw", opts) -- delete forward
vim.keymap.set("i", "<C-h>", "<C-o>db", opts) -- del backward
-- -- Move beginning and end of line
vim.keymap.set("i", "<C-a>", "<Home>", opts) -- move cursor to beginning of the line
@ostadsgo
ostadsgo / tmux.conf
Created February 21, 2025 12:41
Tmux before deleting package manager
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Kye Bindings
unbind C-b
unbind C-/
unbind '"'
@ostadsgo
ostadsgo / keybindings.json
Created September 11, 2024 23:08
VS Code Settings
// Place your key bindings in this file to override the defaults
[
// Terminal
{
"key": "ctrl+shift+a",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+b",
@ostadsgo
ostadsgo / guessing_game.py
Last active July 21, 2023 13:21
Number guessing game with Python
from random import randrange
HAND = 10
RANDOM_NUMBER = randrange(1, 100)
print("I am a number between 1 to 99. Try to guess me.")
while HAND > 0:
guess = int(input("Enter your guess: "))
if guess == RANDOM_NUMBER: