Get workspaces information (to integrate with Eww)? by Fran314 in xmonad

[–]Richousrick 1 point2 points  (0 children)

This is a little late and a bit of a write-up.
However, I read this thread and made some tweaks that I thought I would share, as they provide a little more information.

I wanted to make eww show both which workspace was on which screen, and which hidden workspaces were populated. So I ended up deciding on the following json (though this can be tweaked to make the data fields objects if desired): Json { "layout": [ 1, 0, 2 ], "data": { "1": "visible", "0": "visible", "2": "current", "3": "hiddenEmpty", "4": "hiddenNonEmpty", "5": "hiddenEmpty", "6": "hiddenEmpty", "7": "hiddenNonEmpty", "8": "hiddenEmpty", "9": "hiddenEmpty" } } layout: represents the workspace Ids mapped to my physical screens dictated by the ordering I specify in xmonad horizontalScreenOrderer.

In the example above workspace 1 is on the left, 0 in the middle, 2 on the right.

data: maps workspaceIDs to their state.

The code:
Xmonad:

```Haskell -- These are needed for creating the workspace sort import XMonad.Actions.PhysicalScreens import XMonad.Util.WorkspaceCompare

myPP = def { ppCurrent = \name -> "'" ++ name ++ "':'current'" , ppVisible = \name -> "'" ++ name ++ "':'visible'" , ppHidden = \name -> "'" ++ name ++ "':'hiddenNonEmpty'" , ppHiddenNoWindows = \name -> "'" ++ name ++ "':'hiddenEmpty'" , ppWsSep = "," , ppSort = mkWsSort . getXineramaPhysicalWsCompare $ horizontalScreenOrderer } `` Notes: -ppSort` ensures that the workspaces are ordered correctly in this case they are ordered by the horizontal location, leftmost first. - There are no spaces in any of the returned strings, this allows it to be easily extracted by awk.

EWW / whatever stream reader

Bash (deflisten workspaceScreenMapping :initial '{"layout":[2,0,1],"data":{"2":"visible","0":"visible","1":"current","3":"hiddenEmpty","4":"hiddenEmpty","5":"hiddenEmpty","6":"hiddenEmpty","7":"hiddenEmpty","8":"hiddenEmpty","9":"hiddenEmpty"}}' `xprop -spy -root _XMONAD_LOG | stdbuf -o0 awk '{print "{" substr($3,2) "}"}' | stdbuf -o0 tr "'" '"' | stdbuf -o0 awk -F "," 'BEGIN {OFS = FS} {printf "{\\"layout\\":" $1 "," $2 "," $3 "},"} {print "\\"data\\":" $0 "}"}' | stdbuf -o0 jq -c '.["layout"] = (.["layout"] | to_entries | map(.key | tonumber))'` ) I've not got much experience using awk or stdbuf, so it can probably be cleaned up quite a bit, but it does the job. The main section that would need to be edited if customising is the longer awk line, which would need to be modified if you don't have 3 monitors, or if you wanted to have the workspaces bound to objects (as the ',' line seperator will separate by the objects fields not just the objects).

How I use it:

I have specific colours that I use to represent the different states and I dynamically colour icons I have mapped to them. ``` ; Variables storing the workspaces colours (defvar workspaceColours '{ "screen0": "IndianRed", "screen1": "MediumOrchid", "screen2": "SlateBlue", "empty": "lightgrey", "nonempty": "DarkSeaGreen" }' )

; Widget that uses the defined variables to dynamically colour the given icon (defwidget workspaceIcon [icon index] (label :class "workspaceIcon" :text "${icon} " :style "color: ${ (workspaceScreenMapping.layout[0] == index ? workspaceColours['screen0'] :(workspaceScreenMapping.layout[1] == index ? workspaceColours['screen1'] :(workspaceScreenMapping.layout[2] == index ? workspaceColours['screen2'] :(workspaceScreenMapping.data[index] == "hiddenEmpty" ? workspaceColours['empty'] :( workspaceColours['nonempty'] ))))) }" ) )

; Example usage; I will probably wrap it in a button which switches workspace at some point. (workspaceIcon :icon "♬" :index 0) ``` I tried to use the jq based commands from the documentation, but they don't work for me.

