Skip to content

Instantly share code, notes, and snippets.

View emepetres's full-sized avatar

Javi Carnero emepetres

View GitHub Profile
@emepetres
emepetres / cursor-remove-titlebar.sh
Last active March 18, 2025 08:45
Remove Cursor AI titlebar in Gnome
#!/bin/bash
set -ex
## Script to remove titlebar in Cursor on Gnome (based on https://github.com/getcursor/cursor/issues/837#issuecomment-2614109807)
APP_IMAGE=/opt/cursor-bin/cursor-bin.AppImage
BUILD_PATH=./patch-cursor
mkdir $BUILD_PATH
pushd $BUILD_PATH
@emepetres
emepetres / set-primary-intel.sh
Created January 4, 2023 13:52
Sets intel gpu as primary in hybrid mode
#!/bin/bash
set -e
sudo sed -i 's/Device "dGPU"/Device "iGPU"/g' /etc/X11/xorg.conf
sudo shutdown -r now
@emepetres
emepetres / set-primary-nvidia.sh
Created January 4, 2023 13:51
Sets nvidia gpu as primary in hybrid mode
#!/bin/bash
set -e
sudo sed -i 's/Device "iGPU"/Device "dGPU"/g' /etc/X11/xorg.conf
sudo shutdown -r now
@emepetres
emepetres / maintenance.sh
Last active January 4, 2023 13:50
Manjaro maintenance script
#!/bin/bash
# https://wiki.manjaro.org/index.php?title=System_Maintenance
# automatically purge all .cache files that have not been accessed in 100 days
sudo find ~/.cache/ -type f -atime +100 -delete
# remove all but the most recent entries by size or time
sudo journalctl --vacuum-size=50M
sudo journalctl --vacuum-time=7d
@emepetres
emepetres / dual_boot.md
Last active November 1, 2022 09:37
Dual boot issues and how to solve them

Dual boot fixes

grub doesn't show up

This usually occurs after windows update, because it has deleted linux efi and/or has rewrite the order of efi boot, putting windows efi at the top.

  1. Install TODO
  2. Go to TODO tab
  3. TODO
@emepetres
emepetres / utc.reg
Created September 17, 2019 19:56
Registry file to set Windows to UTC (for dual boot)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=qword:00000001
@emepetres
emepetres / manjaro.sh
Last active May 18, 2020 10:46
Manjaro initial set up
#!/bin/bash
# yay for aur
sudo sed -i 's/#Color/Color/g' /etc/pacman.conf
sudo pacman -Syyu --noconfirm
sudo pacman -S base-devel yay --noconfirm
# neovim
sudo pacman -S neovim --noconfirm
sudo ln -s /usr/bin/nvim /usr/bin/vim
@emepetres
emepetres / .bashrc
Last active July 10, 2020 19:54
My bashrc file in Manjaro
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'