Skip to content

Instantly share code, notes, and snippets.

View NeoTheFox's full-sized avatar

NeoTheFox NeoTheFox

  • Yerevan
View GitHub Profile
@NeoTheFox
NeoTheFox / init.vim
Last active November 29, 2017 07:18
My NeoVim config
set nocompatible " be iMproved, required
filetype off " required
set termguicolors
set clipboard=unnamedplus
syntax on
set nu
autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_en
autocmd BufRead,BufNewFile *.txt setlocal spell spelllang=ru_ru
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
#!/usr/bin/sh
if [ -z "$1" ]
then
echo "No argument supplied"
else
export DISPLAY=$1
fi
if pgrep Xorg > /dev/null
@NeoTheFox
NeoTheFox / i3config
Last active February 4, 2019 08:54
My daily i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
! ------------------------------------------------------------------------------
! ROFI Color theme
! User: Rasi
! ------------------------------------------------------------------------------
rofi.color-enabled: true
rofi.color-window: #002b37, #002b37, #003642
rofi.color-normal: #002b37, #819396, #002b37, #003642, #819396
rofi.color-active: #002b37, #008ed4, #002b37, #003642, #008ed4
rofi.color-urgent: #002b37, #da4281, #002b37, #003642, #da4281
rofi.font: Hack 11
[Unit]
Description=GPU Switcher
After=systemd-user-sessions.service plymouth-quit.service
Before=display-manager.service
[Service]
ExecStart=/usr/local/bin/autogpuswitch.sh
Restart=no
Type=oneshot
RemainAfterExit=yes
#!/usr/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# You would have to create an xorg.conf file for your Nvidia setup #
# before using this script! It can be done by running: #
# #
# nvidia-xconfig -o /etc/X11/xorg.conf.nvidia #
# #
# Make sure your system has eGPU connected and a monitor plugged into the GPU. #
# The reason I've never automated this is that you have to have it all plugged #
#!/usr/bin/bash
xconfig="/etc/X11/xorg.conf"
if [ -e "$xconfig" ]
then
echo "Nvidia xconfig detected"
echo "Switching to mesa..."
sudo pacman -S lib32-mesa-libgl mesa-libgl
sudo rm $xconfig
else
#!/usr/bin/env python2
a = 0
print 'G92 Z0'
while a<100:
a = a+1
print 'G1 Z0'
print 'G1 Z10'