Keeping "chat" windows on a lateral - awesome-wm

I use awesome for quite a while at home, but when setting it up at work I'm facing an issue. I need to keep an eye on 2 chat windows where I'm usually just watching people talk.
I created 2 "google-chrome --app=http://uol" windows, so they open nicely not using much space (ie, like an app).
Since I mostly work with a browser and/or a terminal, the behavior I think would be interesting would probably involve having a single tab with "chat windows on 20% of the screen" and "browser and/or terminal sharing the rest of the screen".
I tried to do something similar to that using tabs, but it doesn't work well (focus issues when switching tabs, and hard to use browser AND terminal (like when I'm following a tutorial on a site and typing on the terminal)).
Does anyone have a suggestion on how I can accomplish that or something similar?
Thanks!

Don't know if I fully understand your question. But, I guess you're looking for what makes the essence of awesome WM: tiling !
On the screenshot below, you see a 'term' tag defined with something like this:
awful.tag.add("term", {
layout = awful.layout.suit.tile.left,
screen = s,
selected = true,
gap = 5,
gap_single_client = true
})
inside the awful.screen.connect_for_each_screen command.
IMHO, you can perform what you want using this and rules for your windows to be in that tag.
I hope it will help.

Related

How to unfullscreen a window without notifying it?

I'm trying to enhance the gTile extension by allowing it to resize a fullscreen window to a tiled area of the screen. That's a pretty common thing to do when tiling and it's pretty handy since some windows will hide some chrome when in fullscreen mode. But I'm having the hardest time figuring out how to do that.
Searching the internet led me to this forum post which mentions EWMH and _NET_WM_FULLSCREEN. I've tried to find ways to access window manager hints but can't find anything bashing by head on Looking Glass or scanning through the docs. Is this kind of thing possible through a shell extension?
Meta.Window is likely what you are looking for:
https://gjs-docs.gnome.org/meta4~4_api/
Setting Window.decorated = false may be able to remove the title bar or perhaps getting the compositor object and changing it from there. However this will still keep the address and tab bars in chrome. You may need to find another method to signal chrome to hide those.
There is not really an easy way to do this, the thread you linked is in regards to VLC and modifying it's source code.

How to add features to the toolbar of any window ? (right click on toolbar)

