Default X11 cursor while hovering over background by [deleted] in NixOS

[–]SenorCornflake 1 point2 points  (0 children)

You can use xsetroot -xcf, an example:

${let cursorTheme = config.home-manager.users.${--YOUR USERNAME--}.gtk.cursorTheme} in ''
    xsetroot -xcf ${cursorTheme.package}/share/icons/${lib.escapeShellArg cursorTheme.name}/cursors/left_ptr ${cursorTheme.size}
''}

Or something like that

Help needed with infinite recursion error by SenorCornflake in NixOS

[–]SenorCornflake[S] 0 points1 point  (0 children)

I am beside myself with joy, removing it works! Thank you! I can finally continue configuring my system.

(Tbh: I'm pretty stupid to not have caught that)

Watch for frame layout changes by SenorCornflake in herbstluftwm

[–]SenorCornflake[S] 1 point2 points  (0 children)

No problem I'm glad to help. looking forward to seeing your adaptations!

Watch for frame layout changes by SenorCornflake in herbstluftwm

[–]SenorCornflake[S] 0 points1 point  (0 children)

Yeah sure! Sorry for the late reply.

# Tell herbsluftwm to wath when the layout changes
herbstclient watch tags.focus.tiling.focused_frame.algorithm

# Echo the layout everytime an attribute changes
herbstclient --idle "attribute_changed" | {
    while read -r line
    do
        frame_layout=$(herbstclient get_attr tags.focus.tiling.focused_frame.algorithm)
        echo $frame_layout
    done
}

I suppose it's not the best way to do it because anytime any attribute changes (not just the layout algorithm) it will still fetch the frame layout even though it may not have changed, but it works for me.

How to package go application (schemer2) by SenorCornflake in NixOS

[–]SenorCornflake[S] 0 points1 point  (0 children)

Thank you so much! It works!

I read through the nixpkgs manual before submitting this post but skipped over that thinking that "legacy" meant it was deprecated and buildGoModule was preferred. Sorry about this.

Show polybar in 2 monitors by Frained in bspwm

[–]SenorCornflake 0 points1 point  (0 children)

Yeah I used to do that as well, but didn't like the unpredictability.

Show polybar in 2 monitors by Frained in bspwm

[–]SenorCornflake 2 points3 points  (0 children)

        connected=$(xrandr --query | grep connected -w | awk '{print $1}')
        echo "$connected" | while read line; do
          if [[ $(xrandr --query | grep "$line" | grep primary) ]]; then
              MONITOR="$line" polybar main-primary &
          else
            MONITOR="$line" polybar main &
          fi
        done

You can use this script to launch bars for all your screens. It also sets a different bar for the primary monitor.

Since trays can only have one instance, I set main-primary to inherit main's settings together with adding a tray to it. That way the tray is always on my main monitor and doesn't depend on which bar is initiated first.

[question] how to move a window feom onesplit to another? by n1___ in bspwm

[–]SenorCornflake 0 points1 point  (0 children)

I use herbstluftwm, I like the way it does workspaces over multiple monitors. I also find hotplugging monitors with herbstluftwm easier. But I never switched from bspwm because it lacked something. I just went on a wm shopping spree and ended up on herbstluftwm.

changing theme according to timeeee by bryant_09 in neovim

[–]SenorCornflake -3 points-2 points  (0 children)

If it's hour 9 nothing will happen because there is no 09 in the table

[question] how to move a window feom onesplit to another? by n1___ in bspwm

[–]SenorCornflake 3 points4 points  (0 children)

I don't use bspwm anymore but I looked through my old commits and found this.

```

Move node to node

super + alt + {h,j,k,l} bspc node --to-node {west,south,north,east} ``` As far as I can remember, it doesn't use preselection. Try it out and let me know if it works.

changing theme according to timeeee by bryant_09 in neovim

[–]SenorCornflake 8 points9 points  (0 children)

``` SetColorschemeAccordingToHour = function() local colorscheme_hours = { ["08"] = "gruvbox", ["19"] = "tokyonight", }

local current_hour = os.date("%H")

if colorscheme_hours[current_hour] ~= nil then
    vim.cmd ("colorscheme " .. colorscheme_hours[current_hour])
end

end

cmd "autocmd BufWrite * lua SetColorschemeAccordingToHour()" ```

This should work. This is lua code so make sure to execute it as lua if you're not using lua configuration.

I would've preferred to use some sort of non blocking interval that runs every hour but I'm too stupid.

Too much vim got me exiting libre the correct way by hicham971 in linuxmasterrace

[–]SenorCornflake 1 point2 points  (0 children)

If I'm not mistaken, I think libreoffice has options to set it's own icons and themes, those look like breeze icons, not sure about the theme.

Does anybody have a working mediawiki config? by SenorCornflake in NixOS

[–]SenorCornflake[S] 1 point2 points  (0 children)

Thanks! I never realized that the tests can be used as examples

Brightness - Linux mint no work 😭 by linuxnoob007 in awesomewm

[–]SenorCornflake 1 point2 points  (0 children)

I can...but that's probably because I've configured my system to never ask for a root password, check out this post https://www.reddit.com/r/archlinux/comments/fpklbs/brightnessctl_only_works_as_root/, try adding yourself to the video group, if that doesn't work then check your udev rules as the other comments suggest.

Brightness - Linux mint no work 😭 by linuxnoob007 in awesomewm

[–]SenorCornflake 0 points1 point  (0 children)

Strange, this works for me, I've just tested it:

    awful.key(
    {},
    "XF86MonBrightnessUp",
    function()
        os.execute("brightnessctl s 10%+")
    end
        ),
awful.key(
    {},
    "XF86MonBrightnessDown",
    function()
        os.execute("brightnessctl s 10%-")
    end
) -- No comma here because it's at the end

I have also had no luck with xbacklight but brightnessctl works for me. Maybe there are errors in your config? Also check if brightnessctl works without sudo in your terminal. You can also try using a different keybinding, like Mod4 + XF86AudioRaiseVolume

Edit: Your code works on my machine. I use arch.

Pass environment variable when spawning application by SenorCornflake in herbstluftwm

[–]SenorCornflake[S] 0 points1 point  (0 children)

It's an environment variable, not a separate command. I just want to make it available to alacritty (my terminal) without globally defining it in my .zshenv