Skip to content

Instantly share code, notes, and snippets.

View CouldBeThis's full-sized avatar

CouldBeThis CouldBeThis

  • lol nope
View GitHub Profile
@CouldBeThis
CouldBeThis / uca.xml
Last active December 24, 2022 22:55
Thunar custom actions ~/.config/Thunar/uca.xml
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon></icon>
<name>⨁ _Copy path to clipboard</name>
<submenu></submenu>
<unique-id>1671863021510925-2</unique-id>
<command>echo -n %f | xclip -selection &quot;clipboard&quot;</command>
<description>_Copy Current Path</description>
<range>*</range>
@CouldBeThis
CouldBeThis / window-manipulation.md
Created September 12, 2022 03:54
manipulating and working with windows in xfce4/linux

get information about a given window

xprop - property displayer for X

xprop man page, XPROP(1) manual page

The xprop utility is for displaying window and font properties in an X server. One window or font is selected using the command line arguments or possibly in the case of a window, by clicking on the desired window. A list of properties is then given, possibly with formatting information.

$originalsFolder = 'originals'
$resizedFolder = 'resized'
$reorganizedFolder = 'reorganized'
$originals = Get-ChildItem -Path $originalsFolder -Recurse -Include *.jpg
foreach ($original in $originals) {
$resized = Get-ChildItem -Path $resizedFolder -Recurse -Include $original.Name
$destination = ($resized.FullName).Replace($resizedFolder, $reorganizedFolder).Replace($resized.Name, "")
New-Item $destination -Type Directory
@CouldBeThis
CouldBeThis / linux-ui-tools-rofi.md
Last active January 23, 2023 04:10
🧰 🥽 [gui tools] fast access via keyboard with `rofi`

🧰 🥽 [gui tools] fast access via keyboard with rofi

repo: davatorium/rofi: Rofi: A window switcher, application launcher and dmenu replacement

use Keyboard > Application Shortcuts setting panel in WM to create shortcut (I used alt+space)

simple use

rofi -show drun -show-icons -sidebar-mode -show-icons
@CouldBeThis
CouldBeThis / xfwm4-to-HiDPI.md
Created June 17, 2022 00:23
resize xfce xfwm4 themes to 200%, making suitable for HiDPI
@CouldBeThis
CouldBeThis / hugo.md
Last active June 4, 2022 08:50
Hugo commands and info

#hugo notes

from help

Flags:
  -D, --buildDrafts                include content marked as draft
      --cleanDestinationDir        remove files from destination not found in static directories
      --enableGitInfo              add Git revision, date, author, and CODEOWNERS info to the pages
 --forceSyncStatic copy all files when static is changed.
@CouldBeThis
CouldBeThis / convert-xpm-window-decorations.md
Created April 16, 2022 14:21
convert `.xpm` images (used in gtk 2 theme)

convert .xpm images (used in gtk 2 theme)

from the base directory of the theme:

magick mogrify -path converstion/png -format png xfwm4/*.xpm

relevant links:

@CouldBeThis
CouldBeThis / color-converstion.md
Last active April 16, 2022 13:22
convert colors from hex to HSL (source = list in text file)

uses pastel to take a text file with a list of colors (in hex) and convert them to HSL. my purpose in this is to replace hardcoded hex color codes in GTK themes with named variables.

this gets less and less useful and finished as it goes on. incomplete and infunctional.

NOTE: the # needs to be removed from the hex code for this to work

basic

cat INPUT.txt | xargs -I {} sh -c "echo \#{}; pastel format hsl  {}" > OUTPUT.txt
@CouldBeThis
CouldBeThis / geanywl
Created March 26, 2022 18:29 — forked from gkatev/geanywl
Geany editor: Wrapper for per-workspace instances, opening in most recently focused window, and more
#!/bin/bash
GEANY_PATH="/usr/bin/geany"
if [ -z "$XDG_RUNTIME_DIR" ]; then
[ -z "$XDG_CACHE_HOME" ] &&
XDG_CACHE_HOME="$HOME/.cache"
XDG_RUNTIME_DIR="$XDG_CACHE_HOME"
fi
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \