From com-xmonad at gladbachcity.de Fri Jun 12 12:59:32 2020 From: com-xmonad at gladbachcity.de (Christian Heinrich) Date: Fri, 12 Jun 2020 14:59:32 +0200 Subject: [xmonad] XMonad.Actions.Search: Issue with escaped URL Message-ID: <068b26140671f165bad95519765e1ffccb3781cd.camel@gladbachcity.de> Hi everyone, I've started to use XMonad.Actions.Search and I'm trying to define my own SearchEngine as follows: > searchFunc :: String -> String > searchFunc s = "https://de.pons.com/übersetzung/französisch-deutsch/" ++ (escape s) > pons = searchEngineF "pons" searchFunc The german umlauts ü and ö are actually part of the URL. According to the documentation, searchEngineF should not handle any escaping (unlike searchEngine), but the URL that is opened for "a" is https://de.pons.com/%C3%83%C2%BCbersetzung/franz%C3%83%C2%B6sisch-deutsch/a I can't find what I'm doing wrong even when looking at the source. Could anyone point out to me how to open that URL without escaping anything? I'm just surprised that the base-URL is escaped as well, and not just the argument. I'm pretty new to Haskell and would be grateful for any hint. Thanks! Christian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From allbery.b at gmail.com Fri Jun 12 14:24:54 2020 From: allbery.b at gmail.com (Brandon Allbery) Date: Fri, 12 Jun 2020 10:24:54 -0400 Subject: [xmonad] XMonad.Actions.Search: Issue with escaped URL In-Reply-To: <068b26140671f165bad95519765e1ffccb3781cd.camel@gladbachcity.de> References: <068b26140671f165bad95519765e1ffccb3781cd.camel@gladbachcity.de> Message-ID: Strictly speaking that's an HTTP protocol violation, so it may be being enforced somewhere in the network-uri package or an HTTP package over it but under xmonad. (The common usage of ~ is also a violation, which leads to %7E escapes.) On 6/12/20, Christian Heinrich wrote: > Hi everyone, > > I've started to use XMonad.Actions.Search and I'm trying to define my own > SearchEngine as follows: > >> searchFunc :: String -> String >> searchFunc s = "https://de.pons.com/übersetzung/französisch-deutsch/" ++ >> (escape s) >> pons = searchEngineF "pons" searchFunc > > The german umlauts ü and ö are actually part of the URL. According to the > documentation, > searchEngineF should not handle any escaping (unlike searchEngine), but the > URL that is opened for "a" is > > https://de.pons.com/%C3%83%C2%BCbersetzung/franz%C3%83%C2%B6sisch-deutsch/a > > I can't find what I'm doing wrong even when looking at the source. > > Could anyone point out to me how to open that URL without escaping anything? > I'm just surprised that > the base-URL is escaped as well, and not just the argument. I'm pretty new > to Haskell and would be > grateful for any hint. > > Thanks! > > Christian > -- brandon s allbery kf8nh allbery.b at gmail.com From platon7pronko at gmail.com Fri Jun 12 17:17:22 2020 From: platon7pronko at gmail.com (Platon Pronko) Date: Fri, 12 Jun 2020 20:17:22 +0300 Subject: [xmonad] XMonad.Actions.Search: Issue with escaped URL In-Reply-To: <068b26140671f165bad95519765e1ffccb3781cd.camel@gladbachcity.de> References: <068b26140671f165bad95519765e1ffccb3781cd.camel@gladbachcity.de> Message-ID: <43765aa9-1d47-b4fd-b412-e2fabfdf5f01@gmail.com> Hi! The issue is that search/promptSearch use safeSpawn internally, and safeSpawn does not deal with non-ASCII characters correctly (see https://mail.haskell.org/pipermail/xmonad/2020-April/015370.html and https://mail.haskell.org/pipermail/xmonad/2020-April/015371.html). You can work around that, but since the call stack is slightly deep you will need quite a lot of code. Here's the snippet I that I tested on my machine, seems to work correctly: safeSpawnUnicode :: MonadIO m => FilePath -> [String] -> m () safeSpawnUnicode prog args = io $ void $ forkProcess $ do uninstallSignalHandlers _ <- createSession executeFile prog True args Nothing ponsSearchEngine = searchEngineF "pons" (\s -> "https://de.pons.com/übersetzung/französisch-deutsch/" ++ (escape s)) -- copied from XMonad.Actions.Search because it does not exort Search constructor data SearchCopy = SearchCopy Name instance XPrompt SearchCopy where showXPrompt (SearchCopy name) = "SearchCopy [" ++ name ++ "]: " nextCompletion _ = getNextCompletion commandToComplete _ c = c promptSearchUnicode :: XPConfig -> SearchEngine -> X () promptSearchUnicode config (SearchEngine name site) = mkXPrompt (SearchCopy name) config (historyCompletionP ("SearchCopy [" `isPrefixOf`)) (\query -> safeSpawnUnicode "firefox" [site query]) showSearchPrompt = promptSearchUnicode myXPConfig ponsSearchEngine Best regards, Platon Pronko On 2020-06-12 15:59, Christian Heinrich wrote: > Hi everyone, > > I've started to use XMonad.Actions.Search and I'm trying to define my own SearchEngine as follows: > >> searchFunc :: String -> String >> searchFunc s = "https://de.pons.com/übersetzung/französisch-deutsch/" ++ (escape s) >> pons = searchEngineF "pons" searchFunc > > The german umlauts ü and ö are actually part of the URL. According to the documentation, > searchEngineF should not handle any escaping (unlike searchEngine), but the URL that is opened for "a" is > > https://de.pons.com/%C3%83%C2%BCbersetzung/franz%C3%83%C2%B6sisch-deutsch/a > > I can't find what I'm doing wrong even when looking at the source. > > Could anyone point out to me how to open that URL without escaping anything? I'm just surprised that > the base-URL is escaped as well, and not just the argument. I'm pretty new to Haskell and would be > grateful for any hint. > > Thanks! > > Christian > > > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad > From oneself at gmail.com Thu Jun 25 10:05:59 2020 From: oneself at gmail.com (Eyal Erez) Date: Thu, 25 Jun 2020 13:05:59 +0300 Subject: [xmonad] Opera Browser Window Borders Missing Message-ID: Hi, I have my active and inactive window borders set to orange and grey respectively. This works well for all windows. However, I've recently installed the Opera browser, and for some reason, the borders are not coming up at all. They seem transparent -- meaning, there's a gap between the Opera window and other windows, the edge of the screen, and xmobar on all sides. I seem to remember that this happened for Chrome as well, until I set "Use system title bar and borders" to on in the settings. I haven't been able to find something similar for Opera. Is there anyway to fix this? Thank you -- There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypt17 at gmail.com Sat Jun 27 01:52:18 2020 From: crypt17 at gmail.com (joe skinner) Date: Sat, 27 Jun 2020 13:52:18 +1200 Subject: [xmonad] incorrect focus after closing a window Message-ID: I currently use the following to get windows inserted in the order that I want and it works well. , manageHook=insertPosition Below Newer <+> manageHook def <+> manageDocks My issue is that when I close a window I always get the wrong window focused as it does not take into account the order in which it was created. Is there any way that this can be overcome? Thanks Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: