• 47 Posts
  • 1.09K Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle






  • I like these self made scripts. Some ideas to improve this: a) instead ls, use find command if you want use its output as input in another program (will yield fullpath too), b) fzf has a preview functionality, which I like a lot to use when it comes to directories or script files. As for the run command, I’m not sure why you use xargs and what i3-msg is needed for. Here is an alternative way.

    (Edit: I always forget that beehaw will convert my ampersand to &. Have this in mind if you read the below code.)

    bash -c 'cd "${HOME}/.local/bin"; path="$(find . -maxdepth 1 -type f -executable -printf "%f\n" | fzf --preview "cat {}")" && "${path}"'
    

    below same command in a bit more readable standalone script:

    #!/usr/bin/env bash
    cd "${HOME}/.local/bin" || exit 1
    path="$( \
        find . -maxdepth 1 -type f -executable -printf "%f\n" | \
        fzf --preview "cat {}" \
    )" && "${path}"
    

    The biggest problem with fzf is, that scripts that need an argument are not covered here. One could either use the input string from fzf as arguments or like that, or an optional input after fzf selection.


  • I might be missing something here but I don’t know how other launchers could possibly make this a simpler process.

    Shortcuts to launch an app directly in example. So my keyboard becomes my launcher.

    I use bunch of different tools, including KRunner (on KDE) and previously Rofi. These type name and search tools for launching an app have the problem that you need to remember what name the tool was. For programs I use often this is not an issue, but not all applications have names good to remember and not all of them are used often. The associated description helps, but sometimes I don’t know what words to type.

    Therefore I “need” the app menu with categories and favorites, to navigate with the mouse through. And the most used applications are usually assigned to a shortcut and my panel on the top. In short I use mostly all of these techniques as an application launcher (in that order):

    1. favorites on panel and my keyboard shortcuts
    2. app menu with categories, navigating with mouse
    3. run tool to search for app name and description (also integrated into the app menu)
    4. additional helper scripts to search and launch programs in the terminal

    Edit: Forgot to mention that some of the launchers I use are custom made scripts for the terminal.









  • thingsiplay@beehaw.orgtoGaming@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    3 days ago

    Valve and Steam is actually the best thing happened to PC Gaming and Linux. No thanks, I want Valve and Steam succeed. I’ve seen the same claims over and over again and most of the time its wrong or disingenuous. I’m not saying Valve is a prophet, off course there are things I don’t like about.

    But saying Valve is ripping every PC gamer is a lie.





  • I was using capital letters in the past, but they look so alien and are not fluid to type as small letters only. After some time I wasn’t sure which commands where capital and which were small letters, so left that concept behind me.

    But as a Vim user, I think of using single capital letters to open specific documents and files directly in Vim; emulating the global mark functionality of Vim. At the moment I have a convention of small letter+“rc” that will open configuration file in Vim, like this:

    alias brc='nvim ~/.bashrc && source ~/.bashrc'
    alias mrc='nvim ~/.config/MangoHud/MangoHud.conf'
    alias nrc='nvim ~/.config/nvim'
    ...
    

    But I might replace them with single letters brc as B in example.


  • While the effects of cheat codes are not copyrighted, its probably still possible to patent them. But that would cost the company lot of legal fees and complications, for cheats. Also thankfully the cheat codes themselves are not copyrighted. But I feel like Konami could potentially trademark the “Konami Code” (which is even named and known like this). This EU court is only about Copyright, which is a good thing and is what everyone gets for free. But trademarks and patents could still be a problem if companies really want to be an ass (like Nintendo, Konami or Rockstar).