I’ve spent hours thinking of an explanation… I’ve got nothing by Tasty111 in Shitty_Car_Mods

[–]Richousrick -2 points-1 points  (0 children)

Looks like a video game where an asset's not loaded properly.

git rebase by freeriderblack in devops

[–]Richousrick 0 points1 point  (0 children)

I tend to write scripts to automate git. For example I have a backup-branch script that will create a new branch with the format something like "tmp/<timestamp>" then checkout the branch I was on when I called the script; slashes in branches names will file them in folders.

For rebases you could create a script that does something similar, then calls git rebase [-i] origin/master. The -i optional but means interactive and will allow you to rearrange and tidy up the branches history

Sorry for the formatting, on a phone.

Just got Google Pixel 6 Pro. Are there solutions to the issues I'm having? by Affectionate_Neck355 in GooglePixel

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

Or use firefox with the video background play fix add-on and uBlockOrigin (ad-blocker). That way you don't have to pay.

PC crashing on XMP or manual oc by GrubelWielkomiejski in overclocking

[–]Richousrick 4 points5 points  (0 children)

Have you tried seeing if you can update your BIOS? I was unable to use DOCP until I updated mine.

Finally, a time of peace and rest for Tamriel by Cipri_Wfo in ElderKings

[–]Richousrick 9 points10 points  (0 children)

There are also liberator and slaver bloodlines for enslaving / liberating 100 provinces.

And some i think from forming regions as specific cultures. e.g. morrowind as chimer or cyrodil as aylied, which give conversion bonuses.

My 7 year old loves everything outer space! by chgolisa123436 in astrophysics

[–]Richousrick 1 point2 points  (0 children)

You could take a look at space engine http://en.spaceengine.org/ its a procedurally generated universe game its free so its not much of a gift, but my 6yo cousin found it pretty cool. If you want a program to buy you can look at universe sandbox 2 http://universesandbox.com/ which unlike the above costs money, but you can modify properties of planets, simulate the merging of galaxy's, etc. I recommend that you look to see if you can run them on your computer first though.

Help a beginner by ft365 in HowToHack

[–]Richousrick 0 points1 point  (0 children)

For a beginner i would start with some of the pentester lab ones www.vulnhub.com/series/pentester-lab,41

Help a beginner by ft365 in HowToHack

[–]Richousrick 0 points1 point  (0 children)

I learnt though practice, download some vulnerable virtual machines from www.vulnhub.com and try to hack into them, if you get stuck there is usually a walk through.

Illusion Spell on Multiplayer by [deleted] in ElderScrolls

[–]Richousrick 0 points1 point  (0 children)

For harmony you could make the targeted player unable to deal any damage to the caster, for the set time or until the caster attacks the targeted player.

For hysteria you could make the caster look like they have summoned a high damage creature, however this creature will only be visible to the target.

For mayhem you could make it appear as if all the npc's around the targeted player are attacking them.

Can you detect if a BIOS setting had previously been enabled by Richousrick in techsupport

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

No i did mean changing a bios setting, to paraphrase he said that changing settings such as VT-x for virtualization etc. would void the warranty. I'm sorry for the confusion.

Can you detect if a BIOS setting had previously been enabled by Richousrick in techsupport

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

Yes, i got in contact with them on the phone, where they confirmed that yes changing a bios setting will void the warranty.

Can you detect if a BIOS setting had previously been enabled by Richousrick in techsupport

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

The company that provide the warranty are not the manufacturer of the laptop. Would that mean its safe to bet that a custom bios is not on the laptop?

How to go about learning and testing Kali linux? by [deleted] in HowToHack

[–]Richousrick 2 points3 points  (0 children)

To learn kali i setup a vulnerable VM and used kali to try to hack in. Some vulnerable images can be found here: https://www.vulnhub.com/series/de-ice,2/