Skip to content

Instantly share code, notes, and snippets.

View dinamycam's full-sized avatar
🎯
Focusing

dinamyc dinamycam

🎯
Focusing
  • shiraz, fars, iran
View GitHub Profile
@kzndotsh
kzndotsh / dropdown-terminal.sh
Created September 19, 2023 14:58
dropdown-terminal.sh
#!/bin/bash
# Controls a dropdown terminal for use in i3wm
DISPLAY_WIDTH=1920
DISPLAY_HEIGHT=1080 # May be usefull...
TERMINAL_WIDTH=900
TERMINAL_HEIGHT=400
TERMINAL_X=$(( (DISPLAY_WIDTH - TERMINAL_WIDTH)/2 ))
TERMINAL_Y=500
@Kvn0l
Kvn0l / config.json
Last active February 21, 2025 21:41
SwayNC config
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"control-center-margin-top": 2,
"control-center-margin-bottom": 2,
"control-center-margin-right": 1,
"control-center-margin-left": 0,
"notification-icon-size": 48,
"notification-body-image-height": 160,
@crispyricepc
crispyricepc / install-instructions.md
Last active May 14, 2025 23:45
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@mxdevmanuel
mxdevmanuel / powermenu.sh
Created July 30, 2021 18:45
Sway power menu
#!/usr/bin/env bash
op=$( echo -e " Poweroff\n Reboot\n Suspend\n Lock\n Logout" | wofi -i --dmenu | awk '{print tolower($2)}' )
case $op in
poweroff)
;&
reboot)
;&
suspend)
@morealaz
morealaz / linux-font-config.md
Last active May 18, 2025 06:41
تنظیمات فونت لینوکس

تنظیمات فونت لینوکس

مقدمه

تنظیمات فونت در لینوکس بر عهده برنامه fontconfig میباشد. این برنامه فونتهای سیستم را بر اساس الویت بندیهایی که قابل تنظیم میباشد مرتب میکند و در اختیار سایر برنامه ها قرار می دهد. مشکل اصلی که اکثر کاربران فارسی زبان لینوکس در ارتباط با fontconfig دارند عدم نمایش صحیح حروف فارسی می باشد که معمولا به دو دلیل زیر اتفاق می‌افتد:

  • نصب نبودن فونت مناسب بر روی سیستم که حروف فارسی را ساپورت کند
  • عدم وجود فایل تنظیمات fontconfig برای انتخاب فونت مناسب برای نمایش حروف فارسی
@gowhari
gowhari / stop-others-bot.py
Created August 12, 2018 06:01
telegram bot that prevents adding bots to group by non admin members, only admins are able to add bots
import json
import time
import logging
import telepot
import telepot.loop
thisbot_token = 'YOUR-BOT-TOKEN'
@alifarazz
alifarazz / Makefile
Last active April 24, 2018 18:03
Makefile for personal kernel development.
# change application name here (executable output name)
TARGET=kernel
LINKERSCRIPT=link.ld
# compiler
CC=gcc
ASM=nasm
QEMU=qemu-system-i386 -kernel
LD=ld
@alifarazz
alifarazz / Makefile
Last active April 24, 2018 18:04
Makefile for personal OpenGL develpment.
# compiler
CC=clang++
# linker
LD=$(CC)
# optimisation
OPT=-ggdb
# warnings
WARN=-Wall -Wextra
# standards
STD=c++14
@alifarazz
alifarazz / Watchdog.py
Created November 19, 2017 13:39
Watches a file, executes commands if the file is updated. (I use it for auto-compilation)
#!/usr/bin/env python3
# -*-coding:utf-8-*-
# usage:
# ./Watchdog.py <subfile> <commands>
# This script takes a <subfile> file and a list of <commands> which it immediately
# executes in a subprocess.
# It kills the subprocess and relaunches it whenever the file changes.
#
@sae13
sae13 / passwdrobot.py
Last active June 12, 2017 20:50
Telegram bot for generating password. http://t.me/passwdrobot
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Simple Bot to reply to Telegram messages. This is built on the API wrapper, see
# echobot2.py to see the same example built on the telegram.ext bot framework.
# This program is dedicated to the public domain under the CC0 license.
import logging
import telegram
from telegram.error import NetworkError, Unauthorized
from time import sleep