I am a retired Linux user and I am now only working on Windows 10. There is a super simple feature that I used a lot on Linux "Stay on top".
I don't understand why, but it's never been a feature on Windows whereas it is super useful especially when you program.
I tried a bunch of software to do that but none are as convenient as right click on the top toolbar of Windows 10 and select "Stay on top".
Is there a way using a script or something else to do this on my own ? I think it should be easy but I'm lacking english keywords to find this.
https://i.imgur.com/iFw4iA1.png
This is the link to an image showing the menu where I want the option to be. (I can't directly post it here :'( )
Thank you for your help, I hope I've been clear enough.

I am using Xamarin.Forms for a cross platform project and I need to use Google drawables nine-patch images for my Google Sign in Button

The thing is I tried using https://baskren.github.io/Forms9Patch/ but I feel like I don't fully grasp it.
Don't get me wrong, the tool is great it does stretch the 9patch images. It's just that I can't get the buttons to look properly based of Google brand guidelines.
https://developers.google.com/identity/branding-guidelines
The way it should look
And this here are the drawables I am using :
https://developers.google.com/identity/images/signin-assets.zip.
Here are the results of different button tries and dimensions
This is the code that got me the closest to the button I want
<f9p:Button Text = "Sign in with xxhdpi"
TextColor="White"
FontSize="14"
FontFamily="sans-serif-medium"
WidthRequest="60"
>
<f9p:Button.BackgroundImage>
<f9p:Image Source="{local:ImageMultiResource TestingApp.Resources.Images.btn_google_signin_dark_normal_xxhdpi}"/>
</f9p:Button.BackgroundImage>
</f9p:Button>
I tried using a grid with image and button as well but it didn't work out.
It would be awesome if someone would point me in a proper direction.
I've actually done this before. Here is a general outline of what I did:
Put your multi-platform icon files into your .NetStandard project as Embedded Resources. This means that I found all of the various resolutions provided by Google (_xxhdpi, _xhdpi, _hdpi, _mdpi, etc) and then renamed them to the following:
icon#¾x.png
icon.png
icon#1½x.png
icon#2x.png
icon#3x.png
icon#4x.png
And then put them in to the Resources/Google folder in my project (FormsFirebase.Ui). So, for example, the EmbeddedResourceId for the first file, in the above list, is FormsFirebase.Ui.Resources.Google.icon#¾x.png.
As you will see in a moment, renaming these files, as shown above, will allow Forms9Patch.Button to pick the right image for the right screen resolution (so it will look great) - freeing you from having to manage this. Likewise, putting them in the .NetStandard project means they are available for all platforms - freeing you up from having to figure this out multiple times!
In your Forms9Patch.Button, refer to the above icon image in a resolution independent fashion. This can be done a couple of ways. One of the more verbose ways is:
var myButton = new Forms9Patch.Button
{
Text = "Sign in with xxhdpi",
TextColor=Color.White,
FontSize=14,
FontFamily="sans-serif",
WidthRequest=60,
IconImage = new Forms9Patch.Image
{
Source = Forms9Patch.ImageSource.FromMultiResource("FormsFirebase.Ui.Resources.Google.icon", GetType().Assembly),
Padding = 1,
},
Spacing = 4,
TintIcon = false,
BackgroundColor = Color.FromRGB(81,134,236)
};
A couple of things to Note:
First, I set TintIcon to false in order to not tint the icon to the same color as the TextColor. Also, I set IconImage, not BackgroundImage. This is to be sure the image is a peer to the text, rather than in a layer below it.
Also note that I am able to set the padding of the IconImage as well as the Forms9Patch.Button.Padding and the Forms9Patch.Button.Spacing (the distance between the IconImage and the Text or HtmlText, depending on if HasTightSpacing has been set to true).
Instead of using multiple .png files (for each screen resolution), if you have .svg version of your image available, you can use that instead. Much less work!
Another thing you might be interested in: Just as Forms9Patch handles images in a platform independent fashion (by putting them in a cross platform project as Embedded Resources), it can do the same thing with Fonts. This means you can put a font file (.ttf or .otf) into your cross platform project and use its EmbeddedResourceId as the value for FontFamily. And this behavior can be extended to Xamarin.Forms elements by use of the Forms9Patch.EmbeddedResourceFontEffect.
Now for a bit of proselytization (please forgive me if this does not apply to you): I see that you used XAML for your sample code. Notice I didn't in my response. If you are new to .Net and/or Xamarin.Forms, I would highly recommend not using XAML. Don't get me wrong, XAML is great - it's just not for beginners. Why? There's just too many things going on under the covers that, as a beginner, will trip you up and slow you down. Rather, I would recommend you write all of your UI in C# so you can learn to manage your properties and learn how binding really works. Once you have mastered making very efficient layouts with the best "context appropriate" use of binding, then you're ready for XAML. For me, the real test was being able to make very a complex cell layout in a large list in a ListView smoothly scroll on a low-end Android phone. After that experience, I was able to take advantage of all the benefits of developing in XAML (and there are many) without worrying about being shackled by my novice mistakes.

How to create an background activity in app inventor

I wanted to create an app in appinventor that would switch screen right/left depending on what side the phone is shaken while unlocked. But couldnt figure out:
a. how to make application run in background.
b. what property i am going for. Like what tells phone's screen to scroll left or right when finger slides across the screen. What method is called. I figured view class would have to do something with it. Having no java experience i couldn't make much sense out of sdk,refernce,resources etc.
Please help me out, i will give you credit for it.
Oh also i think i might have to include "activity starter" too.
It's an issue for app inventor
http://code.google.com/p/app-inventor-for-android/issues/detail?id=32
star it to show you are interested
The standard Application Inventor 2 website, as you surely know, is this one:
http://ai2.appinventor.mit.edu/
However, there is another one, which allows using background threads (services):
http://services.appinventor.mit.edu/
It has a feature not available on the standard (official) AI2 website, the Add Task functionality, which allows adding tasks that will keep running even after a screen have been closed.
However, since it is an unsupported version, whose last release is dated from almost 1 year ago, I did not spent time making experiments, but this migh meet what you need:
The website will turn down, but worked like a charm before.
The whole concept was based on a Master Thesis: https://dspace.mit.edu/bitstream/handle/1721.1/100626/932752939-MIT.pdf;sequence=1
The last message from the site was something like: Google change the concept of background service architecture which cause the 'taks' concept to obsolate and prevent to work in the future.

I don't want to display back and forward button in my browser. Is there any solution apart from popup trick?

customers does not want to allow user to use back or forward button. Just a clean page without commandbar and toolbar, same for FF an IE.
Disabling them is not an option as now.
You cannot change that kind of thing in a existing window -- the only way you can make those disappear is by opening a popup, specifying they should not appear in that popup when it's being opened.
Still, note that you should not try to disable those buttons nor have them disappear : your application should work fine with them, handle their actions -- after all, it's one of the few things users have understood in browsers...
And as a user, this is disturbing and annoying :
I don't like popup windows -- and I'm not the only one who doesn't
I don't like when a website tryies to take control over my browser
It will not always work anyway.
And, as a sidenote : even if the back/forward buttons are not displayed, users can still use Ctrl+left/right or some kind of equivalent !
I know this is not easy, but a part of your work as a web-developper is to explain your clients how Internet and web-applications work... not the same way as desktop applications !
If you can force your users into IE (can't believe I'm suggesting use of IE!) you can do this trick. Try running this from the command line
"C:\Program Files\Internet Explorer\iexplore.exe" -k
This will force IE into kiosk (or full screen mode), similar to pressing F11 when in a usual browser session.
PS. I agree with the other answers suggesting this should be discouraged but there are instances (such as when the end user really can't be trusted) that this is a good solution.
No, there's no other way.
However, this is extremely annoying behavior and should be greatly discouraged. This isn't a code issue to solve...this is behavior that shouldn't be implemented at all.
My opinion here, you have a client problem not a code problem. Whatever standard is the expectation, and the user has the expectation of having their back/forward buttons, break that and you break their experience.
Ever see a Windows application that removes the taskbar? That's the equivalent...
I don't think there is a reasonable way to disable the behavior. You may get rid of the buttons in various ways, but the behavior is still there (through keyboard commands, popup menus and so on).
The only reasonable way is to make your web application follow web semantics, and make the client realize this.
many web based ERP (for example) does not tolerate people using navigation buttons. BUT these web applications handle the fact people use these buttons and do not crash. That's what you should do. If each time people use the back button, they get an error message, they will quickly stop using it.
The solution that used to work in IE was adding a startup script with one line:
location.forward();

Resources