Code Monkey home page Code Monkey logo

Comments (9)

dryBoneMarrow avatar dryBoneMarrow commented on August 24, 2024 2

It is also possible to make a tmpfs (which is stored in ram and hence cleared on shutdown), like so (in /etc/fstab):
tmpfs /home/username/.cache/cliphist/ tmpfs rw,nodev,nosuid,nofail,x-systemd.device-timeout=5
This could be added to the readme

from cliphist.

sentriz avatar sentriz commented on August 24, 2024 1

thanks for the suggestion

though clearing the db on shutdown is out of scope since the cliphist is supervised by wl-clipboard

from cliphist.

sentriz avatar sentriz commented on August 24, 2024 1

yes that should work fine 👍

from cliphist.

sentriz avatar sentriz commented on August 24, 2024 1

seems to work for me

image

from cliphist.

sentriz avatar sentriz commented on August 24, 2024 1

@w-jablonski if you build form source, i just made the db path configureable with a flag

alternatively, you can change any flag with an env var or config file.
for example env CLIPHIST_DB_PATH=$HOME/D/X/run/cliphist


or instead create a ~/.config/cliphist/config which looks like:

db-path $HOME/D/X/run/cliphist-db
max-items 100

then you can just use cliphist anywhere without an env prefix or -max-items param

from cliphist.

w-jablonski avatar w-jablonski commented on August 24, 2024

Thanks. So regarding a configurable path for the db, is it possible? And would something like the following work?

exec XDG_CACHE_HOME="$HOME/my_directory" wl-paste --watch cliphist store

Thanks for your time.

from cliphist.

w-jablonski avatar w-jablonski commented on August 24, 2024

This actually doesn't work. Specifically, this line works when executed in terminal:

wl-paste --type text --watch cliphist -max-items 100 store

But the below one doesn't:

XDG_CACHE_HOME="$HOME/D/X/run" wl-paste --type text --watch cliphist -max-items 100 store

It still creates a folder in $HOME/.cache and the file at $HOME/D/X/run/cliphist/db is empty.

from cliphist.

w-jablonski avatar w-jablonski commented on August 24, 2024

Thanks, I missed the other half there.

So I can get it to work using:
In Sway config:

exec "env XDG_CACHE_HOME=$HOME/D/X/run wl-paste --type text --watch cliphist -max-items 100 store"

Then in terminal:

env XDG_CACHE_HOME="$HOME/D/X/run" cliphist list | fzf --layout=reverse --no-info | env XDG_CACHE_HOME="$HOME/D/X/run" cliphist decode | wl-copy

But strangely, if I put the second half in a script.sh and run something like foot script.sh then everything works fine except when I select an old entry it doesn't move to the top of the list - even though it copies to clipboard correctly...

Any advice on this? And thanks for your help anyway.

from cliphist.

w-jablonski avatar w-jablonski commented on August 24, 2024

Sadly, I need to wait for new release or an AUR package.
Thanks!

from cliphist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.